[clang-tools-extra] r318809 - Silence some MSVC warnings about not all control paths returning a value; NFC.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 23 06:57:55 PST 2017


On Thu, Nov 23, 2017 at 1:47 AM, Kim Gräsman <kim.grasman at gmail.com> wrote:
>
>
> Den 21 nov. 2017 11:24 em skrev "Aaron Ballman via cfe-commits"
> <cfe-commits at lists.llvm.org>:
>
> Author: aaronballman
> Date: Tue Nov 21 14:24:13 2017
> New Revision: 318809
>
> URL: http://llvm.org/viewvc/llvm-project?rev=318809&view=rev
> Log:
> Silence some MSVC warnings about not all control paths returning a value;
> NFC.
>
> Modified:
>     clang-tools-extra/trunk/clangd/JSONExpr.cpp
>     clang-tools-extra/trunk/clangd/JSONExpr.h
>
> Modified: clang-tools-extra/trunk/clangd/JSONExpr.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/JSONExpr.cpp?rev=318809&r1=318808&r2=318809&view=diff
> ==============================================================================
> --- clang-tools-extra/trunk/clangd/JSONExpr.cpp (original)
> +++ clang-tools-extra/trunk/clangd/JSONExpr.cpp Tue Nov 21 14:24:13 2017
> @@ -519,6 +519,7 @@ bool operator==(const Expr &L, const Exp
>    case Expr::Object:
>      return *L.object() == *R.object();
>    }
> +  llvm_unreachable("Unknown expressiopn kind");
>
>
> Typo: expressiopn. Though it *is* unreachable :)

Hah, good catch, thank you! I've corrected in r318921.

~Aaron


More information about the cfe-commits mailing list