Lines Matching defs:DeclGroup
1 //===--- DeclGroup.cpp - Classes for representing groups of Decls -*- C++ -*-==//
10 // This file defines the DeclGroup and DeclGroupRef classes.
14 #include "clang/AST/DeclGroup.h"
20 DeclGroup* DeclGroup::Create(ASTContext &C, Decl **Decls, unsigned NumDecls) {
21 assert(NumDecls > 1 && "Invalid DeclGroup");
22 unsigned Size = sizeof(DeclGroup) + sizeof(Decl*) * NumDecls;
23 void* Mem = C.Allocate(Size, llvm::AlignOf<DeclGroup>::Alignment);
24 new (Mem) DeclGroup(NumDecls, Decls);
25 return static_cast<DeclGroup*>(Mem);
28 DeclGroup::DeclGroup(unsigned numdecls, Decl** decls) : NumDecls(numdecls) {