From: Artyom Skrobov Date: Fri, 27 Nov 2015 18:10:49 +0000 (+0000) Subject: int function without a return statement is invalid C++. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e7a031ee783995486513be51541e2b5b3d57e13;p=clang int function without a return statement is invalid C++. Changing the return type to void. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254206 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Tooling/clang-check-analyzer.cpp b/test/Tooling/clang-check-analyzer.cpp index 16cf7ce603..ee0a6dc369 100644 --- a/test/Tooling/clang-check-analyzer.cpp +++ b/test/Tooling/clang-check-analyzer.cpp @@ -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; } diff --git a/test/Tooling/clang-check-extra-arg.cpp b/test/Tooling/clang-check-extra-arg.cpp index f671535845..a5d00bc8e8 100644 --- a/test/Tooling/clang-check-extra-arg.cpp +++ b/test/Tooling/clang-check-extra-arg.cpp @@ -2,4 +2,4 @@ // CHECK: unknown warning option '-Wunimplemented-warning-before' // CHECK: unknown warning option '-Wunimplemented-warning' -int a(){} +void a(){}