<p dir="ltr"><br>
On Aug 21, 2013 10:48 PM, "Shankar Easwaran" <<a href="mailto:shankare@codeaurora.org">shankare@codeaurora.org</a>> wrote:<br>
><br>
> Author: shankare<br>
> Date: Thu Aug 22 00:44:08 2013<br>
> New Revision: 188988<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=188988&view=rev">http://llvm.org/viewvc/llvm-project?rev=188988&view=rev</a><br>
> Log:<br>
> [lld][test] fix -Wreturn-type error<br>
><br>
> Modified:<br>
>     lld/trunk/unittests/DriverTests/DriverTest.h<br>
><br>
> Modified: lld/trunk/unittests/DriverTests/DriverTest.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/DriverTest.h?rev=188988&r1=188987&r2=188988&view=diff">http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/DriverTest.h?rev=188988&r1=188987&r2=188988&view=diff</a><br>

> ==============================================================================<br>
> --- lld/trunk/unittests/DriverTests/DriverTest.h (original)<br>
> +++ lld/trunk/unittests/DriverTests/DriverTest.h Thu Aug 22 00:44:08 2013<br>
> @@ -38,6 +38,7 @@ protected:<br>
>      if (inputElement.kind() == InputElement::Kind::File)<br>
>        return (llvm::dyn_cast<FileNode>(&inputElement))->path(*linkingContext());<br>
>      assert(0 && "not handling other types of input files");<br>
> +    return "";</p>
<p dir="ltr">Llvm convention is to use llvm_unreachable rather than assert(0), in this way you won't need that dead return statement either.</p>
<p dir="ltr">>    }<br>
><br>
>    // For unit tests to call driver with various command lines.<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</p>