[llvm-bugs] [Bug 40275] New: Analyzer says that 'auto [a, b]' is never used when it is used

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 9 11:18:41 PST 2019


            Bug ID: 40275
           Summary: Analyzer says that 'auto [a,b]' is never used when it
                    is used
           Product: clang
           Version: 7.0
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: yuri at tsoft.com
                CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org

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.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190109/3c605eec/attachment.html>

More information about the llvm-bugs mailing list