From 570b670f539ab5ed9f33aa6507ceea43d6594abc Mon Sep 17 00:00:00 2001 From: Piotr Padlewski Date: Thu, 1 Jun 2017 09:24:36 +0000 Subject: [PATCH] Fixed warnings git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304397 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/VTableBuilder.h | 1 + lib/CodeGen/CodeGenModule.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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) && -- 2.40.0