History log of /llvm-project-15.0.7/clang/lib/Format/UnwrappedLineParser.cpp (Results 1 – 25 of 556)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# d2eda492 16-Jul-2022 Björn Schäpers <[email protected]>

[clang-format] Mark constexpr lambdas as lambda

Otherwise the brace was detected as a function brace, not wrong per se,
but when directly calling the lambda the calling parens were put on the
next l

[clang-format] Mark constexpr lambdas as lambda

Otherwise the brace was detected as a function brace, not wrong per se,
but when directly calling the lambda the calling parens were put on the
next line.

Differential Revision: https://reviews.llvm.org/D129946

show more ...


# a0458d92 16-Jul-2022 owenca <[email protected]>

[clang-format] Never remove braces in macro definitions

Fixes #56559.

Differential Revision: https://reviews.llvm.org/D129921


# 4de0680f 05-Jul-2022 Manuel Klimek <[email protected]>

Fix use of pointer arithmetic instead of iterators.


# 2e32ff10 26-Jun-2022 sstwcw <[email protected]>

[clang-format] Handle Verilog preprocessor directives

Verilog uses the backtick instead of the hash. In this revision
backticks are lexed manually and then get labeled as hashes so the logic
for ha

[clang-format] Handle Verilog preprocessor directives

Verilog uses the backtick instead of the hash. In this revision
backticks are lexed manually and then get labeled as hashes so the logic
for handling C preprocessor stuff don't have to change. Hashes get
labeled as identifiers for Verilog-specific stuff like delays.

Reviewed By: HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D124749

show more ...


# 9ed2e68c 26-Jun-2022 sstwcw <[email protected]>

[clang-format] Parse Verilog if statements

This patch mainly handles treating `begin` as block openers.

While and for statements will be handled in another patch.

Reviewed By: HazardyKnusperkeks

[clang-format] Parse Verilog if statements

This patch mainly handles treating `begin` as block openers.

While and for statements will be handled in another patch.

Reviewed By: HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D123450

show more ...


# b3aeca39 24-Jun-2022 Björn Schäpers <[email protected]>

[clang-format] Further improve requires clause detection

If there is a typeish token before the requires, it can't be a requires
expression.

Fixes https://github.com/llvm/llvm-project/issues/56176

[clang-format] Further improve requires clause detection

If there is a typeish token before the requires, it can't be a requires
expression.

Fixes https://github.com/llvm/llvm-project/issues/56176

Differential Revision: https://reviews.llvm.org/D128496

show more ...


Revision tags: llvmorg-14.0.6
# 7cb0bc8a 13-Jun-2022 owenca <[email protected]>

[clang-format] Handle more cases for RemoveBracesLLVM

Call mightFitOneOneline() on the line before the closing brace only
if it is at the level of the block.

Differential Revision: https://reviews.

[clang-format] Handle more cases for RemoveBracesLLVM

Call mightFitOneOneline() on the line before the closing brace only
if it is at the level of the block.

Differential Revision: https://reviews.llvm.org/D127614

show more ...


# 05d77102 10-Jun-2022 owenca <[email protected]>

[clang-format] Fix a bug in RemoveBracesLLVM

Remove the braces of an else block only if the r_brace of the block
is followed by an if.

Differential Revision: https://reviews.llvm.org/D127532


Revision tags: llvmorg-14.0.5
# 5ead1f13 06-Jun-2022 owenca <[email protected]>

[clang-format] Remove braces of else blocks that embody an if block

Fixes #55663.

Differential Revision: https://reviews.llvm.org/D127260


# b5b33fbf 07-Jun-2022 owenca <[email protected]>

[clang-format] Skip parsing a block if it's nested too deep

Fixes #55912.

Differential Revision: https://reviews.llvm.org/D127183


# 1fd6f06b 07-Jun-2022 Benjamin Kramer <[email protected]>

[format] Fix an uninitialized variable

parseBlock may decide to leave it unchanged. Found by msan.


# ec90bc0e 03-Jun-2022 owenca <[email protected]>

[clang-format][NFC] Clean up the unwrapped line parser

Change the signatures of parseBlock(), parseLevel(), and
parseStructuralElement() to support combining else and if when
removing braces. See #5

[clang-format][NFC] Clean up the unwrapped line parser

Change the signatures of parseBlock(), parseLevel(), and
parseStructuralElement() to support combining else and if when
removing braces. See #55663.

Differential Revision: https://reviews.llvm.org/D127005

show more ...


# fc1c160f 04-Jun-2022 owenca <[email protected]>

[clang-format] Handle attributes for for/while loops

Fixes #55853.

Differential Revision: https://reviews.llvm.org/D127054


# db15e312 01-Jun-2022 owenca <[email protected]>

[clang-format] Handle do-while loops for RemoveBracesLLVM

Also updates the unit tests to match the updated LLVM Coding
Standards.

Differential Revision: https://reviews.llvm.org/D126758


# 5bf44aa4 25-May-2022 owenca <[email protected]>

[clang-format][NFC] Refactor UnwrappedLineParser::parseBlock()

Differential Revision: https://reviews.llvm.org/D126358


# 5221875a 26-May-2022 owenca <[email protected]>

[clang-format] Fix an invalid code generation in RemoveBracesLLVM

Fixes #55706.

Differential Revision: https://reviews.llvm.org/D126438


# 8f70d16c 26-May-2022 Tyler Chatow <[email protected]>

[clang-format] Handle attributes in enum declaration.

Fixes https://github.com/llvm/llvm-project/issues/55457

Ensures that attributes in the enum declaration are interpreted
correctly, for instance

[clang-format] Handle attributes in enum declaration.

Fixes https://github.com/llvm/llvm-project/issues/55457

Ensures that attributes in the enum declaration are interpreted
correctly, for instance:

```
enum class [[nodiscard]] E {
a,
b
};
```

Reviewed By: MyDeveloperDay, curdeius

Differential Revision: https://reviews.llvm.org/D125848

show more ...


Revision tags: llvmorg-14.0.4
# bebf7bdf 22-May-2022 owenca <[email protected]>

[clang-format][NFC] Insert/remove braces in clang/lib/Format/

Differential Revision: https://reviews.llvm.org/D126157


# 1443dbab 16-May-2022 owenca <[email protected]>

[clang-format] Handle "complex" conditionals in RemoveBracesLLVM

Do not remove braces if the conditional of if/for/while might not
fit on a single line even after the opening brace is removed.

Exam

[clang-format] Handle "complex" conditionals in RemoveBracesLLVM

Do not remove braces if the conditional of if/for/while might not
fit on a single line even after the opening brace is removed.

Examples:
// ColumnLimit: 20
// 45678901234567890
if (a) { /* Remove. */
foo();
}
if (-b >= c) { // Keep.
bar();
}

Differential Revision: https://reviews.llvm.org/D126052

show more ...


# 8bfccb96 21-May-2022 owenca <[email protected]>

[clang-format] Fix an infinite loop in parseJavaEnumBody()

Fixes #55623.


# 573a5b58 18-May-2022 Marek Kurdej <[email protected]>

Revert "[clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline."

This reverts commit 50cd52d9357224cce66a9e00c9a0417c658a5655.

It pr

Revert "[clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline."

This reverts commit 50cd52d9357224cce66a9e00c9a0417c658a5655.

It provoked regressions in C++ and ObjectiveC as described in https://reviews.llvm.org/D123676#3515949.

Reproducers:
```
MACRO_BEGIN
#if A
int f();
#else
int f();
#endif
```

```
NS_SWIFT_NAME(A)
@interface B : C
@property(readonly) D value;
@end
```

show more ...


# 9dffab9d 15-May-2022 owenca <[email protected]>

[clang-format][NFC] Don't call mightFitOnOneLine() unnecessarily

Clean up UnwrappedLineParser for RemoveBracesLLVM to avoid calling
mightFitOnOneLine() as much as possible.

Differential Revision: h

[clang-format][NFC] Don't call mightFitOnOneLine() unnecessarily

Clean up UnwrappedLineParser for RemoveBracesLLVM to avoid calling
mightFitOnOneLine() as much as possible.

Differential Revision: https://reviews.llvm.org/D125626

show more ...


# 2cdabc03 13-May-2022 owenca <[email protected]>

[clang-format] Handle "if consteval { ... }" for RemoveBracesLLVM

Differential Revision: https://reviews.llvm.org/D125593


# b6d8c84f 06-May-2022 owenca <[email protected]>

[clang-format] Don't remove braces if a 1-statement body would wrap

Reimplement the RemoveBracesLLVM feature which handles a
single-statement block that would get wrapped.

Fixes #53543.

Differenti

[clang-format] Don't remove braces if a 1-statement body would wrap

Reimplement the RemoveBracesLLVM feature which handles a
single-statement block that would get wrapped.

Fixes #53543.

Differential Revision: https://reviews.llvm.org/D125137

show more ...


# dab5e10e 11-May-2022 Sergey Semushin <[email protected]>

[clang-format] fix nested angle brackets parse inside concept definition

Due to how parseBracedList always stopped on the first closing angle
bracket and was used in parsing angle bracketed expressi

[clang-format] fix nested angle brackets parse inside concept definition

Due to how parseBracedList always stopped on the first closing angle
bracket and was used in parsing angle bracketed expression inside concept
definition, nested brackets inside concepts were parsed incorrectly.

nextToken() call before calling parseBracedList is required because
we were processing opening angle bracket inside parseBracedList second
time leading to incorrect logic after my fix.

Fixes https://github.com/llvm/llvm-project/issues/54943
Fixes https://github.com/llvm/llvm-project/issues/54837

Reviewed By: HazardyKnusperkeks, curdeius

Differential Revision: https://reviews.llvm.org/D123896

show more ...


12345678910>>...23