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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to