[LLVMbugs] [Bug 21342] New: False positive: std::valarray standard conforming operator[] triggers null reference warning

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 22 12:40:36 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=21342

            Bug ID: 21342
           Summary: False positive: std::valarray standard conforming
                    operator[] triggers null reference warning
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: stevemac321 at live.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

libcxx/include/valarray:841:53: warning: Returning null reference
    value_type&       operator[](size_t __i)       {return __begin_[__i];}
                                                    ^~~~~~~~~~~~~~~~~~~~
Standard says:
N3797 clause: 26.6.2.4 valarray element access

paragraph 6.) If the subscript operator is invoked with a size_t argument whose
value is not less than the length of the array, the behavior is undefined.

-- 
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/20141022/de03068a/attachment.html>


More information about the llvm-bugs mailing list