summaryrefslogtreecommitdiff
path: root/test/FileCheck
diff options
context:
space:
mode:
authorMichael Liao <michael.liao@intel.com>2013-04-25 21:31:34 +0000
committerMichael Liao <michael.liao@intel.com>2013-04-25 21:31:34 +0000
commit0fc7137f2f8a99cb749024c51e3247f4b24e1ee0 (patch)
tree3ab5b6c7745c93dff69c2feddebd83525009e06b /test/FileCheck
parent7f8300b8f3f35167ce78628bc14d50beec203b8f (diff)
downloadllvm-0fc7137f2f8a99cb749024c51e3247f4b24e1ee0.tar.gz
llvm-0fc7137f2f8a99cb749024c51e3247f4b24e1ee0.tar.bz2
llvm-0fc7137f2f8a99cb749024c51e3247f4b24e1ee0.tar.xz
Remove SMLoc paired with CHECK-NOT patterns. Not functionality change.
Pattern has source location by itself. After adding a trivial method to retrieve it, it's unnecessary to pair a source location for CHECK-NOT patterns. One thing revised after this is the diagnostic info is more accurate by pointing to the start of the CHECK-NOT pattern instead of the end of the CHECK-NOT pattern. E.g. diagnostic message previously looks like <stdin>:1:1: error: CHECK-NOT: string occurred! test ^ test.txt:1:16: note: CHECK-NOT: pattern specified here CHECK-NOT: test ^ is changed to <stdin>:1:1: error: CHECK-NOT: string occurred! test ^ test.txt:1:12: note: CHECK-NOT: pattern specified here CHECK-NOT: test ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FileCheck')
-rw-r--r--test/FileCheck/check-not-diaginfo.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/FileCheck/check-not-diaginfo.txt b/test/FileCheck/check-not-diaginfo.txt
new file mode 100644
index 0000000000..a4c3ca8840
--- /dev/null
+++ b/test/FileCheck/check-not-diaginfo.txt
@@ -0,0 +1,7 @@
+; RUN: FileCheck -input-file %s %s 2>&1 | FileCheck -check-prefix DIAG %s
+
+CHECK-NOT: test
+
+DIAG: CHECK-NOT: pattern specified here
+DIAG-NEXT: CHECK-NOT: test
+DIAG-NEXT: {{^ \^}}