[PATCH] D20014: [libc++] Explicit return in non-void function

Bernard Ogden via cfe-commits cfe-commits at lists.llvm.org
Fri May 6 05:08:33 PDT 2016


bogden created this revision.
bogden added a reviewer: EricWF.
bogden added a subscriber: cfe-commits.

This test contains a non-void function with no explicit return,
causing it to fail when built with -Werror=return-type. This patch adds
a return to the function.

http://reviews.llvm.org/D20014

Files:
  test/std/utilities/memory/allocator.uses/allocator.uses.trait/uses_allocator.pass.cpp

Index: test/std/utilities/memory/allocator.uses/allocator.uses.trait/uses_allocator.pass.cpp
===================================================================
--- test/std/utilities/memory/allocator.uses/allocator.uses.trait/uses_allocator.pass.cpp
+++ test/std/utilities/memory/allocator.uses/allocator.uses.trait/uses_allocator.pass.cpp
@@ -30,7 +30,7 @@
 };
 
 struct D {
-  static int allocator_type() {}
+  static int allocator_type() { return 0; }
 };
 
 struct E {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20014.56403.patch
Type: text/x-patch
Size: 474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160506/bbec68ed/attachment.bin>


More information about the cfe-commits mailing list