[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 19 05:06:10 PST 2024
================
@@ -32,6 +32,21 @@ void test_invalid_call(int s) {
int var = some_func(undef1);
}
+int some_func2(int a, int b);
+void test_invalid_call_2() {
+ // CHECK: `-RecoveryExpr {{.*}} 'int' contains-errors
+ // CHECK-NEXT: |-UnresolvedLookupExpr {{.*}} '<overloaded function type>' lvalue (ADL) = 'some_func2'
+ // CHECK-NEXT: `-IntegerLiteral {{.*}} 'int' 1
+ some_func2(1, );
+}
+
+void test_invalid_call_3() {
+ // CHECK: `-RecoveryExpr {{.*}} 'int' contains-errors
+ // CHECK-NEXT: |-UnresolvedLookupExpr {{.*}} '<overloaded function type>' lvalue (ADL) = 'some_func2'
+ // CHECK-NEXT: `-IntegerLiteral {{.*}} 'int' 1
+ some_func2(1);
----------------
hokein wrote:
I think this case is already covered below, we can remove it.
https://github.com/llvm/llvm-project/pull/114684
More information about the cfe-commits
mailing list