[PATCH] D82657: [AST][RecoveryAST] Preserve the type by default for recovery expression.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 21 07:24:28 PDT 2020


hokein added inline comments.


================
Comment at: clang/test/SemaCXX/abstract.cpp:282
 
-  void foo( C& c ) {}
+  void foo( C& c ) {} // expected-note {{candidate function not viable: expects an l-value for 1st argument}}
 
----------------
sammccall wrote:
> the new diagnostics are correct (nice!) but this is just a bug in the test:
> see https://bugs.llvm.org/show_bug.cgi?id=12658 vs https://github.com/llvm/llvm-project/commit/ea03214a5e3413cf95e388f28e4d9b9eeb30210a
> 
> To keep the test simple, I'd consider changing C& to const C& here instead.
I'd prefer to keep these as these are secondary-diagnostic improvements (so that we will not regress them in the future).  

I fixed these tests, and created two in `recovery-ast-type.cpp`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82657



More information about the cfe-commits mailing list