[PATCH] D47340: [ClangDiagnostics] Silence warning about fallthrough after PrintFatalError

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 24 17:31:06 PDT 2018


xbolva00 updated this revision to Diff 148523.
xbolva00 added a comment.

Add correct NORETURN attribute


https://reviews.llvm.org/D47340

Files:
  utils/TableGen/ClangDiagnosticsEmitter.cpp


Index: utils/TableGen/ClangDiagnosticsEmitter.cpp
===================================================================
--- utils/TableGen/ClangDiagnosticsEmitter.cpp
+++ utils/TableGen/ClangDiagnosticsEmitter.cpp
@@ -633,7 +633,7 @@
     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);
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47340.148523.patch
Type: text/x-patch
Size: 531 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180525/4323d513/attachment.bin>


More information about the cfe-commits mailing list