MSVC does not create a new scope for the body of an __if_exists compound
statement. Clang already gets this right today, but it was untested.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211650
91177308-0d34-0410-b5e6-
96231b3b80d8
}
}
+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;
}