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 h,cpp --
clang/test/Modules/module-path-prefix-map.cpp
clang/test/PCH/pch-path-prefix-map.cpp clang/include/clang/Basic/LangOptions.h
clang/include/clang/Serialization/ASTReader.h clang/lib/Basic/LangOptions.cpp
clang/lib/DependencyScanning/DependencyScannerImpl.cpp
clang/lib/Frontend/ASTUnit.cpp clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Frontend/FrontendActions.cpp clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp --diff_from_common_commit
``````````
: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/LangOptions.cpp b/clang/lib/Basic/LangOptions.cpp
index 3c351ea7a..14f95ce5e 100644
--- a/clang/lib/Basic/LangOptions.cpp
+++ b/clang/lib/Basic/LangOptions.cpp
@@ -77,8 +77,8 @@ unsigned LangOptions::getOpenCLCompatibleVersion() const {
bool LangOptions::remapPathPrefix(SmallVectorImpl<char> &Path,
const bool reverse /*=false*/) const {
for (const auto &Entry : MacroPrefixMap) {
- const std::string& From = reverse ? Entry.second : Entry.first;
- const std::string& To = reverse ? Entry.first : Entry.second;
+ const std::string &From = reverse ? Entry.second : Entry.first;
+ const std::string &To = reverse ? Entry.first : Entry.second;
if (llvm::sys::path::replace_path_prefix(Path, From, To))
return true;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/203662
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits