rymiel wrote:
Seems to also work for top-level types (`::int_64_t constexpr x{123};` works
correctly) but breaks for fully qualified types (`::std::int64_t constexpr
x{123};` becomes `::constexpr std::int64_t x{123};`)
https://github.com/llvm/llvm-project/pull/125327
__
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/125021
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/124085
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel approved this pull request.
#121675
https://github.com/llvm/llvm-project/pull/121539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel approved this pull request.
these tests are so inconsistent but I guess it's not that critical
https://github.com/llvm/llvm-project/pull/121451
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
rymiel wrote:
This is a good fix but I think it might not be addressing the whole issue. This
isn't a problem with just *compound-requirement*, it's the case for
*simple-requirement*s too.
This is valid:
```c++
template
concept Multiplicable = requires(T a, T b) { a * b; };
```
but clang-form
@@ -3246,8 +3246,15 @@ tooling::Replacements sortCppIncludes(const FormatStyle
&Style, StringRef Code,
SmallVector RawStringMatches;
std::string RawStringTermination = ")\"";
- for (;;) {
-auto Pos = Code.find('\n', SearchFrom);
+ for (const auto Size = Code.size();
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/120821
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel closed
https://github.com/llvm/llvm-project/pull/110942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel updated
https://github.com/llvm/llvm-project/pull/110942
>From ef604d0bd621cfef32a8dd4b5410bd530ed2fe80 Mon Sep 17 00:00:00 2001
From: Emilia Kond
Date: Thu, 3 Oct 2024 03:06:10 +0300
Subject: [PATCH 1/3] [clang-format] Make some binary operations imply requires
claus
https://github.com/rymiel edited
https://github.com/llvm/llvm-project/pull/110942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel edited
https://github.com/llvm/llvm-project/pull/110942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel updated
https://github.com/llvm/llvm-project/pull/110942
>From ef604d0bd621cfef32a8dd4b5410bd530ed2fe80 Mon Sep 17 00:00:00 2001
From: Emilia Kond
Date: Thu, 3 Oct 2024 03:06:10 +0300
Subject: [PATCH 1/2] [clang-format] Make some binary operations imply requires
claus
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/15
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3528,6 +3528,17 @@ bool UnwrappedLineParser::parseRequires() {
return false;
}
break;
+case tok::equalequal:
+case tok::greaterequal:
+case tok::lessequal:
+case tok::r_paren:
+case tok::pipepipe:
+ if (OpenAngles == 0) {
+
@@ -3528,6 +3528,17 @@ bool UnwrappedLineParser::parseRequires() {
return false;
}
break;
+case tok::equalequal:
+case tok::greaterequal:
+case tok::lessequal:
+case tok::r_paren:
+case tok::pipepipe:
+ if (OpenAngles == 0) {
+
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/110945
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3528,6 +3528,17 @@ bool UnwrappedLineParser::parseRequires() {
return false;
}
break;
+case tok::equalequal:
+case tok::greaterequal:
+case tok::lessequal:
+case tok::r_paren:
+case tok::pipepipe:
+ if (OpenAngles == 0) {
+
https://github.com/rymiel created
https://github.com/llvm/llvm-project/pull/110942
This patch adjusts the requires clause/expression lookahead heuristic to assume
that some binary operation mean that the requires keyword refers to a clause.
This partially reverts the removed case clauses from
@@ -243,14 +244,16 @@ class AnnotatingParser {
// operator that was misinterpreted because we are parsing template
// parameters.
// FIXME: This is getting out of hand, write a decent parser.
- if (InExpr && !Line.startsWith(tok::kw_template) &&
+ if
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/108929
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/105941
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/105921
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/102998
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/102261
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -176,31 +176,38 @@ class AnnotatingParser {
FormatToken *Left = CurrentToken->Previous;
Left->ParentBracket = Contexts.back().ContextKind;
ScopedContextCreator ContextCreator(*this, tok::less, 12);
-
Contexts.back().IsExpression = false;
+
+const auto *B
https://github.com/rymiel approved this pull request.
Wow!
https://github.com/llvm/llvm-project/pull/100980
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel edited
https://github.com/llvm/llvm-project/pull/100980
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rymiel wrote:
Are there tests for #98820?
https://github.com/llvm/llvm-project/pull/98849
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/96801
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rymiel wrote:
I'm not even sure if this change is a good idea! I think it's very likely it
will lead to regressions, for we don't have tests for such cases yet, it seems
https://github.com/llvm/llvm-project/pull/96801
___
cfe-commits mailing list
cfe-
https://github.com/rymiel created
https://github.com/llvm/llvm-project/pull/96801
Currently, question mark and colon tokens are not allowed between angle
brackets, as a template argument, if we are in an expression context.
However, expressions can still allowed in non-expression contexts, lea
rymiel wrote:
Isn't fixing bugs meant to change defaults? See #61732, #48746 and #93793. The
old version is confusing since it looks like a separate template parameter when
it isn't.
https://github.com/llvm/llvm-project/pull/96396
___
cfe-commits mai
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/96396
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel created
https://github.com/llvm/llvm-project/pull/96396
Reapply 4a7bf42a9b83144db8a11ac06cce4da21166e6a2
which was reverted in 34d44eb41dfbbbf01712719558b02763334fbeb3
Not sure why there are tests elsewhere in clang that rely on the output of
clang-format, but they we
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/95025
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1269,10 +1269,17 @@ class AnnotatingParser {
if (CurrentToken && CurrentToken->is(tok::less)) {
CurrentToken->setType(TT_TemplateOpener);
next();
- if (!parseAngle())
+ TemplateDeclarationDepth++;
+ if (!parseAngle()) {
+TemplateDeclar
https://github.com/rymiel updated
https://github.com/llvm/llvm-project/pull/95025
>From 6fc09d022a0e4e395a1b8e17166641dffc7c12eb Mon Sep 17 00:00:00 2001
From: Emilia Kond
Date: Mon, 10 Jun 2024 22:17:29 +0300
Subject: [PATCH 1/5] [clang-format] Don't count template template parameter as
decla
@@ -1269,10 +1269,17 @@ class AnnotatingParser {
if (CurrentToken && CurrentToken->is(tok::less)) {
CurrentToken->setType(TT_TemplateOpener);
next();
- if (!parseAngle())
+ TemplateDeclarationDepth++;
+ if (!parseAngle()) {
+TemplateDeclar
@@ -584,6 +584,23 @@ TEST_F(TokenAnnotatorTest,
UnderstandsNonTemplateAngleBrackets) {
EXPECT_TOKEN(Tokens[20], tok::greater, TT_BinaryOperator);
}
+TEST_F(TokenAnnotatorTest, UnderstandsTemplateTemplateParameters) {
+ auto Tokens = annotate("template typename X,\n"
+
https://github.com/rymiel updated
https://github.com/llvm/llvm-project/pull/95025
>From 6fc09d022a0e4e395a1b8e17166641dffc7c12eb Mon Sep 17 00:00:00 2001
From: Emilia Kond
Date: Mon, 10 Jun 2024 22:17:29 +0300
Subject: [PATCH 1/4] [clang-format] Don't count template template parameter as
decla
https://github.com/rymiel updated
https://github.com/llvm/llvm-project/pull/95025
>From 6fc09d022a0e4e395a1b8e17166641dffc7c12eb Mon Sep 17 00:00:00 2001
From: Emilia Kond
Date: Mon, 10 Jun 2024 22:17:29 +0300
Subject: [PATCH 1/3] [clang-format] Don't count template template parameter as
decla
https://github.com/rymiel updated
https://github.com/llvm/llvm-project/pull/95025
>From 6fc09d022a0e4e395a1b8e17166641dffc7c12eb Mon Sep 17 00:00:00 2001
From: Emilia Kond
Date: Mon, 10 Jun 2024 22:17:29 +0300
Subject: [PATCH 1/2] [clang-format] Don't count template template parameter as
decla
@@ -1591,6 +1591,12 @@ TEST_F(TokenAnnotatorTest, UnderstandsLambdas) {
EXPECT_TOKEN(Tokens[15], tok::arrow, TT_TrailingReturnArrow);
EXPECT_TOKEN(Tokens[17], tok::l_brace, TT_LambdaLBrace);
+ Tokens = annotate("auto l = [] -> struct S { return {}; };");
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/95084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel edited https://github.com/llvm/llvm-project/pull/95025
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rymiel wrote:
Note: I understand my solution of adding a member variable is inelegant, I am
of course open to ways on making it better
https://github.com/llvm/llvm-project/pull/95025
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://list
https://github.com/rymiel created
https://github.com/llvm/llvm-project/pull/95025
In ContinuationIndenter::mustBreak, a break is required between a template
declaration and the function/class declaration it applies to, if the template
declaration spans multiple lines.
However, this also inclu
rymiel wrote:
Technically also applies to attributes applied to the return type of the
lambda, i.e.
```
int main() {
very_long_function_name_yes_it_is_really_long(
// also happens with constexpr specifier
[](auto n) [[attribute]]
-> std::enable_if_t<
std::is_arithme
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/94560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/92880
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel approved this pull request.
Also works well for pattern matching
```java
switch (obj) {
case String s when !s.isEmpty() -> 0;
default -> 1;
}
```
and upcoming destructuring
```java
switch (n) {
case IntExpr(int i) -> i;
case N
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/91056
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel created
https://github.com/llvm/llvm-project/pull/91056
Assume that a comma in front of `enum` means it is actually a part of an
elaborated type in a template parameter list.
Fixes https://github.com/llvm/llvm-project/issues/47782
>From f625311fe7259a07607cc2bb8c13e0
https://github.com/rymiel approved this pull request.
I can definitely think of cases where an expression might contain `...` and
still have redundant parentheses, i.e. if the ellipsis isn't part of a fold
expression
For example:
```c++
template
std::tuple foo() {
return (std::tuple{});
}
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/88628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/82735
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/82349
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel updated
https://github.com/llvm/llvm-project/pull/82349
>From 25ca98534f0d5dbd96ff74c802528171787ced45 Mon Sep 17 00:00:00 2001
From: Emilia Kond
Date: Tue, 20 Feb 2024 14:11:33 +0200
Subject: [PATCH 1/4] [clang-format] Fix crash in TokenAnnotator
The while loop on li
https://github.com/rymiel updated
https://github.com/llvm/llvm-project/pull/82349
>From 25ca98534f0d5dbd96ff74c802528171787ced45 Mon Sep 17 00:00:00 2001
From: Emilia Kond
Date: Tue, 20 Feb 2024 14:11:33 +0200
Subject: [PATCH 1/3] [clang-format] Fix crash in TokenAnnotator
The while loop on li
https://github.com/rymiel updated
https://github.com/llvm/llvm-project/pull/82349
>From 25ca98534f0d5dbd96ff74c802528171787ced45 Mon Sep 17 00:00:00 2001
From: Emilia Kond
Date: Tue, 20 Feb 2024 14:11:33 +0200
Subject: [PATCH 1/2] [clang-format] Fix crash in TokenAnnotator
The while loop on li
https://github.com/rymiel created
https://github.com/llvm/llvm-project/pull/82349
The while loop on line 3814 can cause a segmentation fault getting the Next
field on a nullptr. This is because further down, on line 3823, there is
another for loop, which assigns Tok to Tok->Next in its initial
rymiel wrote:
I'm sorry, I do not have the time for this right now, and I'd rather not leave
this open for no reason
https://github.com/llvm/llvm-project/pull/78852
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/78852
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/78847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel approved this pull request.
Thank you for the lightning fast fix!
https://github.com/llvm/llvm-project/pull/80085
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/77712
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest,
UnderstandsRequiresClausesAndConcepts) {
"concept C = (!Foo) && Bar;");
rymiel wrote:
88d1de5ec64210686d93a90529583505635d257d
https://github.com/llvm/llvm-project/pull/78847
___
Author: Emilia Kond
Date: 2024-01-22T14:53:47+02:00
New Revision: 88d1de5ec64210686d93a90529583505635d257d
URL:
https://github.com/llvm/llvm-project/commit/88d1de5ec64210686d93a90529583505635d257d
DIFF:
https://github.com/llvm/llvm-project/commit/88d1de5ec64210686d93a90529583505635d257d.diff
L
https://github.com/rymiel updated
https://github.com/llvm/llvm-project/pull/78847
>From 79ebbdc60cfa0635c9d889823a8b37710d9a4fb5 Mon Sep 17 00:00:00 2001
From: Emilia Kond
Date: Sat, 20 Jan 2024 15:44:16 +0200
Subject: [PATCH 1/3] [clang-format] Allow decltype in requires clause
If clang-forma
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/78921
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel updated
https://github.com/llvm/llvm-project/pull/78847
>From 79ebbdc60cfa0635c9d889823a8b37710d9a4fb5 Mon Sep 17 00:00:00 2001
From: Emilia Kond
Date: Sat, 20 Jan 2024 15:44:16 +0200
Subject: [PATCH 1/2] [clang-format] Allow decltype in requires clause
If clang-forma
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest,
UnderstandsRequiresClausesAndConcepts) {
"concept C = (!Foo) && Bar;");
ASSERT_EQ(Tokens.size(), 19u) << Tokens;
EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator);
+
+ Tokens = annotate("void f()
https://github.com/rymiel edited https://github.com/llvm/llvm-project/pull/78847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest,
UnderstandsRequiresClausesAndConcepts) {
"concept C = (!Foo) && Bar;");
ASSERT_EQ(Tokens.size(), 19u) << Tokens;
EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator);
+
+ Tokens = annotate("void f()
rymiel wrote:
https://github.com/llvm/llvm-project/issues/61233
The ambiguities this syntax extension can bring are pretty much impossible or
at least very hard to always handle, but I'll try to avoid breaking things
which weren't already broken.
https://github.com/llvm/llvm-project/pull/7885
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest,
UnderstandsRequiresClausesAndConcepts) {
"concept C = (!Foo) && Bar;");
ASSERT_EQ(Tokens.size(), 19u) << Tokens;
EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator);
+
+ Tokens = annotate("void f()
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest,
UnderstandsRequiresClausesAndConcepts) {
"concept C = (!Foo) && Bar;");
ASSERT_EQ(Tokens.size(), 19u) << Tokens;
EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator);
+
+ Tokens = annotate("void f()
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest,
UnderstandsRequiresClausesAndConcepts) {
"concept C = (!Foo) && Bar;");
ASSERT_EQ(Tokens.size(), 19u) << Tokens;
EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator);
+
+ Tokens = annotate("void f()
https://github.com/rymiel converted_to_draft
https://github.com/llvm/llvm-project/pull/78852
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel ready_for_review
https://github.com/llvm/llvm-project/pull/78847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel converted_to_draft
https://github.com/llvm/llvm-project/pull/78847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rymiel wrote:
clang-format does not support that extension in the first place, there's an
open issue for it. But I will try a few edge cases to see if it changes
anything or if it was already broken
https://github.com/llvm/llvm-project/pull/78852
___
https://github.com/rymiel created
https://github.com/llvm/llvm-project/pull/78852
Simply always return false if tok::ampamp is passed into
determineUnaryOperatorByUsage.
I've done a fix earlier regarding ampamp becoming an unary operator, this would
technically supersede that.
I'm not sure w
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest,
UnderstandsRequiresClausesAndConcepts) {
"concept C = (!Foo) && Bar;");
rymiel wrote:
So, GitHub won't actually let me leave a comment on the line I want to actually
talk about, but I notice
https://github.com/rymiel created
https://github.com/llvm/llvm-project/pull/78847
If clang-format is not sure whether a `requires` keyword starts a requires
clause or a requires expression, it looks ahead to see if any token
disqualifies it from being a requires clause. Among these tokens was
@@ -804,6 +806,46 @@ void FormatTokenLexer::handleTableGenMultilineString() {
FirstLineText, MultiLineString->OriginalColumn, Style.TabWidth,
Encoding);
}
+void FormatTokenLexer::handleTableGenNumericLikeIdentifier() {
+ FormatToken *Tok = Tokens.back();
+ // TableGen
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/78015
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/77833
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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 = annot
@@ -0,0 +1,321 @@
+===
+HLSL Function Calls
+===
+
+.. contents::
+ :local:
+
+Introduction
+
+
+This document describes the design and implementation of HLSL's function call
+semantics in Clang. This includes details related to argume
https://github.com/rymiel created
https://github.com/llvm/llvm-project/pull/77712
clang-format has logic to align declarations of multiple variables of the same
type, aligning them at the equals sign. This logic is applied in for loops as
well. However, this alignment logic also erroneously af
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 be
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/77045
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel approved this pull request.
https://github.com/llvm/llvm-project/pull/77013
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rymiel edited https://github.com/llvm/llvm-project/pull/77013
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3903,6 +3903,15 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) {
parseParens();
}
+ auto IsTemplate = [&] {
+FormatToken *Tok = InitialToken.Previous;
+while (Tok) {
+ if (Tok->is(tok::kw_template))
+return true;
+ Tok = Tok->
rymiel wrote:
Who should have the final say on the Google code style if not Google?
https://github.com/llvm/llvm-project/pull/76239
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -272,6 +276,38 @@ void FormatTokenLexer::tryMergePreviousTokens() {
return;
}
}
+ if (Style.isTableGen()) {
+if (tryMergeTokens({tok::l_square, tok::l_brace},
+ TT_TableGenMultiLineString)) {
+ Tokens.back()->Tok.setKind(tok::strin
1 - 100 of 169 matches
Mail list logo