[LLVMbugs] [Bug 13525] New: GTest ASSERT_NO_THROW

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Aug 4 15:39:10 PDT 2012


             Bug #: 13525
           Summary: GTest ASSERT_NO_THROW
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: roland at utk.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

#include <gtest/gtest.h>

void f(int** i)
  *i = new int();

void g(int* ret)
  int *i;
  *ret = *i;

int main()
  int ret;
  return ret;


test.cc:21:3: warning: Undefined or garbage value returned to caller
  return ret;
  ^      ~~~
test.cc:14:10: warning: Dereference of undefined pointer value
  *ret = *i;
2 warnings generated.

Without the ASSERT_NO_THROW no false positive is reported.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list