[PATCH] clang-cl: Don't warn for unused private fields when encountering a late parsed template member
Hans Wennborg
hans at chromium.org
Fri Oct 10 12:05:33 PDT 2014
================
Comment at: lib/Sema/Sema.cpp:548
@@ -547,2 +547,3 @@
else if (const FunctionTemplateDecl *F = dyn_cast<FunctionTemplateDecl>(*I))
- Complete = F->getTemplatedDecl()->isDefined();
+ Complete = !F->getTemplatedDecl()->isLateTemplateParsed() &&
+ F->getTemplatedDecl()->isDefined();
----------------
Is the issue that the template has been defined, but we haven't parsed and semantically analysed it because it's late-parsed?
This gets called from ActOnEndOfTranslationUnit, so shouldn't the delayed template parsing already have taken place?
http://reviews.llvm.org/D5718
More information about the cfe-commits
mailing list