This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Add support for namespaces to GenericTaintChecker
ClosedPublic

Authored by boga95 on Dec 1 2019, 11:11 AM.

Details

Summary

Now the user can define a Scope for every configured function:

  • Functions without Scope match for every function regardless of the namespace.
  • Functions with Scope will match if the full name of the function is start with the Scope.
  • Multiple functions can exist with the same name.

I also added support for member functions.

Diff Detail

Event Timeline

boga95 created this revision.Dec 1 2019, 11:11 AM
NoQ accepted this revision.Dec 11 2019, 2:21 PM

Looks great but i keep worrying that you're re-inventing CallDescription which already supports this feature (and many more) and we really need a single implementation of this logic because it has been historically very annoying and bugprone. Like, if you can convert your configs to a CallDescriptionMap<> while loading that'd be awesome.

clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
396โ€“407

๐Ÿ‘ Call ๐Ÿ‘ Description ๐Ÿ‘ Map ๐Ÿ‘

This revision is now accepted and ready to land.Dec 11 2019, 2:21 PM
This revision was automatically updated to reflect the committed changes.
boga95 marked 2 inline comments as done.