summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/RedundantSmartptrGet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/RedundantSmartptrGet.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/misc/RedundantSmartptrGet.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/RedundantSmartptrGet.cpp b/clang-tools-extra/clang-tidy/misc/RedundantSmartptrGet.cpp
index 97398af2977..d48d74c1125 100644
--- a/clang-tools-extra/clang-tidy/misc/RedundantSmartptrGet.cpp
+++ b/clang-tools-extra/clang-tidy/misc/RedundantSmartptrGet.cpp
@@ -22,6 +22,7 @@ internal::Matcher<Expr> callToGet(internal::Matcher<Decl> OnClass) {
on(expr(anyOf(hasType(OnClass),
hasType(qualType(pointsTo(decl(OnClass).bind(
"ptr_to_ptr")))))).bind("smart_pointer")),
+ unless(callee(memberExpr(hasObjectExpression(thisExpr())))),
callee(methodDecl(hasName("get")))).bind("redundant_get");
}
OpenPOWER on IntegriCloud