r350941 - Fix a pair of Wfallthrough warnings in ScanfFormatString.

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 11 10:01:40 PST 2019


Author: erichkeane
Date: Fri Jan 11 10:01:40 2019
New Revision: 350941

URL: http://llvm.org/viewvc/llvm-project?rev=350941&view=rev
Log:
Fix a pair of Wfallthrough warnings in ScanfFormatString.

Change-Id: Ia73a34fdd93fc974224583505f9e6432493cb0da

Modified:
    cfe/trunk/lib/AST/ScanfFormatString.cpp

Modified: cfe/trunk/lib/AST/ScanfFormatString.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ScanfFormatString.cpp?rev=350941&r1=350940&r2=350941&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ScanfFormatString.cpp (original)
+++ cfe/trunk/lib/AST/ScanfFormatString.cpp Fri Jan 11 10:01:40 2019
@@ -264,6 +264,7 @@ ArgType ScanfSpecifier::getArgType(ASTCo
         case LengthModifier::AsWide:
           return ArgType::Invalid();
       }
+      llvm_unreachable("Unsupported LenghtModifier Type");
 
     // Unsigned int.
     case ConversionSpecifier::oArg:
@@ -303,6 +304,7 @@ ArgType ScanfSpecifier::getArgType(ASTCo
         case LengthModifier::AsWide:
           return ArgType::Invalid();
       }
+      llvm_unreachable("Unsupported LenghtModifier Type");
 
     // Float.
     case ConversionSpecifier::aArg:




More information about the cfe-commits mailing list