Lines Matching defs:Size
124 llvm::APSInt Size, DstSize;
127 if (!SizeArg->EvaluateAsInt(Size, S.Context) ||
131 if (Size.ule(DstSize))
1144 if (Val >= Args.size())
1147 NonNullArgs.resize(Args.size());
1164 (ArgIndex < NonNullArgs.size() && NonNullArgs[ArgIndex]))
1169 for (/**/; ArgIndex < NonNullArgs.size(); ++ArgIndex)
1189 CheckedVarArgs.resize(Args.size());
1199 for (unsigned ArgIdx = NumParams; ArgIdx < Args.size(); ++ArgIdx) {
1655 if (SubExprs.size() >= 2 && Form != Init) {
1802 // Determine the index of the size.
2086 unsigned NumBytes = String.size();
2806 if (format_idx >= Args.size()) {
2848 if (Args.size() == firstDataArg)
4000 assert(FirstDataArg + FS.getArgIndex() < CheckedVarArgs.size() &&
4208 size());
4209 const unsigned numDataArgs = Args.size() - firstDataArg;
4213 if (TypeSize <= StrRef.size() &&
4264 size_t StrLen = std::min(std::max(TypeSize, size_t(1)) - 1, StrRef.size());
4621 // size.
4664 const BinaryOperator *Size = dyn_cast<BinaryOperator>(E);
4665 if (!Size)
4669 if (!Size->isComparisonOp() && !Size->isEqualityOp() && !Size->isLogicalOp())
4672 SourceRange SizeRange = Size->getSourceRange();
4673 S.Diag(Size->getOperatorLoc(), diag::warn_memsize_comparison)
4677 S.getLocForEndOfToken(Size->getLHS()->getLocEnd()), ")")
4809 ActionIdx = 2; // If the pointee's size is sizeof(char),
4936 // Only issue the FIXIT for arrays of size > 1.
4945 // Warn if the user has made the 'size' argument to strlcpy or strlcat
4946 // be the size of the source, instead of the destination.
4997 // pointers if we know the actual size, like if DstArg is 'array+2'
5032 // Warn on anti-patterns as the 'size' argument to strncat.
5033 // The correct size argument should look like following:
5048 // Identify common expressions, which are wrongly used as the size argument
5175 for (unsigned i = 0, e = refVars.size(); i != e; ++i) {
5868 // The width of a division result is mostly determined by the size
6625 // If the vector cast is cast between two vectors of the same size, it is
7259 return Seq(Values.size() - 1);
7680 for (unsigned I = 0; I < Elts.size(); ++I)
7701 for (unsigned I = 0; I < Elts.size(); ++I)
7878 /// \brief Check whether this array fits the idiom of a size-one tail padded
7883 static bool IsTailPaddedMemberArray(Sema &S, llvm::APInt Size,
7885 if (Size != 1 || !ND) return false;
7952 llvm::APInt size = ArrayTy->getSize();
7953 if (!size.isStrictlyPositive())
7958 // Make sure we're comparing apples to apples when comparing index to size
7964 // There's a cast to a different size type involved
7969 size *= llvm::APInt(size.getBitWidth(), ratio);
7973 if (size.getBitWidth() > index.getBitWidth())
7974 index = index.zext(size.getBitWidth());
7975 else if (size.getBitWidth() < index.getBitWidth())
7976 size = size.zext(index.getBitWidth());
7978 // For array subscripting the index must be less than size, but for pointer
7979 // arithmetic also allow the index (offset) to be equal to size since
7982 if (AllowOnePastEnd ? index.ule(size) : index.ult(size))
7985 // Also don't warn for arrays of size 1 which are members of some
7988 if (IsTailPaddedMemberArray(*this, size, ND))
8011 << size.toString(10, true)
8012 << (unsigned)size.getLimitedValue(~0U)