Skip to content

Commit 0f85449

Browse files
authored
Add support for clang >= 19 (#123)
1 parent 6f78f5f commit 0f85449

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

generator/preprocessorcallback.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ void PreprocessorCallback::InclusionDirective(
248248
clang::SourceLocation HashLoc, const clang::Token &IncludeTok, llvm::StringRef FileName,
249249
bool IsAngled, clang::CharSourceRange FilenameRange, clang::OptionalFileEntryRef File,
250250
llvm::StringRef SearchPath, llvm::StringRef RelativePath, const clang::Module *Imported,
251+
#if CLANG_VERSION_MAJOR >= 19
252+
bool ModuleImported,
253+
#endif
251254
clang::SrcMgr::CharacteristicKind)
252255
{
253256
if (!HashLoc.isValid() || !HashLoc.isFileID() || !File)

generator/preprocessorcallback.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,11 @@ class PreprocessorCallback : public clang::PPCallbacks
6161
llvm::StringRef FileName, bool IsAngled,
6262
clang::CharSourceRange FilenameRange, clang::OptionalFileEntryRef File,
6363
llvm::StringRef SearchPath, llvm::StringRef RelativePath,
64-
const clang::Module *Imported,
65-
clang::SrcMgr::CharacteristicKind) override;
64+
const clang::Module *SuggestedModule,
65+
#if CLANG_VERSION_MAJOR >= 19
66+
bool ModuleImported,
67+
#endif
68+
clang::SrcMgr::CharacteristicKind FileType) override;
6669

6770
void PragmaDirective(clang::SourceLocation Loc, clang::PragmaIntroducerKind Introducer) override
6871
{

0 commit comments

Comments
 (0)