summaryrefslogtreecommitdiffstats
path: root/test/Misc
diff options
context:
space:
mode:
Diffstat (limited to 'test/Misc')
-rw-r--r--test/Misc/Inputs/remapped-file1
-rw-r--r--test/Misc/Inputs/remapped-file-23
-rw-r--r--test/Misc/Inputs/remapped-file-32
-rw-r--r--test/Misc/message-length.c4
-rw-r--r--test/Misc/remap-file.c8
5 files changed, 16 insertions, 2 deletions
diff --git a/test/Misc/Inputs/remapped-file b/test/Misc/Inputs/remapped-file
new file mode 100644
index 0000000..657613e
--- /dev/null
+++ b/test/Misc/Inputs/remapped-file
@@ -0,0 +1 @@
+int *f(float *fp) { return fp; }
diff --git a/test/Misc/Inputs/remapped-file-2 b/test/Misc/Inputs/remapped-file-2
new file mode 100644
index 0000000..9ac034a
--- /dev/null
+++ b/test/Misc/Inputs/remapped-file-2
@@ -0,0 +1,3 @@
+#include "nonexistent.h"
+
+int *f() { return fp; }
diff --git a/test/Misc/Inputs/remapped-file-3 b/test/Misc/Inputs/remapped-file-3
new file mode 100644
index 0000000..b7ab613
--- /dev/null
+++ b/test/Misc/Inputs/remapped-file-3
@@ -0,0 +1,2 @@
+extern float *fp;
+
diff --git a/test/Misc/message-length.c b/test/Misc/message-length.c
index 841ffc9..24f6233 100644
--- a/test/Misc/message-length.c
+++ b/test/Misc/message-length.c
@@ -1,5 +1,5 @@
-// RUN: clang -fsyntax-only -fmessage-length=72 %s 2>&1 | FileCheck -strict-whitespace %s
-// RUN: clang -fsyntax-only -fmessage-length=1 %s
+// RUN: clang-cc -fmessage-length 72 %s 2>&1 | FileCheck -strict-whitespace %s
+// RUN: clang-cc -fmessage-length 1 %s
// Hack so we can check things better, force the file name and line.
# 1 "FILE" 1
diff --git a/test/Misc/remap-file.c b/test/Misc/remap-file.c
new file mode 100644
index 0000000..f12fe95
--- /dev/null
+++ b/test/Misc/remap-file.c
@@ -0,0 +1,8 @@
+// RUN: clang-cc -remap-file "%s;%S/Inputs/remapped-file" -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXIST %s
+// RUN: clang-cc -remap-file "%S/nonexistent.c;%S/Inputs/remapped-file" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-NONEXIST %s
+// RUN: clang-cc -remap-file "%S/nonexistent.c;%S/Inputs/remapped-file-2" -remap-file "%S/nonexistent.h;%S/Inputs/remapped-file-3" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-HEADER %s
+
+// CHECK-EXIST: remap-file.c:1:28: warning: incompatible pointer types
+// CHECK-NONEXIST: nonexistent.c:1:28: warning: incompatible pointer types
+// CHECK-HEADER: nonexistent.c:3:19: warning: incompatible pointer types
+int
OpenPOWER on IntegriCloud