This is an archive of the discontinued LLVM Phabricator instance.

[clang-format][NFC] Clean up nullptr comparison style
ClosedPublic

Authored by owenpan on Feb 19 2023, 4:24 PM.

Details

Summary

For example, use Next instead of Next != nullptr, and !Next instead of Next == nullptr.

Diff Detail

Event Timeline

owenpan created this revision.Feb 19 2023, 4:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2023, 4:24 PM
owenpan requested review of this revision.Feb 19 2023, 4:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2023, 4:24 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
sstwcw added a subscriber: sstwcw.Feb 19 2023, 7:30 PM

@MyDeveloperDay Looking at the return lines in the functions in FormatToken.h got me to check the similar functions not changed by this patch. And I noticed that the final == in isCSharpKeyword seems to return true when the token is not a keyword.

This revision is now accepted and ready to land.Feb 20 2023, 12:02 PM
This revision was landed with ongoing or failed builds.Feb 21 2023, 2:56 AM
This revision was automatically updated to reflect the committed changes.