File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1251,6 +1251,17 @@ void Sema::ActOnEndOfTranslationUnit() {
12511251 if (LateTemplateParserCleanup)
12521252 LateTemplateParserCleanup (OpaqueParser);
12531253
1254+ if (LangOpts.DelayedTemplateParsing ) {
1255+ // Try to parse any templates that have been delayed and never
1256+ // instantiated so that their bodies are available for static
1257+ // analysis tools to analyze.
1258+ Diags.setSuppressAllDiagnostics (true );
1259+ for (auto &[Decl, Template] : LateParsedTemplateMap)
1260+ if (Decl->isLateTemplateParsed ())
1261+ LateTemplateParser (OpaqueParser, *Template);
1262+ Diags.setSuppressAllDiagnostics (false );
1263+ }
1264+
12541265 CheckDelayedMemberExceptionSpecs ();
12551266 } else {
12561267 // If we are building a TU prefix for serialization, it is safe to transfer
You can’t perform that action at this time.
0 commit comments