[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

[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

[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
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-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 , QuerySession ) const { + auto Buffer = llvm::MemoryBuffer::getFile(StringRef{File}.trim()); + if (!Buffer) { +if

[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

[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