This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Exclude kw_decltype in RemoveParentheses
ClosedPublic

Authored by owenpan on Aug 17 2023, 1:13 AM.

Details

Summary

From https://en.cppreference.com/w/cpp/language/decltype:
Note that if the name of an object is parenthesized, it is treated as an ordinary lvalue expression, thus decltype(x) and decltype((x)) are often different types.

Fixes https://github.com/llvm/llvm-project/issues/64786.

Diff Detail

Event Timeline

owenpan created this revision.Aug 17 2023, 1:13 AM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptAug 17 2023, 1:13 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
owenpan requested review of this revision.Aug 17 2023, 1:13 AM
This revision is now accepted and ready to land.Aug 17 2023, 9:39 AM
owenpan edited the summary of this revision. (Show Details)Aug 17 2023, 4:00 PM
This revision was landed with ongoing or failed builds.Aug 17 2023, 4:05 PM
This revision was automatically updated to reflect the committed changes.