[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann
sbergman at redhat.com
Mon Feb 9 01:40:49 PST 2015
compilerplugins/clang/passstuffbyref.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 92db2f17b37660fd4edd8267a107d5491787dfad
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Feb 9 10:40:07 2015 +0100
Adapt loplugin:passstuffbyref to Clang 3.2
Change-Id: I24d0b7531feba32f86f761daf18170397cfe5d2f
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx
index 5617650..9eb0768 100644
--- a/compilerplugins/clang/passstuffbyref.cxx
+++ b/compilerplugins/clang/passstuffbyref.cxx
@@ -77,16 +77,16 @@ bool PassStuffByRef::VisitLambdaExpr(const LambdaExpr * expr) {
if (ignoreLocation(expr)) {
return true;
}
- for (auto const & i: expr->captures()) {
- if (i.getCaptureKind() == LambdaCaptureKind::LCK_ByCopy) {
+ for (auto i(expr->capture_begin()); i != expr->capture_end(); ++i) {
+ if (i->getCaptureKind() == LambdaCaptureKind::LCK_ByCopy) {
std::string name;
- if (isFat(i.getCapturedVar()->getType(), &name)) {
+ if (isFat(i->getCapturedVar()->getType(), &name)) {
report(
DiagnosticsEngine::Warning,
("%0 capture of '%1' variable by copy, rather use capture"
" by reference---UNLESS THE LAMBDA OUTLIVES THE VARIABLE"),
- i.getLocation())
- << (i.isImplicit() ? "implicit" : "explicit") << name
+ i->getLocation())
+ << (i->isImplicit() ? "implicit" : "explicit") << name
<< expr->getSourceRange();
}
}
More information about the Libreoffice-commits
mailing list