diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-18 12:52:00 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-18 12:52:00 +0000 |
commit | adba2aadf29228a501988cccc67e8aeeab025087 (patch) | |
tree | 48b937ff1ab62f476f924ed2225bfa171391336a /clang/unittests/Format/FormatTest.cpp | |
parent | cbb227b48d61a122d816b595479034841df2d4b4 (diff) | |
download | bcm5719-llvm-adba2aadf29228a501988cccc67e8aeeab025087.tar.gz bcm5719-llvm-adba2aadf29228a501988cccc67e8aeeab025087.zip |
clang-format: Allow braced initializers in template arguments of class
specializations.
Before:
template <class T>
struct S < std::is_arithmetic<T> {
} > {};
After:
template <class T> struct S<std::is_arithmetic<T>{}> {};
llvm-svn: 237565
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 5e69e05d4a4..f41928fe725 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -5257,6 +5257,7 @@ TEST_F(FormatTest, UnderstandsTemplateParameters) { verifyFormat("struct A<std::enable_if<sizeof(T2) < sizeof(int32)>::type>;"); verifyFormat("struct A<std::enable_if<sizeof(T2) ? sizeof(int32) : " "sizeof(char)>::type>;"); + verifyFormat("template <class T> struct S<std::is_arithmetic<T>{}> {};"); // Not template parameters. verifyFormat("return a < b && c > d;"); |