http://llvm.org/bugs/show_bug.cgi?id=15881

            Bug ID: 15881
           Summary: clang fails to detect delete x; return x
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Mac, Xcode 4.6.2, Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM
3.2svn), Objective C++.

Neither clang with lots of warning enabled, nor the static analyser detect this
simple failure case:

HBaseAction*
AMouseMoveAndClick::Merge( HBaseAction* action )
{
    AMouseMoveAndClick* newAction = new AMouseMoveAndClick( *this );
    delete newAction;
    return newAction;
}

Shouldn't pretty much any use of a deleted variable be flagged as an error?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to