]> granicus.if.org Git - clang/commitdiff
int function without a return statement is invalid C++.
authorArtyom Skrobov <Artyom.Skrobov@arm.com>
Fri, 27 Nov 2015 18:10:49 +0000 (18:10 +0000)
committerArtyom Skrobov <Artyom.Skrobov@arm.com>
Fri, 27 Nov 2015 18:10:49 +0000 (18:10 +0000)
Changing the return type to void.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254206 91177308-0d34-0410-b5e6-96231b3b80d8

test/Tooling/clang-check-analyzer.cpp
test/Tooling/clang-check-extra-arg.cpp

index 16cf7ce603baddf2412e908dc9d4ffc03304c426..ee0a6dc369caf4ef21a8596dbdff1bd5ce808936 100644 (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; }
index f6715358453f179ce48601ad60834f6620baabe1..a5d00bc8e89237b71490a39ab518289cdac4f373 100644 (file)
@@ -2,4 +2,4 @@
 
 // CHECK: unknown warning option '-Wunimplemented-warning-before'
 // CHECK: unknown warning option '-Wunimplemented-warning'
-int a(){}
+void a(){}