Finish converting decls over to the new invalid decl API.

Also removed an old FIXME (FIXME: "auto func();" passes through...).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41555 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaType.cpp b/Sema/SemaType.cpp
index 04264a3..3bc0e76 100644
--- a/Sema/SemaType.cpp
+++ b/Sema/SemaType.cpp
@@ -278,11 +278,12 @@
   assert(D.getIdentifier() == 0 && "Type name should have no identifier!");
   
   QualType T = GetTypeForDeclarator(D, S);
+
+  assert(!T.isNull() && "GetTypeForDeclarator() returned null type");
   
-  // If the type of the declarator was invalid, this is an invalid typename.
-  if (T.isNull())
-    return true;
-  
+  // In this context, we *do not* check D.getInvalidType(). If the declarator
+  // type was invalid, GetTypeForDeclarator() still returns a "valid" type,
+  // though it will not reflect the user specified type.
   return T.getAsOpaquePtr();
 }
 
@@ -292,9 +293,10 @@
   // just want the type converted.
   QualType T = GetTypeForDeclarator(D, S);
   
-  // If the type of the declarator was invalid, this is an invalid typename.
-  if (T.isNull())
-    return true;
-  
+  assert(!T.isNull() && "GetTypeForDeclarator() returned null type");
+
+  // In this context, we *do not* check D.getInvalidType(). If the declarator
+  // type was invalid, GetTypeForDeclarator() still returns a "valid" type,
+  // though it will not reflect the user specified type.
   return T.getAsOpaquePtr();
 }