Bug #:
Submitted by:
Reviewed by:
Implement type checking. First round of changes are:
- Added predicates to Type.
- Added predicates to BinExpr.
- Added Check hooks that model the categories for Binary ops.
- Added TypeRef to Expr. Will lazily eval subclasses...
- Misc bug fixes/cleanups.

llvm-svn: 39360
diff --git a/clang/AST/SemaDecl.cpp b/clang/AST/SemaDecl.cpp
index 0e5e658..5803def 100644
--- a/clang/AST/SemaDecl.cpp
+++ b/clang/AST/SemaDecl.cpp
@@ -288,10 +288,8 @@
     S->AddDecl(New);
   }
   
-  // If this is a top-level decl that is chained to some other (e.g. int A,B,C;)
-  // remember this in the LastInGroupList list.
-  if (LastInGroup && S->getParent() == 0)
-    LastInGroupList.push_back((Decl*)LastInGroup);
+  if (S->getParent() == 0)
+    AddTopLevelDecl(New, (Decl *)LastInGroup);
   
   return New;
 }
@@ -714,3 +712,12 @@
   Enum->defineElements(&Values[0], Values.size());
 }
 
+void Sema::AddTopLevelDecl(Decl *current, Decl *last) {
+  if (!current) return;
+
+  // If this is a top-level decl that is chained to some other (e.g. int A,B,C;)
+  // remember this in the LastInGroupList list.
+  if (last) {
+    LastInGroupList.push_back((Decl*)last);
+  }
+}