================
@@ -19061,6 +19061,15 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc,
FunctionDecl *Func,
}
}
});
+ } else if (NeedDefinition && getLangOpts().IncrementalExtensions &&
----------------
vgvassilev wrote:
> Hi @vgvassilev, you are right. Modifying `Sema` is the wrong layer. I
> considered resetting the `InvalidDecl` flags inside
> `IncrementalParser::CleanUpPTU`. However, this still feels like a workaround,
> as it leaves orphaned template instantiations lingering in the AST. The
> proper fix seems to require a full transactional AST rollback?
Yes, exactly, we should probably do something similar to the DeclUnloader of
cling.
https://github.com/llvm/llvm-project/pull/192588
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits