diff options
author | Sylvestre Ledru <sylvestre@debian.org> | 2016-08-09 14:24:40 +0000 |
---|---|---|
committer | Sylvestre Ledru <sylvestre@debian.org> | 2016-08-09 14:24:40 +0000 |
commit | 83bbd5731bcb88374b400d349a98711d71c2ec14 (patch) | |
tree | ce0cf9126a7015e758f4752bbfb97b22248184e1 /clang/unittests/Format | |
parent | 27740d038cca7914ce005ab6d1ed11e3f0fc2a4e (diff) | |
download | bcm5719-llvm-83bbd5731bcb88374b400d349a98711d71c2ec14.tar.gz bcm5719-llvm-83bbd5731bcb88374b400d349a98711d71c2ec14.zip |
clang-format: Add SpaceAfterTemplate
Summary:
This is required for compliance with the Mozilla style guide.
This is a rebase+minor change of Birunthan Mohanathas's patch
Reviewers: djasper
Subscribers: klimek, cfe-commits, opilarium
Differential Revision: https://reviews.llvm.org/D23317
llvm-svn: 278121
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index f2b5bd6a816..6cffb3b238e 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -10191,6 +10191,7 @@ TEST_F(FormatTest, ParsesConfigurationBools) { CHECK_PARSE_BOOL(SpacesInContainerLiterals); CHECK_PARSE_BOOL(SpacesInCStyleCastParentheses); CHECK_PARSE_BOOL(SpaceAfterCStyleCast); + CHECK_PARSE_BOOL(SpaceAfterTemplateKeyword); CHECK_PARSE_BOOL(SpaceBeforeAssignmentOperators); CHECK_PARSE_NESTED_BOOL(BraceWrapping, AfterClass); @@ -11329,6 +11330,12 @@ TEST_F(FormatTest, SpacesInAngles) { verifyFormat("A<A<int>>();", Spaces); } +TEST_F(FormatTest, SpaceAfterTemplateKeyword) { + FormatStyle Style = getLLVMStyle(); + Style.SpaceAfterTemplateKeyword = false; + verifyFormat("template<int> void foo();", Style); +} + TEST_F(FormatTest, TripleAngleBrackets) { verifyFormat("f<<<1, 1>>>();"); verifyFormat("f<<<1, 1, 1, s>>>();"); |