r295829 - Fix 'control reaches end of non-void function' warning

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 22 05:21:24 PST 2017


Author: rksimon
Date: Wed Feb 22 07:21:24 2017
New Revision: 295829

URL: http://llvm.org/viewvc/llvm-project?rev=295829&view=rev
Log:
Fix 'control reaches end of non-void function' warning

Modified:
    cfe/trunk/lib/Serialization/ASTReader.cpp

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=295829&r1=295828&r2=295829&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Wed Feb 22 07:21:24 2017
@@ -8973,8 +8973,9 @@ void ASTReader::diagnoseOdrViolations()
           case AS_protected:
             return ProtectedSpecifer;
           case AS_none:
-            llvm_unreachable("Invalid access specifier");
+            break;
           }
+          llvm_unreachable("Invalid access specifier");
         }
       };
 




More information about the cfe-commits mailing list