Add class-specific operator new to Decl hierarchy. This guarantees that Decls
can't accidentally be allocated the wrong way (missing prefix data for decls from AST files, for instance) and simplifies the CreateDeserialized functions a little. An extra DeclContext* parameter to the not-from-AST-file operator new allows us to ensure that we don't accidentally call the wrong one when deserializing (when we don't have a DeclContext), allows some extra checks, and prepares for some planned modules-related changes to Decl allocation. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195426 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/DeclBase.h 16 additions, 12 deletionsinclude/clang/AST/DeclBase.h
- include/clang/AST/DeclCXX.h 12 additions, 9 deletionsinclude/clang/AST/DeclCXX.h
- include/clang/AST/DeclTemplate.h 2 additions, 3 deletionsinclude/clang/AST/DeclTemplate.h
- lib/AST/Decl.cpp 66 additions, 92 deletionslib/AST/Decl.cpp
- lib/AST/DeclBase.cpp 13 additions, 8 deletionslib/AST/DeclBase.cpp
- lib/AST/DeclCXX.cpp 83 additions, 86 deletionslib/AST/DeclCXX.cpp
- lib/AST/DeclFriend.cpp 5 additions, 9 deletionslib/AST/DeclFriend.cpp
- lib/AST/DeclObjC.cpp 53 additions, 67 deletionslib/AST/DeclObjC.cpp
- lib/AST/DeclOpenMP.cpp 4 additions, 11 deletionslib/AST/DeclOpenMP.cpp
- lib/AST/DeclTemplate.cpp 60 additions, 102 deletionslib/AST/DeclTemplate.cpp
- lib/Sema/SemaDeclCXX.cpp 2 additions, 4 deletionslib/Sema/SemaDeclCXX.cpp
- lib/Sema/SemaTemplateInstantiateDecl.cpp 3 additions, 5 deletionslib/Sema/SemaTemplateInstantiateDecl.cpp
Loading
Please register or sign in to comment