summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2011-05-07 17:30:27 +0000
committerFrancois Pichet <pichet2000@gmail.com>2011-05-07 17:30:27 +0000
commita5b3fcbc024454c228b27e09a497f6ccfde1af98 (patch)
tree935672d4586a4ae2ff20da17efac78f6351487a0 /clang/test
parentaf32728a57e2092de84cad8c9479795a97a2b33c (diff)
downloadbcm5719-llvm-a5b3fcbc024454c228b27e09a497f6ccfde1af98.tar.gz
bcm5719-llvm-a5b3fcbc024454c228b27e09a497f6ccfde1af98.zip
Add support for _if_exists and __if_not_exists at namespace/global scope.
llvm-svn: 131050
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Parser/MicrosoftExtensions.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/clang/test/Parser/MicrosoftExtensions.cpp b/clang/test/Parser/MicrosoftExtensions.cpp
index 933231d5f70..292d3e1239d 100644
--- a/clang/test/Parser/MicrosoftExtensions.cpp
+++ b/clang/test/Parser/MicrosoftExtensions.cpp
@@ -174,26 +174,36 @@ private:
};
int __if_exists_test() {
-
int b=0;
-
-
__if_exists(IF_EXISTS::Type) {
b++;
b++;
}
-
__if_exists(IF_EXISTS::Type_not) {
this wont compile.
}
-
__if_not_exists(IF_EXISTS::Type) {
this wont compile.
}
-
__if_not_exists(IF_EXISTS::Type_not) {
b++;
b++;
}
+}
+
+
+__if_exists(IF_EXISTS::Type) {
+ int var23;
+}
+
+__if_exists(IF_EXISTS::Type_not) {
+ this wont compile.
+}
+
+__if_not_exists(IF_EXISTS::Type) {
+ this wont compile.
+}
+__if_not_exists(IF_EXISTS::Type_not) {
+ int var244;
}
OpenPOWER on IntegriCloud