On Wed, Jul 17, 2013 at 11:17 AM, Jordan Rose <[email protected]> wrote: > > On Jul 17, 2013, at 11:07 , Eli Friedman <[email protected]> wrote: > > On Wed, Jul 17, 2013 at 10:16 AM, Jordan Rose <[email protected]> wrote: > > Author: jrose > Date: Wed Jul 17 12:16:42 2013 > New Revision: 186521 > > URL: http://llvm.org/viewvc/llvm-project?rev=186521&view=rev > Log: > [analyzer] Handle C++11 member initializer expressions. > > Previously, we would simply abort the path when we saw a default member > initialization; now, we actually attempt to evaluate it. Like default > arguments, the contents of these expressions are not actually part of the > current function, so we fall back to constant evaluation. > > > This sounds strange. They are not constants in general; the analyzer > should be able to evaluate them just like an expression written > directly in the function. (This is important if, for example, the > initializer involves a constructor call.) > > > Yeah, in order to do this properly we'd have to pull the expressions into > the CFG. However, the CFG has an implicit invariant that no statement > appears more than once, and we'd have to figure out what to do about that to > make default args and default init exprs work properly. > > We could special-case the initializer case, where the expression only > appears once, but Richard's whole purpose for adding this was to handle > aggregate initialization, which means this could get reused. This was mostly > just to unblock the analyzer for these kinds of expressions.
Ah, okay. -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
