mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 12:16:06 +00:00
Remove throw() from Stmt::operator new so the compiler will omit the null check on the result since ASTContext allocator won't return null.
llvm-svn: 188641
This commit is contained in:
parent
d278589329
commit
5a050016bb
@ -313,10 +313,10 @@ public:
|
|||||||
// Only allow allocation of Stmts using the allocator in ASTContext
|
// Only allow allocation of Stmts using the allocator in ASTContext
|
||||||
// or by doing a placement new.
|
// or by doing a placement new.
|
||||||
void* operator new(size_t bytes, const ASTContext& C,
|
void* operator new(size_t bytes, const ASTContext& C,
|
||||||
unsigned alignment = 8) throw();
|
unsigned alignment = 8);
|
||||||
|
|
||||||
void* operator new(size_t bytes, const ASTContext* C,
|
void* operator new(size_t bytes, const ASTContext* C,
|
||||||
unsigned alignment = 8) throw();
|
unsigned alignment = 8);
|
||||||
|
|
||||||
void* operator new(size_t bytes, void* mem) throw() {
|
void* operator new(size_t bytes, void* mem) throw() {
|
||||||
return mem;
|
return mem;
|
||||||
|
@ -50,12 +50,12 @@ static StmtClassNameTable &getStmtInfoTableEntry(Stmt::StmtClass E) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void *Stmt::operator new(size_t bytes, const ASTContext& C,
|
void *Stmt::operator new(size_t bytes, const ASTContext& C,
|
||||||
unsigned alignment) throw() {
|
unsigned alignment) {
|
||||||
return ::operator new(bytes, C, alignment);
|
return ::operator new(bytes, C, alignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *Stmt::operator new(size_t bytes, const ASTContext* C,
|
void *Stmt::operator new(size_t bytes, const ASTContext* C,
|
||||||
unsigned alignment) throw() {
|
unsigned alignment) {
|
||||||
return ::operator new(bytes, *C, alignment);
|
return ::operator new(bytes, *C, alignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user