summaryrefslogtreecommitdiff
path: root/test/CodeGen/x86-64-inline-asm.c
diff options
context:
space:
mode:
authorJoey Gouly <joey.gouly@gmail.com>2014-06-08 21:28:54 +0000
committerJoey Gouly <joey.gouly@gmail.com>2014-06-08 21:28:54 +0000
commitc21287e819c6126c0ea4ebd2849e935080527ade (patch)
treebce57c249e9420d048a835b2579d4f601c163ecb /test/CodeGen/x86-64-inline-asm.c
parentb23b4992370221b27d64fa5b1da01a52aa271bef (diff)
downloadclang-c21287e819c6126c0ea4ebd2849e935080527ade.tar.gz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210440 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/x86-64-inline-asm.c')
-rw-r--r--test/CodeGen/x86-64-inline-asm.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/CodeGen/x86-64-inline-asm.c b/test/CodeGen/x86-64-inline-asm.c
index 666d4c0822..fefbf76dd9 100644
--- a/test/CodeGen/x86-64-inline-asm.c
+++ b/test/CodeGen/x86-64-inline-asm.c
@@ -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@1 {{instantiated into assembly here}}
+#ifdef WARN
+// expected-warning@-3 {{scale factor without index register is ignored}}
+#else
+// expected-error@-5 {{scale factor without index register is ignored}}
+#endif
}