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

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 11 03:20:46 PST 2024


================
@@ -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 = annotate("template <typename T>\n"
+                    "concept C = (!Foo<T>) && Bar;");
+  ASSERT_EQ(Tokens.size(), 19u) << Tokens;
+  EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator);
----------------
mydeveloperday wrote:

out of interest what did it think it was  before?

https://github.com/llvm/llvm-project/pull/77704


More information about the cfe-commits mailing list