r210440 - Convert tests I recently add to use -verify instead of FileCheck.
Joey Gouly
joey.gouly at gmail.com
Sun Jun 8 14:28:54 PDT 2014
Author: joey
Date: Sun Jun 8 16:28:54 2014
New Revision: 210440
URL: http://llvm.org/viewvc/llvm-project?rev=210440&view=rev
Log:
Convert tests I recently add to use -verify instead of FileCheck.
This uncovered something strange. Diagnostics for InlineAsm have source locations
that don't really map to where they are within the .c source file.
Modified:
cfe/trunk/test/CodeGen/arm-asm-deprecated.c
cfe/trunk/test/CodeGen/x86-64-inline-asm.c
Modified: cfe/trunk/test/CodeGen/arm-asm-deprecated.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/arm-asm-deprecated.c?rev=210440&r1=210439&r2=210440&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/arm-asm-deprecated.c (original)
+++ cfe/trunk/test/CodeGen/arm-asm-deprecated.c Sun Jun 8 16:28:54 2014
@@ -1,8 +1,13 @@
// REQUIRES: arm-registered-target
-// RUN: %clang_cc1 -triple armv8 -target-feature +neon %s -S -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-v8
-// RUN: not %clang_cc1 -triple armv8 -target-feature +neon %s -S -o /dev/null -Werror 2>&1 | FileCheck %s --check-prefix=CHECK-v8-Werror
+// RUN: %clang_cc1 -triple armv8 -target-feature +neon %s -S -o /dev/null -verify -DWARN
+// RUN: %clang_cc1 -triple armv8 -target-feature +neon %s -S -o /dev/null -Werror -verify
void set_endian() {
- asm("setend be"); // CHECK-v8: warning: deprecated
- // CHECK-v8-Werror: error: deprecated
+ asm("setend be");
+// expected-note at 1 {{instantiated into assembly here}}
+#ifdef WARN
+// expected-warning at -3 {{deprecated}}
+#else
+// expected-error at -5 {{deprecated}}
+#endif
}
Modified: cfe/trunk/test/CodeGen/x86-64-inline-asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/x86-64-inline-asm.c?rev=210440&r1=210439&r2=210440&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/x86-64-inline-asm.c (original)
+++ cfe/trunk/test/CodeGen/x86-64-inline-asm.c Sun Jun 8 16:28:54 2014
@@ -1,7 +1,12 @@
// REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -triple x86_64 %s -S -o /dev/null 2>&1 | FileCheck %s
-// RUN: not %clang_cc1 -triple x86_64 %s -S -o /dev/null -Werror 2>&1 | FileCheck %s --check-prefix=CHECK-Werror
+// RUN: %clang_cc1 -triple x86_64 %s -S -o /dev/null -DWARN -verify
+// RUN: %clang_cc1 -triple x86_64 %s -S -o /dev/null -Werror -verify
void f() {
- asm("movaps %xmm3, (%esi, 2)"); // CHECK: warning: scale factor without index register is ignored
- // CHECK-Werror: error: scale factor without index register is ignored
+ asm("movaps %xmm3, (%esi, 2)");
+// expected-note at 1 {{instantiated into assembly here}}
+#ifdef WARN
+// expected-warning at -3 {{scale factor without index register is ignored}}
+#else
+// expected-error at -5 {{scale factor without index register is ignored}}
+#endif
}
More information about the cfe-commits
mailing list