Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

false-positive [clang-analyzer-deadcode.DeadStores] with switch-case #36156

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR37183
Status NEW
Importance P normal
Reported by Jürgen Pesara (juergen.pesara@draeger.com)
Reported on 2018-04-20 01:58:19 -0700
Last modified on 2018-06-05 10:10:45 -0700
Version unspecified
Hardware PC other
CC alexfh@google.com, djasper@google.com, eugene.zelenko@gmail.com, juergen.pesara@draeger.com, klimek@google.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments bugreport.c (376 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 20206
run clang-tidy on it and you'll see.

In the attached code, clang-tidy 6.0.0 reports "Value stored to 'i1' is never
read", but both i1 and i2 in fact are read.
Quuxplusone commented 6 years ago

Attached bugreport.c (376 bytes, text/plain): run clang-tidy on it and you'll see.

Quuxplusone commented 6 years ago

clang-analyzer-deadcode is implemented in Clang Static Analyzer. Clang-tidy only invoke it.