int function without a return statement is invalid C++.

Changing the return type to void.

llvm-svn: 254206
This commit is contained in:
Artyom Skrobov 2015-11-27 18:10:49 +00:00
parent bd3f47f5b5
commit d08cb6c528
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
// RUN: clang-check -analyze "%s" -- -c 2>&1 | FileCheck %s
// CHECK: Dereference of null pointer
int a(int *x) { if(x){} *x = 47; }
void a(int *x) { if(x){} *x = 47; }

View File

@ -2,4 +2,4 @@
// CHECK: unknown warning option '-Wunimplemented-warning-before'
// CHECK: unknown warning option '-Wunimplemented-warning'
int a(){}
void a(){}