summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/DiagnosticSemaKinds.td
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2018-11-02 21:04:44 +0000
committerAaron Ballman <aaron@aaronballman.com>2018-11-02 21:04:44 +0000
commit38ae8879fa59652fb89e9383c6ff89bfad099439 (patch)
tree94b0c097467926c381211fe0eb13659cfb03c8bc /include/clang/Basic/DiagnosticSemaKinds.td
parent90458949c1c82c72ec45267838ad6b313d25b745 (diff)
Diagnose parameter names that shadow the names of inherited fields under -Wshadow-field.
This addresses PR34120. Note, unlike GCC, we take into account the accessibility of the field when deciding whether to warn or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346041 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticSemaKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td19
1 files changed, 9 insertions, 10 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 8403278746..d322457d77 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -9467,16 +9467,15 @@ def warn_block_literal_qualifiers_on_omitted_return_type : Warning<
InGroup<IgnoredQualifiers>;
def ext_warn_gnu_final : ExtWarn<
- "__final is a GNU extension, consider using C++11 final">,
- InGroup<GccCompat>;
-
-def warn_shadow_field :
- Warning<"non-static data member %0 of %1 shadows member inherited from "
- "type %2">,
- InGroup<ShadowField>, DefaultIgnore;
-def note_shadow_field : Note<"declared here">;
-
-def err_multiversion_required_in_redecl : Error<
+ "__final is a GNU extension, consider using C++11 final">,
+ InGroup<GccCompat>;
+
+def warn_shadow_field : Warning<
+ "%select{parameter|non-static data member}3 %0 %select{|of %1 }3shadows "
+ "member inherited from type %2">, InGroup<ShadowField>, DefaultIgnore;
+def note_shadow_field : Note<"declared here">;
+
+def err_multiversion_required_in_redecl : Error<
"function declaration is missing %select{'target'|'cpu_specific' or "
"'cpu_dispatch'}0 attribute in a multiversioned function">;
def note_multiversioning_caused_here : Note<