summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-08-18 17:45:38 +0000
committerCraig Topper <craig.topper@gmail.com>2013-08-18 17:45:38 +0000
commit5a050016bb8e33f8e53b1fe05de7adb8ff00d4aa (patch)
tree24663325641d03505268588139862b0f1e885cb8 /clang
parentd27858932960f74bf05223bf63d398f1143a8830 (diff)
downloadbcm5719-llvm-5a050016bb8e33f8e53b1fe05de7adb8ff00d4aa.tar.gz
bcm5719-llvm-5a050016bb8e33f8e53b1fe05de7adb8ff00d4aa.zip
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
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/AST/Stmt.h4
-rw-r--r--clang/lib/AST/Stmt.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h
index 834a3dc1c0f..bc5dabb5ac9 100644
--- a/clang/include/clang/AST/Stmt.h
+++ b/clang/include/clang/AST/Stmt.h
@@ -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;
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp
index 87e55a2fb9d..a80bd87d216 100644
--- a/clang/lib/AST/Stmt.cpp
+++ b/clang/lib/AST/Stmt.cpp
@@ -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);
}
OpenPOWER on IntegriCloud