[llvm-branch-commits] [cfe-branch] r215881 - Merging r215609:
Bill Wendling
isanbard at gmail.com
Sun Aug 17 22:18:35 PDT 2014
Author: void
Date: Mon Aug 18 00:18:35 2014
New Revision: 215881
URL: http://llvm.org/viewvc/llvm-project?rev=215881&view=rev
Log:
Merging r215609:
------------------------------------------------------------------------
r215609 | majnemer | 2014-08-13 17:49:23 -0700 (Wed, 13 Aug 2014) | 3 lines
Sema: Permit nullptr template args in MSVC compat mode
This fixes a regression I caused back in r211766.
------------------------------------------------------------------------
Modified:
cfe/branches/release_35/ (props changed)
cfe/branches/release_35/lib/Sema/SemaTemplate.cpp
cfe/branches/release_35/test/Parser/MicrosoftExtensions.cpp
Propchange: cfe/branches/release_35/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 18 00:18:35 2014
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:213609,213611,213613,213741,213834,213840,213902,213912-213913,213993,213998-213999,214008,214050,214060,214119,214208,214222,214369,214390,214471,214734-214735,214777,215046,215229,215245,215618,215806-215808
+/cfe/trunk:213609,213611,213613,213741,213834,213840,213902,213912-213913,213993,213998-213999,214008,214050,214060,214119,214208,214222,214369,214390,214471,214734-214735,214777,215046,215229,215245,215609,215618,215806-215808
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_35/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_35/lib/Sema/SemaTemplate.cpp?rev=215881&r1=215880&r2=215881&view=diff
==============================================================================
--- cfe/branches/release_35/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/branches/release_35/lib/Sema/SemaTemplate.cpp Mon Aug 18 00:18:35 2014
@@ -4189,7 +4189,7 @@ isNullPointerValueTemplateArgument(Sema
if (Arg->isValueDependent() || Arg->isTypeDependent())
return NPV_NotNullPointer;
- if (!S.getLangOpts().CPlusPlus11 || S.getLangOpts().MSVCCompat)
+ if (!S.getLangOpts().CPlusPlus11)
return NPV_NotNullPointer;
// Determine whether we have a constant expression.
Modified: cfe/branches/release_35/test/Parser/MicrosoftExtensions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_35/test/Parser/MicrosoftExtensions.cpp?rev=215881&r1=215880&r2=215881&view=diff
==============================================================================
--- cfe/branches/release_35/test/Parser/MicrosoftExtensions.cpp (original)
+++ cfe/branches/release_35/test/Parser/MicrosoftExtensions.cpp Mon Aug 18 00:18:35 2014
@@ -118,7 +118,7 @@ typedef COM_CLASS_TEMPLATE_REF<struct_wi
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;
More information about the llvm-branch-commits
mailing list