[PATCH] D49228: [analyzer][UninitializedObjectChecker] Void pointer objects are casted back to their dynmic type in note message

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 25 17:49:44 PDT 2018


NoQ added inline comments.


================
Comment at: test/Analysis/cxx-uninitialized-object-ptr-ref.cpp:290
 struct IntDynTypedVoidPointerTest1 {
-  void *vptr; // expected-note{{uninitialized pointee 'this->vptr'}}
+  void *vptr; // expected-note{{uninitialized pointee 'this->static_cast<int *>(vptr)'}}
   int dontGetFilteredByNonPedanticMode = 0;
----------------
Shouldn't this rather say something like `static_cast<int *>(this->vptr)`? That's the normal syntax to do this sort of stuff, i guess.


https://reviews.llvm.org/D49228





More information about the cfe-commits mailing list