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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 25 07:19:40 PST 2019


aaron.ballman added inline comments.


================
Comment at: clang/include/clang/AST/ASTContext.h:2092
+  Optional<CharUnits> getTypeSizeInCharsIfKnown(QualType Ty) const {
+    if (Ty->isIncompleteType() || Ty->isDependentType())
+      return None;
----------------
erik.pilkington wrote:
> aaron.ballman wrote:
> > Can you add a dependent type test as well?
> I don't think its possible to get a dependent type here, since this feature is only supported in C mode.
That makes sense; I couldn't figure out a way to trigger it either. It seems sensible to leave it in should we ever need this for C++, though.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57064/new/

https://reviews.llvm.org/D57064





More information about the cfe-commits mailing list