[PATCH] D33993: Fix compiler crash in AsmParser::Lex
Nirav Dave via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 7 07:52:04 PDT 2017
niravd accepted this revision.
niravd added a comment.
This revision is now accepted and ready to land.
"AsmParser::parseStatement" also has this issue. Please add the fix there as part of your commit as well?
Modulo that, LGTM.
================
Comment at: lib/MC/MCParser/AsmParser.cpp:703
// if this is a line comment output it.
- if (getTok().getString().front() != '\n' &&
+ if (getTok().getString().empty() == false &&
+ getTok().getString().front() != '\n' &&
----------------
Nit: Please use !getTok().getString().empty()
Repository:
rL LLVM
https://reviews.llvm.org/D33993
More information about the llvm-commits
mailing list