This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Handle typename macros inside cast expressions
ClosedPublic

Authored by arichardson on Sep 1 2020, 5:02 AM.

Details

Summary

Before: x = (STACK_OF(uint64_t)) & a;
After: x = (STACK_OF(uint64_t))&a;

Diff Detail

Event Timeline

arichardson created this revision.Sep 1 2020, 5:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2020, 5:02 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
arichardson requested review of this revision.Sep 1 2020, 5:02 AM

I am a beginner to compiler, interesting in how to write Unit Test case for change so I ran it, but found difference with my expection.

You mentioned
Before: x = (STACK_OF(uint64_t)) & a;
After: x = (STACK_OF(uint64_t))&a;

Your input test data is identical with the expected data. Does this exactly you need? Attach with a screenshot for your reference.

I am a beginner to compiler, interesting in how to write Unit Test case for change so I ran it, but found difference with my expection.

You mentioned
Before: x = (STACK_OF(uint64_t)) & a;
After: x = (STACK_OF(uint64_t))&a;

Your input test data is identical with the expected data. Does this exactly you need? Attach with a screenshot for your reference.

It previously would have reformatted that input to add the spaces, so using the expected value as an input works fine. This is what almost all tests in this file do.

This revision is now accepted and ready to land.Sep 4 2020, 10:23 AM