Implement Hover on Expression and Identifier and some fix. (#83)

This commit is contained in:
Shiyu
2025-02-18 21:40:43 +08:00
committed by GitHub
parent 4b8b84f18e
commit 40912a8a91
16 changed files with 1672 additions and 231 deletions

View File

@@ -91,19 +91,22 @@ struct PPCallback : public clang::PPCallbacks {
void InclusionDirective(clang::SourceLocation hashLoc,
const clang::Token& includeTok,
llvm::StringRef,
llvm::StringRef fileName,
bool,
clang::CharSourceRange,
clang::OptionalFileEntryRef,
llvm::StringRef,
llvm::StringRef,
llvm::StringRef searchPath,
llvm::StringRef relativePath,
const clang::Module*,
bool,
clang::SrcMgr::CharacteristicKind) override {
prevFID = SM.getFileID(hashLoc);
directives[prevFID].includes.emplace_back(Include{
{},
includeTok.getLocation(),
.fid = {},
.location = includeTok.getLocation(),
.fileName = fileName.str(),
.searchPath = searchPath.str(),
.relativePath = relativePath.str(),
});
}