[clang] [Attributes] Support Attributes being declared as only supporting late parsing when passing an experimental feature flag (PR #88596)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 15 11:22:39 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 9bd10853e505b61f5fe2e3b3592c76787a06aa31 3554ada2c327aa6fb5ce90e26876414123bdca2d -- clang/test/Driver/experimental-late-parse-attributes.c clang/include/clang/Parse/Parser.h clang/lib/Driver/ToolChains/Clang.cpp clang/lib/Parse/ParseDecl.cpp clang/utils/TableGen/ClangAttrEmitter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp
index e06be57d6b..8aa02313da 100644
--- a/clang/utils/TableGen/ClangAttrEmitter.cpp
+++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -1822,11 +1822,7 @@ void WriteSemanticSpellingSwitch(const std::string &VarName,
OS << " }\n";
}
-enum class LateAttrParseKind {
- Never = 0,
- Always = 1,
- ExperimentalOnly = 2
-};
+enum class LateAttrParseKind { Never = 0, Always = 1, ExperimentalOnly = 2 };
static LateAttrParseKind getLateAttrParseKind(const Record *Attr) {
// This function basically does
@@ -1909,16 +1905,15 @@ static void emitClangAttrLateParsedListImpl(RecordKeeper &Records,
static void emitClangAttrLateParsedList(RecordKeeper &Records,
raw_ostream &OS) {
OS << "#if defined(CLANG_ATTR_LATE_PARSED_LIST)\n";
- emitClangAttrLateParsedListImpl(Records, OS,
- LateAttrParseKind::Always);
+ emitClangAttrLateParsedListImpl(Records, OS, LateAttrParseKind::Always);
OS << "#endif // CLANG_ATTR_LATE_PARSED_LIST\n\n";
}
static void emitClangAttrLateParsedExperimentalList(RecordKeeper &Records,
raw_ostream &OS) {
OS << "#if defined(CLANG_ATTR_LATE_PARSED_EXPERIMENTAL_LIST)\n";
- emitClangAttrLateParsedListImpl(
- Records, OS, LateAttrParseKind::ExperimentalOnly);
+ emitClangAttrLateParsedListImpl(Records, OS,
+ LateAttrParseKind::ExperimentalOnly);
OS << "#endif // CLANG_ATTR_LATE_PARSED_EXPERIMENTAL_LIST\n\n";
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/88596
More information about the cfe-commits
mailing list