loplugin:constantfunction
Change-Id: I7cb5b0c2cf9ade557173ca596ea5d42d853ff448
This commit is contained in:
@@ -144,7 +144,7 @@ bool ConstantFunction::VisitFunctionDecl(const FunctionDecl * pFunctionDecl) {
|
||||
return true;
|
||||
}
|
||||
// static with inline body will be optimised at compile-time to a constant anyway
|
||||
if (pCXXMethodDecl->isStatic() && pCXXMethodDecl->hasInlineBody()) {
|
||||
if (pCXXMethodDecl->isStatic() && (pCXXMethodDecl->hasInlineBody() || pCXXMethodDecl->isInlineSpecified())) {
|
||||
return true;
|
||||
}
|
||||
// this catches some stuff in templates
|
||||
@@ -412,6 +412,11 @@ bool ConstantFunction::VisitFunctionDecl(const FunctionDecl * pFunctionDecl) {
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// LINK callback which supplies a return value which means something
|
||||
if (aFunctionName == "SfxVirtualMenu::Highlight" || aFunctionName == "framework::MenuManager::Highlight"
|
||||
|| aFunctionName == "framework::MenuBarManager::Highlight") {
|
||||
return true;
|
||||
}
|
||||
|
||||
// can't mess with the TYPEINIT macros in include/tools/rtti.hxx or the LINK macros in include/tools/link.hxx
|
||||
std::string aImmediateMacro = "";
|
||||
|
Reference in New Issue
Block a user