]> granicus.if.org Git - clang/commit
[MS] Warn when shadowing template parameters under -fms-compatibility
authorReid Kleckner <rnk@google.com>
Thu, 12 Sep 2019 18:26:34 +0000 (18:26 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 12 Sep 2019 18:26:34 +0000 (18:26 +0000)
commite6202c43db54569c344e8dff98fdb399ef023c82
tree05345ad28c5414b021b60ec75b8839314d2faed9
parent02fd9963406199172d2545389edbecc440982dc7
[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
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaTemplate.cpp
test/Parser/DelayedTemplateParsing.cpp
test/SemaCXX/MicrosoftCompatibility.cpp