[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)
Nathan James via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 9 02:31:01 PDT 2024
================
@@ -569,7 +573,8 @@ class Expr : public ValueStmt {
/// Note: This does not perform the implicit conversions required by C++11
/// [expr.const]p5.
bool isCXX11ConstantExpr(const ASTContext &Ctx, APValue *Result = nullptr,
- SourceLocation *Loc = nullptr) const;
+ SourceLocation *Loc = nullptr,
+ bool CheckUnsignedOverflow = false) const;
----------------
njames93 wrote:
Given that unsigned overflow is well defined and allowed in constexpr, having an argument to disallow it seems a little off. From what I can tell the implementation here can just hard code the value internally to `false` and the public API for this function remains unchanged
https://github.com/llvm/llvm-project/pull/101073
More information about the cfe-commits
mailing list