[PATCH] D51866: [analyzer][UninitializedObjectChecker] New flag to ignore guarded uninitialized fields
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 19 14:02:10 PDT 2018
NoQ added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:515
+ continue;
+ const auto *FirstAccess = Accesses[0].getNodeAs<MemberExpr>("access");
+
----------------
I feel that it's a good practice to `assert(FirstAccess)` here (same for `FirstGuard` and generally after every `getNodeAs`). The assertion will hold because "access" is always bound to on every possible match and is always a member-expression, and it'd be great to check that after the matcher is changed.
https://reviews.llvm.org/D51866
More information about the cfe-commits
mailing list