hnakamura5 wrote:
Thank you very much!
> how small the diff is
Maybe it is by TableGen's simple syntax, and that here we are parsing only the
structure of the statements. (e.g. ignoring the `` part of `if` now).
https://github.com/llvm/llvm-project/pull/78846
https://github.com/hnakamura5 closed
https://github.com/llvm/llvm-project/pull/78846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request.
I'm actually fascinated how small the diff is, the description led me to
thinking that we'd have a +/-200 lines change.
https://github.com/llvm/llvm-project/pull/78846
___
cfe-commits
https://github.com/hnakamura5 updated
https://github.com/llvm/llvm-project/pull/78846
>From fbf7e0f624fb7a4ef05970ee1241cf68f3f5f783 Mon Sep 17 00:00:00 2001
From: hnakamura5
Date: Sat, 20 Jan 2024 22:37:25 +0900
Subject: [PATCH 1/2] [clang-format] Support of TableGen statements in
unwrapped
@@ -2743,6 +2760,14 @@ FormatToken
*UnwrappedLineParser::parseIfThenElse(IfStmtKind *IfKind,
}
}
+ // TableGen's if statement has the form of `if then { ... }`.
+ if (Style.isTableGen()) {
+while (!eof() && !(FormatTok->is(Keywords.kw_then))) {
https://github.com/hnakamura5 edited
https://github.com/llvm/llvm-project/pull/78846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: Hirofumi Nakamura (hnakamura5)
Changes
Make TableGen's statements to be parsed considering their structure.
- Removed label
- Avoid class from being parsed as c++'s class
- Support if statement of the form `if cond then { ... }`
-
https://github.com/hnakamura5 created
https://github.com/llvm/llvm-project/pull/78846
Make TableGen's statements to be parsed considering their structure.
- Removed label
- Avoid class from being parsed as c++'s class
- Support if statement of the form `if then { ... }`
- Support defset