[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-08-09 Thread Chris Warner via cfe-commits
@@ -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 =

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-08-09 Thread Chris Warner via cfe-commits
cwarner-8702 wrote: > There should definitely be a test in the clang side of things to ensure > correct handling of the Expr::getIntegerConstantExpr method with this new > parameter 100% agree. What would be a good way to verify handling of it when the flag shouldn't the compiled output? ht

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-07-29 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 created https://github.com/llvm/llvm-project/pull/101073 Expanding on [the previous PR](https://github.com/llvm/llvm-project/pull/98352), this is an attempt to remove the limitation that the option can only apply to signed integer types. Because unsigned types

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-07-30 Thread Chris Warner via cfe-commits
@@ -49,8 +49,7 @@ Options If the multiplication operands are compile-time constants (like literals or are ``constexpr``) and fit within the source expression type, do not emit a - diagnostic or suggested fix. Only considers expressions where the source - expression

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-07-30 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 updated https://github.com/llvm/llvm-project/pull/101073 >From 39208a7b73893d1eef2078b3d212c92eb58e4457 Mon Sep 17 00:00:00 2001 From: Chris Warner Date: Wed, 17 Jul 2024 11:22:39 -0700 Subject: [PATCH 1/2] [clang-tidy] bugprone-implicit-widening ignores unsigned

[clang-tools-extra] [clang-query] Load queries and matchers from file during REPL cycle (PR #90603)

2024-04-30 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 created https://github.com/llvm/llvm-project/pull/90603 The clang-query tool has the ability to execute or pre-load queries from a file when the tool is launched, but doesn't have the ability to do the same from the interactive REPL prompt. Because the prompt a

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-08-29 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 updated https://github.com/llvm/llvm-project/pull/101073 >From 24f52fbfb9117a6498769cebdc7b09ecbd7e019e Mon Sep 17 00:00:00 2001 From: Chris Warner Date: Wed, 17 Jul 2024 11:22:39 -0700 Subject: [PATCH 1/5] [clang-tidy] bugprone-implicit-widening ignores unsigned

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 created https://github.com/llvm/llvm-project/pull/98352 Add an option to the `bugprone-implicit-widening-of-multiplication-result` clang-tidy checker to suppress warnings when the expression is made up of all compile-time constants (literals, `constexpr` values

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Chris Warner via cfe-commits
cwarner-8702 wrote: @AaronBallman @njames93 Could you review? https://github.com/llvm/llvm-project/pull/98352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Chris Warner via cfe-commits
@@ -50,7 +50,7 @@ Options If the multiplication operands are compile-time constants (like literals or are ``constexpr``) and fit within the source expression type, do not emit a diagnostic or suggested fix. Only considers expressions where the source - expression is

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Chris Warner via cfe-commits
cwarner-8702 wrote: > Actually it's oposite. Simply when -Winteger-overflow is enabled, then > IgnoreConstantIntExpr can be set to true, to avoid duplicated warnings. For > me IgnoreConstantIntExpr should even by ON by default. Sorry, I'm still struggling to see the connection. Maybe I'm ge

[clang-tools-extra] [clang-query] Load queries and matchers from file during REPL cycle (PR #90603)

2024-05-09 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 updated https://github.com/llvm/llvm-project/pull/90603 >From 9b1fe59633b5404281b5b9fd754b8a81fae411d0 Mon Sep 17 00:00:00 2001 From: Chris Warner Date: Tue, 23 Apr 2024 10:48:44 -0700 Subject: [PATCH 1/4] Load queries and matchers from file during REPL cycle Th

[clang-tools-extra] [clang-query] Load queries and matchers from file during REPL cycle (PR #90603)

2024-05-09 Thread Chris Warner via cfe-commits
@@ -281,5 +282,26 @@ const QueryKind SetQueryKind::value; const QueryKind SetQueryKind::value; #endif +bool FileQuery::run(llvm::raw_ostream &OS, QuerySession &QS) const { + auto Buffer = llvm::MemoryBuffer::getFile(StringRef{File}.trim()); + if (!Buffer) { +if (Prefix.h

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-08-05 Thread Chris Warner via cfe-commits
cwarner-8702 wrote: @PiotrZSL Ok. I was hoping that since this new option is _only_ used by the `clang-tidy` check, that it's tests would suffice. But I would also like to have more assurance than that. I need some help figuring out how to go about testing the change to the `Expr` class i

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-08-20 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 updated https://github.com/llvm/llvm-project/pull/101073 >From 39208a7b73893d1eef2078b3d212c92eb58e4457 Mon Sep 17 00:00:00 2001 From: Chris Warner Date: Wed, 17 Jul 2024 11:22:39 -0700 Subject: [PATCH 1/4] [clang-tidy] bugprone-implicit-widening ignores unsigned

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-08-26 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 updated https://github.com/llvm/llvm-project/pull/101073 >From 24f52fbfb9117a6498769cebdc7b09ecbd7e019e Mon Sep 17 00:00:00 2001 From: Chris Warner Date: Wed, 17 Jul 2024 11:22:39 -0700 Subject: [PATCH 1/4] [clang-tidy] bugprone-implicit-widening ignores unsigned

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-09-12 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 updated https://github.com/llvm/llvm-project/pull/101073 >From 24f52fbfb9117a6498769cebdc7b09ecbd7e019e Mon Sep 17 00:00:00 2001 From: Chris Warner Date: Wed, 17 Jul 2024 11:22:39 -0700 Subject: [PATCH 1/5] [clang-tidy] bugprone-implicit-widening ignores unsigned

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-10-09 Thread Chris Warner via cfe-commits
cwarner-8702 wrote: @5chmidti I agree. Do you know how I can get the attention of someone more familiar with clang internals, or who that might be? https://github.com/llvm/llvm-project/pull/101073 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-10-08 Thread Chris Warner via cfe-commits
cwarner-8702 wrote: Ping https://github.com/llvm/llvm-project/pull/101073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-10-11 Thread Chris Warner via cfe-commits
cwarner-8702 wrote: Thanks @AaronBallman! > I don't think we want constant expression evaluation to fail based on an > input parameter. It will already fail if the inputs as signed and expression overflows, so this seems like a case that all callers will have to deal with anyway. > I think a

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-09-24 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 updated https://github.com/llvm/llvm-project/pull/101073 >From 24f52fbfb9117a6498769cebdc7b09ecbd7e019e Mon Sep 17 00:00:00 2001 From: Chris Warner Date: Wed, 17 Jul 2024 11:22:39 -0700 Subject: [PATCH 1/6] [clang-tidy] bugprone-implicit-widening ignores unsigned

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-09-20 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 updated https://github.com/llvm/llvm-project/pull/101073 >From 24f52fbfb9117a6498769cebdc7b09ecbd7e019e Mon Sep 17 00:00:00 2001 From: Chris Warner Date: Wed, 17 Jul 2024 11:22:39 -0700 Subject: [PATCH 1/5] [clang-tidy] bugprone-implicit-widening ignores unsigned

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-09-20 Thread Chris Warner via cfe-commits
cwarner-8702 wrote: @EugeneZelenko @PiotrZSL @njames93 @SimplyDanny @5chmidti @HerrCai0907 @AaronBallman Sorry for mass tagging folks, but this PR has been open for nearly 8 weeks with barely any feedback, and is starting to bit rot. I'd really appreciate some feedback, even if it's "this is