[PATCH] D47340: [ClangDiagnostics] Silence warning about fallthrough after PrintFatalError
Richard Trieu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 24 17:17:54 PDT 2018
rtrieu added a comment.
Instead of adding a break, you should add a noreturn attribute to the PrintFatalError function. LLVM has the macro LLVM_ATTRIBUTE_NORETURN to do this. You can confirm that PrintFatalError is a noreturn function by seeing that it unconditionally calls llvm::PrintFatalError which itself is attributed with LLVM_ATTRIBUTE_NORETURN.
Repository:
rC Clang
https://reviews.llvm.org/D47340
More information about the cfe-commits
mailing list