]> granicus.if.org Git - clang/commitdiff
Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
authorGalina Kistanova <gkistanova@gmail.com>
Sat, 3 Jun 2017 06:30:46 +0000 (06:30 +0000)
committerGalina Kistanova <gkistanova@gmail.com>
Sat, 3 Jun 2017 06:30:46 +0000 (06:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304649 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBuiltin.cpp
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGCoroutine.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CodeGenModule.cpp

index 2134fb9e03e4dbeb3e6824bf56f76f42c8654567..3b4f8854a9ca64d33e366b66e3cb907f977a7494 100644 (file)
@@ -2659,6 +2659,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
           Builder.CreateCall(CGM.CreateRuntimeFunction(FTy, Name),
                              llvm::ArrayRef<llvm::Value *>(Args)));
     }
+    LLVM_FALLTHROUGH;
   }
   // OpenCL v2.0 s6.13.17.6 - Kernel query functions need bitcast of block
   // parameter.
@@ -3813,6 +3814,7 @@ Value *CodeGenFunction::EmitCommonNeonBuiltinExpr(
   case NEON::BI__builtin_neon_vcalt_v:
   case NEON::BI__builtin_neon_vcaltq_v:
     std::swap(Ops[0], Ops[1]);
+    LLVM_FALLTHROUGH;
   case NEON::BI__builtin_neon_vcage_v:
   case NEON::BI__builtin_neon_vcageq_v:
   case NEON::BI__builtin_neon_vcagt_v:
@@ -5056,6 +5058,7 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,
   case NEON::BI__builtin_neon_vsri_n_v:
   case NEON::BI__builtin_neon_vsriq_n_v:
     rightShift = true;
+    LLVM_FALLTHROUGH;
   case NEON::BI__builtin_neon_vsli_n_v:
   case NEON::BI__builtin_neon_vsliq_n_v:
     Ops[2] = EmitNeonShiftVector(Ops[2], Ty, rightShift);
index 8f405eee6e5231ecdcf48febfac00ad2f789d653..079064733585bed09b8e0181094da59cc440b3df 100644 (file)
@@ -4259,6 +4259,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
         Builder.CreateStore(elt, eltAddr);
       }
       // FALLTHROUGH
+      LLVM_FALLTHROUGH;
     }
 
     case ABIArgInfo::InAlloca:
index f65fb5b9232ab08c699a0fe90dd51edf0140eddc..bc5f6327c9a055fa8936a40b04d00be295273a56 100644 (file)
@@ -625,6 +625,7 @@ RValue CodeGenFunction::EmitCoroutineIntrinsic(const CallExpr *E,
     CGM.Error(E->getLocStart(), "this builtin expect that __builtin_coro_id has"
                                 " been used earlier in this function");
     // Fallthrough to the next case to add TokenNone as the first argument.
+    LLVM_FALLTHROUGH;
   }
   // @llvm.coro.suspend takes a token parameter. Add token 'none' as the first
   // argument.
index 3ed388974c46544a8934129fd2f486c84056c890..02db79159b58fefbb2717cc90256b025c39c324f 100644 (file)
@@ -2781,6 +2781,7 @@ llvm::DICompositeType *CGDebugInfo::CreateLimitedType(const RecordType *Ty) {
     // them distinct if they are ODR-uniqued.
     if (FullName.empty())
       break;
+    LLVM_FALLTHROUGH;
 
   case llvm::dwarf::DW_TAG_structure_type:
   case llvm::dwarf::DW_TAG_union_type:
index c61a5f6ffa719f57b0e14862a1b0734a8da0299b..dde8f2e369200b967a864f3352f33b6d85dac3fc 100644 (file)
@@ -3841,6 +3841,7 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
     // Skip variable templates
     if (cast<VarDecl>(D)->getDescribedVarTemplate())
       return;
+    LLVM_FALLTHROUGH;
   case Decl::VarTemplateSpecialization:
     EmitGlobal(cast<VarDecl>(D));
     if (auto *DD = dyn_cast<DecompositionDecl>(D))