[PATCH] D120140: [clang-format] Avoid inserting space after C++ casts.

2022-02-24 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGbfb4afee74c8: [clang-format] Avoid inserting space after C++ casts. (authored by curdeius). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D120140: [clang-format] Avoid inserting space after C++ casts.

2022-02-22 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius requested review of this revision. curdeius added a comment. I took another approach to fix the problem found in polly tests. I added CppCastLParen kind so as not to interfere with C-style casts. I also added a test case taken from lib/Format that got misformatted by the previous version

[PATCH] D120140: [clang-format] Avoid inserting space after C++ casts.

2022-02-22 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 410638. curdeius added a comment. This revision is now accepted and ready to land. - Fix. Add tests from inspired by polly and lib/Format that had misformats. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D12014

[PATCH] D120140: [clang-format] Avoid inserting space after C++ casts.

2022-02-20 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius planned changes to this revision. curdeius added a comment. This commit provokes failures in formatting tests of polly. Cf. https://lab.llvm.org/buildbot/#/builders/205/builds/3320. That's probably because of ) being annotated as CastRParen instead of Unknown before, hence being kept on

[PATCH] D120140: [clang-format] Avoid inserting space after C++ casts.

2022-02-20 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. curdeius marked an inline comment as done. Closed by commit rGe021987273be: [clang-format] Avoid inserting space after C++ casts. (authored by curdeius). Changed prior to commit: https://reviews.llvm.org/D120140?vs=409959

[PATCH] D120140: [clang-format] Avoid inserting space after C++ casts.

2022-02-18 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius marked an inline comment as done. curdeius added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1951 +// FIXME: Maybe we should handle identifiers ending with "_cast", +// e.g. bit_cast? +return true;

[PATCH] D120140: [clang-format] Avoid inserting space after C++ casts.

2022-02-18 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1951 +// FIXME: Maybe we should handle identifiers ending with "_cast", +// e.g. bit_cast? +return true; Very unlikely `bit_cast` gives you somethin

[PATCH] D120140: [clang-format] Avoid inserting space after C++ casts.

2022-02-18 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1740 +assert(Current.MatchingParen); +Current.MatchingParen->setType(TT_Unknown); + } To add some context, in the failing cases, the opening parenthesis was set t

[PATCH] D120140: [clang-format] Avoid inserting space after C++ casts.

2022-02-18 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: MyDeveloperDay, HazardyKnusperkeks, owenpan. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/53876. This is a solution for