summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Parser')
-rw-r--r--clang/test/Parser/attributes.c46
-rw-r--r--clang/test/Parser/declarators.c2
-rw-r--r--clang/test/Parser/recovery.c2
3 files changed, 23 insertions, 27 deletions
diff --git a/clang/test/Parser/attributes.c b/clang/test/Parser/attributes.c
index 37fa0ca1d36..dc2bb02670c 100644
--- a/clang/test/Parser/attributes.c
+++ b/clang/test/Parser/attributes.c
@@ -1,57 +1,53 @@
// RUN: clang-cc -fsyntax-only -verify %s -pedantic -std=c99
-int __attribute__(()) x; // expected-warning {{extension used}}
+int __attribute__(()) x;
-// Hide __attribute__ behind a macro, to silence extension warnings about
-// "__attribute__ being an extension".
-#define attribute __attribute__
-
-__inline void attribute((__always_inline__, __nodebug__))
+__inline void __attribute__((__always_inline__, __nodebug__))
foo(void) {
}
-attribute(()) y; // expected-warning {{defaults to 'int'}}
+__attribute__(()) y; // expected-warning {{defaults to 'int'}}
// PR2796
-int (attribute(()) *z)(long y);
+int (__attribute__(()) *z)(long y);
-void f1(attribute(()) int x);
+void f1(__attribute__(()) int x);
-int f2(y, attribute(()) x); // expected-error {{expected identifier}}
+int f2(y, __attribute__(()) x); // expected-error {{expected identifier}}
// This is parsed as a normal argument list (with two args that are implicit
-// int) because the attribute is a declspec.
-void f3(attribute(()) x, // expected-warning {{defaults to 'int'}}
+// int) because the __attribute__ is a declspec.
+void f3(__attribute__(()) x, // expected-warning {{defaults to 'int'}}
y); // expected-warning {{defaults to 'int'}}
-void f4(attribute(())); // expected-error {{expected parameter declarator}}
+void f4(__attribute__(())); // expected-error {{expected parameter declarator}}
-// This is ok, the attribute applies to the pointer.
-int baz(int (attribute(()) *x)(long y));
+// This is ok, the __attribute__ applies to the pointer.
+int baz(int (__attribute__(()) *x)(long y));
-void g1(void (*f1)(attribute(()) int x));
-void g2(int (*f2)(y, attribute(()) x)); // expected-error {{expected identifier}}
-void g3(void (*f3)(attribute(()) x, int y)); // expected-warning {{defaults to 'int'}}
-void g4(void (*f4)(attribute(()))); // expected-error {{expected parameter declarator}}
+void g1(void (*f1)(__attribute__(()) int x));
+void g2(int (*f2)(y, __attribute__(()) x)); // expected-error {{expected identifier}}
+void g3(void (*f3)(__attribute__(()) x, int y)); // expected-warning {{defaults to 'int'}}
+void g4(void (*f4)(__attribute__(()))); // expected-error {{expected parameter declarator}}
-void (*h1)(void (*f1)(attribute(()) int x));
-void (*h2)(int (*f2)(y, attribute(()) x)); // expected-error {{expected identifier}}
+void (*h1)(void (*f1)(__attribute__(()) int x));
+void (*h2)(int (*f2)(y, __attribute__(()) x)); // expected-error {{expected identifier}}
-void (*h3)(void (*f3)(attribute(()) x)); // expected-warning {{defaults to 'int'}}
-void (*h4)(void (*f4)(attribute(()))); // expected-error {{expected parameter declarator}}
+void (*h3)(void (*f3)(__attribute__(()) x)); // expected-warning {{defaults to 'int'}}
+void (*h4)(void (*f4)(__attribute__(()))); // expected-error {{expected parameter declarator}}
// rdar://6131260
int foo42(void) {
- int x, attribute((unused)) y, z;
+ int x, __attribute__((unused)) y, z;
return 0;
}
// rdar://6096491
-void attribute((noreturn)) d0(void), attribute((noreturn)) d1(void);
+void __attribute__((noreturn)) d0(void), __attribute__((noreturn)) d1(void);
diff --git a/clang/test/Parser/declarators.c b/clang/test/Parser/declarators.c
index a4b2aad09d8..26e8027d107 100644
--- a/clang/test/Parser/declarators.c
+++ b/clang/test/Parser/declarators.c
@@ -63,4 +63,4 @@ struct xyz test8() { return a; } // a should be be marked invalid, no diag.
static f; // expected-warning {{type specifier missing, defaults to 'int'}}
static g = 4; // expected-warning {{type specifier missing, defaults to 'int'}}
static h // expected-warning {{type specifier missing, defaults to 'int'}}
- __asm__("foo"); // expected-warning {{extension used}}
+ __asm__("foo");
diff --git a/clang/test/Parser/recovery.c b/clang/test/Parser/recovery.c
index 3f2d48d0f70..89eac564a32 100644
--- a/clang/test/Parser/recovery.c
+++ b/clang/test/Parser/recovery.c
@@ -11,7 +11,7 @@ float test2241[2] = {
static char *f (char * (*g) (char **, int), char **p, ...) {
char *s;
va_list v; // expected-error {{identifier}}
- s = g (p, __builtin_va_arg(v, int)); // expected-error {{identifier}} expected-warning {{extension}}
+ s = g (p, __builtin_va_arg(v, int)); // expected-error {{identifier}}
}
OpenPOWER on IntegriCloud