[clang] [clang-tools-extra] [clang] NFC: Remove `OptionalFileEntryRefDegradesToFileEntryPtr` (PR #74899)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 8 15:51:26 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 8615ead9a6d37e6353df1b652aadebe71ec6c242 de1d9c6808271ea802813daa71e6d94bce8a9894 -- clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp clang/include/clang/Basic/FileEntry.h clang/include/clang/Basic/Module.h clang/include/clang/Basic/SourceManager.h clang/include/clang/Lex/PreprocessorLexer.h clang/include/clang/Serialization/ModuleFile.h clang/lib/Frontend/CompilerInstance.cpp clang/lib/Lex/ModuleMap.cpp clang/lib/Lex/PPDirectives.cpp clang/lib/Lex/Pragma.cpp clang/lib/Lex/PreprocessorLexer.cpp clang/lib/Serialization/ASTReader.cpp clang/lib/Serialization/ASTWriter.cpp clang/lib/Serialization/ModuleManager.cpp clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp clang/tools/libclang/CXIndexDataConsumer.cpp clang/tools/libclang/CXIndexDataConsumer.h clang/unittests/Basic/FileEntryTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/tools/libclang/CXIndexDataConsumer.cpp b/clang/tools/libclang/CXIndexDataConsumer.cpp
index a327d39ee0..c1022263a5 100644
--- a/clang/tools/libclang/CXIndexDataConsumer.cpp
+++ b/clang/tools/libclang/CXIndexDataConsumer.cpp
@@ -1104,7 +1104,7 @@ void CXIndexDataConsumer::translateLoc(SourceLocation Loc,
if (FID.isInvalid())
return;
-
+
OptionalFileEntryRef FE = SM.getFileEntryRefForID(FID);
if (indexFile)
*indexFile = getIndexFile(FE);
diff --git a/clang/tools/libclang/CXIndexDataConsumer.h b/clang/tools/libclang/CXIndexDataConsumer.h
index eb9b2eaae2..54a3add3a9 100644
--- a/clang/tools/libclang/CXIndexDataConsumer.h
+++ b/clang/tools/libclang/CXIndexDataConsumer.h
@@ -461,7 +461,7 @@ private:
const DeclContext *getEntityContainer(const Decl *D) const;
CXIdxClientFile getIndexFile(OptionalFileEntryRef File);
-
+
CXIdxLoc getIndexLoc(SourceLocation Loc) const;
void getEntityInfo(const NamedDecl *D,
``````````
</details>
https://github.com/llvm/llvm-project/pull/74899
More information about the cfe-commits
mailing list