[PATCH] D55734: [analyzer] Refactoring GenericTaintChecker.cpp

Kristina Brooks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 15 02:23:49 PST 2018


kristina added a comment.

If you don't mind, please submit diffs with full context (`diff -U99999` or something alike depending on what you use). It makes it much easier to review patches. Also the formatting looks really off in some places where 4 spaces are used. Also another nitpick, nested statement ifs should have the statements within them aligned without adding another indentation level for every line break within the statement, also in case below `dyn_cast_or_null` may eliminate a need for an additional check in which case you can just use `&&` instead.

  if ((D->getName().find("stdin") != StringRef::npos) && D->isExternC())
    if (const PointerType *PtrTy =
            dyn_cast<PointerType>(D->getType().getTypePtr()))
      if (PtrTy->getPointeeType().getCanonicalType() ==
          C.getASTContext().getFILEType().getCanonicalType())
        return true;

Also, is there a reason for pulling in `<utility>` here?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55734/new/

https://reviews.llvm.org/D55734





More information about the cfe-commits mailing list