[flang] Address review comments

Original-commit: flang-compiler/f18@511c9ec536
Reviewed-on: https://github.com/flang-compiler/f18/pull/343
This commit is contained in:
Tim Keith 2019-03-19 14:18:44 -07:00
parent 8d4c934da7
commit 1ad772336a
1 changed files with 2 additions and 4 deletions

View File

@ -1344,11 +1344,9 @@ public:
auto result{parser_.Parse(state)};
if (result.has_value()) {
const char *end{state.GetLocation()};
if (start < end && start[0] == ' ') {
++start;
for (; start < end && start[0] == ' '; ++start) {
}
if (start < end && end[-1] == ' ') {
--end;
for (; start < end && end[-1] == ' '; --end) {
}
result->source = CharBlock{start, end};
}