r240801 - Avoid false positive/negative test results from line directive interference.NFC.
Chad Rosier
mcrosier at codeaurora.org
Fri Jun 26 10:49:10 PDT 2015
Author: mcrosier
Date: Fri Jun 26 12:49:10 2015
New Revision: 240801
URL: http://llvm.org/viewvc/llvm-project?rev=240801&view=rev
Log:
Avoid false positive/negative test results from line directive interference.NFC.
http://reviews.llvm.org/D10443
Patch by Geoff Berry.
Modified:
cfe/trunk/test/Preprocessor/cxx_true.cpp
Modified: cfe/trunk/test/Preprocessor/cxx_true.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/cxx_true.cpp?rev=240801&r1=240800&r2=240801&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/cxx_true.cpp (original)
+++ cfe/trunk/test/Preprocessor/cxx_true.cpp Fri Jun 26 12:49:10 2015
@@ -1,15 +1,18 @@
-/* RUN: %clang_cc1 -E %s -x c++ | grep block_1
- RUN: %clang_cc1 -E %s -x c++ | not grep block_2
- RUN: %clang_cc1 -E %s -x c | not grep block
+/* RUN: %clang_cc1 -E %s -x c++ | FileCheck -check-prefix CPP %s
+ RUN: %clang_cc1 -E %s -x c | FileCheck -check-prefix C %s
RUN: %clang_cc1 -E %s -x c++ -verify -Wundef
*/
// expected-no-diagnostics
#if true
-block_1
+// CPP: test block_1
+// C-NOT: test block_1
+test block_1
#endif
#if false
-block_2
+// CPP-NOT: test block_2
+// C-NOT: test block_2
+test block_2
#endif
More information about the cfe-commits
mailing list