diff options
-rw-r--r-- | compilerplugins/clang/ptrvector.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compilerplugins/clang/ptrvector.cxx b/compilerplugins/clang/ptrvector.cxx index 40e37e5937c9..ed0893e3558f 100644 --- a/compilerplugins/clang/ptrvector.cxx +++ b/compilerplugins/clang/ptrvector.cxx @@ -13,6 +13,8 @@ #include <iostream> #include <fstream> #include <set> + +#include "check.hxx" #include "plugin.hxx" /** @@ -54,7 +56,10 @@ bool PtrVector::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr* expr) } const Expr* argExpr = expr->getArg(0); std::string s = argExpr->getType().getDesugaredType(compiler.getASTContext()).getAsString(); - if (s.find("iterator") != std::string::npos) { + if (s.find("iterator") != std::string::npos + || (loplugin::TypeCheck(argExpr->getType()).Class("__wrap_iter").Namespace("__1") + .StdNamespace())) + { return true; } if (s.find("array") == std::string::npos && s.find("deque") == std::string::npos |