[llvm-bugs] [Bug 34809] New: Passing multiple optimization level options (e.g., /O1 /O2) to clang-cl causes "argument unused" warning

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 2 15:38:35 PDT 2017


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

            Bug ID: 34809
           Summary: Passing multiple optimization level options (e.g., /O1
                    /O2) to clang-cl causes "argument unused" warning
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dcower at google.com
                CC: llvm-bugs at lists.llvm.org

I am using trunk r314281. I would expect passing multiple /O<value> option to
cause the driver to use the final one passed (i.e., the behavior seen with
normal clang and multiple -O<value> options).

$ cat a.cc
int main() { return 0; }

$ clang-cl -c /O1 a.cc
<works fine -- no output>

$ clang-cl -c /O1 /O1 a.cc
clang-cl: warning: argument unused during compilation: '/O1'
[-Wunused-command-line-argument]

$ clang-cl -c /O1 /O2 a.cc
clang-cl: warning: argument unused during compilation: '/O1'
[-Wunused-command-line-argument]

$ clang-cl -c /O2 /O1 a.cc
clang-cl: warning: argument unused during compilation: '/O2'
[-Wunused-command-line-argument

-- 
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/20171002/58737985/attachment.html>


More information about the llvm-bugs mailing list