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 c,cpp --
clang/lib/CodeGen/CodeGenModule.cpp clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/cspgo-instrumentation.c
clang/test/CodeGen/cspgo-instrumentation_lto.c
clang/test/CodeGen/cspgo-instrumentation_thinlto.c
clang/test/CodeGen/opt-record.c clang/test/CodeGen/pgo-instrumentation.c
clang/test/CodeGen/thinlto-clang-diagnostic-handler-in-be.c
clang/test/CodeGenCXX/profile-remap.cpp
clang/test/DebugInfo/CXX/fdebug-info-for-profiling.cpp
clang/test/Driver/cl-options.c clang/test/Driver/clang_f_opts.c
clang/test/Driver/fcs-profile-generate.c
clang/test/Driver/fsplit-machine-functions.c
clang/test/Frontend/optimization-remark-with-hotness-new-pm.c
clang/test/Profile/c-captured.c clang/test/Profile/c-counter-overflows.c
clang/test/Profile/c-general.c clang/test/Profile/c-outdated-data.c
clang/test/Profile/c-unprofiled-blocks.c clang/test/Profile/c-unprofiled.c
clang/test/Profile/cxx-class.cpp clang/test/Profile/cxx-hash-v2.cpp
clang/test/Profile/cxx-lambda.cpp clang/test/Profile/cxx-missing-bodies.cpp
clang/test/Profile/cxx-never-executed-branch.cpp
clang/test/Profile/cxx-rangefor.cpp clang/test/Profile/cxx-templates.cpp
clang/test/Profile/cxx-throws.cpp clang/test/Profile/func-entry.c
clang/test/Profile/misexpect-branch-cold.c
clang/test/Profile/misexpect-branch-nonconst-expected-val.c
clang/test/Profile/misexpect-branch-unpredictable.c
clang/test/Profile/misexpect-branch.c
clang/test/Profile/misexpect-switch-default.c
clang/test/Profile/misexpect-switch-nonconst.c
clang/test/Profile/misexpect-switch-only-default-case.c
clang/test/Profile/misexpect-switch.c
clang/test/Profile/profile-does-not-exist-ir.c
clang/test/Profile/profile-does-not-exist.c clang/test/Profile/profile-summary.c
``````````
: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/CodeGen/CodeGenModule.cpp
b/clang/lib/CodeGen/CodeGenModule.cpp
index 9e9631bf8..ac7c12224 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -494,10 +494,11 @@ CodeGenModule::CodeGenModule(ASTContext &C,
CodeGenOpts.ProfileInstrumentUsePath, *FS,
CodeGenOpts.ProfileRemappingFile);
if (auto E = ReaderOrErr.takeError()) {
- unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
- "Error in reading profile %0:
%1");
+ unsigned DiagID = Diags.getCustomDiagID(
+ DiagnosticsEngine::Error, "Error in reading profile %0: %1");
llvm::handleAllErrors(std::move(E), [&](const llvm::ErrorInfoBase &EI) {
- Diags.Report(DiagID) << CodeGenOpts.ProfileInstrumentUsePath <<
EI.message();
+ Diags.Report(DiagID)
+ << CodeGenOpts.ProfileInstrumentUsePath << EI.message();
});
return;
}
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp
b/clang/lib/Driver/ToolChains/Clang.cpp
index b1acdfc4d..e4c913ec0 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -501,8 +501,8 @@ static void addPGOAndCoverageFlags(const ToolChain &TC,
Compilation &C,
UsePath = Path;
}
StringRef UseKind;
- auto ReaderOrErr = llvm::IndexedInstrProfReader::create(
- UsePath, D.getVFS());
+ auto ReaderOrErr =
+ llvm::IndexedInstrProfReader::create(UsePath, D.getVFS());
if (auto E = ReaderOrErr.takeError()) {
auto DiagID = D.getDiags().getCustomDiagID(
DiagnosticsEngine::Error, "Error in reading profile %0: %1");
``````````
</details>
https://github.com/llvm/llvm-project/pull/159667
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits