[PATCH] D50509: [analyzer][UninitializedObjectChecker] Refactoring p6.: Move dereferencing to a function

George Karpenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 10 11:54:11 PDT 2018


george.karpenkov requested changes to this revision.
george.karpenkov added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/StaticAnalyzer/Checkers/UninitializedPointee.cpp:78
+/// If for whatever reason dereferencing fails, returns with false.
+static bool dereference(ProgramStateRef State, SVal &V, QualType &DynT);
+
----------------
In general, using return values is better than out-parameters.
Could you instead return `Optional<std::pair<SVal, QualType>>` ?


https://reviews.llvm.org/D50509





More information about the cfe-commits mailing list