summaryrefslogtreecommitdiffstats
path: root/clang/test/Format
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-09-02 13:44:16 +0000
committerAlexander Kornienko <alexfh@google.com>2013-09-02 13:44:16 +0000
commit9acf3dbf1da0a109376be2553ad5b36b420fadc9 (patch)
tree6a502b20cf0e929b774cb1b0f5eb0133704a593a /clang/test/Format
parentf49c80178e1cb13eef49520eb40562e60f497e92 (diff)
downloadbcm5719-llvm-9acf3dbf1da0a109376be2553ad5b36b420fadc9.tar.gz
bcm5719-llvm-9acf3dbf1da0a109376be2553ad5b36b420fadc9.zip
Test for empty .clang-format file.
Summary: Test clang-format's handling of empty .clang-format files. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1562 llvm-svn: 189757
Diffstat (limited to 'clang/test/Format')
-rw-r--r--clang/test/Format/style-on-command-line.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Format/style-on-command-line.cpp b/clang/test/Format/style-on-command-line.cpp
index 6f81b9bf723..044264b9160 100644
--- a/clang/test/Format/style-on-command-line.cpp
+++ b/clang/test/Format/style-on-command-line.cpp
@@ -6,6 +6,8 @@
// RUN: [ ! -e %T/.clang-format ] || rm %T/.clang-format
// RUN: printf "BasedOnStyle: google\nIndentWidth: 5\n" > %T/.clang-format
// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK5 %s
+// RUN: printf "\n" > %T/.clang-format
+// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK6 %s
void f() {
// CHECK1: {{^ int\* i;$}}
// CHECK2: {{^ int \*i;$}}
@@ -15,6 +17,8 @@ void f() {
// CHECK4: Error parsing -style: Invalid argument, using LLVM style
// CHECK4: {{^ int \*i;$}}
// CHECK5: {{^ int\* i;$}}
+// CHECK6: Can't find usable .clang-format, using LLVM style
+// CHECK6: {{^ int \*i;$}}
int*i;
int j;
}
OpenPOWER on IntegriCloud