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

            Bug ID: 45843
           Summary: please report invalid use of placement new
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: msan
          Assignee: unassignedb...@nondot.org
          Reporter: raf...@espindo.la
                CC: llvm-bugs@lists.llvm.org

Created attachment 23465
  --> https://bugs.llvm.org/attachment.cgi?id=23465&action=edit
testcase

As far as I can tell, basic.life makes this code illegal

new (&x) X(std::move(x));

No one would write that directly, but I have hit that with std::swap(x,x) and a
move assignment operator that was using the move constructor.

The attached file is a case where it would be nice to get a warning. It is the
same testcase given to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94992

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to