Changes to cpp runtime to make antlr work with Chromium build

This commit is contained in:
Daniel Clifford 2018-03-08 14:38:19 +01:00
parent 30ef969e76
commit 6e213a09c5
3 changed files with 5 additions and 1 deletions

View File

@ -180,3 +180,4 @@ YYYY/MM/DD, github id, Full name, email
2017/12/03, oranoran, Oran Epelbaum, oran / epelbaum me
2017/12/20, kbsletten, Kyle Sletten, kbsletten@gmail.com
2017/12/27, jkmar, Jakub Marciniszyn, marciniszyn.jk@gmail.com
2018/03/08, dannoc, Daniel Clifford, danno@google.com

View File

@ -53,7 +53,7 @@ ParserATNSimulator::ParserATNSimulator(const ATN &atn, std::vector<dfa::DFA> &de
ParserATNSimulator::ParserATNSimulator(Parser *parser, const ATN &atn, std::vector<dfa::DFA> &decisionToDFA,
PredictionContextCache &sharedContextCache)
: ATNSimulator(atn, sharedContextCache), parser(parser), decisionToDFA(decisionToDFA) {
: ATNSimulator(atn, sharedContextCache), decisionToDFA(decisionToDFA), parser(parser) {
InitializeInstanceFields();
}

View File

@ -50,6 +50,9 @@ namespace antlrcpp {
break;
}
// else fall through
#if __has_cpp_attribute(clang::fallthrough)
[[clang::fallthrough]];
#endif
default:
result += c;