[clang] [StaticAnalyzer] Relax the pre-condition of 'setsockopt' (PR #130683)

2025-03-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Thanks for the fix. Your raised points also make sense to me. https://github.com/llvm/llvm-project/pull/130683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [Clang] add additional tests for -Wshift-bool (PR #130339)

2025-03-11 Thread Oleksandr T. via cfe-commits
@@ -22,4 +23,6 @@ void t() { if ((y << 1) != 0) { } if ((y >> 1) != 0) { } // expected-warning {{right shifting a 'bool' implicitly converts it to 'int'}} + + bool k = (x < z) >> 1; // expected-warning {{right shifting a 'bool' implicitly converts it to 'int'}}

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-11 Thread Erich Keane via cfe-commits
@@ -130,17 +389,136 @@ mlir::Value ScalarExprEmitter::VisitCastExpr(CastExpr *ce) { QualType destTy = ce->getType(); CastKind kind = ce->getCastKind(); + // These cases are generally not written to ignore the result of evaluating + // their sub-expressions, so we clear

[clang] [HLSL] Add bounds checks for the hlsl vector arguments and return types (PR #130724)

2025-03-11 Thread Sarah Spall via cfe-commits
https://github.com/spall approved this pull request. https://github.com/llvm/llvm-project/pull/130724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenCL] Allow -fno-offload-uniform-block for 1.2 (PR #79026)

2025-03-11 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/79026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenCL] Allow -fno-offload-uniform-block for 1.2 (PR #79026)

2025-03-11 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: close this for now since it seems no longer needed https://github.com/llvm/llvm-project/pull/79026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] add additional tests for -Wshift-bool (PR #130339)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -fsyntax-only -Wshift-bool -verify %s + +void t() { + int x = 10; + int y = 1; + + int a = y << x; + int b = y >> x; + + int c = 0 << x; + int d = 0 >> x; + + int e = y << 1; + int f = y >> 1; + + int g = y << -1; // expected-warning {

[clang] [clang] Fix darwin-related tests' REQUIRES annotation (PR #130138)

2025-03-11 Thread Steven Wu via cfe-commits
@@ -18,7 +18,7 @@ // RUN: c-index-test -test-load-source local %s -include %t.clang.h -fmodules -fmodules-cache-path=%t.mcp -Xclang -triple -Xclang x86_64-apple-darwin | FileCheck %s // FIXME: Still fails on at least some linux boxen. -// REQUIRES: system-darwin +// REQUIRES

[clang] [clang] Fix darwin-related tests' REQUIRES annotation (PR #130138)

2025-03-11 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/130138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix darwin-related tests' REQUIRES annotation (PR #130138)

2025-03-11 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: I think the fix makes sense for a linux toolchain running on Darwin. I am still surprised that you have a "system-darwin" platform where you don't want the default target triple to be darwin. I am ok with the fix but it will be good to update the R

[clang] Add SPIRV support to HIPAMD toolchain (PR #75357)

2025-03-11 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/75357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add SPIRV support to HIPAMD toolchain (PR #75357)

2025-03-11 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: close this since it is superseded by other PRs https://github.com/llvm/llvm-project/pull/75357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-11 Thread via cfe-commits
higher-performance wrote: > > Checking in - has everybody had a chance to review this? Can we merge? > > Was @cor3ntin correct here? > > > I think we are a bit confused, so can someone tell me if I'm wrong > > N is always going to be fairly small (and always 1 in the non-template case) > > We c

[clang-tools-extra] [clang-tidy] 'modernize-use-starts-ends-with': fixed false positives on `find` and `rfind` (PR #129564)

2025-03-11 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/129564 >From c3f21bb654d2980955f2c37a5dc7a02a1ced7891 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 3 Mar 2025 21:00:32 +0300 Subject: [PATCH 1/7] [clang-tidy] fixed false positives on find and rfind ---

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-11 Thread Alexey Bataev via cfe-commits
@@ -226,7 +228,12 @@ T tmain(T argc) { #pragma omp parallel for reduction(+ : fl) for (int i = 0; i < 10; ++i) foo(); - +#if defined(_OPENMP) && (_OPENMP >= 202411) +#pragma omp parallel private(fl) +#pragma omp for reduction(original(abcxx),+:fl) // expected-error {{priv

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-11 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/128150 ___ 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] Avoid processing declarations in system headers (PR #128150)

2025-03-11 Thread Piotr Zegar via cfe-commits
@@ -91,6 +91,11 @@ Improvements to clang-query Improvements to clang-tidy -- +- It no longer processes declarations from system headers by default, greatly PiotrZSL wrote: Would be nice to start with ":program:clang-tidy" (or something

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-11 Thread Piotr Zegar via cfe-commits
@@ -1573,19 +1574,41 @@ bool MatchASTVisitor::TraverseAttr(Attr *AttrNode) { class MatchASTConsumer : public ASTConsumer { public: MatchASTConsumer(MatchFinder *Finder, - MatchFinder::ParsingDoneTestCallback *ParsingDone) - : Finder(Finder), ParsingDone

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-11 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. I like what I see. One thing that may be required later is manual review of implementation of every check to verify that they will work correctly, current tests may not be sufficient. https://github.com/llvm/llvm-project/pull/128150 _

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #128586)

2025-03-11 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Fixed all the issues and posted a new PR at https://github.com/llvm/llvm-project/pull/130729 https://github.com/llvm/llvm-project/pull/128586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2025-03-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-with-thin-lto-ubuntu` running on `as-worker-92` while building `llvm` at step 6 "build-stage1-compiler". Full details are available at: https://lab.llvm.org/buildbot/#/builders/127/builds/2671 Here is the relevant pie

[clang] [Clang] Fix the printout of CXXParenListInitExpr involving default arguments (PR #130731)

2025-03-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/130731 The parantheses are unnecessary IMO because they should have been handled in the parents of such expressions, e.g. in CXXFunctionalCastExpr. Moreover, we shouldn't join CXXDefaultInitExpr either because they ar

[clang] cb7298f - [AstMatcher][NFC]fix doc gen for ast matchers (#130726)

2025-03-11 Thread via cfe-commits
Author: Congcong Cai Date: 2025-03-11T16:24:00+08:00 New Revision: cb7298f66d62a3548fcf3bd230304067ecf30d17 URL: https://github.com/llvm/llvm-project/commit/cb7298f66d62a3548fcf3bd230304067ecf30d17 DIFF: https://github.com/llvm/llvm-project/commit/cb7298f66d62a3548fcf3bd230304067ecf30d17.diff

[clang] f421875 - [Clang] Implement P0963R3 "Structured binding declaration as a condition" (#130228)

2025-03-11 Thread via cfe-commits
Author: Younan Zhang Date: 2025-03-11T15:41:56+08:00 New Revision: f4218753ad93dd44b019e38bae61dceb93514aee URL: https://github.com/llvm/llvm-project/commit/f4218753ad93dd44b019e38bae61dceb93514aee DIFF: https://github.com/llvm/llvm-project/commit/f4218753ad93dd44b019e38bae61dceb93514aee.diff

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-03-11 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/121829 >From 9bb78235d2ba008dc49dc4746edbd9978a92396b Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Fri, 13 Dec 2024 05:31:56 -0800 Subject: [PATCH] [RISCV] Teach Barmetal toolchain about GCC installation(1/3

[clang] [clang-tools-extra] [AstMatcher]`templateArgumentCountIs` support `FunctionDecl` (PR #130416)

2025-03-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/130416 >From ca39210f6a28569116759f9e62b6120ddd746968 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 8 Mar 2025 21:22:47 +0800 Subject: [PATCH 1/4] [clang-tidy][NFC]refactor matcher for bugprone-optional-v

[clang] [Clang] Fix the printout of CXXParenListInitExpr involving default arguments (PR #130731)

2025-03-11 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/130731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix the printout of CXXParenListInitExpr involving default arguments (PR #130731)

2025-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes The parantheses are unnecessary IMO because they should have been handled in the parents of such expressions, e.g. in CXXFunctionalCastExpr. Moreover, we shouldn't join CXXDefaultInitExpr either because they

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Yingwei Zheng (dtcxzyw) Changes In the LLVM middle-end we want to fold `gep inbounds null, idx -> null`: https://alive2.llvm.org/ce/z/5ZkPx- This pattern is common in real-world programs. Generally, it exists in some (actually) un

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-11 Thread Anutosh Bhat via cfe-commits
@@ -1,7 +1,8 @@ // REQUIRES: host-supports-jit // UNSUPPORTED: system-aix // RUN: cat %s | clang-repl | FileCheck %s -// RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s +// RUN: cat %s | not clang-repl -Xcc -Xclang -Xcc -verify -Xcc -O2 | FileCheck %s anutosh

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-03-11 Thread Hank Chang via cfe-commits
HankChang736 wrote: I create another pull request [#130733](https://github.com/llvm/llvm-project/pull/130733) that is implemented with the RISCVInsertVSETVL approach, since it's a new approach. https://github.com/llvm/llvm-project/pull/128636 ___ cfe

[clang] [Clang] Fix the printout of CXXParenListInitExpr involving default arguments (PR #130731)

2025-03-11 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > The CI failure seems relevant here Not a big deal. https://github.com/llvm/llvm-project/pull/130731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Sink false [[assume]] execution paths (PR #130418)

2025-03-11 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/130418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [AstMatcher]`templateArgumentCountIs` support `FunctionDecl` (PR #130416)

2025-03-11 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Adding @AaronBallman as owner for `ASTMatchers` https://github.com/llvm/llvm-project/pull/130416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] OOB test consolidation IV: split off unrelated tests (PR #130763)

2025-03-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Ah! Sorry about this. I didn't mean to push roadblocks to you. I have a followup PR (#130418) probably later today - I'll make sure that's rebased to this one. Thanks for taking care of this! https://github.com/llvm/llvm-project/pull/13076

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-11 Thread Gábor Horváth via cfe-commits
@@ -449,6 +453,7 @@ ClangTidyASTConsumerFactory::createASTConsumer( } std::vector> Consumers; + Xazax-hun wrote: Nit: is this an intended change? https://github.com/llvm/llvm-project/pull/128150 ___ cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-11 Thread Gábor Horváth via cfe-commits
@@ -1573,19 +1574,42 @@ bool MatchASTVisitor::TraverseAttr(Attr *AttrNode) { class MatchASTConsumer : public ASTConsumer { public: MatchASTConsumer(MatchFinder *Finder, - MatchFinder::ParsingDoneTestCallback *ParsingDone) - : Finder(Finder), ParsingDone

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-11 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. Overall looks good to me, some nits inline. https://github.com/llvm/llvm-project/pull/128150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-11 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/128150 ___ 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] Avoid processing declarations in system headers (PR #128150)

2025-03-11 Thread Gábor Horváth via cfe-commits
@@ -91,6 +91,10 @@ Improvements to clang-query Improvements to clang-tidy -- +- It no longer processes declarations from system headers by default, greatly Xazax-hun wrote: I think we should mention somewhere that downstream users migh

[clang] [NFC][analyzer] Split [[assume]] tests to a separate file (PR #130763)

2025-03-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/130763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] OOB test consolidation IV: rename files (PR #129697)

2025-03-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/129697 From 3a3236237e193fb1d1de1aed72e128195d4d0730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 4 Mar 2025 11:44:18 +0100 Subject: [PATCH 1/3] [NFC][analyzer] OOB test consolidation IV: r

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-11 Thread via cfe-commits
mydeveloperday wrote: > The only problem I see is how clang-format parses those lists from yaml. I > think there is no possibility to choose between adding or overwriting, if you > put `AttributeMacros` in your `.clang-format`, but it just overwrites the > values. if they can be overridden!,

[clang] [clang-tools-extra] [AstMatcher]`templateArgumentCountIs` support `FunctionDecl` (PR #130416)

2025-03-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/130416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-03-11 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Doesn't mingw target support it? I'm pretty sure that profiling already works, both in mingw and MSVC configurations. I'm not familiar with all the nuances in various forms of profiling though, so it's unclear to me if this is some specific fringe configuration which didn't

[clang] 405c28b - [NFC][analyzer] Split [[assume]] tests to a separate file (#130763)

2025-03-11 Thread via cfe-commits
Author: Donát Nagy Date: 2025-03-11T13:52:55+01:00 New Revision: 405c28bb10928a59c5647ec0768387e27a64f5d0 URL: https://github.com/llvm/llvm-project/commit/405c28bb10928a59c5647ec0768387e27a64f5d0 DIFF: https://github.com/llvm/llvm-project/commit/405c28bb10928a59c5647ec0768387e27a64f5d0.diff LO

[clang] [NFC][analyzer] Split [[assume]] tests to a separate file (PR #130763)

2025-03-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/130763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [AstMatcher]`templateArgumentCountIs` support `FunctionDecl` (PR #130416)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -1090,6 +1090,7 @@ AST_POLYMORPHIC_MATCHER_P2( AST_POLYMORPHIC_MATCHER_P( templateArgumentCountIs, AST_POLYMORPHIC_SUPPORTED_TYPES(ClassTemplateSpecializationDecl, +VarTemplateSpecializationDecl, FunctionDecl, Aar

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-11 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/127467 >From 6ff448ed506e0ef75db2c9974a628a965e85df2f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Mon, 17 Feb 2025 15:33:20 +0530 Subject: [PATCH 1/5] Fix error recovery while PTU cleanup --- clang/lib/Interpr

[clang] [clang] Fix a segfault when M is a nullptr (PR #130712)

2025-03-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: The patch itself seems not bad. But we prefer to ask for a test for such changes. https://github.com/llvm/llvm-project/pull/130712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang][AST] Remove HasFirstArg assertion in CallExpr::getBeginLoc() (PR #130725)

2025-03-11 Thread via cfe-commits
https://github.com/cor3ntin commented: Missing changelog. Otherwise, I think it makes sense even if I sort of hate it, as it relies on `TryCopyInitialization` looking at the location and nothing else. I wonder if we could get rid of `CallExpr::CreateTemporary` and instead create something like

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-11 Thread Vassil Vassilev via cfe-commits
@@ -1,7 +1,8 @@ // REQUIRES: host-supports-jit // UNSUPPORTED: system-aix // RUN: cat %s | clang-repl | FileCheck %s -// RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s +// RUN: cat %s | not clang-repl -Xcc -Xclang -Xcc -verify -Xcc -O2 | FileCheck %s vgvassi

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-03-11 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/130734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix the printout of CXXParenListInitExpr involving default arguments (PR #130731)

2025-03-11 Thread via cfe-commits
cor3ntin wrote: The CI failure seems relevant here https://github.com/llvm/llvm-project/pull/130731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [AstMatcher]`templateArgumentCountIs` support `FunctionDecl` (PR #130416)

2025-03-11 Thread Carlos Galvez via cfe-commits
@@ -4833,6 +4833,17 @@ Narrowing Matchers +MatcherFunctionDecl>templateArgumentCountIsunsigned N +Matches if the number of template arguments equals N. + +Given + template struct C {}; -

[clang] [clang-tools-extra] [AstMatcher]`templateArgumentCountIs` support `FunctionDecl` (PR #130416)

2025-03-11 Thread Carlos Galvez via cfe-commits
@@ -6219,6 +6230,17 @@ Narrowing Matchers Usable as: MatcherFunctionDecl>, MatcherVarDecl>, Matcher

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-03-11 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. I think this makes sense, but please wait for a second opinion... https://github.com/llvm/llvm-project/pull/130734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] disable unary, vector mask (PR #130400)

2025-03-11 Thread via cfe-commits
wsehjk wrote: > You can see two test failures in the CI output above. Hi. This PR disables the unary version of` __builtin_shufflevector(vec, mask)`. If my implementation is correct, I believe we should remove the unary version test to pass the CI. https://github.com/llvm/llvm-project/pull/13

[clang] 63635c1 - [clang] [OpenMP] New OpenMP 6.0 self_maps clause (#129888)

2025-03-11 Thread via cfe-commits
Author: Ritanya-B-Bharadwaj Date: 2025-03-11T16:31:42+05:30 New Revision: 63635c174610344a47c686a9a8e5cc266f39a320 URL: https://github.com/llvm/llvm-project/commit/63635c174610344a47c686a9a8e5cc266f39a320 DIFF: https://github.com/llvm/llvm-project/commit/63635c174610344a47c686a9a8e5cc266f39a320

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-03-11 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw created https://github.com/llvm/llvm-project/pull/130734 In the LLVM middle-end we want to fold `gep inbounds null, idx -> null`: https://alive2.llvm.org/ce/z/5ZkPx- This pattern is common in real-world programs. Generally, it exists in some (actually) unreachable bl

[clang] Reland "[clang] Lower modf builtin using `llvm.modf` intrinsic" (PR #130761)

2025-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Benjamin Maxwell (MacDue) Changes Reverts https://github.com/llvm/llvm-project/commit/c40f0fe4348bb9304b95bd317665bf1cb2bdcc85 Original description: This updates the existing modf[f|l] builtin to be lowered via the llvm.modf.* intr

[clang] [NFC][analyzer] OOB test consolidation IV: split off unrelated tests (PR #130763)

2025-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Donát Nagy (NagyDonat) Changes Recently commit e5821bae80db3f3f0fe0d5f8ce62f79e548eed5 (which is a re-application of 2b9abf0db2d106c7208b4372e662ef5df869e6f1) added some tests to out-of-bonunds-new.cpp, which use a very

[clang] [NFC][analyzer] OOB test consolidation IV: split off unrelated tests (PR #130763)

2025-03-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/130763 Recently commit e5821bae80db3f3f0fe0d5f8ce62f79e548eed5 (which is a re-application of 2b9abf0db2d106c7208b4372e662ef5df869e6f1) added some tests to out-of-bonunds-new.cpp, which use a very simple out of bound

[clang] [analyzer] Model [[assume]] attributes without side-ffects (PR #130418)

2025-03-11 Thread Balazs Benics via cfe-commits
@@ -91,8 +91,29 @@ QualType getOverflowBuiltinResultType(const CallEvent &Call, CheckerContext &C, } } -class BuiltinFunctionChecker : public Checker { +class BuiltinFunctionChecker +: public Checker> { public: + void checkPostStmt(const AttributedStmt *A, CheckerCont

[clang] [analyzer] Model [[assume]] attributes without side-ffects (PR #130418)

2025-03-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/130418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] OOB test consolidation IV: split off unrelated tests (PR #130763)

2025-03-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/130763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] OOB test consolidation IV: split off unrelated tests (PR #130763)

2025-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Donát Nagy (NagyDonat) Changes Recently commit e5821bae80db3f3f0fe0d5f8ce62f79e548eed5 (which is a re-application of 2b9abf0db2d106c7208b4372e662ef5df869e6f1) added some tests to out-of-bonunds-new.cpp, which use a very simple out of boun

[clang] [analyzer] Model [[assume]] attributes without side-ffects (PR #130418)

2025-03-11 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/130418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] OOB test consolidation IV: split off unrelated tests (PR #130763)

2025-03-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/130763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] OOB test consolidation IV: split off unrelated tests (PR #130763)

2025-03-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/130763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Model [[assume]] attributes without side-ffects (PR #130418)

2025-03-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/130418 >From bdb40a95061acd007d1f27f1412c216c6ab6acb6 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 19 Dec 2024 13:45:58 +0100 Subject: [PATCH 1/3] [analyzer] Model [[assume]] attributes without side-ffects

[clang] [analyzer] Model [[assume]] attributes without side-ffects (PR #130418)

2025-03-11 Thread Balazs Benics via cfe-commits
@@ -91,8 +91,29 @@ QualType getOverflowBuiltinResultType(const CallEvent &Call, CheckerContext &C, } } -class BuiltinFunctionChecker : public Checker { +class BuiltinFunctionChecker +: public Checker> { public: + void checkPostStmt(const AttributedStmt *A, CheckerCont

[clang] [analyzer] Model [[assume]] attributes without side-effects (PR #130418)

2025-03-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/130418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Sink false [[assume]] execution paths (PR #130418)

2025-03-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/130418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [clang] [OpenMP] New OpenMP 6.0 self_maps clause (PR #129888)

2025-03-11 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj updated https://github.com/llvm/llvm-project/pull/129888 >From 831fb3cf165814c3a7e437a7839951ef12d51694 Mon Sep 17 00:00:00 2001 From: Ritanya B Bharadwaj Date: Wed, 5 Mar 2025 08:45:23 -0600 Subject: [PATCH 1/2] [OpenMP] Parsing/Sema support for self_maps

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-03-11 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/130458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-11 Thread Alexey Bataev via cfe-commits
@@ -3678,6 +3678,9 @@ class OMPReductionClause final /// Name of custom operator. DeclarationNameInfo NameInfo; + /// Private variable reduction flag + llvm::SmallVector IsPrivateVarReductionFlags; alexey-bataev wrote: No SmallVector is allowed here, us

[clang] [StaticAnalyzer] Relax the pre-condition of 'setsockopt' (PR #130683)

2025-03-11 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/130683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC]clean ConstCorrectnessCheck (PR #130493)

2025-03-11 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp edited https://github.com/llvm/llvm-project/pull/130493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-03-11 Thread Djordje Todorovic via cfe-commits
@@ -43,7 +43,7 @@ class MipsSubtarget : public MipsGenSubtargetInfo { Mips3, Mips4, Mips5, Mips64, Mips64r2, Mips64r3, Mips64r5, Mips64r6 }; - enum class CPU { P5600 }; + enum class CPU { P5600, I6400 }; djtodoro wrote: So, we do not use this in this

[clang-tools-extra] [clang-tidy] Added Conflicting Global Accesses checker (PR #130421)

2025-03-11 Thread via cfe-commits
https://github.com/ConcreteCactus edited https://github.com/llvm/llvm-project/pull/130421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] OOB test consolidation IV: rename files (PR #129697)

2025-03-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/129697 From 3a3236237e193fb1d1de1aed72e128195d4d0730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 4 Mar 2025 11:44:18 +0100 Subject: [PATCH] [NFC][analyzer] OOB test consolidation IV: renam

[libclc] [libclc] Fix commands in compile_to_bc are executed sequentially (PR #130755)

2025-03-11 Thread Wenju He via cfe-commits
https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/130755 In libclc, we observe that compiling OpenCL source files to bitcode is executed sequentially on Windows, which increases debug build time by about an hour. add_custom_command may introduce additional implicit d

[clang] [llvm] [RISCV] Add Qualcomn uC Xqcili (load large immediates) extension (PR #130012)

2025-03-11 Thread Sudharsan Veeravalli via cfe-commits
@@ -0,0 +1,27 @@ +# Xqcili - Qualcomm uC Load Large Immediate Extension +# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-xqcili < %s 2>&1 \ +# RUN: | FileCheck -check-prefixes=CHECK,CHECK-PLUS %s +# RUN: not llvm-mc -triple riscv32 -mattr=-experimental-xqcili < %s 2>&1

[clang] [NFC][analyzer] OOB test consolidation IV: rename files (PR #129697)

2025-03-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/129697 From bdee737e98cb66cb8a9528df7da9be0f367c6287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 4 Mar 2025 11:44:18 +0100 Subject: [PATCH 1/3] [NFC][analyzer] OOB test consolidation IV: r

[clang] [StaticAnalyzer] Relax the pre-condition of 'setsockopt' (PR #130683)

2025-03-11 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: This change looks good to me. I think you could open PRs for the questions you brought up and we could sort them out in the review process. https://github.com/llvm/llvm-project/pull/130683 ___ cfe-commits mailing list cfe-commits@lis

[clang] [llvm] [RISCV] Add Qualcomn uC Xqcili (load large immediates) extension (PR #130012)

2025-03-11 Thread via cfe-commits
https://github.com/u4f3 updated https://github.com/llvm/llvm-project/pull/130012 >From 68336aeededdd6f839134d0ace9f098d799bc2b0 Mon Sep 17 00:00:00 2001 From: u4f3 Date: Fri, 7 Mar 2025 15:01:57 +0800 Subject: [PATCH] [RISCV] Add Qualcomn uC Xqcili (load large immediates) extension The Xqcili

[clang] Reland "[clang] Lower modf builtin using `llvm.modf` intrinsic" (PR #130761)

2025-03-11 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/130761 Reverts https://github.com/llvm/llvm-project/commit/c40f0fe4348bb9304b95bd317665bf1cb2bdcc85 Original description: This updates the existing modf[f|l] builtin to be lowered via the llvm.modf.* intrinsic (rather

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-11 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Checking in - has everybody had a chance to review this? Can we merge? Was @cor3ntin correct here? > I think we are a bit confused, so can someone tell me if I'm wrong > >N is always going to be fairly small (and always 1 in the non-template > case) We care about

[clang] [analyzer] Model [[assume]] attributes without side-ffects (PR #130418)

2025-03-11 Thread Gábor Horváth via cfe-commits
@@ -91,8 +91,29 @@ QualType getOverflowBuiltinResultType(const CallEvent &Call, CheckerContext &C, } } -class BuiltinFunctionChecker : public Checker { +class BuiltinFunctionChecker +: public Checker> { public: + void checkPostStmt(const AttributedStmt *A, CheckerCont

[clang] [analyzer] Model [[assume]] attributes without side-ffects (PR #130418)

2025-03-11 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. I have one question once that is resolved the rest looks good to me. https://github.com/llvm/llvm-project/pull/130418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang-tools-extra] [clang-tidy] support different precisions (PR #130540)

2025-03-11 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/130540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Reflect the implementation status for P2280R4 (PR #127166)

2025-03-11 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127166 >From a2fc3d0550ab22e1a4273dc2debfda23df7cad6f Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Fri, 14 Feb 2025 14:03:23 +0800 Subject: [PATCH 1/3] [clang][docs] Fix DR staus for P2280R4 P2280R4 is offi

[clang] [clang][docs] Reflect the implementation status for P2280R4 (PR #127166)

2025-03-11 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > > Ideally, the C++23 behavior should also be present in C++11~20 modes. Did > > you want to add FIXME to these checks? > > Yes, this would be an improvement. I'd wait for @tbaederr's backport #129646. Once that lands, IIUC this PR will only contain pure documentation

[clang] [clang][test] Don't require specific alignment in test case (PR #130589)

2025-03-11 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/130589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-11 Thread Erich Keane via cfe-commits
@@ -603,6 +606,64 @@ static void prepareTypeConverter(mlir::LLVMTypeConverter &converter, }); } +// The unreachable code is not lowered by applyPartialConversion function +// since it traverses blocks in the dominance order. At the same time we +// do need to lower such cod

[clang-tools-extra] d22d143 - [clang-tidy] support different precisions (#130540)

2025-03-11 Thread via cfe-commits
Author: Tommy Chen Date: 2025-03-11T18:05:01+01:00 New Revision: d22d14375d4410cdb441e04016531962e3abb44e URL: https://github.com/llvm/llvm-project/commit/d22d14375d4410cdb441e04016531962e3abb44e DIFF: https://github.com/llvm/llvm-project/commit/d22d14375d4410cdb441e04016531962e3abb44e.diff LO

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-11 Thread Amr Hesham via cfe-commits
@@ -33,6 +33,14 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("NYI: PPC double-double format for long double"); llvm_unreachable("Unsupported format for long double"); } + + bool isSized(mlir::Type ty) { +if (mlir::isa(ty)) + r

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2025-03-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-latest-gcc` running on `linaro-flang-aarch64-latest-gcc` while building `llvm` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/130/builds/11027 Here is t

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-03-11 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/121291 ___ 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   7   >