[clang] [clang-format] Handle template closer followed by braces (PR #110971)

2024-10-04 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/110971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle template closer followed by braces (PR #110971)

2024-10-04 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/110971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle template closer followed by braces (PR #110971)

2024-10-03 Thread Carlos Galvez via cfe-commits
@@ -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::conditi

[clang] [clang-format] Handle template closer followed by braces (PR #110971)

2024-10-03 Thread Owen Pan via cfe-commits
@@ -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::conditi

[clang] [clang-format] Handle template closer followed by braces (PR #110971)

2024-10-03 Thread Carlos Galvez via cfe-commits
@@ -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::conditi

[clang] [clang-format] Handle template closer followed by braces (PR #110971)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #110968. --- Full diff: https://github.com/llvm/llvm-project/pull/110971.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+5) - (modified) clang/unittests/Format/Token

[clang] [clang-format] Handle template closer followed by braces (PR #110971)

2024-10-03 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/110971 Fixes #110968. >From b98834264b09fb283cc060ee06576b014809ec5f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 3 Oct 2024 01:57:14 -0700 Subject: [PATCH] [clang-format] Handle template closer followed by brace