Related to PR37768: improve diagnostics for class name shadowing.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 20 Jun 2018 21:58:20 +0000 (21:58 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 20 Jun 2018 21:58:20 +0000 (21:58 +0000)
commit715ee079da4eb26fbe3c4c01cb8a3636d7a24667
treeb51de2ca3708abe665d1290b3d74ea9473b880bd
parentb45fd5cdab9c404367ee959f13bac58142b0dad0
Related to PR37768: improve diagnostics for class name shadowing.

Diagnose the name of the class being shadowed by using declarations, and
improve the diagnostics for the case where the name of the class is
shadowed by a non-static data member in a class with constructors.  In
the latter case, we now always give the "member with the same name as
its class" diagnostic regardless of the relative order of the member and
the constructor, rather than giving an inscrutible diagnostic if the
constructor appears second.

llvm-svn: 335182
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseExprCXX.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/test/CXX/class/class.mem/p13.cpp
clang/test/CXX/class/class.mem/p14.cpp
clang/test/CXX/drs/dr0xx.cpp