summaryrefslogtreecommitdiffstats
path: root/clang/test/Format
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-12-02 15:21:38 +0000
committerAlexander Kornienko <alexfh@google.com>2013-12-02 15:21:38 +0000
commitbc4ae44928f5b96c554b83f926c4caebe728d18f (patch)
tree416010eb1dde963e76606a0e4e3d7c0ba6bff719 /clang/test/Format
parent9beb517307aa5617e7597af6d8b64eebf21d8e68 (diff)
downloadbcm5719-llvm-bc4ae44928f5b96c554b83f926c4caebe728d18f.tar.gz
bcm5719-llvm-bc4ae44928f5b96c554b83f926c4caebe728d18f.zip
Added an option to specify fallback style.
Summary: Added -fallback-style option. Changed clang-format to stop searching for .clang-format when an invalid file is found. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2292 llvm-svn: 196108
Diffstat (limited to 'clang/test/Format')
-rw-r--r--clang/test/Format/style-on-command-line.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/Format/style-on-command-line.cpp b/clang/test/Format/style-on-command-line.cpp
index 22131a1ebe1..554a67e264d 100644
--- a/clang/test/Format/style-on-command-line.cpp
+++ b/clang/test/Format/style-on-command-line.cpp
@@ -7,7 +7,7 @@
// 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
+// RUN: clang-format -style=file -fallback-style=webkit %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK6 %s
// RUN: [ ! -e %T/.clang-format ] || rm %T/.clang-format
// RUN: [ ! -e %T/_clang-format ] || rm %T/_clang-format
// RUN: printf "BasedOnStyle: google\nIndentWidth: 6\n" > %T/_clang-format
@@ -22,7 +22,8 @@ void f() {
// CHECK4: {{^ int \*i;$}}
// CHECK5: {{^ int\* i;$}}
// CHECK6: {{^Error reading .*\.clang-format: Invalid argument}}
-// XCHECK6X: {{^ int \*i;$}}
+// CHECK6: {{^Can't find usable .clang-format, using webkit style$}}
+// CHECK6: {{^ int\* i;$}}
// CHECK7: {{^ int\* i;$}}
int*i;
int j;
OpenPOWER on IntegriCloud