forked from include-what-you-use/include-what-you-use
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix detection of substituted tpl param in alias
It turns out that the presence of `SubstTemplateTypeParmType` inside an alias type sugar chain doesn't necessarily mean that it is a user-provided template parameter. It may occur e. g. when an alias template is used inside the `typedef` declaration, and its template parameter is specified inside that declaration. The regression had been introduced in 2d26dd1 and found on MS STL `vector` implementation when IWYU started to require `_Simple_types` type info for such a code: std::vector v{1, 2, 3}; (void)v.begin(); due to the returned `iterator` type alias.
- Loading branch information
1 parent
3977b59
commit 827a695
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//===--- typedef_chain_no_follow-d4.h - test input file for iwyu ----------===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is distributed under the University of Illinois Open Source | ||
// License. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "tests/cxx/typedef_chain_class.h" | ||
|
||
template <typename T> | ||
using IdentityAlias = T; | ||
|
||
using ProvidingWithAliasTpl = IdentityAlias<TypedefChainClass>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters