llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.15k stars 12.03k forks source link

Analyzer says that 'auto [a,b]' is never used when it is used #39622

Open yurivict opened 5 years ago

yurivict commented 5 years ago
Bugzilla Link 40275
Version 7.0
OS FreeBSD
CC @devincoughlin

Extended Description

This line https://github.com/yurivict/gas-simulator/blob/master/main.cpp#L459 causes this wrong message:

main.cpp:531:10: warning: Value stored to '[theta, phi]' during its initialization is never read auto [theta,phi] = sphereAngles(); ^ ~~~~~~

Both variables are obviously used there.

clang-70 on FreeBSD 11.2.

yurivict commented 5 years ago

It similarly complains about this line: https://github.com/yurivict/gas-simulator/blob/master/main.cpp#L508

yurivict commented 5 years ago

assigned to @devincoughlin