[PATCH] New functionality for the consumed analysis
delesley at google.com
Wed Aug 21 15:16:40 PDT 2013
Comment at: lib/Analysis/Consumed.cpp:446
@@ -419,1 +445,3 @@
+ if (!MethodDecl->isConst())
+ StateMap->setState(PState.getVar(), consumed::CS_Unknown);
Is the assumption here that calling a non-const method puts the object into an unknown state? That's a correct, conservative judgement.
However, an alternative is to assume that unmarked methods do not change the object state, which might be more user-friendly in the common case.
More information about the cfe-commits