[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 24 07:52:48 PDT 2018


aaron.ballman created this revision.
aaron.ballman added reviewers: lebedev.ri, rsmith, dblaikie.

This patch diagnoses parameter names that shadow the names of inherited fields under -Wshadow-field. It addresses PR34120. Note, unlike GCC, we take into account the accessibility of the field when deciding whether to warn or not.


https://reviews.llvm.org/D52421

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Sema/Sema.h
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaDeclCXX.cpp
  test/SemaCXX/warn-shadow.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52421.166686.patch
Type: text/x-patch
Size: 3663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180924/d8532954/attachment.bin>


More information about the cfe-commits mailing list