[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-27 Thread Emilia Kond via cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-27 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

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

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-16 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-16 Thread Emilia Kond via cfe-commits
https://github.com/rymiel resolved https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-16 Thread Emilia Kond via cfe-commits
https://github.com/rymiel resolved https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-16 Thread Emilia Kond via cfe-commits
https://github.com/rymiel resolved https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-16 Thread Emilia Kond via cfe-commits
https://github.com/rymiel updated https://github.com/llvm/llvm-project/pull/65908 >From 0cfeaee5ec5c431bc15fb037f2a20c944c508c2a Mon Sep 17 00:00:00 2001 From: Emilia Kond Date: Sun, 10 Sep 2023 23:01:39 +0300 Subject: [PATCH 1/3] [clang-format] Fix requires misannotation with comma clang-form

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-16 Thread Owen Pan via cfe-commits
@@ -1019,10 +1019,12 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { Tokens = annotate("void f() & requires(true) {}"); EXPECT_EQ(Tokens.size(), 12u) << Tokens; + EXPECT_TOKEN(Tokens[5], tok::kw_requires, TT_RequiresClause); EXPECT_TOKEN(Tokens[

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-16 Thread Owen Pan via cfe-commits
@@ -1019,10 +1019,12 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { Tokens = annotate("void f() & requires(true) {}"); EXPECT_EQ(Tokens.size(), 12u) << Tokens; + EXPECT_TOKEN(Tokens[5], tok::kw_requires, TT_RequiresClause); EXPECT_TOKEN(Tokens[

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-16 Thread Owen Pan via cfe-commits
@@ -1135,6 +1145,14 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresExpressions) { EXPECT_TOKEN(Tokens[3], tok::kw_requires, TT_RequiresExpression); EXPECT_TOKEN(Tokens[4], tok::l_paren, TT_RequiresExpressionLParen); EXPECT_TOKEN(Tokens[14], tok::l_brace, TT_RequiresExp

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-16 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: Nits. https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-16 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Emilia Kond via cfe-commits
https://github.com/rymiel resolved https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Emilia Kond via cfe-commits
https://github.com/rymiel resolved https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Emilia Kond via cfe-commits
https://github.com/rymiel resolved https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Emilia Kond via cfe-commits
https://github.com/rymiel updated https://github.com/llvm/llvm-project/pull/65908: >From 0cfeaee5ec5c431bc15fb037f2a20c944c508c2a Mon Sep 17 00:00:00 2001 From: Emilia Kond Date: Sun, 10 Sep 2023 23:01:39 +0300 Subject: [PATCH 1/2] [clang-format] Fix requires misannotation with comma clang-for

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Björn Schäpers via cfe-commits
@@ -3369,9 +3369,13 @@ bool clang::format::UnwrappedLineParser::parseRequires() { case tok::kw_volatile: case tok::kw_const: case tok::comma: - FormatTok = Tokens->setPosition(StoredPosition); - parseRequiresExpression(RequiresToken); - return false;

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Björn Schäpers via cfe-commits
@@ -3369,9 +3369,13 @@ bool clang::format::UnwrappedLineParser::parseRequires() { case tok::kw_volatile: case tok::kw_const: case tok::comma: - FormatTok = Tokens->setPosition(StoredPosition); - parseRequiresExpression(RequiresToken); - return false;

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Björn Schäpers via cfe-commits
@@ -1016,6 +1016,14 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { ASSERT_EQ(Tokens.size(), 22u) << Tokens; EXPECT_TOKEN(Tokens[4], tok::kw_requires, TT_RequiresClause); EXPECT_TOKEN(Tokens[10], tok::ampamp, TT_PointerOrReference); + + Tokens = a

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks requested changes to this pull request. https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Björn Schäpers via cfe-commits
@@ -1016,6 +1016,14 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { ASSERT_EQ(Tokens.size(), 22u) << Tokens; EXPECT_TOKEN(Tokens[4], tok::kw_requires, TT_RequiresClause); EXPECT_TOKEN(Tokens[10], tok::ampamp, TT_PointerOrReference); + + Tokens = a

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Owen Pan via cfe-commits
@@ -3369,9 +3369,13 @@ bool clang::format::UnwrappedLineParser::parseRequires() { case tok::kw_volatile: case tok::kw_const: case tok::comma: - FormatTok = Tokens->setPosition(StoredPosition); - parseRequiresExpression(RequiresToken); - return false;

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

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

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Emilia Kond via cfe-commits
@@ -3369,9 +3369,13 @@ bool clang::format::UnwrappedLineParser::parseRequires() { case tok::kw_volatile: case tok::kw_const: case tok::comma: - FormatTok = Tokens->setPosition(StoredPosition); - parseRequiresExpression(RequiresToken); - return false;

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Changes clang-format uses a heuristic to determine if a requires() is either a requires clause or requires expression, based on what is in the parentheses. Part of this heuristic assumed that a requires clause can never contain a comma, howev

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes clang-format uses a heuristic to determine if a requires() is either a requires clause or requires expression, based on what is in the parentheses. Part of this heuristic assumed that a requires clause can never contain a comma, however this

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread via cfe-commits
https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread via cfe-commits
https://github.com/llvmbot labeled https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Emilia Kond via cfe-commits
https://github.com/rymiel created https://github.com/llvm/llvm-project/pull/65908: clang-format uses a heuristic to determine if a requires() is either a requires clause or requires expression, based on what is in the parentheses. Part of this heuristic assumed that a requires clause can never

[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

2023-09-10 Thread Emilia Kond via cfe-commits
https://github.com/rymiel review_requested https://github.com/llvm/llvm-project/pull/65908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits