[llvm-bugs] [Bug 27742] New: Self referential using declaration inside a derived class lack an accompanying Note in C++11
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri May 13 17:34:52 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27742
Bug ID: 27742
Summary: Self referential using declaration inside a derived
class lack an accompanying Note in C++11
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: charles_li at playstation.sony.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
This diagnostic inconsistency has been discovered while
updating the following Lit test for C++11 compatibiliity.
CXX/dcl.dcl/basic.namespace/namespace.udecl/p4.cpp
Here is a reduced test case:
/***********************************/
struct Base { };
struct C : Base {
int bar();
using C::bar;
};
/***********************************/
When compiling in C++98, Clang issues both an Error and a Note.
$ clang useself.cpp -c -std=c++98 -Wall -Weverything
useself.cpp:7:12: error: using declaration refers to its own class
using C::bar;
~~~^
useself.cpp:6:7: note: target of using declaration
int bar();
^
1 error generated.
When compiling in C++11, Clang issues just an Error.
$ clang useself.cpp -c -std=c++11 -Wall -Weverything
useself.cpp:7:12: error: using declaration refers to its own class
using C::bar;
~~~^
1 error generated.
--
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/20160514/bc6c541e/attachment.html>
More information about the llvm-bugs
mailing list