-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[clang-tidy] bugprone-implicit-widening ignores unsigned consts #101073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 7 commits
24f52fb
3f59abb
ac27ca9
276e48b
6913f63
9c772f8
2f636a3
c710c28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -551,11 +551,15 @@ class Expr : public ValueStmt { | |
| /// and fill in Loc (if specified) with the location of the invalid | ||
| /// expression. | ||
| /// | ||
| /// If CheckUnsignedOverflow is true, the i-c-e is of an unsigned type, and | ||
| /// the i-c-e result cannot fit into the expression type without overflowing, | ||
| /// std::nullopt is returned. | ||
| /// | ||
| /// Note: This does not perform the implicit conversions required by C++11 | ||
| /// [expr.const]p5. | ||
| std::optional<llvm::APSInt> | ||
| getIntegerConstantExpr(const ASTContext &Ctx, | ||
| SourceLocation *Loc = nullptr) const; | ||
| getIntegerConstantExpr(const ASTContext &Ctx, SourceLocation *Loc = nullptr, | ||
| bool CheckUnsignedOverflow = false) const; | ||
| bool isIntegerConstantExpr(const ASTContext &Ctx, | ||
| SourceLocation *Loc = nullptr) const; | ||
|
|
||
|
|
@@ -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; | ||
|
||
|
|
||
| /// isPotentialConstantExpr - Return true if this function's definition | ||
| /// might be usable in a constant expression in C++11, if it were marked | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.