This is an archive of the discontinued LLVM Phabricator instance.

clang-format converts a keyword macro definition to a macro function
ClosedPublic

Authored by owenpan on Apr 17 2019, 10:38 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

owenpan created this revision.Apr 17 2019, 10:38 PM
owenpan retitled this revision from clang-format incorrectly inserts a space after a macro function name that is a keyword to clang-format incorrectly converts a keyword macro definition to a macro function.Apr 17 2019, 10:51 PM
owenpan retitled this revision from clang-format incorrectly converts a keyword macro definition to a macro function to clang-format converts a keyword macro definition to a macro function.

LGTM

clang/lib/Format/UnwrappedLineParser.cpp
808 ↗(On Diff #195675)

Is this equivalent to saying something that means FormatTok->isKeyWord() ? for those case where the #define <keyword>

MyDeveloperDay accepted this revision.Apr 18 2019, 3:15 AM
This revision is now accepted and ready to land.Apr 18 2019, 3:15 AM
owenpan marked 2 inline comments as done.Apr 18 2019, 9:36 AM
owenpan added inline comments.
clang/lib/Format/UnwrappedLineParser.cpp
808 ↗(On Diff #195675)

The condition tests if FormatTok is neither a keyword (true, false, etc.) nor a non-keyword identifier.

owenpan marked an inline comment as done.Apr 18 2019, 12:56 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 18 2019, 1:16 PM
owenpan edited the summary of this revision. (Show Details)Apr 25 2019, 12:16 AM