[llvm-bugs] [Bug 32347] New: Clang is reporting wrong "previous declaration is here" notes
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Mar 19 13:22:56 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32347
Bug ID: 32347
Summary: Clang is reporting wrong "previous declaration is
here" notes
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: heavenandhell171 at gmail.com
CC: llvm-bugs at lists.llvm.org
Clang version 5.0.0 (trunk 298027)
This snippet is from the Microsoft STL contained in one of the recent MSVC
nightly builds.
$ cat Test.cpp
template<class _Size_type> inline
_Size_type _Convert_size(const size_t _Len)
{ // convert size_t to _Size_type, avoiding truncation
return (static_cast<_Size_type>(_Len));
}
template<> inline
size_t _Convert_size<size_t>(const size_t _Len) noexcept
{ // convert size_t to size_t, unchanged
return (_Len);
}
$ clang-cl Test.cpp -std:c++latest
Test.cpp(8,10): warning: exception specification in declaration does not match
previous declaration
[-Wmicrosoft-exception-spec]
size_t _Convert_size<size_t>(const size_t _Len) noexcept
^
Test.cpp(8,10): note: previous declaration is here
Test.cpp(8,10): error: conflicting types for '_Convert_size'
size_t _Convert_size<size_t>(const size_t _Len) noexcept
^
Test.cpp(8,10): note: previous declaration is here
1 warning and 1 error generated.
Note how both notes are wrong. They don't have diagnostics, and point to the
same location of the error/warning.
--
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/20170319/965db05e/attachment.html>
More information about the llvm-bugs
mailing list