aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/decltype-crash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/decltype-crash.cpp')
-rw-r--r--test/SemaCXX/decltype-crash.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaCXX/decltype-crash.cpp b/test/SemaCXX/decltype-crash.cpp
new file mode 100644
index 000000000000..b56a7f602987
--- /dev/null
+++ b/test/SemaCXX/decltype-crash.cpp
@@ -0,0 +1,7 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+int& a();
+
+void f() {
+ decltype(a()) c; // expected-error {{no matching function for call to 'decltype'}}
+}