r332854 - [Clang Tablegen] Add llvm_unreachable() to getModifierName()
Mark Searles via cfe-commits
cfe-commits at lists.llvm.org
Mon May 21 10:29:08 PDT 2018
Author: msearles
Date: Mon May 21 10:29:08 2018
New Revision: 332854
URL: http://llvm.org/viewvc/llvm-project?rev=332854&view=rev
Log:
[Clang Tablegen] Add llvm_unreachable() to getModifierName()
Fix internal build failure:
../../../ClangDiagnosticsEmitter.cpp -o ClangDiagnosticsEmitter.o
../../../ClangDiagnosticsEmitter.cpp: In function 'llvm::StringRef
{anonymous}::getModifierName({anonymous}::ModifierType)':
../../../ClangDiagnosticsEmitter.cpp:495:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
Build failure triggered by git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332799 91177308-0d34-0410-b5e6-96231b3b80d8
Differential Revision: https://reviews.llvm.org/D47150
Modified:
cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp?rev=332854&r1=332853&r2=332854&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Mon May 21 10:29:08 2018
@@ -492,6 +492,8 @@ static StringRef getModifierName(Modifie
case MT_Unknown:
llvm_unreachable("invalid modifier type");
}
+ // Unhandled case
+ llvm_unreachable("invalid modifier type");
}
struct Piece {
More information about the cfe-commits
mailing list