[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

Henry Wong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 13 04:46:23 PDT 2018


MTC added inline comments.


================
Comment at: lib/StaticAnalyzer/Checkers/CtorUninitializedMemberChecker.cpp:10
+//
+//  This file defines a checker that checks cunstructors for possibly
+//  uninitialized fields.
----------------
typo :)  `cunstructors` -> `constructors`


================
Comment at: lib/StaticAnalyzer/Checkers/CtorUninitializedMemberChecker.cpp:54
+  StringRef getAsString(SmallString<200> &Buf) const;
+  friend class FieldChainInfoComparator;
+};
----------------
When I apply this patch, hit a compiler warning. Maybe `friend struct` is better.
```
warning: 'FieldChainInfoComparator' defined as a struct here but previously declared as a class [-Wmismatched-tags]
```


https://reviews.llvm.org/D45532





More information about the cfe-commits mailing list