[PATCH] D92298: [AST][RecoveryAST] Preserve type for member call expr if argments are not matched.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 9 04:56:42 PST 2020


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Some case errors on the allowRecovery variable name throughout.



================
Comment at: clang/include/clang/Sema/Sema.h:3730
+                                       SourceLocation RParenLoc,
+                                       bool allowRecovery = false);
   ExprResult
----------------
nit: AllowRecovery (case)


================
Comment at: clang/include/clang/Sema/Sema.h:5242
+                           bool IsExecConfig = false,
+                           bool allowRecovery = false);
   enum class AtomicArgumentOrder { API, AST };
----------------
(and here)


================
Comment at: clang/lib/Sema/SemaExpr.cpp:6312
+  ExprResult Call = BuildCallExpr(Scope, Fn, LParenLoc, ArgExprs, RParenLoc,
+                                  ExecConfig, false, true);
   if (Call.isInvalid())
----------------
/*IsExecConfig=*/false, /*AllowRecovery=*/true


================
Comment at: clang/lib/Sema/SemaOverload.cpp:14218
 
+  auto BuildRecoveryExpr = [&](QualType Type) {
+    if (!allowRecovery)
----------------
This would be a good place to add a comment
// We only try to build a recovery expr at this level if we can preserve the return type, otherwise we return ExprError() and let the caller recover.


================
Comment at: clang/test/AST/ast-dump-recovery.cpp:45
 
+class ForwardClass;
+ForwardClass createFwd();
----------------
Is this a leftover?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92298



More information about the cfe-commits mailing list