summaryrefslogtreecommitdiff
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2019-09-12 18:26:34 +0000
committerReid Kleckner <rnk@google.com>2019-09-12 18:26:34 +0000
commite6202c43db54569c344e8dff98fdb399ef023c82 (patch)
tree05345ad28c5414b021b60ec75b8839314d2faed9 /include/clang/Basic
parent02fd9963406199172d2545389edbecc440982dc7 (diff)
downloadclang-e6202c43db54569c344e8dff98fdb399ef023c82.tar.gz
[MS] Warn when shadowing template parameters under -fms-compatibility
Summary: C++ does not allow shadowing template parameters, but previously we allowed it under -fms-extensions. Now this behavior is controlled by -fms-compatibility, and we emit a -Wmicrosoft-template warning when it happens. Fixes PR43265 Reviewers: thakis, hans Subscribers: amccarth, rsmith, STL_MSFT, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67463 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 22596950e2..46af14503e 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -4000,6 +4000,8 @@ def err_ovl_no_viable_literal_operator : Error<
// C++ Template Declarations
def err_template_param_shadow : Error<
"declaration of %0 shadows template parameter">;
+def ext_template_param_shadow : ExtWarn<
+ err_template_param_shadow.Text>, InGroup<MicrosoftTemplate>;
def note_template_param_here : Note<"template parameter is declared here">;
def warn_template_export_unsupported : Warning<
"exported templates are unsupported">;