• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.deadcode.UnreachableCode,experimental.core.CastSize,unix.Malloc -analyzer-store=region -verify %s
2 
3 typedef __typeof(sizeof(int)) size_t;
4 void *malloc(size_t);
5 void free(void *);
6 void *realloc(void *ptr, size_t size);
7 void *calloc(size_t nmemb, size_t size);
8 
9 // Test for radar://11110132.
10 struct Foo {
11     mutable void* m_data;
FooFoo12     Foo(void* data) : m_data(data) {}
13 };
aFunction()14 Foo aFunction() {
15     return malloc(10);
16 }
17