This fixes PR21235.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Sema/Sema.cpp | ||
---|---|---|
548 ↗ | (On Diff #14698) | 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? |
lib/Sema/Sema.cpp | ||
---|---|---|
548 ↗ | (On Diff #14698) | Yes the template is not defined by we haven't done semantic analysis (and parsing!) on it yet. It looks like by ActOnEndOfTranslationUnit the semantic analysis still wouldn't happen unless if we see a call to that function (or presumably other things such as its address being taken etc.) IOW if the test case includes an instantiation of the template member, the warning doesn't appear. |
lib/Sema/Sema.cpp | ||
---|---|---|
548 ↗ | (On Diff #14698) | Oh that makes sense. If we don't instantiate it, we don't parse it. This patch seems correct to me, but please add a comment about this check. |