Author: Sam McCall
Date: 2020-03-26T18:43:29+01:00
New Revision: 47e7bdb10732e6f140adce39a1bc34e3ee2a6ea6

URL: 
https://github.com/llvm/llvm-project/commit/47e7bdb10732e6f140adce39a1bc34e3ee2a6ea6
DIFF: 
https://github.com/llvm/llvm-project/commit/47e7bdb10732e6f140adce39a1bc34e3ee2a6ea6.diff

LOG: Test that would have caught recovery-expr crashes in 0788acbccbec. NFC

Added: 
    clang/test/Sema/invalid-member.cpp

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/clang/test/Sema/invalid-member.cpp 
b/clang/test/Sema/invalid-member.cpp
new file mode 100644
index 000000000000..5475157e936e
--- /dev/null
+++ b/clang/test/Sema/invalid-member.cpp
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -verify -fsyntax-only %s
+void foo(); // expected-note {{requires 0 arguments}}
+class X {
+  decltype(foo(42)) invalid; // expected-error {{no matching function}}
+};
+// Should be able to evaluate sizeof without crashing.
+static_assert(sizeof(X) == 1, "No valid members");


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

Reply via email to