https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/84599
>From 43238d58ff490073c13ff621faddceb89b05b22e Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 8 Mar 2024 19:47:54 -0800
Subject: [PATCH 1/2] [clang-format][NFC] Eliminate the IsCpp parameter in all
functions
owenca wrote:
> I mean multiple threads in the same process with different languages. maybe
> unlikely, but not impossible.
But libFormat/clang-format are _not_ multithreaded, right?
https://github.com/llvm/llvm-project/pull/84599
___
cfe-commits
owenca wrote:
> Then I'd go back to `Style.isCpp()`.
That would still require passing `Style.isCpp()` as the parameter to the
`FormatToken` (and other) functions.
> What happens if you use libFormat concurrently?
Can you elaborate? Doesn't each process get its own copy of the globals of a
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/84599
>From 43238d58ff490073c13ff621faddceb89b05b22e Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 8 Mar 2024 19:47:54 -0800
Subject: [PATCH 1/2] [clang-format][NFC] Eliminate the IsCpp parameter in all
functions
owenca wrote:
> That's okay for clang-format, but you couldn't use libFormat with different
> languages at once anymore.
I believe we still could because `IsCpp` is set to `Style.isCpp()` every time
new instances of the classes are constructed. I'll add a couple of test cases
to demonstrate
owenca wrote:
> Thanks for doing this. Does it mean we would have to add every type we use to
> our config? It would be much more convenient if clang-format treated the
> argument list the same way that it treats in definitions. For example
>
> ```shell
> printf "int\niso_time(time_t) {
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/84599
>From 43238d58ff490073c13ff621faddceb89b05b22e Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 8 Mar 2024 19:47:54 -0800
Subject: [PATCH] [clang-format][NFC] Eliminate the IsCpp parameter in all
functions
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/84599
None
>From bd3e866189ad4c238ea0afbbc30fbe88e0406eb9 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 8 Mar 2024 19:47:54 -0800
Subject: [PATCH] [clang-format][NFC] Eliminate the IsCpp parameter in all
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/83709
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> Just thinking out loud and maybe not for this patch but for a more general
> solution, what we seem to never do is collect information about types local
> to the file as we go; For example what if a first pass identified types from
> declarations and function argument
owenca wrote:
> Can the TypeNames mechanism be prepopulated with this list of types instead?
I don't see how that would work. Please note that the TypeNames option is not
specific to C/C++/Objective-C. Otherwise, I could simply change
`isTypeName(bool IsCpp)` to `isCppTypeName()`.
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/83709
>From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 2 Mar 2024 22:08:29 -0800
Subject: [PATCH 1/6] [clang-format] Handle common C++ non-keyword types as
such
Fixes
@@ -620,6 +620,23 @@ TEST_F(TokenAnnotatorTest, UnderstandsCasts) {
ASSERT_EQ(Tokens.size(), 8u) << Tokens;
EXPECT_TOKEN(Tokens[3], tok::r_paren, TT_Unknown);
EXPECT_TOKEN(Tokens[4], tok::amp, TT_BinaryOperator);
+
+ Tokens = annotate("#define FOO(bar)
@@ -268,20 +268,24 @@ const FormatToken
*LeftRightQualifierAlignmentFixer::analyzeRight(
if (isPossibleMacro(TypeToken))
return Tok;
+ const bool IsCpp = Style.isCpp();
+
// The case `const long long int volatile` -> `long long int const volatile`
// The case
@@ -71,8 +71,21 @@ bool FormatToken::isSimpleTypeSpecifier() const {
}
}
-bool FormatToken::isTypeOrIdentifier() const {
- return isSimpleTypeSpecifier() || Tok.isOneOf(tok::kw_auto, tok::identifier);
+// Sorted common C++ non-keyword types.
+static SmallVector
owenca wrote:
> > It does fix the example given.
>
> #83400 has 6 real-world examples. This patch fixes none of them. It also has
> a reduced testcase, which this patch does fix. But fixing the reduced
> testcase without fixing the real-world examples is not fixing the bug.
You took what I
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/83709
>From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 2 Mar 2024 22:08:29 -0800
Subject: [PATCH 1/5] [clang-format] Handle common C++ non-keyword types as
such
Fixes
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/83709
>From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 2 Mar 2024 22:08:29 -0800
Subject: [PATCH 1/4] [clang-format] Handle common C++ non-keyword types as
such
Fixes
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/83709
>From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 2 Mar 2024 22:08:29 -0800
Subject: [PATCH 1/3] [clang-format] Handle common C++ non-keyword types as
such
Fixes
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) {
return nullptr;
}
+// Sorted common C++ non-keyword types.
+static SmallVector CppNonKeywordTypes = {
+"byte", "int16_t", "int32_t", "int64_t", "int8_t",
+"size_t", "uint16_t", "uint32_t",
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) {
return nullptr;
}
+// Sorted common C++ non-keyword types.
+static SmallVector CppNonKeywordTypes = {
+"byte", "int16_t", "int32_t", "int64_t", "int8_t",
+"size_t", "uint16_t", "uint32_t",
owenca wrote:
> But looking for a parenthesized single identifier addresses all of the
> examples in the issue.
I don't think it would work, but you are welcome to submit a patch to prove me
wrong.
https://github.com/llvm/llvm-project/pull/83709
owenca wrote:
> > This patch does not only fix formatting of C-casting to a C++ standard
> > type. It correctly identifies (most of) such types and might have fixed
> > other kinds of bugs.
>
> Sure, this patch seems like a good change. But it does not fix #83400.
It does fix the example
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) {
return nullptr;
}
+// Sorted common C++ non-keyword types.
+static SmallVector CppNonKeywordTypes = {
+"byte", "int16_t", "int32_t", "int64_t", "int8_t",
+"size_t", "uint16_t", "uint32_t",
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) {
return nullptr;
}
+// Sorted common C++ non-keyword types.
+static SmallVector CppNonKeywordTypes = {
+"byte", "int16_t", "int32_t", "int64_t", "int8_t",
owenca wrote:
Good point
owenca wrote:
> > > Another possibility to consider for the original bug:
> > > `(single_identifier)` is almost certainly a cast, not redundant
> > > parentheses, unless `single_identifier` names a macro argument. So I
> > > wonder if that would be a better heuristic to use to fix the
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) {
return nullptr;
}
+// Sorted common C++ non-keyword types.
+static SmallVector CppNonKeywordTypes = {
+"byte", "int16_t", "int32_t", "int64_t", "int8_t",
+"size_t", "uint16_t", "uint32_t",
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) {
return nullptr;
}
+// Sorted common C++ non-keyword types.
+static SmallVector CppNonKeywordTypes = {
+"byte", "int16_t", "int32_t", "int64_t", "int8_t",
+"size_t", "uint16_t", "uint32_t",
owenca wrote:
> Another possibility to consider for the original bug: `(single_identifier)`
> is almost certainly a cast, not redundant parentheses, unless
> `single_identifier` names a macro argument. So I wonder if that would be a
> better heuristic to use to fix the regression.
I don’t
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) {
return nullptr;
}
+// Sorted common C++ non-keyword types.
+static SmallVector CppNonKeywordTypes = {
+"byte", "int16_t", "int32_t", "int64_t", "int8_t",
+"size_t", "uint16_t", "uint32_t",
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/83709
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -34,9 +34,15 @@ const char *getTokenTypeName(TokenType Type) {
return nullptr;
}
+// Sorted common C++ non-keyword types.
+static SmallVector CppNonKeywordTypes = {
+"byte", "int16_t", "int32_t", "int64_t", "int8_t",
+"size_t", "uint16_t", "uint32_t",
@@ -66,13 +72,17 @@ bool FormatToken::isSimpleTypeSpecifier() const {
case tok::kw_decltype:
case tok::kw__Atomic:
return true;
+ case tok::identifier:
+return IsCpp && std::binary_search(CppNonKeywordTypes.begin(),
+
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/83709
>From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 2 Mar 2024 22:08:29 -0800
Subject: [PATCH 1/2] [clang-format] Handle common C++ non-keyword types as
such
Fixes
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> So I did added a simple search and replace to the generating script so now
> every time [[[NAME]]] is reference it will use the members name.
Nice! Though why `[[[NAME]]]` in particular? Can we use `` instead?
https://github.com/llvm/llvm-project/pull/83415
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/83709
Fixes #83400.
>From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sat, 2 Mar 2024 22:08:29 -0800
Subject: [PATCH] [clang-format] Handle common C++ non-keyword types as
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/83533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> The question is: why? And why handle c++ different than all other languages?
This is the preparation for fixing/extending
`FormatToken::isSimpleTypeSpecifier()`, which I'll add a couple of parameters
to, e.g. `isSimpleTypeSpecifier(bool IsCpp, const LangOptions )`.
Also, this
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
Hi, you need to edit `clang/include/clang/Format/Format.h` and then run
`clang/docs/tools/dump_format_style.py` to regenerate
`clang/docs/ClangFormatStyleOptions.rst`.
https://github.com/llvm/llvm-project/pull/83415
___
cfe-commits
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/83533
None
>From a643963e818a9c6c4abea93c15f8c48f7291a837 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 29 Feb 2024 23:07:58 -0800
Subject: [PATCH] [clang-format][NFC] Replace Style.isCpp() with IsCpp
---
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/83380
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -16710,7 +16705,7 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
verifyFormat("typedef void (*cb)(int);", SpaceFuncDef);
verifyFormat("T A::operator()();", SpaceFuncDef);
verifyFormat("X A::operator++(T);", SpaceFuncDef);
- // verifyFormat("T A::operator() ()
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/83380
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -16671,9 +16667,8 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
SpaceFuncDecl);
verifyFormat("int f () throw(Deprecated);", SpaceFuncDecl);
verifyFormat("typedef void (*cb)(int);", SpaceFuncDecl);
- // FIXME these tests regressed behaviour.
-
@@ -16797,7 +16792,7 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
verifyFormat("int f() throw (Deprecated);", SomeSpace2);
verifyFormat("typedef void (*cb) (int);", SomeSpace2);
verifyFormat("T A::operator()();", SomeSpace2);
- // verifyFormat("X A::operator++
@@ -16710,7 +16705,7 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
verifyFormat("typedef void (*cb)(int);", SpaceFuncDef);
verifyFormat("T A::operator()();", SpaceFuncDef);
verifyFormat("X A::operator++(T);", SpaceFuncDef);
- // verifyFormat("T A::operator() ()
@@ -16797,7 +16792,7 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
verifyFormat("int f() throw (Deprecated);", SomeSpace2);
verifyFormat("typedef void (*cb) (int);", SomeSpace2);
verifyFormat("T A::operator()();", SomeSpace2);
- // verifyFormat("X A::operator++
@@ -16671,9 +16667,8 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
SpaceFuncDecl);
verifyFormat("int f () throw(Deprecated);", SpaceFuncDecl);
verifyFormat("typedef void (*cb)(int);", SpaceFuncDecl);
- // FIXME these tests regressed behaviour.
-
owenca wrote:
> > @HighCommander4 I got a better idea. It seems that we don't need to add the
> > parameter! See #82957. I think all you need to do is to call `getStyle()`
> > with the default `""` for the `StringRef Code` argument to skip the
> > Objective-C guesser.
>
> Thanks. That does
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/82911
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/82957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
I will abandon this pull request if #82957 gets approved.
https://github.com/llvm/llvm-project/pull/82911
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca converted_to_draft
https://github.com/llvm/llvm-project/pull/82911
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
@HighCommander4 I got a better idea. It seems that we don't need to add the
parameter! See #82957. I think all you need to do is to call `getStyle()` with
the default `""` for the `StringRef Code` argument to skip the Objective-C
guesser.
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/82957
None
>From 9334d008b4c7ae13fdeb674a6bb9b4dc62c6a1dd Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 25 Feb 2024 20:58:25 -0800
Subject: [PATCH] [clang-format][NFC] Skip ObjCHeaderStyleGuesser for empty
code
Author: Owen Pan
Date: 2024-02-25T16:08:37-08:00
New Revision: 085f9b0d146fc99bbb0e193593aad696fc50a056
URL:
https://github.com/llvm/llvm-project/commit/085f9b0d146fc99bbb0e193593aad696fc50a056
DIFF:
https://github.com/llvm/llvm-project/commit/085f9b0d146fc99bbb0e193593aad696fc50a056.diff
owenca wrote:
@HighCommander4 see #82911
https://github.com/llvm/llvm-project/pull/78925
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/82911
Add a boolean parameter GuessObjC that defaults to true. This allows e.g.
clangd to bypass ObjCHeaderStyleGuesser.process() by passing false for the
parameter.
>From bd85fd1dff5ac7b72913ed175daec3809896e6c0 Mon
https://github.com/owenca closed 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
@@ -420,6 +420,8 @@ struct UnwrappedLineNode {
SmallVector Children;
};
+std::ostream <<(std::ostream , const UnwrappedLine );
+
owenca wrote:
Ah, thanks for the explanation.
https://github.com/llvm/llvm-project/pull/82523
@@ -90,6 +90,12 @@ class ScopedDeclarationState {
} // end anonymous namespace
+std::ostream <<(std::ostream , const UnwrappedLine ) {
+ llvm::raw_os_ostream OS(Stream);
+ printLine(OS, Line);
+ return Stream;
+}
+
owenca wrote:
Delete.
@@ -287,6 +287,21 @@ TEST_F(FormatTestMacroExpansion,
Style);
}
+TEST_F(FormatTestMacroExpansion, IndentChildrenWithinMacroCall) {
+ FormatStyle Style = getGoogleStyleWithColumns(22);
+ Style.Macros.push_back("MACRO(a, b)=a=(b)");
+ verifyFormat("void f()
@@ -19,6 +19,7 @@
#include "clang/Basic/TokenKinds.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/Support/Debug.h"
+#include
owenca wrote:
Not needed explicitly.
https://github.com/llvm/llvm-project/pull/82523
@@ -420,6 +420,8 @@ struct UnwrappedLineNode {
SmallVector Children;
};
+std::ostream <<(std::ostream , const UnwrappedLine );
+
owenca wrote:
Delete.
https://github.com/llvm/llvm-project/pull/82523
___
owenca wrote:
> > If we add a `bool GuessObjC` parameter to `guessLanguage()`, would that
> > solve the problem?
>
> I assume you mean making it so that when clangd calls into `guessLanguage()`,
> the ObjC guessing algorithm is skipped entirely.
I'm not familiar with clangd use cases, but I
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/82735
Also insert separators for decimal integers longer than 4 digits.
>From e0a9d61283276bddda8231b599697cf4d497ff0a Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 22 Feb 2024 20:56:47 -0800
Subject: [PATCH]
https://github.com/owenca approved this pull request.
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
owenca wrote:
> As a side note, I tried adding these two tests but they fail, meaning the
> cursor is still incorrectly computed with CRLF when replacing lines.
>
> This is due to adding lines between the include groups (with Regroup option),
> as this new line is added with only the
@@ -3134,20 +3135,24 @@ static void sortCppIncludes(const FormatStyle ,
}
result += Includes[Index].Text;
if (Cursor && CursorIndex == Index)
- *Cursor = IncludesBeginOffset + result.size() - CursorToEOLOffset;
+ NewCursor = IncludesBeginOffset +
https://github.com/owenca commented:
`git diff Format.cpp` output:
```
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -3116,6 +3116,7 @@ static void sortCppIncludes(const FormatStyle ,
return;
}
+ const auto OldCursor = Cursor ? *Cursor : 0;
std::string
@@ -3134,20 +3135,24 @@ static void sortCppIncludes(const FormatStyle ,
}
result += Includes[Index].Text;
if (Cursor && CursorIndex == Index)
- *Cursor = IncludesBeginOffset + result.size() - CursorToEOLOffset;
+ NewCursor = IncludesBeginOffset +
@@ -3134,20 +3135,24 @@ static void sortCppIncludes(const FormatStyle ,
}
result += Includes[Index].Text;
if (Cursor && CursorIndex == Index)
- *Cursor = IncludesBeginOffset + result.size() - CursorToEOLOffset;
+ NewCursor = IncludesBeginOffset +
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/77456
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3123,6 +3123,7 @@ static void sortCppIncludes(const FormatStyle ,
}
std::string result;
+ unsigned NewCursor = UINT_MAX;
owenca wrote:
```suggestion
const auto OldCursor = Cursor ? *Cursor : 0;
```
https://github.com/llvm/llvm-project/pull/77456
owenca wrote:
> However, for clangd users, a crucial difference between `guessLanguage()` vs.
> other code in libFormat that uses `UnwrappedLineParser`, is that
> `guessLanguage()` gets called as soon as a file is opened in the editor,
> while the other code is only called if the user
@@ -13503,6 +13503,9 @@ TEST_F(FormatTest, IncorrectCodeUnbalancedBraces) {
verifyFormat("{");
verifyFormat("#})");
verifyNoCrash("(/**/[:!] ?[).");
+ verifyNoCrash("struct X{"
+" operator iunt("
owenca wrote:
```suggestion
@@ -3817,7 +3817,7 @@ void
TokenAnnotator::calculateFormattingInformation(AnnotatedLine ) const {
do {
Tok = Tok->Next;
} while (Tok && Tok->isNot(TT_OverloadedOperatorLParen));
-if (!Tok)
+if (!Tok || !Tok->Next)
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/82278
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> > couldn't we just use the .clang-format-ignore file to say... hey don't
> > bother with this file, we can't do it...
>
> I think that's a good solution for avoiding the OOM when actually trying to
> format the file, in combination with this patch for avoiding the OOM in
>
Author: Owen Pan
Date: 2024-02-20T00:28:26-08:00
New Revision: 119a72866f0e143127355fe6e03f57c4f8bab1ae
URL:
https://github.com/llvm/llvm-project/commit/119a72866f0e143127355fe6e03f57c4f8bab1ae
DIFF:
https://github.com/llvm/llvm-project/commit/119a72866f0e143127355fe6e03f57c4f8bab1ae.diff
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/81848
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/82278
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/82278
Fixes #79833.
>From 4bcf6dba8b97096801be550c4a8d1626ed57e475 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Mon, 19 Feb 2024 13:11:29 -0800
Subject: [PATCH] [clang-format] Fix RemoveSemicolon for empty
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/82097
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/82097
>From f02c1acefe642065cae01ced98b168ce33b98d47 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 16 Feb 2024 23:27:12 -0800
Subject: [PATCH 1/2] [clang-format] Correctly annotate block braces of empty
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/82097
Also reformat polly.
Fixes #79834.
>From f02c1acefe642065cae01ced98b168ce33b98d47 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 16 Feb 2024 23:27:12 -0800
Subject: [PATCH] [clang-format] Correctly annotate
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/81958
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> LGTM, as long as someone doesn't say it should be
>
> ```c++
> #if FOO
>constexpr
> #endif
>inline
>int i = 0;
> ```
>
> but I think this change is fine..I would rather we didn't try and support
> that.. thank you.
Yep! Otherwise, you would have to handle the
@@ -22893,6 +22893,19 @@ TEST_F(FormatTest, FormatsLambdas) {
LLVMWithBeforeLambdaBody);
verifyFormat("FctWithTwoParams_SLS_All([]() { return 43; }, 87);",
LLVMWithBeforeLambdaBody);
+ verifyFormat(
+ "FctWithTwoParams_SLS_All(\n"
+ "
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/81848
___
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/81848
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Owen Pan
Date: 2024-02-16T01:47:49-08:00
New Revision: 92ef40874d58d4fca4b7657c31ab2538e1301f26
URL:
https://github.com/llvm/llvm-project/commit/92ef40874d58d4fca4b7657c31ab2538e1301f26
DIFF:
https://github.com/llvm/llvm-project/commit/92ef40874d58d4fca4b7657c31ab2538e1301f26.diff
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/81958
Fixes #80579.
>From 13614f5760a26ba6134abdd555176a1aa2ed3974 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 15 Feb 2024 17:37:44 -0800
Subject: [PATCH] [clang-format] Don't sort qualifiers across
Author: Owen Pan
Date: 2024-02-14T21:40:07-08:00
New Revision: 6087d7bc0a9d7d4ad2c94a131c2bc427b767c9d7
URL:
https://github.com/llvm/llvm-project/commit/6087d7bc0a9d7d4ad2c94a131c2bc427b767c9d7
DIFF:
https://github.com/llvm/llvm-project/commit/6087d7bc0a9d7d4ad2c94a131c2bc427b767c9d7.diff
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/81591
___
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/81591
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1130,14 +1129,13 @@ template <> struct MappingTraits {
// AlwaysBreakAfterReturnType was not, initialize the latter from the
// former for backwards compatibility.
owenca wrote:
```suggestion
// BreakAfterReturnType was not, initialize the
201 - 300 of 1138 matches
Mail list logo