[clang] [NFC][clang] Don't sort sections (PR #162166)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 6 14:46:17 PDT 2025
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 origin/main HEAD --extensions cpp -- clang/lib/Basic/Diagnostic.cpp
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index 0a261cac7..2b89370a4 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/lib/Basic/Diagnostic.cpp
@@ -538,11 +538,11 @@ WarningsSpecialCaseList::create(const llvm::MemoryBuffer &Input,
void WarningsSpecialCaseList::processSections(DiagnosticsEngine &Diags) {
static constexpr auto WarningFlavor = clang::diag::Flavor::WarningOrError;
- for (const auto& SectionEntry : Sections) {
+ for (const auto &SectionEntry : Sections) {
StringRef DiagGroup = SectionEntry.SectionStr;
if (DiagGroup == "*") {
- // Drop the default section introduced by special case list, we only support
- // exact diagnostic group names.
+ // Drop the default section introduced by special case list, we only
+ // support exact diagnostic group names.
// FIXME: We should make this configurable in the parser instead.
continue;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/162166
More information about the cfe-commits
mailing list