From 5e0db6780b264baba5639ec11c5823787661c318 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 5 Feb 2024 11:31:17 -0500 Subject: [PATCH] Port to LLVM/Clang Git release/18.x as of 2024-02-05 (900e7cbfdee) `isPure` was renamed to `isPureVirtual`. --- src/Output.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Output.cxx b/src/Output.cxx index 6086c04..5d15caa 100644 --- a/src/Output.cxx +++ b/src/Output.cxx @@ -93,6 +93,10 @@ using OptionalFileEntryRef = clang::FileEntry const*; #include #include +#if LLVM_VERSION_MAJOR < 18 +# define isPureVirtual isPure +#endif + class ASTVisitorBase { protected: @@ -2282,7 +2286,7 @@ void ASTVisitor::OutputCXXMethodDecl(clang::CXXMethodDecl const* d, if (d->isVirtual()) { flags |= FH_Virtual; } - if (d->isPure()) { + if (d->isPureVirtual()) { flags |= FH_Pure; } if (d->isOverloadedOperator()) { @@ -2312,7 +2316,7 @@ void ASTVisitor::OutputCXXConversionDecl(clang::CXXConversionDecl const* d, if (d->isVirtual()) { flags |= FH_Virtual; } - if (d->isPure()) { + if (d->isPureVirtual()) { flags |= FH_Pure; } this->OutputFunctionHelper(d, dn, "Converter", flags); @@ -2348,7 +2352,7 @@ void ASTVisitor::OutputCXXDestructorDecl(clang::CXXDestructorDecl const* d, if (d->isVirtual()) { flags |= FH_Virtual; } - if (d->isPure()) { + if (d->isPureVirtual()) { flags |= FH_Pure; } this->OutputFunctionHelper(d, dn, "Destructor", flags, -- 2.44.0