[clang-tools-extra] [clang-include-cleaner] Fix incorrect directory issue for writing files (PR #111375)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 10 02:40:10 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 f58e85a9725bb7d731c5ff5f79448e7150db6a6c 0c9477d3d7f2eb14f221a0a36cbd9dfd75015ef1 --extensions cpp -- clang-tools-extra/include-cleaner/test/tool.cpp clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp b/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp
index c0363b3d2b..6b1e716e12 100644
--- a/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp
+++ b/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp
@@ -174,7 +174,8 @@ private:
writeHTML();
// Source File's path of compiler invocation, converted to absolute path.
- llvm::SmallString<256> AbsPath(SM.getFileEntryRefForID(SM.getMainFileID())->getName());
+ llvm::SmallString<256> AbsPath(
+ SM.getFileEntryRefForID(SM.getMainFileID())->getName());
assert(!AbsPath.empty() && "Main file path not known?");
SM.getFileManager().makeAbsolutePath(AbsPath);
llvm::StringRef Code = SM.getBufferData(SM.getMainFileID());
``````````
</details>
https://github.com/llvm/llvm-project/pull/111375
More information about the cfe-commits
mailing list