r283778 - [Examples] Fix use of sema.LateParsedTemplateMap in clang/examples.
Justin Lebar via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 10 09:41:00 PDT 2016
Author: jlebar
Date: Mon Oct 10 11:41:00 2016
New Revision: 283778
URL: http://llvm.org/viewvc/llvm-project?rev=283778&view=rev
Log:
[Examples] Fix use of sema.LateParsedTemplateMap in clang/examples.
Modified:
cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.cpp
Modified: cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.cpp?rev=283778&r1=283777&r2=283778&view=diff
==============================================================================
--- cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.cpp (original)
+++ cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.cpp Mon Oct 10 11:41:00 2016
@@ -69,8 +69,9 @@ public:
v.TraverseDecl(context.getTranslationUnitDecl());
clang::Sema &sema = Instance.getSema();
for (const FunctionDecl *FD : v.LateParsedDecls) {
- clang::LateParsedTemplate* LPT = sema.LateParsedTemplateMap.lookup(FD);
- sema.LateTemplateParser(sema.OpaqueParser, *LPT);
+ clang::LateParsedTemplate &LPT =
+ *sema.LateParsedTemplateMap.find(FD)->second;
+ sema.LateTemplateParser(sema.OpaqueParser, LPT);
llvm::errs() << "late-parsed-decl: \"" << FD->getNameAsString() << "\"\n";
}
}
More information about the cfe-commits
mailing list