summaryrefslogtreecommitdiffstats
path: root/clang/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-02-05 14:17:16 +0000
committerDaniel Jasper <djasper@google.com>2016-02-05 14:17:16 +0000
commit0c9772e8742645f65b6e657e9ec77d1c3b27798f (patch)
treed4846f402e8d53bdf4002a74b35ec5d2f9740195 /clang/unittests
parent85c824f131e92aac16fc0e29ec60cc3ccfe6e286 (diff)
downloadbcm5719-llvm-0c9772e8742645f65b6e657e9ec77d1c3b27798f.tar.gz
bcm5719-llvm-0c9772e8742645f65b6e657e9ec77d1c3b27798f.zip
clang-format: Fix corner case in template detection.
Before: f(a.operator() < A > ()); After: f(a.operator()<A>()); llvm-svn: 259884
Diffstat (limited to 'clang/unittests')
-rw-r--r--clang/unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index e03a484f290..0db5d9c89a1 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -5394,6 +5394,10 @@ TEST_F(FormatTest, UnderstandsTemplateParameters) {
verifyFormat("struct A<std::enable_if<sizeof(T2) ? sizeof(int32) : "
"sizeof(char)>::type>;");
verifyFormat("template <class T> struct S<std::is_arithmetic<T>{}> {};");
+ verifyFormat("f(a.operator()<A>());");
+ verifyFormat("f(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
+ " .template operator()<A>());",
+ getLLVMStyleWithColumns(35));
// Not template parameters.
verifyFormat("return a < b && c > d;");
OpenPOWER on IntegriCloud