diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-04-15 22:09:44 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-04-15 22:09:44 +0000 |
commit | 030c7e9d105fdd9b5cb11b5b16c258bcb39bdac1 (patch) | |
tree | 38793fdc969bcc8eb16fa60ca1d1e75df4f00bbf /test/SemaCXX | |
parent | 6c22939938d9596af43ebd456f68f8e49b42500a (diff) |
Fix tests that weren't actually verifying anything.
Passing -verify to clang without -cc1 or -Xclang silently passes (with a
printed warning, but lit doesn't care about that). This change adds -cc1 or,
as is necessary in one case, -Xclang to fix this so that these tests are
actually verifying as intended.
I'd like to change the driver so this kind of mistake could not be made, but
I'm not entirely sure how. Further, since the driver only warns about unknown
flags in general, we could have similar bugs with a misspellings of arguments
that would be nice to find.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX')
-rw-r--r-- | test/SemaCXX/warn-everthing.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/SemaCXX/warn-everthing.cpp b/test/SemaCXX/warn-everthing.cpp index 144a8f90df..ad3dd8a24d 100644 --- a/test/SemaCXX/warn-everthing.cpp +++ b/test/SemaCXX/warn-everthing.cpp @@ -1,4 +1,4 @@ -// RUN: %clang -Weverything -fsyntax-only %s -verify +// RUN: %clang_cc1 -Weverything -fsyntax-only %s -verify // This previously crashed due to a bug in the CFG. Exercising all // warnings helps check CFG construction. @@ -8,6 +8,6 @@ public: ~PR12271(); }; -void testPR12271() { - PR12271 a[1][1]; -}
\ No newline at end of file +void testPR12271() { // expected-warning {{no previous prototype for function 'testPR12271'}} + PR12271 a[1][1]; // expected-warning {{unused variable 'a'}} +} |