[PATCH] D57064: [Sema] Improve a -Warray-bounds diagnostic

2019-01-25 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL352239: [Sema] Improve a -Warray-bounds diagnostic (authored by epilk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D57064: [Sema] Improve a -Warray-bounds diagnostic

2019-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:2092 + Optional getTypeSizeInCharsIfKnown(QualType Ty) const { +if (Ty->isIncompleteType() || Ty->isDependentType()) + return None; erik.pilkington wrote: >

[PATCH] D57064: [Sema] Improve a -Warray-bounds diagnostic

2019-01-24 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked an inline comment as done. erik.pilkington added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:2092 + Optional getTypeSizeInCharsIfKnown(QualType Ty) const { +if (Ty->isIncompleteType() || Ty->isDependentType()) + return None;

[PATCH] D57064: [Sema] Improve a -Warray-bounds diagnostic

2019-01-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM with a testing request and some small nits. Comment at: clang/include/clang/AST/ASTContext.h:2092 + Optional getTypeSizeInCharsIfKnown(QualType Ty) const

[PATCH] D57064: [Sema] Improve a -Warray-bounds diagnostic

2019-01-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: aaron.ballman, rsmith. Herald added subscribers: dexonsmith, jkorous. Fix a bug where we would compare array sizes with incompatible element types, and look through explicit casts. rdar://44800168 Thanks for taking a look!