From bc805aef33da0f642c2e8cb6b33491a4038155b5 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 16 Dec 2016 16:09:06 +0000 Subject: [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 --- clang-tools-extra/include-fixer/IncludeFixer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang-tools-extra/include-fixer') 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 MatchedSymbols = -- cgit v1.2.1