https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/76804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/76804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ilya-biryukov wrote:
@owenca, @HazardyKnusperkeks could you please take another look and approve if
this looks good to you?
I believe all comments should be addressed at this point.
https://github.com/llvm/llvm-project/pull/76804
___
cfe-commits maili
@@ -1698,8 +1698,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind
Language) {
/*BasedOnStyle=*/"google",
},
};
- GoogleStyle.AttributeMacros.push_back("GUARDED_BY");
ilya-biryukov wrote:
I think we should postpone the inclusion of
https://github.com/ilya-biryukov updated
https://github.com/llvm/llvm-project/pull/76804
>From d8598a382fb1496a96d6ff8317c06cf73606ad84 Mon Sep 17 00:00:00 2001
From: Ilya Biryukov
Date: Wed, 3 Jan 2024 11:07:17 +0100
Subject: [PATCH 1/4] [Format] Fix isStartOfName to recognize attributes
This
https://github.com/ilya-biryukov updated
https://github.com/llvm/llvm-project/pull/76804
>From d8598a382fb1496a96d6ff8317c06cf73606ad84 Mon Sep 17 00:00:00 2001
From: Ilya Biryukov
Date: Wed, 3 Jan 2024 11:07:17 +0100
Subject: [PATCH 1/3] [Format] Fix isStartOfName to recognize attributes
This
@@ -1698,8 +1698,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind
Language) {
/*BasedOnStyle=*/"google",
},
};
- GoogleStyle.AttributeMacros.push_back("GUARDED_BY");
HazardyKnusperkeks wrote:
I'm open in all directions.
When clang
@@ -8498,9 +8498,6 @@ TEST_F(FormatTest,
BreaksFunctionDeclarationsWithTrailingTokens) {
"__attribute__((unused));");
Style = getGoogleStyle();
- ASSERT_THAT(Style.AttributeMacros,
owenca wrote:
Please also delete line 10:
```
#include
@@ -2209,7 +2209,8 @@ class AnnotatingParser {
(!NextNonComment && !Line.InMacroBody) ||
(NextNonComment &&
(NextNonComment->isPointerOrReference() ||
- NextNonComment->isOneOf(tok::identifier, tok::string_literal {
+ (Line.InPragm
owenca wrote:
> > can you also add a test to clang/unittests/Format/TokenAnnotatorTest.cpp
> > that ensures trailing attribute-like macros receive `StartOfName`
> > annotation to make sure we don't regress the signal in the future?
>
> ok, that opened a whole can of worms.
>
> ```
> Tokens =
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/76804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1698,8 +1698,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind
Language) {
/*BasedOnStyle=*/"google",
},
};
- GoogleStyle.AttributeMacros.push_back("GUARDED_BY");
kadircet wrote:
FWIW, not recognizing `foo` in `int foo BAR` as s
@@ -1698,8 +1698,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind
Language) {
/*BasedOnStyle=*/"google",
},
};
- GoogleStyle.AttributeMacros.push_back("GUARDED_BY");
ilya-biryukov wrote:
@HazardyKnusperkeks friendly ping. Any thoug
@@ -1698,8 +1698,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind
Language) {
/*BasedOnStyle=*/"google",
},
};
- GoogleStyle.AttributeMacros.push_back("GUARDED_BY");
ilya-biryukov wrote:
They are attribute macros indeed, the proble
@@ -10093,11 +10090,11 @@ TEST_F(FormatTest, ReturnTypeBreakingStyle) {
getGoogleStyleWithColumns(40));
verifyFormat("Tttt ppp\n"
"ABSL_GUARDED_BY(mutex1)\n"
- "ABSL_GUARDED_BY(mutex2);",
+
@@ -10093,11 +10090,11 @@ TEST_F(FormatTest, ReturnTypeBreakingStyle) {
getGoogleStyleWithColumns(40));
verifyFormat("Tttt ppp\n"
"ABSL_GUARDED_BY(mutex1)\n"
- "ABSL_GUARDED_BY(mutex2);",
+
@@ -1698,8 +1698,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind
Language) {
/*BasedOnStyle=*/"google",
},
};
- GoogleStyle.AttributeMacros.push_back("GUARDED_BY");
HazardyKnusperkeks wrote:
Even if that would not be needed anymor
ilya-biryukov wrote:
> can you also add a test to clang/unittests/Format/TokenAnnotatorTest.cpp that
> ensures trailing attribute-like macros receive `StartOfName` annotation to
> make sure we don't regress the signal in the future?
ok, that opened a whole can of worms.
```
Tokens = annotate(
https://github.com/kadircet approved this pull request.
can you also add a test to clang/unittests/Format/TokenAnnotatorTest.cpp that
ensures trailing attribute-like macros receive `StartOfName` annotation to make
sure we don't regress the signal in the future?
https://github.com/llvm/llvm-pro
https://github.com/ilya-biryukov updated
https://github.com/llvm/llvm-project/pull/76804
>From d8598a382fb1496a96d6ff8317c06cf73606ad84 Mon Sep 17 00:00:00 2001
From: Ilya Biryukov
Date: Wed, 3 Jan 2024 11:07:17 +0100
Subject: [PATCH 1/2] [Format] Fix isStartOfName to recognize attributes
This
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: Ilya Biryukov (ilya-biryukov)
Changes
This addresses a problem with formatting attributes. Some context:
- 199fc973ced20016b04ba540cf63a1d4914fa513 changed `isStartOfName` to fix
problems inside macro directives (judging by the adde
https://github.com/ilya-biryukov created
https://github.com/llvm/llvm-project/pull/76804
This addresses a problem with formatting attributes. Some context:
- 199fc973ced20016b04ba540cf63a1d4914fa513 changed `isStartOfName` to fix
problems inside macro directives (judging by the added tests), bu
22 matches
Mail list logo