diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-04 21:11:30 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-04 21:11:30 +0000 |
commit | b4051e7047a0085f0679257386ff183aed3e5162 (patch) | |
tree | 86be0a99d548864e167603673e692a5a38dfa50a /include/clang/Basic/DiagnosticSemaKinds.td | |
parent | 465a8998bd5e2565ed98e1179876ef9266581f74 (diff) |
Implement C++11 [temp.arg.nontype]'s permission to use the address of an object
or function with internal linkage as a non-type template argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticSemaKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 480ba958a1..f5a72ca99c 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -2361,11 +2361,18 @@ def err_template_arg_field : Error< "non-type template argument refers to non-static data member %0">; def err_template_arg_method : Error< "non-type template argument refers to non-static member function %0">; -def err_template_arg_function_not_extern : Error< - "non-type template argument refers to function %0 with internal linkage">; -def err_template_arg_object_not_extern : Error< - "non-type template argument refers to object %0 that does not have external " - "linkage">; +def err_template_arg_object_no_linkage : Error< + "non-type template argument refers to %select{function|object}0 %1 that " + "does not have linkage">; +def warn_cxx98_compat_template_arg_object_internal : Warning< + "non-type template argument referring to %select{function|object}0 %1 with " + "internal linkage is incompatible with C++98">, + InGroup<CXX98Compat>, DefaultIgnore; +def ext_template_arg_object_internal : ExtWarn< + "non-type template argument referring to %select{function|object}0 %1 with " + "internal linkage is a C++11 extension">, InGroup<CXX11>; +def err_template_arg_thread_local : Error< + "non-type template argument refers to thread-local object">; def note_template_arg_internal_object : Note< "non-type template argument refers to %select{function|object}0 here">; def note_template_arg_refers_here : Note< |