[clang] [Tooling] Fix FixedCompilationDatabase with header compile flags (PR #73913)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 30 01:25:43 PST 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 6d2dfd37bd50b21ed90427052198bd1f06c761f8 61b0a506142990255f37fc5e52d56805bbba1889 -- clang/lib/Tooling/CompilationDatabase.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 fffef88a91..bcdfc38077 100644
--- a/clang/unittests/Tooling/CompilationDatabaseTest.cpp
+++ b/clang/unittests/Tooling/CompilationDatabaseTest.cpp
@@ -665,8 +665,7 @@ TEST(ParseFixedCompilationDatabase, HandlesPositionalArgsHeader) {
FixedCompilationDatabase::loadFromCommandLine(Argc, Argv, ErrorMsg);
ASSERT_TRUE((bool)Database);
ASSERT_TRUE(ErrorMsg.empty());
- std::vector<CompileCommand> Result =
- Database->getCompileCommands("source");
+ std::vector<CompileCommand> Result = Database->getCompileCommands("source");
ASSERT_EQ(1ul, Result.size());
ASSERT_EQ(".", Result[0].Directory);
ASSERT_THAT(Result[0].CommandLine,
``````````
</details>
https://github.com/llvm/llvm-project/pull/73913
More information about the cfe-commits
mailing list