[clang-tools-extra] In compilation databases, add support for relative directories (PR #69856)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 22 13:41:32 PDT 2023
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 f3ff0a67be46f2380ca597d21fe551cf2bbf41fd 01c1271b9e0f9583262bf00d5853ef362764909a -- clang-tools-extra/clangd/GlobalCompilationDatabase.cpp clang/include/clang/Tooling/JSONCompilationDatabase.h clang/lib/Tooling/JSONCompilationDatabase.cpp clang/unittests/Tooling/CompilationDatabaseTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/unittests/Tooling/CompilationDatabaseTest.cpp b/clang/unittests/Tooling/CompilationDatabaseTest.cpp
index 86bbe74bfdc4..9479d02532de 100644
--- a/clang/unittests/Tooling/CompilationDatabaseTest.cpp
+++ b/clang/unittests/Tooling/CompilationDatabaseTest.cpp
@@ -27,8 +27,8 @@ using testing::UnorderedElementsAreArray;
static void expectFailure(StringRef JSONDatabase, StringRef Explanation) {
std::string ErrorMessage;
EXPECT_EQ(nullptr,
- JSONCompilationDatabase::loadFromBuffer("", JSONDatabase, ErrorMessage,
- JSONCommandLineSyntax::Gnu))
+ JSONCompilationDatabase::loadFromBuffer(
+ "", JSONDatabase, ErrorMessage, JSONCommandLineSyntax::Gnu))
<< "Expected an error because of: " << Explanation.str();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/69856
More information about the cfe-commits
mailing list