[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-11 Thread Emilia Kond via cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/77704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-11 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/77704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-11 Thread Emilia Kond via cfe-commits
@@ -1066,6 +1066,11 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { EXPECT_EQ(Tokens.size(), 17u) << Tokens; EXPECT_TOKEN(Tokens[4], tok::amp, TT_PointerOrReference); EXPECT_TOKEN(Tokens[5], tok::kw_requires, TT_RequiresClause); + + Tokens =

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

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

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-11 Thread via cfe-commits
@@ -1066,6 +1066,11 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { EXPECT_EQ(Tokens.size(), 17u) << Tokens; EXPECT_TOKEN(Tokens[4], tok::amp, TT_PointerOrReference); EXPECT_TOKEN(Tokens[5], tok::kw_requires, TT_RequiresClause); + + Tokens =

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-11 Thread via cfe-commits
https://github.com/mydeveloperday edited https://github.com/llvm/llvm-project/pull/77704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-11 Thread via cfe-commits
https://github.com/mydeveloperday commented: LGTM https://github.com/llvm/llvm-project/pull/77704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-10 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/77704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Emilia Kond (rymiel) Changes clang-format performs a heuristic to see if a right parenthesis is the parenthesis of a cast expression. This check never looked ahead to see if the next token is an ampamp token. This resulted in the

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-10 Thread Emilia Kond via cfe-commits
https://github.com/rymiel created https://github.com/llvm/llvm-project/pull/77704 clang-format performs a heuristic to see if a right parenthesis is the parenthesis of a cast expression. This check never looked ahead to see if the next token is an ampamp && token. This resulted in the paren