Page MenuHomePhabricator

[analyzer][NFC] CallDescription should own the qualified name parts
ClosedPublic

Authored by steakhal on Wed, Nov 10, 10:46 AM.

Details

Summary

Previously, CallDescription simply referred to the qualified name parts
by const char* pointers.
In the future, we might want to dynamically load and populate
CallDescriptionMaps, hence we will need the CallDescriptions to
actually own their qualified name parts.

Diff Detail

Event Timeline

steakhal created this revision.Wed, Nov 10, 10:46 AM
xazax.hun accepted this revision.Fri, Nov 12, 9:26 AM
This revision is now accepted and ready to land.Fri, Nov 12, 9:26 AM
NoQ added a comment.Tue, Nov 16, 6:11 PM

Why though? Are you actually putting anything in there that isn't a static string literal?

Why though? Are you actually putting anything in there that isn't a static string literal?

If we plan in the future to dynamically populate CallDescriptionMaps then we will need owning semantics for CallDescriptions actually owning the qualified name parts.
Consider the GenericTaintChecker, which currently implements an ad-hoc function call matching just because of this.
Ideally, what we want is just parsing the config and populating the corresponding maps.
On the other hand, it could come in handy in the StdLibraryChecker as well, if we decide to hoist the DSL and let users specify their API in config files in a similar manner.

martong accepted this revision.Thu, Nov 18, 9:25 AM

LGTM!

This revision was landed with ongoing or failed builds.Fri, Nov 19, 9:33 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFri, Nov 19, 9:33 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript