diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-08-14 00:49:23 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-08-14 00:49:23 +0000 |
commit | 5c734ad844037462ebcc46542bc621cecb34b1e3 (patch) | |
tree | 28ed07f0fb88b04925f6163e7b0f068bc1e30dc5 /clang/test/Parser/MicrosoftExtensions.cpp | |
parent | 32e5d8f3c07fd49c98ea93e8a2b006d8db038cd2 (diff) | |
download | bcm5719-llvm-5c734ad844037462ebcc46542bc621cecb34b1e3.tar.gz bcm5719-llvm-5c734ad844037462ebcc46542bc621cecb34b1e3.zip |
Sema: Permit nullptr template args in MSVC compat mode
This fixes a regression I caused back in r211766.
llvm-svn: 215609
Diffstat (limited to 'clang/test/Parser/MicrosoftExtensions.cpp')
-rw-r--r-- | clang/test/Parser/MicrosoftExtensions.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/test/Parser/MicrosoftExtensions.cpp b/clang/test/Parser/MicrosoftExtensions.cpp index a35d0695b08..0174ec2f292 100644 --- a/clang/test/Parser/MicrosoftExtensions.cpp +++ b/clang/test/Parser/MicrosoftExtensions.cpp @@ -118,7 +118,7 @@ typedef COM_CLASS_TEMPLATE_REF<struct_with_uuid, __uuidof(struct_with_uuid)> COM COM_CLASS_TEMPLATE_REF<int, __uuidof(struct_with_uuid)> good_template_arg; -COM_CLASS_TEMPLATE<int, __uuidof(struct_with_uuid)> bad_template_arg; // expected-error {{non-type template argument of type 'const _GUID' cannot be converted to a value of type 'const GUID *' (aka 'const _GUID *')}} +COM_CLASS_TEMPLATE<int, __uuidof(struct_with_uuid)> bad_template_arg; // expected-error {{non-type template argument of type 'const _GUID' is not a constant expression}} namespace PR16911 { struct __declspec(uuid("{12345678-1234-1234-1234-1234567890aB}")) uuid; @@ -357,3 +357,7 @@ void *_alloca(int); void foo(void) { __declspec(align(16)) int *buffer = (int *)_alloca(9); } + +template <int *> +struct NullptrArg {}; +NullptrArg<nullptr> a; |