[llvm-bugs] [Bug 30332] New: clang-cl warns on constructs in <string>
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 8 12:15:35 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30332
Bug ID: 30332
Summary: clang-cl warns on constructs in <string>
Product: new-bugs
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: froydnj at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 17226
--> https://llvm.org/bugs/attachment.cgi?id=17226&action=edit
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.
--
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/20160908/6f5e5210/attachment.html>
More information about the llvm-bugs
mailing list