diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Parser/extension.c | 11 | ||||
-rw-r--r-- | clang/test/SemaCXX/decl-expr-ambiguity.cpp | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/clang/test/Parser/extension.c b/clang/test/Parser/extension.c index 24f1ac5181a..519dc053c82 100644 --- a/clang/test/Parser/extension.c +++ b/clang/test/Parser/extension.c @@ -1,17 +1,20 @@ -// RUN: clang-cc %s -fsyntax-only +/* RUN: clang-cc %s -fsyntax-only -pedantic -verify -std=c89 + */ -// Top level extension marker. +/* Top level extension marker. */ __extension__ typedef struct { long long int quot; long long int rem; -}lldiv_t; +} lldiv_t; -// Compound expr __extension__ marker. +/* Decl/expr __extension__ marker. */ void bar() { __extension__ int i; int j; + __extension__ (j = 10LL); + __extension__ j = 10LL; /* expected-warning {{'long long' is an extension}} */ } diff --git a/clang/test/SemaCXX/decl-expr-ambiguity.cpp b/clang/test/SemaCXX/decl-expr-ambiguity.cpp index a9275dcd1fd..bff333464b9 100644 --- a/clang/test/SemaCXX/decl-expr-ambiguity.cpp +++ b/clang/test/SemaCXX/decl-expr-ambiguity.cpp @@ -9,7 +9,7 @@ void f() { T(a)->m = 7; int(a)++; // expected-error {{expression is not assignable}} __extension__ int(a)++; // expected-error {{expression is not assignable}} - typeof(int)(a,5)<<a; // expected-error {{function-style cast to a builtin type can only take one argument}} + __typeof(int)(a,5)<<a; // expected-error {{function-style cast to a builtin type can only take one argument}} void(a), ++a; // expected-warning {{expression result unused}} if (int(a)+1) {} for (int(a)+1;;) {} |