[PATCH] D49656: [analyzer] Add support for more pointer invalidating functions in InnerPointerChecker

Reka Kovacs via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 25 09:13:21 PDT 2018


rnkovacs added inline comments.


================
Comment at: lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp:181
 
-  auto *TypeDecl = ObjRegion->getValueType()->getAsCXXRecordDecl();
-  if (TypeDecl->getName() != "basic_string")
-    return;
+    for (unsigned I = 0, E = FD->getNumParams(); I != E; ++I) {
+      QualType ParamTy = FD->getParamDecl(I)->getType();
----------------
xazax.hun wrote:
> Nit: maybe using `FunctionDecl::parameters` and range based for loop is sligtly cleaner.
Given that I am manipulating indices below, I feel that actually the plain for loop is a bit simpler here, what do you think?


https://reviews.llvm.org/D49656





More information about the cfe-commits mailing list