[PATCH] D19971: [scan-build] fix warnings emitted on LLVM TargetRecip code base
Apelete Seketeli via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 09:57:23 PDT 2016
apelete 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;
----------------
spatel wrote:
> 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?
This one looks like a false positive indeed: scan-build seems unable to see that RefSteps is initialized in parseRefinementStep() below.
Should I remove the initializations here and ignore the warnings ?
http://reviews.llvm.org/D19971
More information about the llvm-commits
mailing list