[X86] Fix x86-header-warnings.c test not detecting regressions as intended.
authorPierre Gousseau <pierre.gousseau@sony.com>
Wed, 8 Apr 2020 14:15:39 +0000 (15:15 +0100)
committerPierre Gousseau <pierre.gousseau@sony.com>
Wed, 8 Apr 2020 14:22:44 +0000 (15:22 +0100)
Use -verify -fsyntax-only and expected-no-diagnostics as
recommended by Paul.

Reviewed By: probinson

Differential Revision: https://reviews.llvm.org/D77393

clang/test/Headers/x86-header-warnings.c

index ec7cfc6..3306b95 100644 (file)
@@ -1,16 +1,14 @@
 // Fix sign conversion warnings found by fsanitize=implicit-integer-sign-change
 // in intrinsic headers.
 // Preprocess file to workaround no warnings in system headers.
-// RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -ffreestanding -E 2>&1 \
-// RUN:     | %clang_cc1 -x c - -triple x86_64-pc-linux-gnu -ffreestanding -Wsign-conversion -E -o - 2>&1 \
-// RUN:     | FileCheck --allow-empty %s
+// RUN: %clang_cc1 %s -triple x86_64-pc-linux-gnu -ffreestanding -E -CC 2>&1 \
+// RUN:     | %clang_cc1 -x c - -triple x86_64-pc-linux-gnu -Wsign-conversion -fsyntax-only -verify
 // REQUIRES: x86-registered-target
 
 #include <x86intrin.h>
 
 void test0() {
-  // CHECK-LABEL: test0
-  // CHECK-NOT: warning:
+  // expected-no-diagnostics
   _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
   _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_OFF);
   _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_MASK);