riccibruno added a comment.

It seems that these two options are not exactly the same right ? The 
`ContainsError` bit is useful to quickly answer "Does this expression contains 
an invalid sub-expression" without doing the search, while adding an 
`ErrorExpr` node is useful to note that //this// sub-expression is invalid (and 
as Aaron says the hypothetical `ErrorExpr` node can carry more info about the 
error).



================
Comment at: clang/include/clang/AST/Expr.h:1521
+      : Expr(CharacterLiteralClass, type, VK_RValue, OK_Ordinary, false, false,
+             false, false, false),
+        Value(value), Loc(l) {
----------------
`/*ContainsError=*/false` here and elsewhere ?


================
Comment at: clang/include/clang/AST/Expr.h:3602
+                 ExprValueKind VK, ExprObjectKind OK, SourceLocation opLoc,
+                 FPOptions FPFeatures, bool dead2)
+      : Expr(CompoundAssignOperatorClass, ResTy, VK, OK,
----------------
What is this `dead2` ?


================
Comment at: clang/lib/AST/ExprObjC.cpp:29
     : Expr(ObjCArrayLiteralClass, T, VK_RValue, OK_Ordinary, false, false,
-           false, false),
+           false, false, /*ContainsErros*/ false),
       NumElements(Elements.size()), Range(SR), ArrayWithObjectsMethod(Method) {
----------------
s/ContainsErros/ContainsErrors


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65591



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to