Skip to content

Commit

Permalink
Minor API updates for clang-18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rpav committed Apr 19, 2024
1 parent 1646379 commit dd614ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Decl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void FunctionsMixin::add_functions(C2FFIASTConsumer* ast, const clang::CXXRecord
f->set_is_static(m->isStatic());
f->set_is_virtual(m->isVirtual());
f->set_is_const(m->isConst());
f->set_is_pure(m->isPure());
f->set_is_pure(m->isPureVirtual());
f->set_location(ast->ci(), m);

for(clang::FunctionDecl::param_const_iterator i = m->param_begin(); i != m->param_end(); i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/c2ffi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) {

C2FFIASTConsumer *astc = NULL;

const clang::FileEntry *file = ci.getFileManager().getFile(sys.filename).get();
auto&& file = ci.getFileManager().getFileRef(sys.filename).get();
clang::FileID fid = ci.getSourceManager().createFileID(file,
clang::SourceLocation(),
clang::SrcMgr::C_User);
Expand Down
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void c2ffi::init_ci(config &c, clang::CompilerInstance &ci) {
lo.WCharSize = c.wchar_size;

std::vector<std::string> includes;
ci.getInvocation().getLangOpts()->setLangDefaults(lo, c.kind.getLanguage(),
ci.getInvocation().getLangOpts().setLangDefaults(lo, c.kind.getLanguage(),
pti->getTriple(), includes, c.std);
//clang::LangOptions::setLangDefaults(lo, c.kind.getLanguage(), pti->getTriple(), includes, c.std);
ci.createFileManager();
Expand Down

0 comments on commit dd614ce

Please sign in to comment.