summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/plugin.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-17 15:06:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-17 19:32:43 +0200
commitdd969ad6e006adb4a9585c0d1b3378f29bbe5787 (patch)
treea4f479f3f7170205c075e5ce6837949b41acc604 /compilerplugins/clang/plugin.cxx
parent7598810d6372bac07e503728ee28c4600a1c9b5d (diff)
make some plugins used the shared framework
Change-Id: Ie283a4774564f25e0fde8ca35212f92be786d671 Reviewed-on: https://gerrit.libreoffice.org/75785 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/plugin.cxx')
-rw-r--r--compilerplugins/clang/plugin.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index 1a1ca44a91ab..7e8dfb664b15 100644
--- a/compilerplugins/clang/plugin.cxx
+++ b/compilerplugins/clang/plugin.cxx
@@ -686,6 +686,17 @@ bool isSamePathname(StringRef pathname, StringRef other)
pathname, other, [](StringRef p, StringRef a) { return p == a; });
}
+bool hasCLanguageLinkageType(FunctionDecl const * decl) {
+ assert(decl != nullptr);
+ if (decl->isExternC()) {
+ return true;
+ }
+ if (decl->isInExternCContext()) {
+ return true;
+ }
+ return false;
+}
+
} // namespace
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */