Skip to content
Snippets Groups Projects
  • Jordan Rose's avatar
    81557223
    [analyzer] Handle destructors for the argument to C++ 'delete'. · 81557223
    Jordan Rose authored
    Now that the CFG includes nodes for the destructors in a delete-expression,
    process them in the analyzer using the same common destructor interface
    currently used for local, member, and base destructors. Also, check for when
    the value is known to be null, in which case no destructor is actually run.
    
    This does not yet handle destructors for deleted /arrays/, which may need
    more CFG work. It also causes a slight regression in the location of
    double delete warnings; the double delete is detected at the destructor
    call, which is implicit, and so is reported on the first access within the
    destructor instead of at the 'delete' statement. This will be fixed soon.
    
    Patch by Karthik Bhat!
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191381 91177308-0d34-0410-b5e6-96231b3b80d8
    81557223
    History
    [analyzer] Handle destructors for the argument to C++ 'delete'.
    Jordan Rose authored
    Now that the CFG includes nodes for the destructors in a delete-expression,
    process them in the analyzer using the same common destructor interface
    currently used for local, member, and base destructors. Also, check for when
    the value is known to be null, in which case no destructor is actually run.
    
    This does not yet handle destructors for deleted /arrays/, which may need
    more CFG work. It also causes a slight regression in the location of
    double delete warnings; the double delete is detected at the destructor
    call, which is implicit, and so is reported on the first access within the
    destructor instead of at the 'delete' statement. This will be fixed soon.
    
    Patch by Karthik Bhat!
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191381 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.