This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Allow bindings of the CompoundLiteralRegion
ClosedPublic

Authored by vsavchenko on Apr 28 2020, 2:45 AM.

Details

Summary

CompoundLiteralRegions have been properly modeled before, but
'getBindingForElement` was not changed to accommodate this change
properly.

rdar://problem/46144644

Diff Detail

Event Timeline

vsavchenko created this revision.Apr 28 2020, 2:45 AM
NoQ added a comment.Apr 29 2020, 2:43 AM

Yay unit tests! Let's squash those mutually cancelling bugs.

clang/unittests/StaticAnalyzer/StoreTest.cpp
22–32

Why was this necessary? All these variables seem to be already available in the surrounding scope as fields in ExprEngineConsumer.

Fix code review remarks.

vsavchenko marked an inline comment as done.May 19 2020, 3:04 AM
NoQ accepted this revision.May 28 2020, 2:57 AM

Great, thanks!

clang/unittests/StaticAnalyzer/StoreTest.cpp
66

The reason i usually specify S to St is i want to avoid confusion with SourceManager. It still causes confusion with [Program]StateManager but those two rarely appear in the same code because ProgramStateManager provides wrappers for most of the StoreManager.

This revision is now accepted and ready to land.May 28 2020, 2:57 AM
This revision was automatically updated to reflect the committed changes.