https://llvm.org/bugs/show_bug.cgi?id=24181

            Bug ID: 24181
           Summary: False positive for -Wdangling-initializer-list
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 14616
  --> https://llvm.org/bugs/attachment.cgi?id=14616&action=edit
Test case

Clang's dangling-initializer-list diagnostic is incorrectly emitted twice for
this program:

#include <initializer_list>

int main() {
    new std::initializer_list<int>[2]{};
    new std::initializer_list<int>{};
}

All instances of std::initializer_list in this program are value-initialized,
and hence not backed by any array.

-- 
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