<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - clang-cl warns on constructs in <string>"
   href="https://llvm.org/bugs/show_bug.cgi?id=30332">30332</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-cl warns on constructs in <string>
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>froydnj@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17226" name="attach_17226" title="preprocessed source and runscript">attachment 17226</a> <a href="attachment.cgi?id=17226&action=edit" title="preprocessed source and runscript">[details]</a></span>
preprocessed source and runscript

The attached tarball contains a preprocessed file and a script, 'run', to
compile the preprocessed file.  I've truncated the preprocessed file from the
full code to just the part that produces the warning.  With r280838, compiling
with clang-cl produces:

In file included from c:/m-c/devtools/shared/heapsnapshot/CoreDump.pb.cc:6:
In file included from c:/m-c/devtools/shared/heapsnapshot/CoreDump.pb.h:8:
In file included from
c:/m-c/obj-clang-cl-optimized/dist/stl_wrappers\string:63:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\string(668,15):
warning: user-defined literal suffixes not starting with '_' are reserved
[-Wuse
r-defined-literals]
inline string operator "" s(const char *_Str, size_t _Len)
              ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\string(673,16):
warning: user-defined literal suffixes not starting with '_' are reserved
[-Wuse
r-defined-literals]
inline wstring operator "" s(const wchar_t *_Str, size_t _Len)
               ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\string(678,18):
warning: user-defined literal suffixes not starting with '_' are reserved
[-Wuse
r-defined-literals]
inline u16string operator "" s(const char16_t *_Str, size_t _Len)
                 ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\string(683,18):
warning: user-defined literal suffixes not starting with '_' are reserved
[-Wuse
r-defined-literals]
inline u32string operator "" s(const char32_t *_Str, size_t _Len)
                 ^
4 warnings generated.

What puzzles me is that the same set of warnings is not produced when compiling
so simple a file as:

#include <string>

Even if you preprocess a file containing the above #include and substitute it
in place of CoreDump.pb.i in the provided 'run' script, you don't get the same
warnings.

My understanding is that clang-cl isn't supposed to warn for constructs in
system headers, so this seems like something is going wrong in the warning
code.</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>