diff options
Diffstat (limited to 'test/Parser')
-rw-r--r-- | test/Parser/MicrosoftExtensions.c | 2 | ||||
-rw-r--r-- | test/Parser/cxx-decl.cpp | 4 | ||||
-rw-r--r-- | test/Parser/cxx-template-argument.cpp | 2 | ||||
-rw-r--r-- | test/Parser/knr_parameter_attributes.c | 11 |
4 files changed, 17 insertions, 2 deletions
diff --git a/test/Parser/MicrosoftExtensions.c b/test/Parser/MicrosoftExtensions.c index 082929f..0b2733e 100644 --- a/test/Parser/MicrosoftExtensions.c +++ b/test/Parser/MicrosoftExtensions.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions -x objective-c++ %s +// RUN: %clang_cc1 -triple i386-mingw32 -fsyntax-only -verify -fms-extensions -x objective-c++ %s __stdcall int func0(); int __stdcall func(); typedef int (__cdecl *tptr)(); diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp index f37604c..c8f2c0b 100644 --- a/test/Parser/cxx-decl.cpp +++ b/test/Parser/cxx-decl.cpp @@ -58,3 +58,7 @@ struct test4 { int y; int z // expected-error {{expected ';' at end of declaration list}} }; + +// PR5825 +struct test5 {}; +::new(static_cast<void*>(0)) test5; // expected-error {{expected unqualified-id}} diff --git a/test/Parser/cxx-template-argument.cpp b/test/Parser/cxx-template-argument.cpp index 80389a0..532b4c9 100644 --- a/test/Parser/cxx-template-argument.cpp +++ b/test/Parser/cxx-template-argument.cpp @@ -5,5 +5,5 @@ template<typename T> struct A {}; // Check for template argument lists followed by junk // FIXME: The diagnostics here aren't great... A<int+> int x; // expected-error {{expected '>'}} expected-error {{expected unqualified-id}} -A<int x; // expected-error {{expected '>'}} expected-error {{C++ requires a type specifier for all declarations}} +A<int x; // expected-error {{expected '>'}} diff --git a/test/Parser/knr_parameter_attributes.c b/test/Parser/knr_parameter_attributes.c new file mode 100644 index 0000000..fb975cb --- /dev/null +++ b/test/Parser/knr_parameter_attributes.c @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -fsyntax-only -W -Wall -Werror -verify %s + +int f(int i __attribute__((__unused__))) +{ + return 0; +} +int g(i) + int i __attribute__((__unused__)); +{ + return 0; +} |