[PATCH] D61246: [analyzer][UninitializedObjectChecker] PR41611: Regard vector types as primitive

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 29 15:26:33 PDT 2019


NoQ added inline comments.


================
Comment at: test/Analysis/cxx-uninitialized-object.cpp:1155
+void __vector_size__LongTest() {
+  VectorSizeLong v;
+}
----------------
gribozavr wrote:
> gribozavr wrote:
> > gribozavr wrote:
> > > Could you also add tests where the vector member is being subscripted?  for example, `v.x[0] = 0;`
> > Should there be a warning about the member being uninitialized?
> Just to be clear -- if there should be a warning, I don't think this patch has to necessarily fix everything in the checker and static analyzer core to support vector types, the fix for the crash is valuable by itself.  However, if there should be a warning, this test should have a fixme.
Most of the code in the Static Analyzer that deals with vector types is exactly like this patch: "oh, there are also vector types, right, i've no idea what they are but let's suppress everything just in case". Fixing false positives should be fine, but introducing warnings that are specific to vector types would be hard.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61246/new/

https://reviews.llvm.org/D61246





More information about the cfe-commits mailing list