[llvm-bugs] [Bug 42139] New: -Wreturn-std-move-in-c++11 should probably only warn when compiling with -std=c++11

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 5 07:30:49 PDT 2019


            Bug ID: 42139
           Summary: -Wreturn-std-move-in-c++11 should probably only warn
                    when compiling with -std=c++11
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: evan.teran at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

I've noticed that this warning triggers even when compiling in c++14 and c++17
modes. It strikes me that if the code is being compiled with a standard newer
than c++11, then this is information that is at best, not useful to the user,
and at worst confusing, as it is encouraging a code change when none is needed.

I noticed this because things like Qt creator have this warning on by default
when it tries to offer inline warnings in the UI.

I would suggest having this warning only have an effect when compiling in c++11

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/20190605/5b499a86/attachment.html>

More information about the llvm-bugs mailing list