diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-18 08:15:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-18 08:51:07 +0200 |
commit | 40fd53a2383ba353054ed440c45f2319a9b8efef (patch) | |
tree | d0bc0d68101b51d11b70dc8e057bbb722b893911 /compilerplugins/clang/salbool.cxx | |
parent | 9d8d2e0787b8d866a651bcb9778393fb080ab6e8 (diff) |
loplugins: extract some common functionality
Change-Id: If470e1d9b481c9eda0829aa985152baf8fb46d7a
Diffstat (limited to 'compilerplugins/clang/salbool.cxx')
-rw-r--r-- | compilerplugins/clang/salbool.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compilerplugins/clang/salbool.cxx b/compilerplugins/clang/salbool.cxx index 040512c35780..a443234e779c 100644 --- a/compilerplugins/clang/salbool.cxx +++ b/compilerplugins/clang/salbool.cxx @@ -479,9 +479,7 @@ bool SalBool::VisitParmVarDecl(ParmVarDecl const * decl) { if (f != nullptr) { // e.g.: typedef sal_Bool (* FuncPtr )( sal_Bool ); f = f->getCanonicalDecl(); if (!(hasCLanguageLinkageType(f) - || (isInUnoIncludeFile( - compiler.getSourceManager().getSpellingLoc( - f->getNameInfo().getLoc())) + || (isInUnoIncludeFile(f) && (!f->isInlined() || f->hasAttr<DeprecatedAttr>() || decl->getType()->isReferenceType() || hasBoolOverload(f, false))) @@ -654,9 +652,7 @@ bool SalBool::VisitFunctionDecl(FunctionDecl const * decl) { OverrideKind k = getOverrideKind(f); if (k != OverrideKind::YES && !(hasCLanguageLinkageType(f) - || (isInUnoIncludeFile( - compiler.getSourceManager().getSpellingLoc( - f->getNameInfo().getLoc())) + || (isInUnoIncludeFile(f) && (!f->isInlined() || f->hasAttr<DeprecatedAttr>())))) { SourceLocation loc { decl->getLocStart() }; |