r333340 - [ClangDiagnostics] Silence warning about fallthrough after PrintFatalError
David Bolvansky via cfe-commits
cfe-commits at lists.llvm.org
Sat May 26 02:24:00 PDT 2018
Author: xbolva00
Date: Sat May 26 02:24:00 2018
New Revision: 333340
URL: http://llvm.org/viewvc/llvm-project?rev=333340&view=rev
Log:
[ClangDiagnostics] Silence warning about fallthrough after PrintFatalError
Summary:
ClangDiagnosticsEmitter.cpp:1047:57: warning: this statement may fall through [-Wimplicit-fallthrough=]
Builder.PrintFatalError("Unknown modifier type: " + Modifier);
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
ClangDiagnosticsEmitter.cpp:1048:5: note: here
case MT_Select: {
^
Reviewers: rsmith, rtrieu
Reviewed By: rtrieu
Subscribers: rtrieu, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D47340
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=333340&r1=333339&r2=333340&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Sat May 26 02:24:00 2018
@@ -633,7 +633,7 @@ struct DiagnosticTextBuilder {
return It->second.Root;
}
- void PrintFatalError(llvm::Twine const &Msg) const {
+ LLVM_ATTRIBUTE_NORETURN void PrintFatalError(llvm::Twine const &Msg) const {
assert(EvaluatingRecord && "not evaluating a record?");
llvm::PrintFatalError(EvaluatingRecord->getLoc(), Msg);
}
More information about the cfe-commits
mailing list