r345873 - Add LLVM_FALLTHROUGH annotation after switch
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 1 11:53:02 PDT 2018
Author: rnk
Date: Thu Nov 1 11:53:02 2018
New Revision: 345873
URL: http://llvm.org/viewvc/llvm-project?rev=345873&view=rev
Log:
Add LLVM_FALLTHROUGH annotation after switch
This silences a -Wimplicit-fallthrough warning from clang. GCC does not
appear to warn when the case body ends in a switch.
This is a somewhat surprising but intended fallthrough that I pulled out
from my mechanical patch. The code intends to handle 'Yi' and related
constraints as the 'x' constraint.
Modified:
cfe/trunk/lib/Basic/Targets/X86.cpp
Modified: cfe/trunk/lib/Basic/Targets/X86.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/X86.cpp?rev=345873&r1=345872&r2=345873&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/X86.cpp (original)
+++ cfe/trunk/lib/Basic/Targets/X86.cpp Thu Nov 1 11:53:02 2018
@@ -1681,6 +1681,7 @@ bool X86TargetInfo::validateOperandSize(
return false;
break;
}
+ LLVM_FALLTHROUGH;
case 'v':
case 'x':
if (SSELevel >= AVX512F)
More information about the cfe-commits
mailing list