[clang] [Clang][Sema] Fix crash when rebuilding MemberExprs with invalid object expressions (PR #97455)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 3 09:41:40 PDT 2024


================
@@ -2896,6 +2896,9 @@ class TreeTransform {
     SS.Adopt(QualifierLoc);
 
     Base = BaseResult.get();
+    if (Base->containsErrors())
+      return ExprError();
----------------
mizvekov wrote:

I am still traveling back from St Louis, so I can't double check this:

Why is this point the farthest we can go if Base contains errors?

It seems we can build a reference expression over it from the cases above, but why not below?

https://github.com/llvm/llvm-project/pull/97455


More information about the cfe-commits mailing list