[flang-commits] [clang] [clang-tools-extra] [flang] Reapply "[clang] Extend diagnose_if to accept more detailed warning information (#70976)" (PR #108453)
via flang-commits
flang-commits at lists.llvm.org
Thu Sep 12 13:59:52 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 d37d05795dbbdd1b7e629e966013df5967d2da5b b429f137f3c1e2b2a72c9f3f444f6d43a8b5e35d --extensions c,h,cpp -- clang/test/SemaCXX/diagnose_if-warning-group.cpp clang-tools-extra/clangd/Diagnostics.cpp clang-tools-extra/clangd/Diagnostics.h clang-tools-extra/clangd/ParsedAST.cpp clang-tools-extra/clangd/Preamble.cpp clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp clang/include/clang/Basic/Diagnostic.h clang/include/clang/Basic/DiagnosticCategories.h clang/include/clang/Basic/DiagnosticIDs.h clang/lib/Basic/Diagnostic.cpp clang/lib/Basic/DiagnosticIDs.cpp clang/lib/Frontend/LogDiagnosticPrinter.cpp clang/lib/Frontend/SerializedDiagnosticPrinter.cpp clang/lib/Frontend/TextDiagnosticPrinter.cpp clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaCUDA.cpp clang/lib/Sema/SemaDeclAttr.cpp clang/lib/Sema/SemaOverload.cpp clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/lib/Serialization/ASTReader.cpp clang/lib/Serialization/ASTWriter.cpp clang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp clang/test/Sema/diagnose_if.c clang/tools/diagtool/ListWarnings.cpp clang/tools/diagtool/ShowEnabledWarnings.cpp clang/tools/libclang/CXStoredDiagnostic.cpp flang/lib/Frontend/TextDiagnosticPrinter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Frontend/TextDiagnosticPrinter.cpp b/flang/lib/Frontend/TextDiagnosticPrinter.cpp
index 8b00fb69b3..e4d4cbe91b 100644
--- a/flang/lib/Frontend/TextDiagnosticPrinter.cpp
+++ b/flang/lib/Frontend/TextDiagnosticPrinter.cpp
@@ -38,8 +38,9 @@ TextDiagnosticPrinter::~TextDiagnosticPrinter() {}
static void printRemarkOption(llvm::raw_ostream &os,
clang::DiagnosticsEngine::Level level,
const clang::Diagnostic &info) {
- llvm::StringRef opt = info.getDiags()->getDiagnosticIDs()
- ->getWarningOptionForDiag(info.getID());
+ llvm::StringRef opt =
+ info.getDiags()->getDiagnosticIDs()->getWarningOptionForDiag(
+ info.getID());
if (!opt.empty()) {
// We still need to check if the level is a Remark since, an unknown option
// warning could be printed i.e. [-Wunknown-warning-option]
``````````
</details>
https://github.com/llvm/llvm-project/pull/108453
More information about the flang-commits
mailing list