dcoughlin added inline comments.

================
Comment at: 
cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:517
+    if (const auto *Array = dyn_cast<ConstantArrayType>(DeclRef->getType())) {
+      uint64_t ArraySize = BR.getContext().getTypeSize(Array) / 8;
+      if (const auto *String = dyn_cast<StringLiteral>(Source)) {
----------------
Rather than dividing by '8', I suggest using ASTContext's getTypeSizeInChars(). 
This will make sure we handle those annoying platforms that don't have 8-bit 
chars.


Repository:
  rL LLVM

https://reviews.llvm.org/D41384



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to