summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-03-27 17:23:14 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-03-27 17:23:14 +0000
commit3a8650af779c6864d34a49585299c98363f023c9 (patch)
tree8634073cd36093143ebb64a551a538532bec5e30 /clang/include
parent45523ffd074f9db9f9936096ca3dfc3c9fb0f5e3 (diff)
downloadbcm5719-llvm-3a8650af779c6864d34a49585299c98363f023c9.tar.gz
bcm5719-llvm-3a8650af779c6864d34a49585299c98363f023c9.zip
[Sema] Factor diags with %plural. No functionality change intended.
llvm-svn: 233387
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Basic/DiagnosticSemaKinds.td59
1 files changed, 14 insertions, 45 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index 9fa66db1391..e02271c9023 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -3801,34 +3801,14 @@ def note_template_parameter_pack_here : Note<
"previous %select{template type|non-type template|template template}0 "
"parameter%select{| pack}1 declared here">;
-def err_unexpanded_parameter_pack_0 : Error<
+def err_unexpanded_parameter_pack : Error<
"%select{expression|base type|declaration type|data member type|bit-field "
"size|static assertion|fixed underlying type|enumerator value|"
"using declaration|friend declaration|qualifier|initializer|default argument|"
"non-type template parameter type|exception type|partial specialization|"
- "__if_exists name|__if_not_exists name|lambda|block}0 "
- "contains an unexpanded parameter pack">;
-def err_unexpanded_parameter_pack_1 : Error<
- "%select{expression|base type|declaration type|data member type|bit-field "
- "size|static assertion|fixed underlying type|enumerator value|"
- "using declaration|friend declaration|qualifier|initializer|default argument|"
- "non-type template parameter type|exception type|partial specialization|"
- "__if_exists name|__if_not_exists name|lambda|block}0 "
- "contains unexpanded parameter pack %1">;
-def err_unexpanded_parameter_pack_2 : Error<
- "%select{expression|base type|declaration type|data member type|bit-field "
- "size|static assertion|fixed underlying type|enumerator value|"
- "using declaration|friend declaration|qualifier|initializer|default argument|"
- "non-type template parameter type|exception type|partial specialization|"
- "__if_exists name|__if_not_exists name|lambda|block}0 "
- "contains unexpanded parameter packs %1 and %2">;
-def err_unexpanded_parameter_pack_3_or_more : Error<
- "%select{expression|base type|declaration type|data member type|bit-field "
- "size|static assertion|fixed underlying type|enumerator value|"
- "using declaration|friend declaration|qualifier|initializer|default argument|"
- "non-type template parameter type|exception type|partial specialization|"
- "__if_exists name|__if_not_exists name|lambda|block}0 "
- "contains unexpanded parameter packs %1, %2, ...">;
+ "__if_exists name|__if_not_exists name|lambda|block}0 contains"
+ "%plural{0: an|:}1 unexpanded parameter pack"
+ "%plural{0:|1: %2|2:s %2 and %3|:s %2, %3, ...}1">;
def err_pack_expansion_without_parameter_packs : Error<
"pack expansion does not contain any unexpanded parameter packs">;
@@ -6878,29 +6858,18 @@ def warn_case_empty_range : Warning<"empty case range specified">;
def warn_missing_case_for_condition :
Warning<"no case matching constant switch condition '%0'">;
-def warn_def_missing_case1 : Warning<
- "enumeration value %0 not explicitly handled in switch">,
- InGroup<SwitchEnum>, DefaultIgnore;
-def warn_def_missing_case2 : Warning<
- "enumeration values %0 and %1 not explicitly handled in switch">,
- InGroup<SwitchEnum>, DefaultIgnore;
-def warn_def_missing_case3 : Warning<
- "enumeration values %0, %1, and %2 not explicitly handled in switch">,
- InGroup<SwitchEnum>, DefaultIgnore;
-def warn_def_missing_cases : Warning<
- "%0 enumeration values not explicitly handled in switch: %1, %2, %3...">,
+def warn_def_missing_case : Warning<"%plural{"
+ "1:enumeration value %1 not explicitly handled in switch|"
+ "2:enumeration values %1 and %2 not explicitly handled in switch|"
+ "3:enumeration values %1, %2, and %3 not explicitly handled in switch|"
+ ":%0 enumeration values not explicitly handled in switch: %1, %2, %3...}0">,
InGroup<SwitchEnum>, DefaultIgnore;
-def warn_missing_case1 : Warning<"enumeration value %0 not handled in switch">,
- InGroup<Switch>;
-def warn_missing_case2 : Warning<
- "enumeration values %0 and %1 not handled in switch">,
- InGroup<Switch>;
-def warn_missing_case3 : Warning<
- "enumeration values %0, %1, and %2 not handled in switch">,
- InGroup<Switch>;
-def warn_missing_cases : Warning<
- "%0 enumeration values not handled in switch: %1, %2, %3...">,
+def warn_missing_case : Warning<"%plural{"
+ "1:enumeration value %1 not handled in switch|"
+ "2:enumeration values %1 and %2 not handled in switch|"
+ "3:enumeration values %1, %2, and %3 not handled in switch|"
+ ":%0 enumeration values not handled in switch: %1, %2, %3...}0">,
InGroup<Switch>;
def warn_unannotated_fallthrough : Warning<
OpenPOWER on IntegriCloud