Skip to content
  • Douglas Gregor's avatar
    Alter the internal representation of the condition variable in · 27b98eae
    Douglas Gregor authored
    if/while/switch/for statements to ensure that walking the children of
    these statements actually works. Previously, we stored the condition
    variable as a VarDecl. However, StmtIterator isn't able to walk from a
    VarDecl to a set of statements, and would (in some circumstances) walk
    beyond the end of the list of statements, cause Bad Behavior.
    
    In this change, we've gone back to representing the condition
    variables as DeclStmts. While not as memory-efficient as VarDecls, it
    greatly simplifies iteration over the children. 
    
    Fixes the remainder of <rdar://problem/8104754>.
    
    llvm-svn: 106504
    27b98eae
Loading