summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/test/Parser/ms-if-exists.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Parser/ms-if-exists.cpp b/clang/test/Parser/ms-if-exists.cpp
index f1cfbcfdfe4..2d4a957f127 100644
--- a/clang/test/Parser/ms-if-exists.cpp
+++ b/clang/test/Parser/ms-if-exists.cpp
@@ -25,6 +25,16 @@ void test_if_exists_stmts() {
}
}
+int if_exists_creates_no_scope() {
+ __if_exists(MayExist::Type) {
+ int x; // 'x' is declared in the parent scope.
+ }
+ __if_not_exists(MayExist::Type_not) {
+ x++;
+ }
+ return x;
+}
+
__if_exists(MayExist::Type) {
int var23;
}
OpenPOWER on IntegriCloud