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:
Craig Topper 2013-08-18 17:45:38 +00:00
parent d278589329
commit 5a050016bb
2 changed files with 4 additions and 4 deletions

View File

@ -313,10 +313,10 @@ public:
// Only allow allocation of Stmts using the allocator in ASTContext
// or by doing a placement new.
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,
unsigned alignment = 8) throw();
unsigned alignment = 8);
void* operator new(size_t bytes, void* mem) throw() {
return mem;

View File

@ -50,12 +50,12 @@ static StmtClassNameTable &getStmtInfoTableEntry(Stmt::StmtClass E) {
}
void *Stmt::operator new(size_t bytes, const ASTContext& C,
unsigned alignment) throw() {
unsigned alignment) {
return ::operator new(bytes, C, alignment);
}
void *Stmt::operator new(size_t bytes, const ASTContext* C,
unsigned alignment) throw() {
unsigned alignment) {
return ::operator new(bytes, *C, alignment);
}