From: Piotr Padlewski Date: Thu, 1 Jun 2017 09:24:36 +0000 (+0000) Subject: Fixed warnings X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=570b670f539ab5ed9f33aa6507ceea43d6594abc;p=clang Fixed warnings git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304397 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/VTableBuilder.h b/include/clang/AST/VTableBuilder.h index 6db69ae925..b0b71e4735 100644 --- a/include/clang/AST/VTableBuilder.h +++ b/include/clang/AST/VTableBuilder.h @@ -173,6 +173,7 @@ public: case CK_UnusedFunctionPointer: llvm_unreachable("Only function pointers kinds"); } + llvm_unreachable("Should already return"); } private: diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index b7a3777fe4..c61a5f6ffa 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1393,8 +1393,8 @@ void CodeGenModule::EmitVTablesOpportunistically() { // is not allowed to create new references to things that need to be emitted // lazily. Note that it also uses fact that we eagerly emitting RTTI. - assert(OpportunisticVTables.empty() || shouldOpportunisticallyEmitVTables() && - "Only emit opportunistic vtables with optimizations"); + assert((OpportunisticVTables.empty() || shouldOpportunisticallyEmitVTables()) + && "Only emit opportunistic vtables with optimizations"); for (const CXXRecordDecl *RD : OpportunisticVTables) { assert(getVTables().isVTableExternal(RD) &&