Skip to content

Commit 1ddc734

Browse files
committed
review
1 parent c764bc8 commit 1ddc734

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎simplecpp.cpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,8 +2209,10 @@ namespace simplecpp {
22092209
* @param nameTokInst the macro name in the call
22102210
* @param calledInDefine the call is in a #define, so the arguments must be on the same line
22112211
* @return the tokens that delimit the arguments: the '(', each ',' between two arguments and the ')'.
2212-
* Empty when the macro is not function-like or the name is not followed by '('.
2213-
* @throws wrongNumberOfParameters if a function-like macro has the wrong number of arguments
2212+
* Empty when the macro is not function-like.
2213+
* @throws wrongNumberOfParameters if a function-like macro has the wrong number of arguments.
2214+
* This includes the case where the name is not followed by '(' (or is the last token),
2215+
* so the caller must check for that first if it is not an error.
22142216
*/
22152217
std::vector<const Token *> getMacroParameters(const Token *nameTokInst, bool calledInDefine) const {
22162218
if (!functionLike())

0 commit comments

Comments
 (0)