[PATCH] D51866: [analyzer][UninitializedObjectChecker] New flag to ignore guarded uninitialized fields

Umann Kristóf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 25 09:29:48 PDT 2018


Szelethus planned changes to this revision.
Szelethus added a comment.

Hmm, I'll investigate the `assert` issue @NoQ mentioned before moving forward.



================
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:502
+
+  auto AssertM = callExpr(callee(functionDecl(hasName("assert"))));
+  auto GuardM =
----------------
NoQ wrote:
> In a lot of standard libraries `assert()` is implemented as a macro. You might want to catch the corresponding builtin or look at macro names (not sure if we have a matcher for the latter but it should be easy to add).
Hmm, maybe go for `[[noreturn]]` functions?


https://reviews.llvm.org/D51866





More information about the cfe-commits mailing list