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: unassignedclangb...@nondot.org
          Reporter: dco...@google.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to