]> granicus.if.org Git - clang/commit
[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)
commit1a6e64de7431241f4457b70e6e8da3a6c8103d5d
tree7aee92e4bf3f1be60b2a38dcb1c696c0aef24e84
parentc1dec21eaaed82a7ab5382810dcc889d60d4486e
[MSVC] Explicit specializations can be declared in any namespace (fix for http://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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232800 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaTemplate.cpp
test/SemaTemplate/ext_ms_template_spec.cpp [new file with mode: 0644]