diff options
Diffstat (limited to 'clang/test/Parser/MicrosoftExtensions.cpp')
-rw-r--r-- | clang/test/Parser/MicrosoftExtensions.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/clang/test/Parser/MicrosoftExtensions.cpp b/clang/test/Parser/MicrosoftExtensions.cpp index 32ed375889a..933231d5f70 100644 --- a/clang/test/Parser/MicrosoftExtensions.cpp +++ b/clang/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++; + } + +} |