r254206 - int function without a return statement is invalid C++.
Artyom Skrobov via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 27 10:10:49 PST 2015
Author: askrobov
Date: Fri Nov 27 12:10:49 2015
New Revision: 254206
URL: http://llvm.org/viewvc/llvm-project?rev=254206&view=rev
Log:
int function without a return statement is invalid C++.
Changing the return type to void.
Modified:
cfe/trunk/test/Tooling/clang-check-analyzer.cpp
cfe/trunk/test/Tooling/clang-check-extra-arg.cpp
Modified: cfe/trunk/test/Tooling/clang-check-analyzer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Tooling/clang-check-analyzer.cpp?rev=254206&r1=254205&r2=254206&view=diff
==============================================================================
--- cfe/trunk/test/Tooling/clang-check-analyzer.cpp (original)
+++ cfe/trunk/test/Tooling/clang-check-analyzer.cpp Fri Nov 27 12:10:49 2015
@@ -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; }
Modified: cfe/trunk/test/Tooling/clang-check-extra-arg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Tooling/clang-check-extra-arg.cpp?rev=254206&r1=254205&r2=254206&view=diff
==============================================================================
--- cfe/trunk/test/Tooling/clang-check-extra-arg.cpp (original)
+++ cfe/trunk/test/Tooling/clang-check-extra-arg.cpp Fri Nov 27 12:10:49 2015
@@ -2,4 +2,4 @@
// CHECK: unknown warning option '-Wunimplemented-warning-before'
// CHECK: unknown warning option '-Wunimplemented-warning'
-int a(){}
+void a(){}
More information about the cfe-commits
mailing list