diff options
Diffstat (limited to 'clang/test/Parser/MicrosoftExtensions.cpp')
-rw-r--r-- | clang/test/Parser/MicrosoftExtensions.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/clang/test/Parser/MicrosoftExtensions.cpp b/clang/test/Parser/MicrosoftExtensions.cpp index adf93b62d1a..3a72ea0234c 100644 --- a/clang/test/Parser/MicrosoftExtensions.cpp +++ b/clang/test/Parser/MicrosoftExtensions.cpp @@ -168,7 +168,7 @@ __interface MicrosoftInterface { __int64 x7 = __int64(0); - +namespace If_exists_test { class IF_EXISTS { private: @@ -210,6 +210,31 @@ __if_not_exists(IF_EXISTS::Type_not) { int var244; } +class IF_EXISTS_CLASS_TEST { + __if_exists(IF_EXISTS::Type) { + // __if_exists, __if_not_exists can nest + __if_not_exists(IF_EXISTS::Type_not) { + int var123; + } + 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; + } +}; + +} + + int __identifier(generic) = 3; class inline_definition_pure_spec { |