[clang-tools-extra] r345951 - Fix -Wimplicit-fallthrough warning in LLVM_ENABLE_ASSERTIONS=Off builds
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 1 21:17:17 PDT 2018
Author: maskray
Date: Thu Nov 1 21:17:17 2018
New Revision: 345951
URL: http://llvm.org/viewvc/llvm-project?rev=345951&view=rev
Log:
Fix -Wimplicit-fallthrough warning in LLVM_ENABLE_ASSERTIONS=Off builds
Modified:
clang-tools-extra/trunk/clang-tidy/cert/StrToNumCheck.cpp
Modified: clang-tools-extra/trunk/clang-tidy/cert/StrToNumCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cert/StrToNumCheck.cpp?rev=345951&r1=345950&r2=345951&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cert/StrToNumCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cert/StrToNumCheck.cpp Thu Nov 1 21:17:17 2018
@@ -134,7 +134,7 @@ ConversionKind ClassifyFormatString(Stri
StringRef ClassifyConversionType(ConversionKind K) {
switch (K) {
case ConversionKind::None:
- assert(false && "Unexpected conversion kind");
+ llvm_unreachable("Unexpected conversion kind");
case ConversionKind::ToInt:
case ConversionKind::ToLongInt:
case ConversionKind::ToIntMax:
@@ -154,7 +154,7 @@ StringRef ClassifyConversionType(Convers
StringRef ClassifyReplacement(ConversionKind K) {
switch (K) {
case ConversionKind::None:
- assert(false && "Unexpected conversion kind");
+ llvm_unreachable("Unexpected conversion kind");
case ConversionKind::ToInt:
return "strtol";
case ConversionKind::ToUInt:
More information about the cfe-commits
mailing list