Index: include/clang/AST/DeclCXX.h =================================================================== --- include/clang/AST/DeclCXX.h +++ include/clang/AST/DeclCXX.h @@ -2856,18 +2856,34 @@ }; /// \brief Represents a shadow declaration introduced into a scope by a -/// (resolved) using declaration. +/// (resolved) using declaration, whose target is made visible for name lookup. /// /// For example, /// \code /// namespace A { -/// void foo(); +/// void foo(int); +/// void foo(double); /// } /// namespace B { /// using A::foo; // <- a UsingDecl -/// // Also creates a UsingShadowDecl for A::foo() in B +/// // Also creates UsingShadowDecls for both A::foo(int) and +/// // A::foo(double) in B /// } /// \endcode +/// +/// Derived class member declarations can hide any shadow declarations brought +/// in by a class-scope UsingDecl; +/// \code +/// class Base { +/// public: +/// void foo(); +/// }; +/// class Derived : public Base { +/// public: +/// using Base::foo; // <- a UsingDecl +/// void foo(); // Hides Base::foo and suppresses its UsingShadowDecl. +/// }; +/// \endcode class UsingShadowDecl : public NamedDecl, public Redeclarable { void anchor() override;