Author: jrose
Date: Tue Jul 6 18:33:54 2010
New Revision: 107728
URL: http://llvm.org/viewvc/llvm-project?rev=107728&view=rev
Log:
Add comment noting VLASizeChecker's duty in defining a VLA's extent.
Modified:
cfe/trunk/lib/Checker/VLASizeChecker.cpp
Modified: cfe/trunk/lib/Checker/VLASizeChecker.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/VLASizeChecker.cpp?rev=107728&r1=107727&r2=107728&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/VLASizeChecker.cpp (original)
+++ cfe/trunk/lib/Checker/VLASizeChecker.cpp Tue Jul 6 18:33:54 2010
@@ -9,6 +9,8 @@
//
// This defines VLASizeChecker, a builtin check in GRExprEngine that
// performs checks for declaration of VLA of undefined or zero size.
+// In addition, VLASizeChecker is responsible for defining the extent
+// of the MemRegion that represents a VLA.
//
//===----------------------------------------------------------------------===//
@@ -100,6 +102,10 @@
// From this point on, assume that the size is not zero.
state = stateNotZero;
+ // VLASizeChecker is responsible for defining the extent of the array being
+ // declared. We do this by multiplying the array length by the element size,
+ // then matching that with the array region's extent symbol.
+
// Convert the array length to size_t.
ValueManager &ValMgr = C.getValueManager();
SValuator &SV = ValMgr.getSValuator();
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits