Page MenuHomePhabricator

[MS] Warn when shadowing template parameters under -fms-compatibility
ClosedPublic

Authored by rnk on Wed, Sep 11, 1:08 PM.

Details

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

Diff Detail

Repository
rL LLVM

Event Timeline

rnk created this revision.Wed, Sep 11, 1:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Sep 11, 1:08 PM
thakis accepted this revision.Wed, Sep 11, 8:00 PM

Nice!

Hopefully this is rare enough that putting it under an existing warning flag won't be too inconvenient.

This revision is now accepted and ready to land.Wed, Sep 11, 8:00 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptThu, Sep 12, 11:26 AM