diff options
Diffstat (limited to 'test/Parser/pragma-attribute-declspec.cpp')
-rw-r--r-- | test/Parser/pragma-attribute-declspec.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Parser/pragma-attribute-declspec.cpp b/test/Parser/pragma-attribute-declspec.cpp new file mode 100644 index 0000000000000..28785ba90063c --- /dev/null +++ b/test/Parser/pragma-attribute-declspec.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple i386-pc-win32 -std=c++11 -verify -Wno-pragma-clang-attribute -fms-extensions -fms-compatibility %s + +#pragma clang attribute push(__declspec(dllexport), apply_to = function) + +void function(); + +#pragma clang attribute pop + +#pragma clang attribute push(__declspec(dllexport, dllimport), apply_to = function) // expected-error {{more than one attribute specified in '#pragma clang attribute push'}} + +#pragma clang attribute push(__declspec(align), apply_to = variable) // expected-error {{attribute 'align' is not supported by '#pragma clang attribute'}} + +#pragma clang attribute push(__declspec(), apply_to = variable) // A noop |