aboutsummaryrefslogtreecommitdiff
path: root/test/Parser
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-05-16 23:40:44 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-05-16 23:40:44 +0000
commitbc6c848f3e0ec2dc44f6e3d59ef85e884cc9b7be (patch)
tree8e77a4fa43b0fdcc4954cb51c62cb0d0768836c9 /test/Parser
parent3f7a5310d43ea58c07d06965b46718a8012b1f76 (diff)
Make the RAII extension warning silencing for __extension__ a bit
narrower, so it doesn't catch expresions that aren't sub-expressions of __extension__ operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser')
-rw-r--r--test/Parser/extension.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/Parser/extension.c b/test/Parser/extension.c
index 24f1ac5181..519dc053c8 100644
--- a/test/Parser/extension.c
+++ b/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}} */
}