 +    }      
 +    return false;
 +  }
++} // end namespace clang
+Index: tools/clang/include/clang/AST/DeclGroup.h
+===================================================================
+--- tools/clang/include/clang/AST/DeclGroup.h	(revision 160362)
++++ tools/clang/include/clang/AST/DeclGroup.h	(working copy)
+@@ -128,6 +128,10 @@
+     X.D = static_cast<Decl*>(Ptr);
+     return X;
+   }
++
++  /// operator== - Determine whether the specified DeclGroupRefs are identical.
++  ///
++  friend bool operator==(const DeclGroupRef LHS, const DeclGroupRef RHS);
  };
  
  } // end clang namespace

Index: tools/clang/include/clang/AST/DeclGroup.h
===================================================================
--- tools/clang/include/clang/AST/DeclGroup.h	(revision 160041)
+++ tools/clang/include/clang/AST/DeclGroup.h	(working copy)
@@ -128,6 +128,29 @@
     X.D = static_cast<Decl*>(Ptr);
     return X;
   }
+
+  /// operator== - Determine whether the specified DeclGroupRefs are identical.
+  ///
+  friend bool operator==(const DeclGroupRef LHS, const DeclGroupRef RHS) {
+    if (LHS.D == RHS.D) {
+      if (LHS.isSingleDecl() && RHS.isSingleDecl())
+        return true;
+
+      if (LHS.isDeclGroup() && RHS.isDeclGroup()){
+        const DeclGroup &LDG = LHS.getDeclGroup();

+          return false;
+
+        for (size_t i = 0; i < LDG.size(); ++i)
+          if (LDG[i] != RDG[i] || LDG[i]->getKind() != RDG[i]->getKind())
+            return false;
+
+        return true;
