[PATCH] D51680: [analyzer][UninitializedObjectChecker] New flag to ignore union-like constructs
George Karpenkov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 5 11:27:54 PDT 2018
george.karpenkov added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:468
+static bool isUnionLike(const RecordDecl *RD) {
+ llvm::Regex ContainsKindOrTag("[kK]ind|[tT]ag");
+
----------------
1. Since you are using `match`, you would reject an extra prefix - but what about an extra suffix?
2. Would it make sense to expose the entire regexp as a flag? Then you could remove the boolean flag (if you can change the regexp to match if only the entire field name matches, then an empty regexp would correspond to "no matches")
https://reviews.llvm.org/D51680
More information about the cfe-commits
mailing list