From: Chris Lattner Date: Wed, 2 Apr 2008 06:06:35 +0000 (+0000) Subject: Add a citation. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9654557562e77564309f6b83b493a9a424e008a;p=clang Add a citation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49080 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index b9b1af1ce5..ce2e58fa35 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -983,7 +983,9 @@ QualType ASTContext::getArrayDecayedType(QualType Ty) { PointerQuals = PrettyArrayType->getIndexTypeQualifier(); } - // Apply any CVR qualifiers from the array type. + // Apply any CVR qualifiers from the array type to the element type. This + // implements C99 6.7.3p8: "If the specification of an array type includes + // any type qualifiers, the element type is so qualified, not the array type." EltTy = EltTy.getQualifiedType(ArrayQuals | EltTy.getCVRQualifiers()); QualType PtrTy = getPointerType(EltTy);