]> granicus.if.org Git - clang/commitdiff
Add a citation.
authorChris Lattner <sabre@nondot.org>
Wed, 2 Apr 2008 06:06:35 +0000 (06:06 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 2 Apr 2008 06:06:35 +0000 (06:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49080 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp

index b9b1af1ce5414a1836a60315904e14f972a2a2a2..ce2e58fa35461167c269cb45cc382b7266b85741 100644 (file)
@@ -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);