summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/blocks-1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/blocks-1.cpp')
-rw-r--r--test/SemaCXX/blocks-1.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/test/SemaCXX/blocks-1.cpp b/test/SemaCXX/blocks-1.cpp
index 02e9cac..e11fd92 100644
--- a/test/SemaCXX/blocks-1.cpp
+++ b/test/SemaCXX/blocks-1.cpp
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks -std=c++11
-// expected-no-diagnostics
+// RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks -std=c++1y
extern "C" int exit(int);
@@ -57,3 +56,18 @@ namespace rdar11055105 {
foo(a);
};
}
+
+namespace LocalDecls {
+ void f() {
+ (void) ^{
+ extern int a; // expected-note {{previous}}
+ extern int b(); // expected-note {{previous}}
+ };
+ }
+ void g() {
+ (void) ^{
+ extern float a; // expected-error {{different type}}
+ extern float b(); // expected-error {{cannot be overloaded}}
+ };
+ }
+}
OpenPOWER on IntegriCloud