[clang-tools-extra] [clang] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-03 Thread Julian Schmidt via cfe-commits
5chmidti wrote: I found the issue, but I have not looked for a solution. See https://godbolt.org/z/or4EnMfWj and #71203. When using clang with `-target` to specify `x86_64-pc-win32` and `x86_64-linux`, the body for the function `f` is `NULL` in the AST with the windows target. This only happens

[clang-tools-extra] [clang] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-06 Thread Qizhi Hu via cfe-commits
jcsxky wrote: how about adding a function call like `f()`? will this can prevent clang to emit empty function body? https://github.com/llvm/llvm-project/pull/70559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang-tools-extra] [clang] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-08 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/70559 >From b29eb35fe8597ceefc4c615817174181a16f3c4c Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 28 Oct 2023 18:08:51 +0200 Subject: [PATCH 1/3] [clang-tidy] fi

[clang-tools-extra] [clang] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-08 Thread Julian Schmidt via cfe-commits
5chmidti wrote: > how about adding a function call like `f()`? will this can prevent clang > to emit empty function body? Yep, thanks. I went this route, but I had to define a conversion operator to compile and keep the `<<` a `BinaryOperator`. The CI now passes https://github.com/llvm/llvm-p

[clang-tools-extra] [clang] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-12 Thread Julian Schmidt via cfe-commits
5chmidti wrote: > In tests we usually use `-fno-delayed-template-parsing` to overcome this > issue with templates and windows. Done. I changed the test in `ExprMutationAnalyzerTest.cpp` to use the flag, `const-correctness-templates.cpp` already had it, and I changed the tested code back to wh

[clang-tools-extra] [clang] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-10-30 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > The top-level Linux and Windows tests work, but inside the `Trigger > Build`/`clang-ci` run, the windows test step fails. I'm not sure what the > difference is between these two Windows tests. This is interesting! Generally speaking, AST of the code in Windows and Linux pla