Skip to content

Commit 15f8335

Browse files
authored
added more @throws to documentation (#618)
1 parent 6d45cd7 commit 15f8335

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

simplecpp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2957,6 +2957,7 @@ static void simplifyComments(simplecpp::TokenList &expr)
29572957
/**
29582958
* @throws std::runtime_error thrown on invalid literals, missing sizeof arguments or invalid expressions,
29592959
* missing __has_include() arguments or expressions, undefined function-like macros, invalid number literals
2960+
* @throws std::overflow_error thrown on overflow or division by zero
29602961
*/
29612962
static long long evaluate(simplecpp::TokenList &expr, const simplecpp::DUI &dui, const std::map<std::string, std::size_t> &sizeOfType)
29622963
{

simplecpp.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,10 @@ namespace simplecpp {
311311
std::string stringify(bool linenrs = false) const;
312312

313313
void readfile(Stream &stream, const std::string &filename=std::string(), OutputList *outputList = nullptr);
314+
/**
315+
* @throws std::overflow_error thrown on overflow or division by zero
316+
* @throws std::runtime_error thrown on invalid expressions
317+
*/
314318
void constFold();
315319

316320
void removeComments();

0 commit comments

Comments
 (0)