[PATCH] D19971: [scan-build] fix warnings emitted on LLVM TargetRecip code base

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu May 5 12:13:45 PDT 2016


spatel added inline comments.

================
Comment at: lib/Target/TargetRecip.cpp:74
@@ -73,3 +73,3 @@
   size_t RefPos;
-  uint8_t RefSteps;
+  uint8_t RefSteps = 0;
   StringRef RefStepString;
----------------
dblaikie wrote:
> Does msan ever diagnose this as use-of-uninitialized? Or is this only used in the codepaths where it is initialized?
The intent was that RefSteps could only be used when RefStepString is valid and therefore not empty (see 'report_fatal_error' just above this). Could this be a false positive from scan-build?


http://reviews.llvm.org/D19971





More information about the llvm-commits mailing list