aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/MicrosoftExtensions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/MicrosoftExtensions.cpp')
-rw-r--r--test/Parser/MicrosoftExtensions.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/Parser/MicrosoftExtensions.cpp b/test/Parser/MicrosoftExtensions.cpp
index 32ed375889..933231d5f7 100644
--- a/test/Parser/MicrosoftExtensions.cpp
+++ b/test/Parser/MicrosoftExtensions.cpp
@@ -164,3 +164,36 @@ __interface MicrosoftInterface {
};
__int64 x7 = __int64(0);
+
+
+
+
+class IF_EXISTS {
+private:
+ typedef int Type;
+};
+
+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++;
+ }
+
+}