]> granicus.if.org Git - clang/commit
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)
commit39990b1e95721caf4dbe0cee68a46552f7f03dd1
tree52a612b74b80b2d5f44ebe38faa25fb18944adb9
parentfcfa2dd517ec1a6045a81e8247e346d630a22618
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335182 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Parse/ParseDecl.cpp
lib/Parse/ParseExprCXX.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExprCXX.cpp
test/CXX/class/class.mem/p13.cpp
test/CXX/class/class.mem/p14.cpp
test/CXX/drs/dr0xx.cpp