This is an archive of the discontinued LLVM Phabricator instance.

Comment parsing: Simplify Lexer::skipLineStartingDecorations (NFC)
ClosedPublic

Authored by aaronpuchert on Dec 22 2021, 12:56 PM.

Details

Summary

Inspection of the first character can just be handled by the loop as
well, it does exactly the same thing. Dereferencing the pointer a second
time shouldn't be an issue: the middle end can eliminate that second
read as it's separated from the first only by a pure function call.

Diff Detail

Event Timeline

aaronpuchert requested review of this revision.Dec 22 2021, 12:56 PM
aaronpuchert created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2021, 12:56 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
gribozavr2 accepted this revision.Jan 14 2022, 9:20 AM

Nice simplification, thank you!

This revision is now accepted and ready to land.Jan 14 2022, 9:20 AM
This revision was landed with ongoing or failed builds.Jan 14 2022, 1:48 PM
This revision was automatically updated to reflect the committed changes.