This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Refine suppression mechanism to better support AST checks
AbandonedPublic

Authored by vsavchenko on Dec 17 2020, 8:57 AM.

Details

Summary

This commit slightly changes the way suppressions were checked before.
Instead of going up from statements and expressions, where bugs were
found, and looking for statements and declarations with attributes,
we traverse function bodies once and map locations with suppressions.

This approach can help with the majority of AST checks that report
directly on source locations. It is not trivial to map locations
back to nodes, so its much easier to map both nodes and suppressions
to locations and reason only on that level.

Diff Detail