Lines Matching defs:VLA
10 // performs checks for declaration of VLA of undefined or zero size.
12 // of the MemRegion that represents a VLA.
37 const BugType BT{this, "Dangerous variable-length array (VLA) declaration"};
39 "Dangerous variable-length array (VLA) declaration",
43 /// Check a VLA for validity.
49 const VariableArrayType *VLA, SVal &ArraySize) const;
50 /// Check a single VLA index size expression for validity.
69 const VariableArrayType *VLA,
71 assert(VLA && "Function should be called with non-null VLA argument.");
76 // Walk over the VLAs for every dimension until a non-VLA is found.
80 // innermost VLA that was encountered.
83 while (VLA) {
84 const Expr *SizeE = VLA->getSizeExpr();
89 VLALast = VLA;
90 VLA = C.getASTContext().getAsVariableArrayType(VLA->getElementType());
220 os << "Declared variable-length array (VLA) ";
242 os << "Declared variable-length array (VLA) ";
281 const VariableArrayType *VLA = Ctx.getAsVariableArrayType(TypeToCheck);
282 if (!VLA)
285 // Check the VLA sizes for validity.
289 State = checkVLA(C, State, VLA, ArraySize);
320 const VariableArrayType *VLA = C.getASTContext().getAsVariableArrayType(
322 // Ensure that the type is a VLA.
323 if (!VLA)
328 State = checkVLA(C, State, VLA, ArraySize);