This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Simplify `splitLiteralAndReplacement` function
ClosedPublic

Authored by jurahul on Jul 20 2020, 8:29 AM.

Details

Summary
  • Eliminate From which is 0 most of the times.
  • Replace 'find_first_of('{') != 0' with 'front() != '{'
  • Simplify the loop body given the it executes only when front() == '}'

Diff Detail

Event Timeline

jurahul created this revision.Jul 20 2020, 8:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2020, 8:29 AM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 22 2020, 3:33 PM
This revision was automatically updated to reflect the committed changes.

LGTM (For the record, this is split from D83888 and I reviewed it there)