[PATCH] D125944: Template instantiation error recovery

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 28 22:10:57 PDT 2022


v.g.vassilev added a reviewer: rsmith.
v.g.vassilev added a subscriber: rsmith.
v.g.vassilev added a comment.

@Purva-Chaudhari, can you rebase this patch, seems that it is not buildable.

@rsmith, we need to do something similar in cling to handle pending template instantiations, I guess the question is if we can avoid instantiating the templates we don't need and still survive.



================
Comment at: clang/lib/Interpreter/IncrementalParser.cpp:180
   DiagnosticsEngine &Diags = getCI()->getDiagnostics();
+  Sema::PerformPendingInstantiationsRAII PerformPendingInstantiations(S);
   if (Diags.hasErrorOccurred()) {
----------------
I suspect we should create this object earlier in this function. Can you export the diff with more context like suggested here https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125944/new/

https://reviews.llvm.org/D125944



More information about the cfe-commits mailing list