Page MenuHomePhabricator

[clang-format] Fixed self assignment
ClosedPublic

Authored by xbolva00 on Mon, Apr 29, 2:14 PM.

Diff Detail

Repository
rC Clang

Event Timeline

xbolva00 created this revision.Mon, Apr 29, 2:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptMon, Apr 29, 2:14 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
MyDeveloperDay added a comment.EditedWed, May 1, 2:44 AM

Did this cause some issue? Does this fix something if so can we add a test, because maybe the line isn't needed

I would think we'd want to keep this as an identifier. we are just treating arg? the same as we would arg

RKSimon added a subscriber: RKSimon.

Did this cause some issue? Does this fix something if so can we add a test, because maybe the line isn't needed

I would think we'd want to keep this as an identifier. we are just treating arg? the same as we would arg

@MyDeveloperDay didn't you write this code in D58404?

Did this cause some issue? Does this fix something if so can we add a test, because maybe the line isn't needed

I would think we'd want to keep this as an identifier. we are just treating arg? the same as we would arg

@MyDeveloperDay didn't you write this code in D58404?

I did, but I think the correct code is to remove line 249 completely and not to set the token type to the question mark, unless there was an issue which suggested the otherway in which case it should be added as a test, but I think something like PVS-Studio was used to detect this as an issue but then actually the wrong assumption is being made as to what was intended. (which is more dangerous than the self assignment in the first place)

MyDeveloperDay requested changes to this revision.Tue, May 14, 12:13 PM

please simply remove line 249

This revision now requires changes to proceed.Tue, May 14, 12:13 PM
xbolva00 updated this revision to Diff 199494.Tue, May 14, 12:43 PM

removed line

This revision is now accepted and ready to land.Wed, May 15, 1:38 AM
This revision was automatically updated to reflect the committed changes.