Skip to content

Commit

Permalink
cpp parser: clang FileEntry -> FileEntryRef
Browse files Browse the repository at this point in the history
  • Loading branch information
wbqpk3 committed Nov 22, 2024
1 parent e44de27 commit 0592bf0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/cpp/parser/include/cppparser/filelocutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class FileLocUtil
if (fid.isInvalid())
return std::string();

const clang::FileEntry* fileEntry = _clangSrcMan.getFileEntryForID(fid);
const clang::OptionalFileEntryRef fileEntry = _clangSrcMan.getFileEntryRefForID(fid);
if (!fileEntry)
return std::string();

Expand Down
2 changes: 1 addition & 1 deletion plugins/cpp/parser/src/clangastvisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,7 @@ class ClangASTVisitor : public clang::RecursiveASTVisitor<ClangASTVisitor>
clang::DynTypedNodeList parents
= _astContext.getParents(*expr_);

const clang::ast_type_traits::DynTypedNode& parent = parents[0];
const clang::DynTypedNode& parent = parents[0];

if (const clang::BinaryOperator* op = parent.get<clang::BinaryOperator>())
{
Expand Down
3 changes: 2 additions & 1 deletion plugins/cpp/parser/src/ppincludecallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ void PPIncludeCallback::InclusionDirective(
clang::StringRef fileName_,
bool,
clang::CharSourceRange filenameRange_,
const clang::FileEntry*,
clang::OptionalFileEntryRef,
clang::StringRef searchPath_,
clang::StringRef,
const clang::Module*,
bool,
clang::SrcMgr::CharacteristicKind)
{
if (searchPath_.empty())
Expand Down
3 changes: 2 additions & 1 deletion plugins/cpp/parser/src/ppincludecallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ class PPIncludeCallback : public clang::PPCallbacks
clang::StringRef FileName,
bool IsAngled,
clang::CharSourceRange FilenameRange,
const clang::FileEntry *File,
clang::OptionalFileEntryRef File,
clang::StringRef SearchPath,
clang::StringRef RelativePath,
const clang::Module *Imported,
bool ModuleImported,
clang::SrcMgr::CharacteristicKind FileType) override;

private:
Expand Down

0 comments on commit 0592bf0

Please sign in to comment.