-Add DeclChain member to DeclContext.
-ScopedDecls get chained to their DeclContext.
-DeclContext's DeclChain replaces FunctionDecl's DeclChain and EnumDecl's ElementList.
llvm-svn: 52164
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 47334f5..949d100 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -116,7 +116,7 @@
}
void EnumDecl::Destroy(ASTContext& C) {
- if (ElementList) ElementList->Destroy(C);
+ if (getEnumConstantList()) getEnumConstantList()->Destroy(C);
Decl::Destroy(C);
}