diff options
author | Mike Stump <mrs@apple.com> | 2009-05-07 21:56:17 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-05-07 21:56:17 +0000 |
commit | 7bc8d964405ce3b0b95091cdb66a391e50275b3c (patch) | |
tree | 2c74fc3251424eb2c0d228177cdf300b2e226332 /lib/Sema/SemaType.cpp | |
parent | 7704a33fb398a4352a18bd3fcb18218d3dc5cc60 (diff) |
Allow qualifiers on blocks. Radar 6441502
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71183 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 6f9818f350..08a5770196 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -666,12 +666,11 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S, unsigned Skip) { if (!LangOpts.Blocks) Diag(DeclType.Loc, diag::err_blocks_disable); - if (DeclType.Cls.TypeQuals) - Diag(D.getIdentifierLoc(), diag::err_qualified_block_pointer_type); if (!T.getTypePtr()->isFunctionType()) Diag(D.getIdentifierLoc(), diag::err_nonfunction_block_type); else - T = Context.getBlockPointerType(T); + T = (Context.getBlockPointerType(T) + .getQualifiedType(DeclType.Cls.TypeQuals)); break; case DeclaratorChunk::Pointer: T = BuildPointerType(T, DeclType.Ptr.TypeQuals, DeclType.Loc, Name); |