After yesterday's discussion (http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-February/001044.html), decided not to change the semantics of Type::isIncompleteType().
This commit simply changes a couple comments to reflect this decision.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46970 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index c427a81..aba5b42 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -527,11 +527,8 @@
} else {
RecordDecl* structDecl = DeclType->getAsRecordType()->getDecl();
- // If the record is invalid, it's members can't be trusted.
- // FIXME: I'd like to "fix" this at a higher level. That is, we should
- // never get here if the struct decl is invalid. Considering a
- // change to Type::isIncompleteType(). Until this happens, the
- // following check is certainly better than crashing.
+ // If the record is invalid, some of it's members are invalid. To avoid
+ // confusion, we forgo checking the intializer for the entire record.
if (structDecl->isInvalidDecl())
return true;