[PATCH] D71155: [analyzer] CERT: StrChecker: 30.c
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 9 19:26:45 PST 2019
NoQ added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2109
+ if (const MemRegion *MR = SrcV.getAsRegion()) {
+ if (const auto *SR = MR->getBaseRegion()->getAs<SymbolicRegion>()) {
+ State = State->BindExpr(CE, LCtx, SrcV);
----------------
Why does it matter whether the region is symbolic or not?
================
Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2110
+ if (const auto *SR = MR->getBaseRegion()->getAs<SymbolicRegion>()) {
+ State = State->BindExpr(CE, LCtx, SrcV);
+ C.addTransition(State);
----------------
Mmm, that's not a correct return value for these functions. These functions don't simply pass through their first argument.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2122
+
+ SVal ConjuredV = SVB.getConjuredHeapSymbolVal(CE, LCtx, C.blockCount());
+ SVal ResultV = loc::MemRegionVal(SVB.getRegionManager().getElementRegion(
----------------
Why "heap"?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71155/new/
https://reviews.llvm.org/D71155
More information about the cfe-commits
mailing list