http://llvm.org/bugs/show_bug.cgi?id=14298

Ismail Pazarbasi <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |INVALID

--- Comment #1 from Ismail Pazarbasi <[email protected]> ---
Clang handles this case correctly.

class_2 injected class name will be inherited by class_1 as well, but it will
be a private member in class_1 (and, hence, in class_0). In the declaration of
var_4, class_2 refers to this privately inherited injected class name. Class
scope will be looked up first, and a name will be found, but it will not be
accessible. 

Use fully qualified name for class_2 to refer to class name in global
namespace.

struct class_0 : private class_1 {
  struct ::class_2 var_4; // OK
};

The error message, however, could be improved. In this particular case, class_2
name is actually not a private member of class_2, but it's a private member in
class_1 because class_1 privately inherits names from class_2. Injected class
names are public members of classes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to