Page MenuHomePhabricator

Fix equalsNode() to accept pointers to derived types.

Authored by sbenza on Jun 2 2014, 2:06 PM.



Move the 'const' in the AST_*MATCHER_P* macros to the right of ParamType to
avoiad applying the constness on the wrong level when ParamType is a pointer.
Change equalsNode() to explicitly accept 'const Decl*' or 'const Stmt*'.

Diff Detail


Event Timeline

sbenza updated this revision to Diff 10026.Jun 2 2014, 2:06 PM
sbenza retitled this revision from to Fix equalsNode() to accept pointers to derived types..
sbenza updated this object.
sbenza edited the test plan for this revision. (Show Details)
sbenza added a reviewer: klimek.
sbenza added a subscriber: Unknown Object (MLST).
klimek edited edge metadata.Jun 3 2014, 1:11 AM

Are you sure you're synced to the latest version?

If your solution works, I like it more (I tried, but didn't get it to compile :P), but it needs to be based on head ;)

sbenza added a comment.Jun 3 2014, 6:30 AM

After months of being annoyed by it, I decide to fix it a few days after you already submitted the fix.
I'll sync and fixup the change.

sbenza updated this revision to Diff 10139.Jun 5 2014, 6:48 AM
sbenza edited edge metadata.

Sync'd to head and replaced the recently added fix.

sbenza added a comment.Jun 5 2014, 6:49 AM

Sync'd and merged. I kept the your test changes.

klimek accepted this revision.Jun 5 2014, 6:50 AM
klimek edited edge metadata.


This revision is now accepted and ready to land.Jun 5 2014, 6:50 AM
sbenza closed this revision.Jun 5 2014, 7:55 AM
sbenza updated this revision to Diff 10142.

Closed by commit rL210269 (authored by @sbenza).