[PATCH] D49199: [analyzer][UninitializedObjectChecker] Pointer/reference objects are dereferenced according to dynamic type
Umann Kristóf via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 11 11:49:52 PDT 2018
Szelethus created this revision.
Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs.
Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, whisperity.
This diff fixes a long debated issues with pointers/references not being dereferenced according to their dynamic type. This also fixed an issue where regions that were pointed to by void pointers were not analyzed.
Note how I also added a test case about inheritance, clearly showing that it doesn't find an uninitialized field that it should. Because base class handling is still being discussed, I'm planning to fix that issue in a different patch. The reason why it's still in this patch is that it might be closely tied to these changes too.
Thumbs up to @NoQ for setting me on the right track! <http://lists.llvm.org/pipermail/cfe-dev/2018-June/058271.html>
Repository:
rC Clang
https://reviews.llvm.org/D49199
Files:
lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp
test/Analysis/cxx-uninitialized-object-inheritance.cpp
test/Analysis/cxx-uninitialized-object-ptr-ref.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49199.155039.patch
Type: text/x-patch
Size: 9943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180711/5d2d79b2/attachment-0001.bin>
More information about the cfe-commits
mailing list