We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36dc794 commit 3272f6fCopy full SHA for 3272f6f
1 file changed
simplecpp.cpp
@@ -1781,8 +1781,10 @@ namespace simplecpp {
1781
expandValue.push_back(new Token(*tok));
1782
tok = tok->next;
1783
}
1784
- if (par != 0)
1785
- throw Error(endToken->location, "Missing closing parenthesis for __VA_OPT__");
+ if (par != 0) {
+ const Token *const lastTok = expandValue.back() ? expandValue.back() : valueToken->next;
1786
+ throw Error(lastTok->location, "Missing closing parenthesis for __VA_OPT__");
1787
+ }
1788
} else {
1789
1790
noExpandValue.push_back(new Token(*tok));
0 commit comments