diff --git a/app/main/parser.h b/app/main/parser.h index 834d2f84..cbc1ac5d 100644 --- a/app/main/parser.h +++ b/app/main/parser.h @@ -54,11 +54,11 @@ public: /** * @brief Parses the input into a syntax tree. * - * @return SyntaxNode* representing an pointer to the top node of the tree. + * @return SyntaxNode* representing a pointer to the top node of the tree. * Notice: The caller is responsible for releasing memory. * */ - SyntaxNode* Parse(); + SyntaxNode* Parse(); // Clang ns_returns_retained private: Lexer *lexer; diff --git a/lib/platform.h b/lib/platform.h index 486a3d78..576479a7 100644 --- a/lib/platform.h +++ b/lib/platform.h @@ -163,11 +163,11 @@ inline void operator delete[] (void* ptr) { #ifdef __cplusplus #if (__GNUC__ > 2) || defined (_WIN32) #include -inline void* operator new (size_t size) throw() { +inline void* operator new (size_t size) throw(std::bad_alloc) { return AllocMemSafe(size); } -inline void* operator new[] (size_t size) throw() { +inline void* operator new[] (size_t size) throw(std::bad_alloc) { return AllocMemSafe(size); }