This is an archive of the discontinued LLVM Phabricator instance.

[Attr] Fix alloc_size's diags to report arg idx not value
ClosedPublic

Authored by jdenny on Feb 25 2018, 11:27 AM.

Details

Reviewers
aaron.ballman
Summary

For consistency with other attributes, fix alloc_size's diagnostics to
report the attribute's argument index for a function parameter index
rather than the actual function parameter index specified in the
source.

Diff Detail

Event Timeline

jdenny created this revision.Feb 25 2018, 11:27 AM
aaron.ballman accepted this revision.Feb 25 2018, 11:49 AM

Aside from a minor testcase nit, this LGTM. Why is this dependent on D43248?

test/Sema/alloc-size.c
3

This looks like a whitespace-only change?

This revision is now accepted and ready to land.Feb 25 2018, 11:49 AM

Aside from a minor testcase nit, this LGTM. Why is this dependent on D43248?

The dependency goes the other way. Did I get it wrong?

test/Sema/alloc-size.c
3

clang-format-diff.py suggested that. Should I drop that?

Aside from a minor testcase nit, this LGTM. Why is this dependent on D43248?

The dependency goes the other way. Did I get it wrong?

Ugh, no, I misunderstood what Phab was trying to tell me. This makes considerably more sense. :-)

Committed (with whitespace fix for the test case) in r326058, thanks for the patch!

Committed (with whitespace fix for the test case) in r326058, thanks for the patch!

Sure. Thanks for committing.

By the way the commit log you added isn't quite right. The issue isn't base 0 versus base 1. The issue is attribute argument index versus attribute argument value. See the test case for an example.

I'm not suggesting we somehow change the commit log. I just want to be sure you see what I actually did here.

Committed (with whitespace fix for the test case) in r326058, thanks for the patch!

Sure. Thanks for committing.

By the way the commit log you added isn't quite right. The issue isn't base 0 versus base 1. The issue is attribute argument index versus attribute argument value. See the test case for an example.

I'm not suggesting we somehow change the commit log. I just want to be sure you see what I actually did here.

Oh, yeah, I did muck up that commit log message a bit. Sorry about that!

Oh, yeah, I did muck up that commit log message a bit. Sorry about that!

No problem. :-)

I'll get to your comments in the other patches hopefully soon. Thanks again.

jdenny closed this revision.Feb 26 2018, 2:06 PM