summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/include-fixer/IncludeFixer.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-12-16 16:09:06 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-12-16 16:09:06 +0000
commitbc805aef33da0f642c2e8cb6b33491a4038155b5 (patch)
treedbbdb6d3dc2b12a931b5c7a2fdddee13e14c287a /clang-tools-extra/include-fixer/IncludeFixer.cpp
parent85347dde27db69941622f0302cad5bda66d7a208 (diff)
downloadbcm5719-llvm-bc805aef33da0f642c2e8cb6b33491a4038155b5.tar.gz
bcm5719-llvm-bc805aef33da0f642c2e8cb6b33491a4038155b5.zip
[include-fixer] Desugar incomplete types.
This will look through typedefs so include-fixer will look up the target of the typedef instead of the typedef itself (which is already in scope). llvm-svn: 289952
Diffstat (limited to 'clang-tools-extra/include-fixer/IncludeFixer.cpp')
-rw-r--r--clang-tools-extra/include-fixer/IncludeFixer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/include-fixer/IncludeFixer.cpp b/clang-tools-extra/include-fixer/IncludeFixer.cpp
index 20683e0c1f9..ad3f8e9d37b 100644
--- a/clang-tools-extra/include-fixer/IncludeFixer.cpp
+++ b/clang-tools-extra/include-fixer/IncludeFixer.cpp
@@ -153,8 +153,8 @@ bool IncludeFixerSemaSource::MaybeDiagnoseMissingCompleteType(
return false;
clang::ASTContext &context = CI->getASTContext();
- std::string QueryString =
- T.getUnqualifiedType().getAsString(context.getPrintingPolicy());
+ std::string QueryString = QualType(T->getUnqualifiedDesugaredType(), 0)
+ .getAsString(context.getPrintingPolicy());
DEBUG(llvm::dbgs() << "Query missing complete type '" << QueryString << "'");
// Pass an empty range here since we don't add qualifier in this case.
std::vector<find_all_symbols::SymbolInfo> MatchedSymbols =
OpenPOWER on IntegriCloud