[clang] [clang-tools-extra] [clang][lex] Remove `HeaderFileInfo::Framework` (PR #114460)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 31 13:30:59 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 3452149c059010e834050acd41a64595eb74df11 a623a41c4b4c02a87e2aaf225c15856c35ed4150 --extensions cpp,h -- clang-tools-extra/clangd/index/SymbolCollector.cpp clang/include/clang/Lex/DirectoryLookup.h clang/include/clang/Lex/HeaderSearch.h clang/include/clang/Lex/HeaderSearchOptions.h clang/lib/Driver/ToolChains/Clang.cpp clang/lib/Frontend/CompilerInvocation.cpp clang/lib/Lex/HeaderSearch.cpp clang/lib/Lex/InitHeaderSearch.cpp clang/lib/Serialization/ASTReader.cpp clang/lib/Serialization/ASTReaderInternals.h clang/lib/Serialization/ASTWriter.cpp clang/unittests/Lex/HeaderSearchTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang-tools-extra/clangd/index/SymbolCollector.cpp b/clang-tools-extra/clangd/index/SymbolCollector.cpp
index 91ae9d3003..3675eea536 100644
--- a/clang-tools-extra/clangd/index/SymbolCollector.cpp
+++ b/clang-tools-extra/clangd/index/SymbolCollector.cpp
@@ -427,8 +427,7 @@ private:
CachePathToFrameworkSpelling.erase(Res.first);
return std::nullopt;
}
- if (auto UmbrellaSpelling =
- getFrameworkUmbrellaSpelling(HS, *HeaderPath)) {
+ if (auto UmbrellaSpelling = getFrameworkUmbrellaSpelling(HS, *HeaderPath)) {
*CachedHeaderSpelling = *UmbrellaSpelling;
return llvm::StringRef(*CachedHeaderSpelling);
}
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 50e5d4af32..118614ba41 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -2028,11 +2028,11 @@ namespace {
endian::Writer LE(Out, llvm::endianness::little);
uint64_t Start = Out.tell(); (void)Start;
- unsigned char Flags = (Data.AlreadyIncluded << 6)
- | (Data.HFI.isImport << 5)
- | (Writer.isWritingStdCXXNamedModules() ? 0 :
- Data.HFI.isPragmaOnce << 4)
- | (Data.HFI.DirInfo << 1);
+ unsigned char Flags =
+ (Data.AlreadyIncluded << 6) | (Data.HFI.isImport << 5) |
+ (Writer.isWritingStdCXXNamedModules() ? 0
+ : Data.HFI.isPragmaOnce << 4) |
+ (Data.HFI.DirInfo << 1);
LE.write<uint8_t>(Flags);
if (Data.HFI.LazyControllingMacro.isID())
``````````
</details>
https://github.com/llvm/llvm-project/pull/114460
More information about the cfe-commits
mailing list