From 112b50e6b627f4780656a4f62f446848e46197b9 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Wed, 6 May 2015 14:53:50 +0000 Subject: clang-format: Allow ternary expressions inside template parameters if the template parameters aren't inside an expression context. This fixes llvm.org/PR23270. llvm-svn: 236603 --- clang/unittests/Format/FormatTest.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/unittests/Format/FormatTest.cpp') diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index cb1f7bd539f..b4c8c26664a 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -5144,6 +5144,8 @@ TEST_F(FormatTest, UnderstandsTemplateParameters) { verifyFormat("f();"); verifyFormat("template void f() {}"); verifyFormat("struct A::type>;"); + verifyFormat("struct A::type>;"); // Not template parameters. verifyFormat("return a < b && c > d;"); -- cgit v1.2.3