From a0a12647c8b6ce9f67be51188da19928fbdfc564 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Fri, 26 Jun 2015 17:49:10 +0000 Subject: [PATCH] Avoid false positive/negative test results from line directive interference.NFC. http://reviews.llvm.org/D10443 Patch by Geoff Berry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240801 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Preprocessor/cxx_true.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/Preprocessor/cxx_true.cpp b/test/Preprocessor/cxx_true.cpp index 39cb349b2a..f6dc459e2c 100644 --- a/test/Preprocessor/cxx_true.cpp +++ b/test/Preprocessor/cxx_true.cpp @@ -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 -- 2.40.0