aboutsummaryrefslogtreecommitdiff
path: root/clang/www
diff options
context:
space:
mode:
authorKristof Umann <dkszelethus@gmail.com>2018-09-14 10:10:09 +0000
committerKristof Umann <dkszelethus@gmail.com>2018-09-14 10:10:09 +0000
commitd6145d9849f48229980c9243c36cb08c2e45c869 (patch)
treee6b9431b2dc1e4eb85f23eb2570ac5c944b3bde3 /clang/www
parent6cec6c467ce93fafcf002a781326bfeaa57c6f49 (diff)
[analyzer][UninitializedObjectChecker] New flag to ignore records based on it's fields
Based on a suggestion from @george.karpenkov. In some cases, structs are used as unions with a help of a tag/kind field. This patch adds a new string flag (a pattern), that is matched against the fields of a record, and should a match be found, the entire record is ignored. For more info refer to http://lists.llvm.org/pipermail/cfe-dev/2018-August/058906.html and to the responses to that, especially http://lists.llvm.org/pipermail/cfe-dev/2018-August/059215.html. Differential Revision: https://reviews.llvm.org/D51680 llvm-svn: 342220
Diffstat (limited to 'clang/www')
-rw-r--r--clang/www/analyzer/alpha_checks.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/www/analyzer/alpha_checks.html b/clang/www/analyzer/alpha_checks.html
index 837ccce624f3..53635b7050ba 100644
--- a/clang/www/analyzer/alpha_checks.html
+++ b/clang/www/analyzer/alpha_checks.html
@@ -356,6 +356,13 @@ It has several options:
whether the object itself is initialized. Defaults to false. <br>
<code>-analyzer-config alpha.cplusplus.UninitializedObject:CheckPointeeInitialization=true</code>.
</li>
+ <li>
+ "<code>IgnoreRecordsWithField</code>" (string). If supplied, the checker will not
+ analyze structures that have a field with a name or type name that
+ matches the given pattern. Defaults to <code>""</code>.
+
+ <code>-analyzer-config alpha.cplusplus.UninitializedObject:IgnoreRecordsWithField="[Tt]ag|[Kk]ind"</code>.
+ </li>
</ul></div></div></td>
<td><div class="exampleContainer expandable">
<div class="example"><pre>