Author: Benjamin Kramer Date: 2023-02-15T14:10:09+01:00 New Revision: 1f818f63b829f3038a9fd605bf90348ba58cd981
URL: https://github.com/llvm/llvm-project/commit/1f818f63b829f3038a9fd605bf90348ba58cd981 DIFF: https://github.com/llvm/llvm-project/commit/1f818f63b829f3038a9fd605bf90348ba58cd981.diff LOG: [clang-format] assert(false) -> llvm_unreachable Avoids warnings in -asserts builds. FormatTokenSource.h:240:3: error: non-void function does not return a value [-Werror,-Wreturn-type] } ^ Added: Modified: clang/lib/Format/FormatTokenSource.h Removed: ################################################################################ diff --git a/clang/lib/Format/FormatTokenSource.h b/clang/lib/Format/FormatTokenSource.h index 8bf7e6932c89..0be46287f6b7 100644 --- a/clang/lib/Format/FormatTokenSource.h +++ b/clang/lib/Format/FormatTokenSource.h @@ -236,7 +236,7 @@ class ScopedMacroState : public FormatTokenSource { } FormatToken *insertTokens(ArrayRef<FormatToken *> Tokens) override { - assert(false && "Cannot insert tokens while parsing a macro."); + llvm_unreachable("Cannot insert tokens while parsing a macro."); } private: _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits