diff options
author | Alexander Kornienko <alexfh@google.com> | 2013-12-02 15:21:38 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2013-12-02 15:21:38 +0000 |
commit | bc4ae44928f5b96c554b83f926c4caebe728d18f (patch) | |
tree | 416010eb1dde963e76606a0e4e3d7c0ba6bff719 /clang/test/Format | |
parent | 9beb517307aa5617e7597af6d8b64eebf21d8e68 (diff) | |
download | bcm5719-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.cpp | 5 |
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; |