r191277 - CGBuiltin.cpp: Prune a stray default: label. [-Wcovered-switch-default]
Gao, Yunzhong
yunzhong_gao at playstation.sony.com
Tue Sep 24 14:19:16 PDT 2013
Hi Takumi-san,
I am seeing warnings like this:
CGBuiltin.cpp: In function 'llvm::VectorType* GetNeonType(clang::CodeGen::CodeGenFunction*, clang::NeonTypeFlags, bool)':
CGBuiltin.cpp:1628:1: warning: control reaches end of non-void function [-Wreturn-type]
I wonder if a llvm_unreachable() statement is needed at the end of this function?
- Gao.
> -----Original Message-----
> From: cfe-commits-bounces at cs.uiuc.edu [mailto:cfe-commits-
> bounces at cs.uiuc.edu] On Behalf Of NAKAMURA Takumi
> Sent: Monday, September 23, 2013 9:38 PM
> To: cfe-commits at cs.uiuc.edu
> Subject: r191277 - CGBuiltin.cpp: Prune a stray default: label. [-Wcovered-
> switch-default]
>
> Author: chapuni
> Date: Mon Sep 23 23:37:50 2013
> New Revision: 191277
>
> URL: http://llvm.org/viewvc/llvm-project?rev=191277&view=rev
> Log:
> CGBuiltin.cpp: Prune a stray default: label. [-Wcovered-switch-default]
>
> Modified:
> cfe/trunk/lib/CodeGen/CGBuiltin.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
> URL: http://llvm.org/viewvc/llvm-
> project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=191277&r1=191276&r2=1
> 91277&view=diff
> ==========================================================
> ====================
> --- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Mon Sep 23 23:37:50 2013
> @@ -1609,8 +1609,6 @@ static llvm::VectorType *GetNeonType(Cod
> bool V1Ty=false) {
> int IsQuad = TypeFlags.isQuad();
> switch (TypeFlags.getEltType()) {
> - default:
> - llvm_unreachable("Invalid NeonTypeFlags element type!");
> case NeonTypeFlags::Int8:
> case NeonTypeFlags::Poly8:
> return llvm::VectorType::get(CGF->Int8Ty, V1Ty ? 1 : (8 << IsQuad));
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list