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: unassignedclangb...@nondot.org
          Reporter: charles...@playstation.sony.com
                CC: dgre...@apple.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to