Adopt loplugin:casttovoid to Objective C
Change-Id: I71bad86a383a9b906b02ec968dc32e9acd0bec26
This commit is contained in:
parent
a1e0232b51
commit
dbeab89b5b
@ -152,6 +152,15 @@ public:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TraverseObjCMethodDecl(ObjCMethodDecl * decl) {
|
||||||
|
returnTypes_.push(decl->getReturnType());
|
||||||
|
auto const ret = RecursiveASTVisitor::TraverseObjCMethodDecl(decl);
|
||||||
|
assert(!returnTypes_.empty());
|
||||||
|
assert(returnTypes_.top() == decl->getReturnType());
|
||||||
|
returnTypes_.pop();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
bool TraverseConstructorInitializer(CXXCtorInitializer * init) {
|
bool TraverseConstructorInitializer(CXXCtorInitializer * init) {
|
||||||
if (auto const field = init->getAnyMember()) {
|
if (auto const field = init->getAnyMember()) {
|
||||||
if (loplugin::TypeCheck(field->getType()).LvalueReference()) {
|
if (loplugin::TypeCheck(field->getType()).LvalueReference()) {
|
||||||
@ -340,8 +349,11 @@ private:
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
auto const fun = dyn_cast_or_null<FunctionDecl>(
|
auto const ctxt = i.first->getDeclContext();
|
||||||
i.first->getDeclContext());
|
if (dyn_cast_or_null<ObjCMethodDecl>(ctxt) != nullptr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
auto const fun = dyn_cast_or_null<FunctionDecl>(ctxt);
|
||||||
assert(fun != nullptr);
|
assert(fun != nullptr);
|
||||||
if (containsPreprocessingConditionalInclusion(
|
if (containsPreprocessingConditionalInclusion(
|
||||||
fun->getSourceRange()))
|
fun->getSourceRange()))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user