[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

Anna Zaks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 9 23:37:09 PDT 2017


zaks.anna added a comment.

Sorry for the delay!!!



================
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:180
+  inline const llvm::APSInt &getZeroWithTypeSize(QualType T,
+                                                 bool isUnsigned = true) {
+    return getValue(0, Ctx.getTypeSize(T), isUnsigned);
----------------
The isUnsigned parameter is not used and is not necessary as the type itself has this info.

Not clear if this function is expected to work for all types or only scalar types (maybe assert that the input is isScalarType()).


Repository:
  rL LLVM

https://reviews.llvm.org/D31029





More information about the cfe-commits mailing list