diff options
Diffstat (limited to 'test/SemaCXX')
66 files changed, 66 insertions, 0 deletions
diff --git a/test/SemaCXX/2008-01-11-BadWarning.cpp b/test/SemaCXX/2008-01-11-BadWarning.cpp index b84e7c1cf8..e27c0848ef 100644 --- a/test/SemaCXX/2008-01-11-BadWarning.cpp +++ b/test/SemaCXX/2008-01-11-BadWarning.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify -Wall %s +// expected-no-diagnostics // rdar://5683899 void** f(void **Buckets, unsigned NumBuckets) { return Buckets + NumBuckets; diff --git a/test/SemaCXX/MicrosoftCompatibilityNoExceptions.cpp b/test/SemaCXX/MicrosoftCompatibilityNoExceptions.cpp index d932b5dbbc..14e5160e09 100644 --- a/test/SemaCXX/MicrosoftCompatibilityNoExceptions.cpp +++ b/test/SemaCXX/MicrosoftCompatibilityNoExceptions.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -fsyntax-only -verify -fms-compatibility +// expected-no-diagnostics // PR13153 namespace std {} diff --git a/test/SemaCXX/PR10447.cpp b/test/SemaCXX/PR10447.cpp index 08644ada4a..5ba74aaba3 100644 --- a/test/SemaCXX/PR10447.cpp +++ b/test/SemaCXX/PR10447.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -verify %s +// expected-no-diagnostics // PR12223 namespace test1 { diff --git a/test/SemaCXX/PR5086-ambig-resolution-enum.cpp b/test/SemaCXX/PR5086-ambig-resolution-enum.cpp index b5aac5f09c..eeb73f6f56 100644 --- a/test/SemaCXX/PR5086-ambig-resolution-enum.cpp +++ b/test/SemaCXX/PR5086-ambig-resolution-enum.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 +// expected-no-diagnostics class C { public: diff --git a/test/SemaCXX/PR6562.cpp b/test/SemaCXX/PR6562.cpp index 854d9b058b..144fde68b1 100644 --- a/test/SemaCXX/PR6562.cpp +++ b/test/SemaCXX/PR6562.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics struct X { ~X(); }; template <typename T> diff --git a/test/SemaCXX/PR9884.cpp b/test/SemaCXX/PR9884.cpp index ab883c4062..bb8bd6a56b 100644 --- a/test/SemaCXX/PR9884.cpp +++ b/test/SemaCXX/PR9884.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics class Base { protected: Base(int val); diff --git a/test/SemaCXX/PR9902.cpp b/test/SemaCXX/PR9902.cpp index 80086e445c..a34f99c122 100644 --- a/test/SemaCXX/PR9902.cpp +++ b/test/SemaCXX/PR9902.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s +// expected-no-diagnostics template <class _Tp, class _Up, bool = false> struct __allocator_traits_rebind diff --git a/test/SemaCXX/PR9908.cpp b/test/SemaCXX/PR9908.cpp index fc090cc42f..a15b637a03 100644 --- a/test/SemaCXX/PR9908.cpp +++ b/test/SemaCXX/PR9908.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s +// expected-no-diagnostics template <class _Tp, class _Up> struct __allocator_traits_rebind diff --git a/test/SemaCXX/__try.cpp b/test/SemaCXX/__try.cpp index cb5d38a097..a0f503abe6 100644 --- a/test/SemaCXX/__try.cpp +++ b/test/SemaCXX/__try.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify -fborland-extensions -fcxx-exceptions %s +// expected-no-diagnostics // This test is from http://docwiki.embarcadero.com/RADStudio/en/Try diff --git a/test/SemaCXX/anonymous-union-cxx11.cpp b/test/SemaCXX/anonymous-union-cxx11.cpp index 8e682ebcda..9f987a9681 100644 --- a/test/SemaCXX/anonymous-union-cxx11.cpp +++ b/test/SemaCXX/anonymous-union-cxx11.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -pedantic %s +// expected-no-diagnostics namespace PR12866 { struct bar { diff --git a/test/SemaCXX/blocks-1.cpp b/test/SemaCXX/blocks-1.cpp index 1b1509482a..02e9cac62e 100644 --- a/test/SemaCXX/blocks-1.cpp +++ b/test/SemaCXX/blocks-1.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks -std=c++11 +// expected-no-diagnostics extern "C" int exit(int); diff --git a/test/SemaCXX/blocks.cpp b/test/SemaCXX/blocks.cpp index adbff553e6..3f81c274d0 100644 --- a/test/SemaCXX/blocks.cpp +++ b/test/SemaCXX/blocks.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks +// expected-no-diagnostics void tovoid(void*); diff --git a/test/SemaCXX/borland-extensions.cpp b/test/SemaCXX/borland-extensions.cpp index 483153004d..1e4bd45612 100644 --- a/test/SemaCXX/borland-extensions.cpp +++ b/test/SemaCXX/borland-extensions.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -fsyntax-only -verify -fborland-extensions +// expected-no-diagnostics // Borland extensions diff --git a/test/SemaCXX/builtin-exception-spec.cpp b/test/SemaCXX/builtin-exception-spec.cpp index 324d20ea6a..590cd3c35d 100644 --- a/test/SemaCXX/builtin-exception-spec.cpp +++ b/test/SemaCXX/builtin-exception-spec.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -isystem %S/Inputs -fsyntax-only -verify %s +// expected-no-diagnostics #include <malloc.h> extern "C" { diff --git a/test/SemaCXX/builtin-ptrtomember-overload.cpp b/test/SemaCXX/builtin-ptrtomember-overload.cpp index c7b5173a4f..c27d642f9a 100644 --- a/test/SemaCXX/builtin-ptrtomember-overload.cpp +++ b/test/SemaCXX/builtin-ptrtomember-overload.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 +// expected-no-diagnostics struct A {}; diff --git a/test/SemaCXX/builtin_objc_msgSend.cpp b/test/SemaCXX/builtin_objc_msgSend.cpp index 0e90d54f80..082fb2868c 100644 --- a/test/SemaCXX/builtin_objc_msgSend.cpp +++ b/test/SemaCXX/builtin_objc_msgSend.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -fsyntax-only -verify +// expected-no-diagnostics // rdar://8686888 typedef struct objc_selector *SEL; diff --git a/test/SemaCXX/cast-explicit-ctor.cpp b/test/SemaCXX/cast-explicit-ctor.cpp index 0052856d2f..41d2fa2fbf 100644 --- a/test/SemaCXX/cast-explicit-ctor.cpp +++ b/test/SemaCXX/cast-explicit-ctor.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics struct B { explicit B(bool); }; void f() { (void)(B)true; diff --git a/test/SemaCXX/class-layout.cpp b/test/SemaCXX/class-layout.cpp index d81944ab9b..f2ff9fcfd7 100644 --- a/test/SemaCXX/class-layout.cpp +++ b/test/SemaCXX/class-layout.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify +// expected-no-diagnostics #define SA(n, p) int a##n[(p) ? 1 : -1] diff --git a/test/SemaCXX/comma.cpp b/test/SemaCXX/comma.cpp index 79ff7d1cde..3a6162bc47 100644 --- a/test/SemaCXX/comma.cpp +++ b/test/SemaCXX/comma.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics // PR6076 void f(); diff --git a/test/SemaCXX/complex-init-list.cpp b/test/SemaCXX/complex-init-list.cpp index e75833a37d..f70f9df6c7 100644 --- a/test/SemaCXX/complex-init-list.cpp +++ b/test/SemaCXX/complex-init-list.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -verify -fsyntax-only -pedantic +// expected-no-diagnostics // This file tests the clang extension which allows initializing the components // of a complex number individually using an initialization list. Basically, diff --git a/test/SemaCXX/constexpr-turing.cpp b/test/SemaCXX/constexpr-turing.cpp index c5153788ad..07c04eff30 100644 --- a/test/SemaCXX/constexpr-turing.cpp +++ b/test/SemaCXX/constexpr-turing.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -verify -std=c++11 %s +// expected-no-diagnostics // A direct proof that constexpr is Turing-complete, once DR1454 is implemented. diff --git a/test/SemaCXX/decltype-98.cpp b/test/SemaCXX/decltype-98.cpp index db52565e6c..3202dfea71 100644 --- a/test/SemaCXX/decltype-98.cpp +++ b/test/SemaCXX/decltype-98.cpp @@ -1,3 +1,4 @@ // RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify %s +// expected-no-diagnostics extern int x; __decltype(1) x = 3; diff --git a/test/SemaCXX/decltype-pr4444.cpp b/test/SemaCXX/decltype-pr4444.cpp index 2f95075067..a5ac54bc37 100644 --- a/test/SemaCXX/decltype-pr4444.cpp +++ b/test/SemaCXX/decltype-pr4444.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 +// expected-no-diagnostics template<typename T, T t> struct TestStruct { diff --git a/test/SemaCXX/decltype-pr4448.cpp b/test/SemaCXX/decltype-pr4448.cpp index 9d33ce7341..b781b891ff 100644 --- a/test/SemaCXX/decltype-pr4448.cpp +++ b/test/SemaCXX/decltype-pr4448.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 +// expected-no-diagnostics template< typename T, T t, decltype(t+2) v > struct Convoluted {}; diff --git a/test/SemaCXX/decltype-this.cpp b/test/SemaCXX/decltype-this.cpp index a13416f089..21b4b60ea3 100644 --- a/test/SemaCXX/decltype-this.cpp +++ b/test/SemaCXX/decltype-this.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s +// expected-no-diagnostics template<typename T, typename U> struct is_same { static const bool value = false; diff --git a/test/SemaCXX/decltype.cpp b/test/SemaCXX/decltype.cpp index a1200e0820..ef3103ded7 100644 --- a/test/SemaCXX/decltype.cpp +++ b/test/SemaCXX/decltype.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s +// expected-no-diagnostics // PR5290 int const f0(); diff --git a/test/SemaCXX/default-argument-temporaries.cpp b/test/SemaCXX/default-argument-temporaries.cpp index 3ab7bf4eb1..c0880d507e 100644 --- a/test/SemaCXX/default-argument-temporaries.cpp +++ b/test/SemaCXX/default-argument-temporaries.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics struct B { B(void* = 0); }; struct A { diff --git a/test/SemaCXX/do-while-scope.cpp b/test/SemaCXX/do-while-scope.cpp index 2602ae12f2..67534db36d 100644 --- a/test/SemaCXX/do-while-scope.cpp +++ b/test/SemaCXX/do-while-scope.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics void test() { int x; diff --git a/test/SemaCXX/empty-class-layout.cpp b/test/SemaCXX/empty-class-layout.cpp index c68f2bb6fb..951f16c1b0 100644 --- a/test/SemaCXX/empty-class-layout.cpp +++ b/test/SemaCXX/empty-class-layout.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify +// expected-no-diagnostics #define SA(n, p) int a##n[(p) ? 1 : -1] diff --git a/test/SemaCXX/exception-spec-no-exceptions.cpp b/test/SemaCXX/exception-spec-no-exceptions.cpp index 2e180706d3..e26e864e3d 100644 --- a/test/SemaCXX/exception-spec-no-exceptions.cpp +++ b/test/SemaCXX/exception-spec-no-exceptions.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify -fexceptions -fobjc-exceptions %s +// expected-no-diagnostics // Note that we're specifically excluding -fcxx-exceptions in the command line above. diff --git a/test/SemaCXX/friend-out-of-line.cpp b/test/SemaCXX/friend-out-of-line.cpp index 56b2daab4c..ab75a4f8ca 100644 --- a/test/SemaCXX/friend-out-of-line.cpp +++ b/test/SemaCXX/friend-out-of-line.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics // <rdar://problem/10204947> namespace N { diff --git a/test/SemaCXX/gnu-case-ranges.cpp b/test/SemaCXX/gnu-case-ranges.cpp index b082e3a6c1..c613cecbc5 100644 --- a/test/SemaCXX/gnu-case-ranges.cpp +++ b/test/SemaCXX/gnu-case-ranges.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -verify -Wno-covered-switch-default %s +// expected-no-diagnostics enum E { one, diff --git a/test/SemaCXX/goto2.cpp b/test/SemaCXX/goto2.cpp index 01ea031ac2..b42a611182 100644 --- a/test/SemaCXX/goto2.cpp +++ b/test/SemaCXX/goto2.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics //PR9463 int subfun(const char *text) { diff --git a/test/SemaCXX/indirect-goto.cpp b/test/SemaCXX/indirect-goto.cpp index 5b3fac4a65..cb2213d78d 100644 --- a/test/SemaCXX/indirect-goto.cpp +++ b/test/SemaCXX/indirect-goto.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics namespace test1 { // Make sure this doesn't crash. diff --git a/test/SemaCXX/issue547.cpp b/test/SemaCXX/issue547.cpp index ab03a155d3..bfec6e080b 100644 --- a/test/SemaCXX/issue547.cpp +++ b/test/SemaCXX/issue547.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s +// expected-no-diagnostics template<typename T> struct classify_function { diff --git a/test/SemaCXX/local-classes.cpp b/test/SemaCXX/local-classes.cpp index 500b2197ef..f4ca79159d 100644 --- a/test/SemaCXX/local-classes.cpp +++ b/test/SemaCXX/local-classes.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics namespace PR6382 { int foo() diff --git a/test/SemaCXX/lookup-member.cpp b/test/SemaCXX/lookup-member.cpp index c75b185bcc..39f5a15d08 100644 --- a/test/SemaCXX/lookup-member.cpp +++ b/test/SemaCXX/lookup-member.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -ver |