summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compilerplugins/clang/salbool.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/compilerplugins/clang/salbool.cxx b/compilerplugins/clang/salbool.cxx
index 5949e75c1999..2a64fe4a5066 100644
--- a/compilerplugins/clang/salbool.cxx
+++ b/compilerplugins/clang/salbool.cxx
@@ -497,7 +497,18 @@ bool SalBool::VisitFunctionDecl(FunctionDecl const * decl) {
|| (isInUnoIncludeFile(
compiler.getSourceManager().getSpellingLoc(
f->getNameInfo().getLoc()))
- && (!f->isInlined() || f->hasAttr<DeprecatedAttr>()))))
+ && (
+// Clang 3.2 FunctionDecl::isInlined doesn't work as advertised ("Determine
+// whether this function should be inlined, because it is either marked 'inline'
+// or 'constexpr' or is a member function of a class that was defined in the
+// class body.") but mis-classifies salhelper::Timer's isTicking, isExpired, and
+// expiresBefore members as defined in salhelper/source/timer.cxx as inlined:
+#if (__clang_major__ == 3 && __clang_minor__ >= 3) || __clang_major__ > 3
+ !f->isInlined()
+#else
+ true
+#endif
+ || f->hasAttr<DeprecatedAttr>()))))
{
SourceLocation loc { decl->getLocStart() };
SourceLocation l { compiler.getSourceManager().getExpansionLoc(