[PATCH] D83502: Change behavior with zero-sized static array extents

2020-07-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Thanks for the review, I've gone ahead and committed in 006c49d890da633d1ce502117fc2a49863cd65b7

[PATCH] D83502: Change behavior with zero-sized static array extents

2020-07-10 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, LGTM. Comment at: clang/lib/CodeGen/CGCall.cpp:2515 +} else { + AI->addAttr(llvm::Attribute::NonNull); +}

[PATCH] D83502: Change behavior with zero-sized static array extents

2020-07-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 277120. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Updated based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83502/new/ https://reviews.llvm.org/D83502 Files:

[PATCH] D83502: Change behavior with zero-sized static array extents

2020-07-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2515 +} else { + AI->addAttr(llvm::Attribute::NonNull); +} rjmccall wrote: > aaron.ballman wrote: > > rjmccall wrote: > > > Isn't the

[PATCH] D83502: Change behavior with zero-sized static array extents

2020-07-10 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2515 +} else { + AI->addAttr(llvm::Attribute::NonNull); +} aaron.ballman wrote: > rjmccall wrote: > > Isn't the old logic still correct? If

[PATCH] D83502: Change behavior with zero-sized static array extents

2020-07-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2515 +} else { + AI->addAttr(llvm::Attribute::NonNull); +} rjmccall wrote: > Isn't the

[PATCH] D83502: Change behavior with zero-sized static array extents

2020-07-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2515 +} else { + AI->addAttr(llvm::Attribute::NonNull); +} Isn't the old logic still correct? If the element size is static and the

[PATCH] D83502: Change behavior with zero-sized static array extents

2020-07-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: rsmith, echristo, dblaikie, rjmccall. Currently, Clang diagnoses this code by default: `void f(int a[static 0]);` saying that "static has no effect on zero-length arrays" and this diagnostic is accurate for our implementation.