diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-11-03 22:42:51 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-11-04 09:51:18 +0100 |
commit | 5323c18753504ae99e271f98052b13271343de6f (patch) | |
tree | 34de1a56e3bf42dd0c31026f09a73adb277a3566 /compilerplugins/clang/unreffun.cxx | |
parent | bfbf0b0991c69a66b5a511acdd2f56aaf834ec91 (diff) |
Adapt to Clang 18 trunk Linkage rework
<https://github.com/llvm/llvm-project/commit/8775947633bf189e1847707932b1015f04640ea0>
"[clang][NFC] Refactor clang::Linkage"
Change-Id: I35e3a3c7e3de29e4f3b9ee8dfc34e39ba2aa1c70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158919
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/unreffun.cxx')
-rw-r--r-- | compilerplugins/clang/unreffun.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compilerplugins/clang/unreffun.cxx b/compilerplugins/clang/unreffun.cxx index 353eee5f0b31..fcb6f04016b7 100644 --- a/compilerplugins/clang/unreffun.cxx +++ b/compilerplugins/clang/unreffun.cxx @@ -16,6 +16,7 @@ #include "clang/AST/Attr.h" #include "clang/Sema/SemaInternal.h" // warn_unused_function +#include "compat.hxx" #include "plugin.hxx" namespace { @@ -152,7 +153,7 @@ bool UnrefFun::VisitFunctionDecl(FunctionDecl const * decl) { return true; } LinkageInfo info(canon->getLinkageAndVisibility()); - if (info.getLinkage() == ExternalLinkage + if (info.getLinkage() == compat::Linkage::External && loplugin::hasCLanguageLinkageType(canon) && canon->isDefined() && ((decl == canon && info.getVisibility() == DefaultVisibility) || ((canon->hasAttr<ConstructorAttr>() |