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

Umann Kristóf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 28 02:34:50 PDT 2018


Szelethus marked an inline comment as done.
Szelethus added inline comments.


================
Comment at: test/Analysis/cxx-uninitialized-object.cpp:526
+
+void f23p5() {
+  void *vptr = malloc(sizeof(int));
----------------
I haven't marked @a.sidorin's comment as done, but it disappeared because I renamed the file, so here it is:
> Could you please explain what is the logic of test naming?
To which I replied:
> The test files follow the strict structure that for each test case we'll define a structure type and then call its constructor(s) in a function right after it (functions are used to avoid zero initializations).
>
>To be honest, there is no real logic behind the naming of the functions, it is only to keep the ODR. I used numbers in an increasing order, however I later added there cases, so in between `f23` and `f24` I used `f23p5` and so on.
>
>I figured that the strict structure of the test files would avoid confusion. Do you find it distracting?


https://reviews.llvm.org/D45532





More information about the cfe-commits mailing list