[MSVC] Explicit specializations can be declared in any namespace (fix for http:/...
authorAlexey Bataev <a.bataev@hotmail.com>
Fri, 20 Mar 2015 07:21:46 +0000 (07:21 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Fri, 20 Mar 2015 07:21:46 +0000 (07:21 +0000)
commit0068cb2499653e8874c2a24d3efbb0b1c0871a91
treeec846c37cae6bb14b46247c9c7f110529ed46b3d
parente9fe0a298c4c1602b94c2f49ab19a753eaadc87c
[MSVC] Explicit specializations can be declared in any namespace (fix for llvm.org/PR13738)

MS compiler emits no errors in case of explicit specializations outside declaration enclosing namespaces, even when language extensions are disabled.
The patch is to suppress errors and emit extension warnings if explicit specializations are not declared in the corresponding namespaces.
This fixes PR13738.

Patch by Alexey Frolov.

Differential Revision: http://reviews.llvm.org/D8283

llvm-svn: 232800
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaTemplate.cpp
clang/test/SemaTemplate/ext_ms_template_spec.cpp [new file with mode: 0644]