summaryrefslogtreecommitdiffstats
path: root/clang/test/Format
diff options
context:
space:
mode:
authorPaul Hoad <mydeveloperday@gmail.com>2019-10-13 14:51:45 +0000
committerPaul Hoad <mydeveloperday@gmail.com>2019-10-13 14:51:45 +0000
commit6a1f7d6c9ff8228328d0e65b8678a9c6dff49837 (patch)
tree80686151ca3a399b14123018e1db415d6ba0c25c /clang/test/Format
parente84916d8917b3b7cc3e629d343675adfb66c0022 (diff)
downloadbcm5719-llvm-6a1f7d6c9ff8228328d0e65b8678a9c6dff49837.tar.gz
bcm5719-llvm-6a1f7d6c9ff8228328d0e65b8678a9c6dff49837.zip
[clang-format] Proposal for clang-format to give compiler style warnings
relanding {D68554} with fixed lit tests, checked on Windows and MacOS llvm-svn: 374720
Diffstat (limited to 'clang/test/Format')
-rw-r--r--clang/test/Format/dry-run-alias.cpp4
-rw-r--r--clang/test/Format/dry-run.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Format/dry-run-alias.cpp b/clang/test/Format/dry-run-alias.cpp
new file mode 100644
index 00000000000..41ccc8f813c
--- /dev/null
+++ b/clang/test/Format/dry-run-alias.cpp
@@ -0,0 +1,4 @@
+// RUN: clang-format -style=LLVM -i -n %s 2> %t.stderr
+// RUN: grep -E "(.*)code should be clang-formatted(.*)" %t.stderr
+
+int a ;
diff --git a/clang/test/Format/dry-run.cpp b/clang/test/Format/dry-run.cpp
new file mode 100644
index 00000000000..78498a6bdfb
--- /dev/null
+++ b/clang/test/Format/dry-run.cpp
@@ -0,0 +1,4 @@
+// RUN: clang-format -style=LLVM -i --dry-run %s 2> %t.stderr
+// RUN: grep -E "(.*)code should be clang-formatted(.*)" %t.stderr
+
+int a ;
OpenPOWER on IntegriCloud