summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/stringconstant.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-12-18 13:44:43 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-12-18 22:43:26 +0100
commitec0665ac8b427b16f1ebc118496d7d2b1831f3fd (patch)
tree57f8dc78d1e600fb283f257b7d37726cfd4cd4de /compilerplugins/clang/stringconstant.cxx
parent5bddd370e0e22c833bdae139444cdd9878d73f6b (diff)
Rename cdecl -> classdecl (MSVC treats the former like a keyword)
Change-Id: I1859a92c996b907b8d511cddba25c00c9a52f398
Diffstat (limited to 'compilerplugins/clang/stringconstant.cxx')
-rw-r--r--compilerplugins/clang/stringconstant.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx
index d67d41c3fdf1..354f23587bfd 100644
--- a/compilerplugins/clang/stringconstant.cxx
+++ b/compilerplugins/clang/stringconstant.cxx
@@ -651,8 +651,8 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
if (ignoreLocation(expr)) {
return true;
}
- auto cdecl = expr->getConstructor()->getParent();
- if (loplugin::DeclCheck(cdecl)
+ auto classdecl = expr->getConstructor()->getParent();
+ if (loplugin::DeclCheck(classdecl)
.Class("OUString").Namespace("rtl").GlobalNamespace())
{
ChangeKind kind;
@@ -693,7 +693,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
("construction of %0 with string constant argument"
" containging non-ASCII characters"),
expr->getExprLoc())
- << cdecl << expr->getSourceRange();
+ << classdecl << expr->getSourceRange();
}
if (emb) {
report(
@@ -701,7 +701,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
("construction of %0 with string constant argument"
" containging embedded NULs"),
expr->getExprLoc())
- << cdecl << expr->getSourceRange();
+ << classdecl << expr->getSourceRange();
}
kind = ChangeKind::Char;
pass = n == 0
@@ -761,7 +761,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
" as call of rtl::OUString::isEmpty"),
getMemberLocation(call))
<< fdecl->getQualifiedNameAsString()
- << cdecl << call->getSourceRange();
+ << classdecl << call->getSourceRange();
return true;
}
if (dc.Operator(OO_ExclaimEqual).Namespace("rtl")
@@ -774,7 +774,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
" as call of !rtl::OUString::isEmpty"),
getMemberLocation(call))
<< fdecl->getQualifiedNameAsString()
- << cdecl << call->getSourceRange();
+ << classdecl << call->getSourceRange();
return true;
}
if ((dc.Operator(OO_Plus).Namespace("rtl")
@@ -788,7 +788,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
" %1 with empty string constant argument"),
getMemberLocation(call))
<< fdecl->getQualifiedNameAsString()
- << cdecl << call->getSourceRange();
+ << classdecl << call->getSourceRange();
return true;
}
if (dc.Operator(OO_Equal).Class("OUString")
@@ -801,7 +801,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
" as call of rtl::OUString::clear"),
getMemberLocation(call))
<< fdecl->getQualifiedNameAsString()
- << cdecl << call->getSourceRange();
+ << classdecl << call->getSourceRange();
return true;
}
} else {
@@ -817,7 +817,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
+ " as operator =="),
getMemberLocation(call))
<< fdecl->getQualifiedNameAsString()
- << cdecl << call->getSourceRange();
+ << classdecl << call->getSourceRange();
return true;
}
if ((dc.Operator(OO_Plus).Namespace("rtl")
@@ -871,7 +871,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
+ (" in call of %1 as construction of"
" OUStringLiteral1")),
getMemberLocation(expr))
- << cdecl
+ << classdecl
<< fdecl->getQualifiedNameAsString()
<< expr->getSourceRange();
} else {
@@ -881,7 +881,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
+ describeChangeKind(kind)
+ " in call of %1"),
getMemberLocation(expr))
- << cdecl
+ << classdecl
<< fdecl->getQualifiedNameAsString()
<< expr->getSourceRange();
}
@@ -1184,9 +1184,9 @@ void StringConstant::reportChange(
return;
}
} else if (isa<CXXConstructExpr>(call)) {
- auto cdecl = cast<CXXConstructExpr>(call)->getConstructor()
- ->getParent();
- loplugin::DeclCheck dc(cdecl);
+ auto classdecl = cast<CXXConstructExpr>(call)
+ ->getConstructor()->getParent();
+ loplugin::DeclCheck dc(classdecl);
if (dc.Class("OUString").Namespace("rtl").GlobalNamespace()
|| (dc.Class("OUStringBuffer").Namespace("rtl")
.GlobalNamespace()))
@@ -1200,7 +1200,7 @@ void StringConstant::reportChange(
+ (" with empty string constant argument as"
" default construction of %0")),
getMemberLocation(call))
- << cdecl->getQualifiedNameAsString()
+ << classdecl->getQualifiedNameAsString()
<< call->getSourceRange();
} else {
assert(pass == PassThrough::NonEmptyConstantString);
@@ -1210,7 +1210,7 @@ void StringConstant::reportChange(
+ describeChangeKind(kind)
+ " in construction of %0"),
getMemberLocation(expr))
- << cdecl->getQualifiedNameAsString()
+ << classdecl->getQualifiedNameAsString()
<< expr->getSourceRange();
}
return;