summaryrefslogtreecommitdiff
path: root/include/clang/Basic/DiagnosticSemaKinds.td
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-06-10 23:29:48 +0000
committerReid Kleckner <reid@kleckner.net>2014-06-10 23:29:48 +0000
commit4ed0870592c05a5c6f80268bdaf62a081c47477f (patch)
treeac488872253455f43e3c99dcd76e809a7c141304 /include/clang/Basic/DiagnosticSemaKinds.td
parenta438edc06abbe6f78fc5cc692b6aaecf0730eb08 (diff)
downloadclang-4ed0870592c05a5c6f80268bdaf62a081c47477f.tar.gz
clang-4ed0870592c05a5c6f80268bdaf62a081c47477f.tar.bz2
clang-4ed0870592c05a5c6f80268bdaf62a081c47477f.tar.xz
Recover from missing typenames on template args for MSVC compatibility
While matching a non-type template argument against a known template type parameter we now modify the AST's TemplateArgumentLoc to assume the user wrote typename. Under -fms-compatibility, we downgrade our diagnostic from an error to an extwarn. Reviewed by: rsmith Differential Revision: http://reviews.llvm.org/D4049 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticSemaKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 7a37effafe..6522303f65 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -3111,6 +3111,10 @@ def err_template_arg_must_be_type : Error<
"template argument for template type parameter must be a type">;
def err_template_arg_must_be_type_suggest : Error<
"template argument for template type parameter must be a type; did you forget 'typename'?">;
+def ext_ms_template_type_arg_missing_typename : ExtWarn<
+ "template argument for template type parameter must be a type; "
+ "omitted 'typename' is a Microsoft extension">,
+ InGroup<Microsoft>;
def err_template_arg_must_be_expr : Error<
"template argument for non-type template parameter must be an expression">;
def err_template_arg_nontype_ambig : Error<