forked from OSchip/llvm-project
int function without a return statement is invalid C++.
Changing the return type to void. llvm-svn: 254206
This commit is contained in:
parent
bd3f47f5b5
commit
d08cb6c528
|
@ -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; }
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
// CHECK: unknown warning option '-Wunimplemented-warning-before'
|
||||
// CHECK: unknown warning option '-Wunimplemented-warning'
|
||||
int a(){}
|
||||
void a(){}
|
||||
|
|
Loading…
Reference in New Issue