[PATCH] D93110: [analyzer] Implement a first version of suppressions via attributes
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 16 07:19:57 PST 2020
xazax.hun added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:2897
+ ASTContext &AC) {
+ PathDiagnosticLocation Location = BR.getLocation();
+
----------------
What will this location return? In case of a leak warning, we might get a different instance of the same warning on separate paths. We usually pick the shortest path, but it can change when we slightly alter the source code. Maybe we want the user to put the suppression at the uniqueing location when such location exist? (The allocation in case of a leak warnings.) I think that would result in a better user experience and more robust suppression mechanism. An open question is how to educate the user about the correct way of suppression. Should we emit a suppress location to the user explicitly?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93110/new/
https://reviews.llvm.org/D93110
More information about the cfe-commits
mailing list