summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-29 11:38:22 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-29 11:38:22 +0200
commitac265f6210452ee48c1766942a3a311aedc3cdcd (patch)
treef01cf52faf1a04ec48245793591e841c2e18af83
parent5d88bf766c8951b15010c8080c3cb56d52321fb2 (diff)
Further clean-up
Change-Id: I16b8bfe2c4a337acf188ec8ffa2ed084ca437faa
-rw-r--r--compilerplugins/clang/passstuffbyref.cxx12
-rw-r--r--forms/source/xforms/computedexpression.hxx2
2 files changed, 10 insertions, 4 deletions
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx
index 1d9339a31c48..4627feefd721 100644
--- a/compilerplugins/clang/passstuffbyref.cxx
+++ b/compilerplugins/clang/passstuffbyref.cxx
@@ -243,13 +243,19 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C
return;
}
loplugin::DeclCheck dc(functionDecl);
- std::string aFunctionName = functionDecl->getQualifiedNameAsString();
// function is passed as parameter to another function
if (dc.Function("ImplColMonoFnc").Class("GDIMetaFile").GlobalNamespace()
|| (dc.Function("darkColor").Class("SvxBorderLine").Namespace("editeng")
.GlobalNamespace())
- || aFunctionName.compare(0, 8, "xforms::") == 0)
+ || (dc.MemberFunction().Class("Binding").Namespace("xforms")
+ .GlobalNamespace())
+ || (dc.MemberFunction().Class("Model").Namespace("xforms")
+ .GlobalNamespace())
+ || (dc.MemberFunction().Class("Submission").Namespace("xforms")
+ .GlobalNamespace()))
+ {
return;
+ }
// not sure how to exclude this yet, returns copy of one of it's params
if (dc.Function("sameDistColor").GlobalNamespace()
|| dc.Function("sameColor").GlobalNamespace()
@@ -278,7 +284,7 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C
DiagnosticsEngine::Warning,
"rather return %0 from function %1 %2 by const& than by value, to avoid unnecessary copying",
functionDecl->getSourceRange().getBegin())
- << type.getAsString() << aFunctionName << type->getTypeClassName() << functionDecl->getSourceRange();
+ << type.getAsString() << functionDecl->getQualifiedNameAsString() << type->getTypeClassName() << functionDecl->getSourceRange();
// display the location of the class member declaration so I don't have to search for it by hand
if (functionDecl->getSourceRange().getBegin() != functionDecl->getCanonicalDecl()->getSourceRange().getBegin())
diff --git a/forms/source/xforms/computedexpression.hxx b/forms/source/xforms/computedexpression.hxx
index 30b9581c5f4b..3a69b1b2a8ec 100644
--- a/forms/source/xforms/computedexpression.hxx
+++ b/forms/source/xforms/computedexpression.hxx
@@ -111,7 +111,7 @@ public:
// get the result of this expression as string/bool/...
// (Results will be based on the last call of evaluate(..). The caller
// must call evaluate to ensure current results.)
- css::uno::Reference<css::xml::xpath::XXPathObject> getXPath() const { return mxResult;}
+ css::uno::Reference<css::xml::xpath::XXPathObject> const & getXPath() const { return mxResult;}
bool getBool( bool bDefault = false ) const;
OUString getString() const;