Alternate address spaces work:

rename QualType::getQualifiers to getCVRQualifiers.
Add some fixme's and clean up some code relevant to qualifiers.
Change ASQualType to contain a Type* instead of a QualType.  
Any CVR qualifiers should be on the outer qual type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47398 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/Expr.cpp b/AST/Expr.cpp
index 27dfa78..7a9a78e 100644
--- a/AST/Expr.cpp
+++ b/AST/Expr.cpp
@@ -358,7 +358,7 @@
     return LV_NotObjectType;
 
   // Allow qualified void which is an incomplete type other than void (yuck).
-  if (TR->isVoidType() && !TR.getCanonicalType().getQualifiers())
+  if (TR->isVoidType() && !TR.getCanonicalType().getCVRQualifiers())
     return LV_IncompleteVoidType;
 
   if (TR->isReferenceType()) // C++ [expr]
@@ -1000,7 +1000,8 @@
     // Check that it is a cast to void*.
     if (const PointerType *PT = CE->getType()->getAsPointerType()) {
       QualType Pointee = PT->getPointeeType();
-      if (Pointee.getQualifiers() == 0 && Pointee->isVoidType() && // to void*
+      if (Pointee.getCVRQualifiers() == 0 && 
+          Pointee->isVoidType() &&                                 // to void*
           CE->getSubExpr()->getType()->isIntegerType())            // from int.
         return CE->getSubExpr()->isNullPointerConstant(Ctx);
     }