diff options
Diffstat (limited to 'test/SemaCXX/gnu-flags.cpp')
-rw-r--r-- | test/SemaCXX/gnu-flags.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/test/SemaCXX/gnu-flags.cpp b/test/SemaCXX/gnu-flags.cpp index 05770c5..3cd18ca 100644 --- a/test/SemaCXX/gnu-flags.cpp +++ b/test/SemaCXX/gnu-flags.cpp @@ -1,13 +1,37 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -DNONE -Wno-gnu +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s -DNONE -Wno-gnu +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -DNONE -Wno-gnu + // RUN: %clang_cc1 -fsyntax-only -verify %s -DALL -Wgnu +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s -DALL -Wgnu +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -DALL -Wgnu + // RUN: %clang_cc1 -fsyntax-only -verify %s -DALL -Wno-gnu \ // RUN: -Wgnu-anonymous-struct -Wredeclared-class-member \ // RUN: -Wgnu-flexible-array-union-member -Wgnu-folding-constant \ // RUN: -Wgnu-empty-struct +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s -DALL -Wno-gnu \ +// RUN: -Wgnu-anonymous-struct -Wredeclared-class-member \ +// RUN: -Wgnu-flexible-array-union-member -Wgnu-folding-constant \ +// RUN: -Wgnu-empty-struct +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -DALL -Wno-gnu \ +// RUN: -Wgnu-anonymous-struct -Wredeclared-class-member \ +// RUN: -Wgnu-flexible-array-union-member -Wgnu-folding-constant \ +// RUN: -Wgnu-empty-struct + // RUN: %clang_cc1 -fsyntax-only -verify %s -DNONE -Wgnu \ // RUN: -Wno-gnu-anonymous-struct -Wno-redeclared-class-member \ // RUN: -Wno-gnu-flexible-array-union-member -Wno-gnu-folding-constant \ // RUN: -Wno-gnu-empty-struct +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s -DNONE -Wgnu \ +// RUN: -Wno-gnu-anonymous-struct -Wno-redeclared-class-member \ +// RUN: -Wno-gnu-flexible-array-union-member -Wno-gnu-folding-constant \ +// RUN: -Wno-gnu-empty-struct +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -DNONE -Wgnu \ +// RUN: -Wno-gnu-anonymous-struct -Wno-redeclared-class-member \ +// RUN: -Wno-gnu-flexible-array-union-member -Wno-gnu-folding-constant \ +// RUN: -Wno-gnu-empty-struct + // Additional disabled tests: // %clang_cc1 -fsyntax-only -verify %s -DANONYMOUSSTRUCT -Wno-gnu -Wgnu-anonymous-struct // %clang_cc1 -fsyntax-only -verify %s -DREDECLAREDCLASSMEMBER -Wno-gnu -Wredeclared-class-member @@ -59,7 +83,7 @@ struct faum { }; -#if ALL || FOLDINGCONSTANT +#if (ALL || FOLDINGCONSTANT) && (__cplusplus <= 199711L) // C++03 or earlier modes // expected-warning@+4 {{in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension}} #endif |