[clang] [clang-format] Handle template closer followed by braces (PR #110971)
Carlos Galvez via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 3 03:50:11 PDT 2024
================
@@ -3538,6 +3538,11 @@ TEST_F(TokenAnnotatorTest, TemplateInstantiation) {
ASSERT_EQ(Tokens.size(), 11u) << Tokens;
EXPECT_TOKEN(Tokens[2], tok::less, TT_TemplateOpener);
EXPECT_TOKEN(Tokens[6], tok::greater, TT_TemplateCloser);
+
+ Tokens = annotate("return std::conditional_t<T::value == U::value, T, U>{};");
+ ASSERT_EQ(Tokens.size(), 21u) << Tokens;
+ EXPECT_TOKEN(Tokens[4], tok::less, TT_TemplateOpener);
+ EXPECT_TOKEN(Tokens[16], tok::greater, TT_TemplateCloser);
----------------
carlosgalvezp wrote:
Will this also verify that there is no extra space between `>` and `{`? I didn't mention it in the ticket but it was another issue.
https://github.com/llvm/llvm-project/pull/110971
More information about the cfe-commits
mailing list