This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Add range constructor to CallDescriptionMap
ClosedPublic

Authored by gamesh411 on Dec 17 2021, 5:12 AM.

Details

Summary

CallDescriptionMap benefits from a range constructor when the
CallDescription and mapped type pairs cannot be constructed at once, but
are built incrementally.

Diff Detail

Event Timeline

gamesh411 created this revision.Dec 17 2021, 5:12 AM
gamesh411 requested review of this revision.Dec 17 2021, 5:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2021, 5:12 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
steakhal accepted this revision.Dec 17 2021, 6:57 AM

LGTM

clang/unittests/StaticAnalyzer/CallDescriptionTest.cpp
24–28 ↗(On Diff #395097)

I'm not even sure we need this assertion though.

38 ↗(On Diff #395097)

Maybe the ResultMap should also follow this and declare the ctor overload.

This revision is now accepted and ready to land.Dec 17 2021, 6:57 AM
gamesh411 updated this revision to Diff 395394.Dec 20 2021, 2:15 AM

Remove static asserts as it only makes the tests more brittle

steakhal accepted this revision.Dec 20 2021, 2:31 AM
This revision was landed with ongoing or failed builds.Dec 20 2021, 3:16 AM
This revision was automatically updated to reflect the committed changes.