[clang] 364f988 - Reland "[clang-format] Fix FormatToken::isSimpleTypeSpecifier() (#91712)"

2024-05-13 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-05-13T21:54:23-07:00 New Revision: 364f988d3feb46ead8fdb657c9eab78d93425a28 URL: https://github.com/llvm/llvm-project/commit/364f988d3feb46ead8fdb657c9eab78d93425a28 DIFF: https://github.com/llvm/llvm-project/commit/364f988d3feb46ead8fdb657c9eab78d93425a28.diff

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-constraints (PR #92019)

2024-05-13 Thread Congcong Cai via cfe-commits
@@ -306,6 +306,10 @@ Changes in existing checks don't remove parentheses used in ``sizeof`` calls when they have array index accesses as arguments. +- Improved :doc:`modernize-use-constraints + ` check by fixing a crash that + occurred in some scenarios and excluded

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-constraints (PR #92019)

2024-05-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/92019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ignore implicit casts with errors in bugprone-implicit-widening-of-multiplication-result (PR #92025)

2024-05-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/92025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow explicit instantiation of Ref/RefPtr on call arguments. (PR #91875)

2024-05-13 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/91875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Treat break, continue, goto, and label statements as trivial in WebKit checkers. (PR #91873)

2024-05-13 Thread Artem Dergachev via cfe-commits
@@ -445,6 +456,10 @@ class TrivialFunctionAnalysisVisitor return Visit(VMT->getSubExpr()); } + bool VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr* BTE) { +return Visit(BTE->getSubExpr()); haoNoQ wrote: At this point you probably want to

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-13 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.cpp - clang-tidy--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [CodeGen] Revert "Generate assume loads only with -fstrict-vtable-pointers" (PR #91900)

2024-05-13 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > -fstrict-vtable-pointers IS experimental, but if you recall, this particular > optimization was added to -fstrict-vtable-pointers because of the effects it > had on compile-time, not because of correctness issues. can you clarify what you mean by "this particular

[clang] e20800c - [clang-format][NFC] Test IsQualifier only needs to call the lexer

2024-05-13 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-05-13T19:45:11-07:00 New Revision: e20800c16f0570562fea31e9a02d65ba56e6858a URL: https://github.com/llvm/llvm-project/commit/e20800c16f0570562fea31e9a02d65ba56e6858a DIFF: https://github.com/llvm/llvm-project/commit/e20800c16f0570562fea31e9a02d65ba56e6858a.diff

[clang] [Clang] Fix dependency computation for pack indexing expression (PR #91933)

2024-05-13 Thread Younan Zhang via cfe-commits
@@ -9806,7 +9806,7 @@ QualType Sema::BuildCountAttributedArrayType(QualType WrappedTy, /// that expression, according to the rules in C++11 /// [dcl.type.simple]p4 and C++11 [expr.lambda.prim]p18. QualType Sema::getDecltypeForExpr(Expr *E) { - if (E->isTypeDependent()) + if

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-13 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.cpp - clang-tidy--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [llvm] [X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (PR #91694)

2024-05-13 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > @phoebewang Can you add a release note for this on the PR for the release > branch and then add the release:note label. Done. https://github.com/llvm/llvm-project/pull/91694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-13 Thread Sirui Mu via cfe-commits
Lancern wrote: FWIW, the current practice uses CamelCase for CIRGen and camelBack for all other CIR stuff. Most code in CIRGen is directly ported from clang CodeGen and the code style is kept as-is, while other part of CIR is invented from scratch and we follow MLIR style guides. I'm not sure

[clang] [clang-format][NFC] Move LeftRightQualifierAlignmentFixer::is...() (PR #91930)

2024-05-13 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/91930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c72e943 - [clang-format][NFC] Move LeftRightQualifierAlignmentFixer::is...() (#91930)

2024-05-13 Thread via cfe-commits
Author: Owen Pan Date: 2024-05-13T19:19:15-07:00 New Revision: c72e94382c21db2f5ff066d72103ac55eb8d2874 URL: https://github.com/llvm/llvm-project/commit/c72e94382c21db2f5ff066d72103ac55eb8d2874 DIFF: https://github.com/llvm/llvm-project/commit/c72e94382c21db2f5ff066d72103ac55eb8d2874.diff

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/7] reformat --- .../clang-tidy/readability/CMakeLists.txt

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/91293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] f12018e - [clang-tidy] support expect no diagnosis test (#91293)

2024-05-13 Thread via cfe-commits
Author: Congcong Cai Date: 2024-05-14T09:48:57+08:00 New Revision: f12018eba11f8d4b74cf67dbc416c429c870a5f4 URL: https://github.com/llvm/llvm-project/commit/f12018eba11f8d4b74cf67dbc416c429c870a5f4 DIFF: https://github.com/llvm/llvm-project/commit/f12018eba11f8d4b74cf67dbc416c429c870a5f4.diff

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-05-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @rjmccall @dwblaikie Since I feel this is a bug we need to fix and I think this patch may not affect non-modules code, I'd like to land this in the end of July (before the next branching of 19) if no more comments came in. https://github.com/llvm/llvm-project/pull/75912

[clang] Avoid unevaluated implicit private (PR #92055)

2024-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (SunilKuravinakop) Changes For every variable used under `#pragma omp task` directive (`DeclRefExpr`) an ImplicitPrivateVariable is created in the AST, if `private` or `shared` clauses are not present. If the variable has the

[clang] Avoid unevaluated implicit private (PR #92055)

2024-05-13 Thread via cfe-commits
https://github.com/SunilKuravinakop created https://github.com/llvm/llvm-project/pull/92055 For every variable used under `#pragma omp task` directive (`DeclRefExpr`) an ImplicitPrivateVariable is created in the AST, if `private` or `shared` clauses are not present. If the variable has the

[clang] [Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer (PR #87933)

2024-05-13 Thread Zequan Wu via cfe-commits
ZequanWu wrote: ``` $ cat a.cpp namespace std { template struct b { static const int c = a; }; template using e = d; template struct p { using g = f; }; template using i = p::g; template class initializer_list {}; template using j = __remove_pointer(d); template using k = j; template

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-13 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/89809 >From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 23 Apr 2024 00:49:28 -0700 Subject: [PATCH 1/7] Add environment parameter to clang availability attribute ---

[clang] [flang] [llvm] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2024-05-13 Thread Nikita Popov via cfe-commits
nikic wrote: @sgundapa Does https://github.com/llvm/llvm-project/pull/90802 fix the issue you're seeing? https://github.com/llvm/llvm-project/pull/68882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] fix crash due to assumed callee in min-max-use-initializer-list (PR #91992)

2024-05-13 Thread via cfe-commits
https://github.com/sopyb approved this pull request. Glad someone was around to make a fix  https://github.com/llvm/llvm-project/pull/91992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer (PR #87933)

2024-05-13 Thread via cfe-commits
yronglin wrote: > Heads up. This causes clang to crash on some code. I'm running creduce to > reduce the cpp source file. > > ``` > clang: > /usr/local/google/home/zequanwu/workspace/llvm/clang/lib/Sema/SemaDecl.cpp:16509: > Decl *clang::Sema::ActOnFinishFunctionBody(Decl *, Stmt *, bool):

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Ideally FileCheck should prefix commands with some tag to distinguish > comments from filecheck annotations, like > `--command-tag=@` and use as `@CHECK: xxx`, `@MYCHECK-NEXT: yyy`, etc. Making > typo\error in both prefix and command tag will be harder, i guess. That way >

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. Some CHECK prefixes are auto-generated by llvm/utils/update_*_test_checks.py. Let's say my build directory is `/tmp/Rel` while my source is at `~/llvm`, use ``` PATH=/tmp/Rel/bin:$PATH ~/llvm/llvm/utils/update_any_test_checks.py path/to/test

[clang] [CodeGen] Revert "Generate assume loads only with -fstrict-vtable-pointers" (PR #91900)

2024-05-13 Thread via cfe-commits
AtariDreams wrote: -fstrict-vtable-pointers IS experimental, but if you recall, this particular optimization was added to -fstrict-vtable-pointers because of the effects it had on compile-time, not because of correctness issues. https://github.com/llvm/llvm-project/pull/91900

[clang] [CodeGen] Revert "Generate assume loads only with -fstrict-vtable-pointers" (PR #91900)

2024-05-13 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: adding assumes in general has issues: https://discourse.llvm.org/t/llvm-assume-blocks-optimization/71609 do you have proof that this change helps binaries and doesn't regress things? I have a feeling this will regress many things. `-fstrict-vtable-pointers` is still somewhat

[clang] [AST] Replace localUncachedLookup with noload_lookup in ASTImporterFixtures (NFC) (PR #91955)

2024-05-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/91955 >From bfd1ce3e91bb21fd4ff2d722cac47cffab1e407b Mon Sep 17 00:00:00 2001 From: Rose Date: Mon, 13 May 2024 08:54:36 -0400 Subject: [PATCH] [AST] Replace localUncachedLookup with noload_lookup in

[clang] [AST] Replace localUncachedLookup with noload_lookup in ASTImporterFixtures (NFC) (PR #91955)

2024-05-13 Thread via cfe-commits
https://github.com/AtariDreams reopened https://github.com/llvm/llvm-project/pull/91955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Replace localUncachedLookup with noload_lookup in ASTImporterFixtures (NFC) (PR #91955)

2024-05-13 Thread via cfe-commits
https://github.com/AtariDreams edited https://github.com/llvm/llvm-project/pull/91955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Revert "Generate assume loads only with -fstrict-vtable-pointers" (PR #91900)

2024-05-13 Thread via cfe-commits
AtariDreams wrote: @aeubanks What do you think about this change? https://github.com/llvm/llvm-project/pull/91900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-05-13 Thread Alexey Bader via cfe-commits
bader wrote: @AlexVlx, do you think it's worth promoting [SPV_INTEL_inline_assembly](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-extensions/SPV_INTEL_inline_assembly.asciidoc) and

[clang] [NFC] Add missing spaces in BoolOption for apinotes (PR #92027)

2024-05-13 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan approved this pull request. Thank you, LGTM! https://github.com/llvm/llvm-project/pull/92027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][flang][windows] Prefer user-provided library paths (-L) (PR #90758)

2024-05-13 Thread David Truby via cfe-commits
DavidTruby wrote: I've left the flang test as the flang directory doesn't change with `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` and removed the other test. I hope this is what you meant @MaskRay  https://github.com/llvm/llvm-project/pull/90758 ___

[clang] [llvm] [X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (PR #91694)

2024-05-13 Thread Tom Stellard via cfe-commits
tstellar wrote: @phoebewang Can you add a release note for this on the PR for the release branch and then add the release:note label. https://github.com/llvm/llvm-project/pull/91694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-13 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: Hi! Thank you for digging into this! Sorry for the delay. > The new UnsafeBufferUsageCtorAttrGadget gadget explicitly avoids matching > against the std::span(ptr, size) constructor because that is handled by > SpanTwoParamConstructorGadget and we never want two gadgets to match

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-13 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 561c42df5712c346d4de2e6499b06712403d3164 dfa0b6b840b1ab12c27b7203ab372bd147885173 --

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Hendrik Hübner (HendrikHuebner) Changes When an atomic builtin is called with a pointer to an object of size zero, an arithmetic exception gets thrown because there is a modulo operation with the objects size in codegen. This is

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-13 Thread Hendrik Hübner via cfe-commits
https://github.com/HendrikHuebner updated https://github.com/llvm/llvm-project/pull/91057 From dfa0b6b840b1ab12c27b7203ab372bd147885173 Mon Sep 17 00:00:00 2001 From: hhuebner Date: Sat, 4 May 2024 13:49:38 +0200 Subject: [PATCH] [Clang] Throw error when calling atomic with pointer to zero

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread via cfe-commits
klensy wrote: > Were these found manually or using some automated tooling? Based on the Rust > PR, it seems like these were found by just manually going through the results > from a regex? At first - yes, but later i noticed other error patterns and tried them iteratively; maybe some edit

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-13 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: Thanks for everyone's input so far. Let me try to summarize two discussions in this PR so we can set on an approach and give advice to our CIR community (and encode on our webpage) on how to move forward in upcoming patches. Useful resources: - [LLVM Coding

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread via cfe-commits
klensy wrote: > When doing large scale cleanups, it might make sense to partition them, e.g. > llvm/ (clang/ & clang-tools-extra/) mlir/ in different PRs. The number of > files will be smaller and github web UI will not make the page too slow to > load. The active contributors in these

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-13 Thread Bill Wendling via cfe-commits
bwendling wrote: > > It's not a lie, because the contents of a pointer don't contribute to the > > size of the struct containing that pointer. > > Consider this example. It tries to illustrate why putting `__counted_by()` on > a pointer to a structs containing flexible array members doesn't

[clang] [llvm] [PowerPC][AIX] 64-bit large code-model support for toc-data (PR #90619)

2024-05-13 Thread Zaara Syeda via cfe-commits
https://github.com/syzaara updated https://github.com/llvm/llvm-project/pull/90619 >From 70a6bc5bb5d5d43a3e87b7cc597682d6647166fc Mon Sep 17 00:00:00 2001 From: Zaara Syeda Date: Tue, 30 Apr 2024 10:22:26 -0400 Subject: [PATCH 1/2] [PowerPC] 64-bit large code-model support for toc-data This

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: Were these found manually or using some automated tooling? Based on the Rust PR, it seems like these were found by just manually going through the results from a regex? https://github.com/llvm/llvm-project/pull/91854 ___

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: The previous failures reported by `buildkite/github-pull-requests Pending` were genuine. I have fixed them separately. When doing large scale cleanups, it might make sense to partition them, e.g. llvm/ (clang/ & clang-tools-extra/) mlir/ in different PRs. The number of files

[clang] [Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer (PR #87933)

2024-05-13 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Heads up. This causes clang to crash on some code. I'm running creduce to reduce the cpp source file. https://github.com/llvm/llvm-project/pull/87933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [WIP][Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Ziqing Luo (ziqingluo-90) Changes A pair of `#pragma clang unsafe_buffer_usage begin/end` pragmas marks a warning-opt-out region. The begin and end locations (opt-out regions) are stored in preprocessor instances (PP) and will

[clang] [WIP][Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-05-13 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/92031 A pair of `#pragma clang unsafe_buffer_usage begin/end` pragmas marks a warning-opt-out region. The begin and end locations (opt-out regions) are stored in preprocessor instances (PP) and will be queried

[clang] [NFC] Add missing spaces in BoolOption for apinotes (PR #92027)

2024-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jacob Lambert (lamb-j) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/92027.diff 1 Files Affected: - (modified) clang/include/clang/Driver/Options.td (+2-2) ``diff diff --git

[clang] [NFC] Add missing spaces in BoolOption for apinotes (PR #92027)

2024-05-13 Thread Jacob Lambert via cfe-commits
lamb-j wrote: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fapinotes https://github.com/llvm/llvm-project/pull/92027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [NFC] Add missing spaces in BoolOption for apinotes (PR #92027)

2024-05-13 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/92027 None >From b68e9e234c1ccd62be507fcb1a0ab77241216f75 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Mon, 13 May 2024 13:24:48 -0700 Subject: [PATCH] [NFC] Add missing spaces in BoolOption for apinotes ---

[clang-tools-extra] [clang-tidy] Ignore implicit casts with errors in bugprone-implicit-widening-of-multiplication-result (PR #92025)

2024-05-13 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Not adding release notes & tests, as this is issue happen only when asserts are enabled and input is invalid. Fix created only to improve diagnostic for end user (errors instead of crash) in this particular case. https://github.com/llvm/llvm-project/pull/92025

[clang-tools-extra] [clang-tidy] Ignore implicit casts with errors in bugprone-implicit-widening-of-multiplication-result (PR #92025)

2024-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes When expression got errors (missing typedef) and clang-tidy is compiled with asserts enabled, then we crash in this check on assert because type with errors is visible as an dependent one. This is

[clang-tools-extra] [clang-tidy] Ignore implicit casts with errors in bugprone-implicit-widening-of-multiplication-result (PR #92025)

2024-05-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/92025 When expression got errors (missing typedef) and clang-tidy is compiled with asserts enabled, then we crash in this check on assert because type with errors is visible as an dependent one. This is issue caused

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-13 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph edited https://github.com/llvm/llvm-project/pull/91007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-13 Thread Mehdi Amini via cfe-commits
@@ -42,6 +47,14 @@ CreateFrontendBaseAction(CompilerInstance ) { StringRef Action("unknown"); (void)Action; + auto UseCIR = CI.getFrontendOpts().UseClangIRPipeline; joker-eph wrote: MLIR isn't meant to differ from LLVM/Clang. > Coding standard doesn't

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-05-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: The clang/test/Driver codegen tests might have been removed. Note: clang/test/Driver is to test how clangDriver passes options to cc1, not for sema/codegen/etc. https://github.com/llvm/llvm-project/pull/89727 ___ cfe-commits mailing

[clang] [flang] [llvm] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2024-05-13 Thread Sumanth Gundapaneni via cfe-commits
sgundapa wrote: I've observed a significant regression in one of the AMDGPU benchmarks after applying this patch. The base address calculation within the unrolled loop seems to be the source. I've attached "before.log" and "after.log" files that detail the issue. The modified GEP format,

[clang] a6d7828 - [test] Use conventional -emit-llvm-only

2024-05-13 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-13T12:53:16-07:00 New Revision: a6d7828f4c50c1ec7b0b5f61fe59d7a768175dcc URL: https://github.com/llvm/llvm-project/commit/a6d7828f4c50c1ec7b0b5f61fe59d7a768175dcc DIFF: https://github.com/llvm/llvm-project/commit/a6d7828f4c50c1ec7b0b5f61fe59d7a768175dcc.diff

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-constraints (PR #92019)

2024-05-13 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: @ccotter Can you take a look, somehow I cannot select you as reviewer. https://github.com/llvm/llvm-project/pull/92019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-constraints (PR #92019)

2024-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes Improved modernize-use-constraints check by fixing a crash that occurred in some scenarios and excluded system headers from analysis. Problem were with DependentNameTypeLoc having null type location as

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-constraints (PR #92019)

2024-05-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/92019 Improved modernize-use-constraints check by fixing a crash that occurred in some scenarios and excluded system headers from analysis. Problem were with DependentNameTypeLoc having null type location as

[clang] [clang][analyzer] Ignore try-statements in dead code checker (PR #91675)

2024-05-13 Thread Andrew Sukach via cfe-commits
https://github.com/soukatch updated https://github.com/llvm/llvm-project/pull/91675 >From 846be0552bd2da608fc1729e5928d85650e1ce06 Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Thu, 9 May 2024 18:49:41 -0400 Subject: [PATCH] [clang][static analyzer] ignore try statements in dead code

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-05-13 Thread William Junda Huang via cfe-commits
@@ -5636,6 +5636,84 @@ void CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var, Var->addDebugInfo(GVE); } +void CGDebugInfo::EmitPseudoVariable(CGBuilderTy , + llvm::Instruction *Value, QualType Ty) { + // Only when -g2 or

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-05-13 Thread William Junda Huang via cfe-commits
https://github.com/huangjd updated https://github.com/llvm/llvm-project/pull/81545 >From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001 From: William Huang Date: Mon, 12 Feb 2024 02:27:13 -0500 Subject: [PATCH 01/13] Add option to generate additional info for expression

[clang] [clang] Introduce `SemaObjC` (PR #89086)

2024-05-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/89086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-05-13 Thread David Blaikie via cfe-commits
@@ -3424,6 +3445,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor( dwblaikie wrote: Eh, I'm not too

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-05-13 Thread David Blaikie via cfe-commits
dwblaikie wrote: Hmm, do other builtins actually end up as symbol names? I think most of them lower to an instruction or two - I guess this one doesn't lower to an actual symbol, only a DWARF symbol - but maybe that's still different enough it should use an llvm or clang in the name...

[clang] [HLSL][CMake] Add clangd and distribution settings (PR #92011)

2024-05-13 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/92011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][CMake] Add clangd and distribution settings (PR #92011)

2024-05-13 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/92011 >From e1b82c5bb1869ac74080e17633bd8ac7931a47b6 Mon Sep 17 00:00:00 2001 From: Chris B Date: Mon, 13 May 2024 13:55:49 -0500 Subject: [PATCH 1/2] [HLSL][CMake] Add clangd and distribution settings This just

[clang] [HLSL][CMake] Add clangd and distribution settings (PR #92011)

2024-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Chris B (llvm-beanz) Changes This just adds some simple distribution settings and includes clangd in the build for distribution. --- Full diff: https://github.com/llvm/llvm-project/pull/92011.diff 1 Files Affected: - (modified)

[clang] [HLSL][CMake] Add clangd and distribution settings (PR #92011)

2024-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes This just adds some simple distribution settings and includes clangd in the build for distribution. --- Full diff: https://github.com/llvm/llvm-project/pull/92011.diff 1 Files Affected: - (modified)

[clang] [HLSL][CMake] Add clangd and distribution settings (PR #92011)

2024-05-13 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/92011 This just adds some simple distribution settings and includes clangd in the build for distribution. >From e1b82c5bb1869ac74080e17633bd8ac7931a47b6 Mon Sep 17 00:00:00 2001 From: Chris B Date: Mon, 13 May

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-13 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 8b318dadac6d0ec53b5d26461edfe19a391845ec Mon Sep 17 00:00:00 2001 From: danakj Date: Fri, 10 May 2024 13:31:17 -0400 Subject: [PATCH 1/3] Respect the [[clang::unsafe_buffer_usage]] attribute for

[clang-tools-extra] [clang-tidy] Add AllowImplicitlyDeletedCopyOrMove option to cppcoreguidelines-special-member-functions (PR #71683)

2024-05-13 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Bump. https://github.com/llvm/llvm-project/pull/71683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-05-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/90397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] af79372 - [clang-tidy] Add modernize-use-std-format check (#90397)

2024-05-13 Thread via cfe-commits
Author: Mike Crowe Date: 2024-05-13T20:42:44+02:00 New Revision: af79372d6349cfba6beff26d54b7ad1b798fc4d5 URL: https://github.com/llvm/llvm-project/commit/af79372d6349cfba6beff26d54b7ad1b798fc4d5 DIFF: https://github.com/llvm/llvm-project/commit/af79372d6349cfba6beff26d54b7ad1b798fc4d5.diff

[clang-tools-extra] [clang-tidy] Ignore unevaluated context in bugprone-optional-value-conversion (PR #90410)

2024-05-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/90410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 6993798 - [clang-tidy] Ignore unevaluated context in bugprone-optional-value-conversion (#90410)

2024-05-13 Thread via cfe-commits
Author: Piotr Zegar Date: 2024-05-13T20:41:42+02:00 New Revision: 69937982dbdd73172ec06580f6f93616edca8e9e URL: https://github.com/llvm/llvm-project/commit/69937982dbdd73172ec06580f6f93616edca8e9e DIFF: https://github.com/llvm/llvm-project/commit/69937982dbdd73172ec06580f6f93616edca8e9e.diff

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.cpp - clang-tidy--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.cpp - clang-tidy--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Few nits. Missing: - more proper handling for unity files (.cpp included from .cpp) - nits - auto-fixes (any) - in worst case you can provide just fixes with static, but attaching them to notes. https://github.com/llvm/llvm-project/pull/90830

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/90830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-13 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > > * The auto-fix should be configurable to choose `static` or anonymous > > namespace. > > Should I implement auto-fix for this check? Maybe some functions / variables > will be marked incorrectly and cause link error because the coder just forget > to include the header

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread via cfe-commits
https://github.com/klensy edited https://github.com/llvm/llvm-project/pull/91854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-13 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/91400 >From 58d3d52c666bdaa3534cd16080bb895d49f61008 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Tue, 7 May 2024 16:54:35 -0400 Subject: [PATCH] Add option to exclude headers from clang-tidy analysis This is

[clang] [Coverage] Handle array decomposition correctly (PR #88881)

2024-05-13 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: This looks like supporting my words: https://github.com/llvm/llvm-project/blob/llvmorg-19-init/clang/lib/CodeGen/CodeGenPGO.cpp#L935-L936 https://github.com/llvm/llvm-project/pull/1 ___ cfe-commits mailing list

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-13 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/91400 >From e65bd48ef896f3327a1397a1b2f6f0a34e3711d2 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Tue, 7 May 2024 16:54:35 -0400 Subject: [PATCH 1/3] Add option to exclude headers from clang-tidy analysis This

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -42,6 +47,14 @@ CreateFrontendBaseAction(CompilerInstance ) { StringRef Action("unknown"); (void)Action; + auto UseCIR = CI.getFrontendOpts().UseClangIRPipeline; bcardosolopes wrote: Right, it's a different discussion than naming. @joker-eph: what's

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-13 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/91400 >From e65bd48ef896f3327a1397a1b2f6f0a34e3711d2 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Tue, 7 May 2024 16:54:35 -0400 Subject: [PATCH 1/2] Add option to exclude headers from clang-tidy analysis This

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,61 @@ +//===--- CIRGenModule.h - Per-Module state for CIR gen --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/91293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,88 @@ +//===--- CIRGenAction.cpp - LLVM Code generation Frontend Action -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-13 Thread Piotr Zegar via cfe-commits
@@ -115,6 +115,8 @@ Improvements to clang-tidy - Fixed `--verify-config` option not properly parsing checks when using the literal operator in the `.clang-tidy` config. +- Added argument `--exclude-header-filter` to exclude headers from analysis via a RegEx.

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/91400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, just 2 nits. https://github.com/llvm/llvm-project/pull/91400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   >