-
Notifications
You must be signed in to change notification settings - Fork 96
fixed #616 - report bad macro syntax via OutputList
#617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
This is also prevents |
| macros.insert(std::pair<TokenString,Macro>(macro.name(), macro)); | ||
| try { | ||
| const Macro macro(lhs, rhs, dummy); | ||
| macros.insert(std::pair<TokenString,Macro>(macro.name(), macro)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use macros.emplace(macro.name(), macro); syntax nowadays or is a newer C++ needed for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #596.
| macros.insert(std::pair<TokenString,Macro>(macro.name(), macro)); | ||
| } catch (const std::runtime_error& e) { | ||
| if (outputList) { | ||
| simplecpp::Output err = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer that the = is removed here. We just want that the constructor is called. No initializer list + assignment stuff..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will clean up as a whole in a follow-up.
| {}, | ||
| e.what() | ||
| }; | ||
| outputList->push_back(std::move(err)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can't emplace_back ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only adjusted those when Clang-Tidy told us to.
Will adjust as a whole in a follow-up.
No description provided.