aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/sm-sensitive.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/analyzer/sm-sensitive.cc')
-rw-r--r--gcc/analyzer/sm-sensitive.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/analyzer/sm-sensitive.cc b/gcc/analyzer/sm-sensitive.cc
index 1720d8d..f40f3e8 100644
--- a/gcc/analyzer/sm-sensitive.cc
+++ b/gcc/analyzer/sm-sensitive.cc
@@ -91,13 +91,17 @@ public:
return same_tree_p (m_arg, other.m_arg);
}
+ int get_controlling_option () const FINAL OVERRIDE
+ {
+ return OPT_Wanalyzer_exposure_through_output_file;
+ }
+
bool emit (rich_location *rich_loc) FINAL OVERRIDE
{
diagnostic_metadata m;
/* CWE-532: Information Exposure Through Log Files */
m.add_cwe (532);
- return warning_meta (rich_loc, m,
- OPT_Wanalyzer_exposure_through_output_file,
+ return warning_meta (rich_loc, m, get_controlling_option (),
"sensitive value %qE written to output file",
m_arg);
}