<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Passing multiple optimization level options (e.g., /O1 /O2) to clang-cl causes "argument unused" warning"
   href="https://bugs.llvm.org/show_bug.cgi?id=34809">34809</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Passing multiple optimization level options (e.g., /O1 /O2) to clang-cl causes "argument unused" warning
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Driver
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dcower@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>