]> granicus.if.org Git - clang/commit
Sema: add warning for c++ member variable shadowing
authorSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 8 Feb 2017 03:30:13 +0000 (03:30 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 8 Feb 2017 03:30:13 +0000 (03:30 +0000)
commit52f027dd7115ad243a927cff142f730dbc539e6f
tree94edb58f0f0479d517b7369e0329158985b2943e
parent7b0f692041cfa8e45f1d3762299924931276fffe
Sema: add warning for c++ member variable shadowing

Add a warning for shadowed variables across records.  Referencing a
shadow'ed variable may not give the desired variable.  Add an optional
warning for the shadowing.

Patch by James Sun!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294401 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaDeclCXX.cpp
test/CXX/class.derived/class.member.lookup/p10.cpp [new file with mode: 0644]
test/CXX/class.derived/class.member.lookup/p6.cpp
test/CXX/class.derived/class.member.lookup/p7.cpp