[clang] 291fa64 - Pre-Commit tests: [HIP] Fix return type in __clang_hip_cmath.h (#139891)

2025-05-15 Thread via cfe-commits
Author: Juan Manuel Martinez Caamaño Date: 2025-05-15T09:51:33+02:00 New Revision: 291fa641ec084ce32468d8a2a9205157d88b022d URL: https://github.com/llvm/llvm-project/commit/291fa641ec084ce32468d8a2a9205157d88b022d DIFF: https://github.com/llvm/llvm-project/commit/291fa641ec084ce32468d8a2a920515

[clang] Pre-Commit tests: [HIP] Fix return type in __clang_hip_cmath.h (PR #139891)

2025-05-15 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez closed https://github.com/llvm/llvm-project/pull/139891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] Fix return type in __clang_hip_cmath.h (PR #139697)

2025-05-15 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/139697 From e60d2b04d1cb7873e4034cb639406b1c329d1c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Tue, 13 May 2025 10:32:41 +0200 Subject: [PATCH] [HIP] Fix return type in

[clang] [OpenMP] Add assertion for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-15 Thread ALBIN BABU VARGHESE via cfe-commits
https://github.com/albus-droid edited https://github.com/llvm/llvm-project/pull/139986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Balazs Benics via cfe-commits
@@ -2633,7 +2633,8 @@ BugPathGetter::BugPathGetter(const ExplodedGraph *OriginalGraph, assert(I->isValid() && "We only allow BugReporterVisitors and BugReporter itself to " "invalidate reports!"); -Nodes.emplace_back(I->getErrorNode()); +if (c

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Balazs Benics via cfe-commits
@@ -442,109 +442,65 @@ std::unique_ptr ExplodedGraph::trim(ArrayRef Sinks, InterExplodedGraphMap *ForwardMap, InterExplodedGraphMap *InverseMap) const { - // FIXME: The two-pass algorithm of this function (which was introduced in - // 2

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/140015 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [clang][analyzer] Fix a nullptr dereference when -ftime-trace is used (Reland) (PR #139980)

2025-05-15 Thread Fangyi Zhou via cfe-commits
fangyi-zhou wrote: > I think this would still trip on the same memory issue. The problem to me is > that we read uninitialized memory. So even if you limit the bounds of the > result of the read of such uninitialized memory, it would only mask and limit > the effect of such read. Have you trie

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-05-15 Thread Ryotaro Kasuga via cfe-commits
kasuga-fj wrote: > For this reason OpenMP 5.1 added new pragma: > > ```c > #pragma omp simd reduction(+:v0) > #pragma omp unroll partial(4) > ``` FWIW, I tried it and the following error occurred. ``` :10:1: error: OpenMP constructs may not be nested inside a simd region except for ordered si

[clang] [sanitizer] Fix empty string in unsupported argument error for -fsanitize-trap (PR #136549)

2025-05-15 Thread Sinkevich Artem via cfe-commits
https://github.com/ArtSin edited https://github.com/llvm/llvm-project/pull/136549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Add assertion for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-15 Thread ALBIN BABU VARGHESE via cfe-commits
https://github.com/albus-droid edited https://github.com/llvm/llvm-project/pull/139986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Separate the actions of the `-emit-fir` and `-emit-mlir` options (PR #139857)

2025-05-15 Thread Valentin Clement バレンタイン クレメン via cfe-commits
clementval wrote: >Currently, using the LLVM dialect is only a temporary solution and doesn’t >align with my long-term goals. Who said it is a temporary solution? Can you point to an RFC? https://github.com/llvm/llvm-project/pull/139857 ___ cfe-comm

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll This PR adds the missing functions to `FUNCTION_LIST`, as well as a test that checks for completeness, as discussed here: https://github.com/llvm/llvm-project/pull/138103#discussion_r2085977138 The test is unfortunately not 100% foolproof, since as noted `clang_get

[clang] [OpenMP] Add assertion for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-15 Thread ALBIN BABU VARGHESE via cfe-commits
@@ -14924,8 +14924,24 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, SourceLocation FactorLoc; if (Expr *FactorVal = PartialClause->getFactor(); FactorVal && !FactorVal->containsErrors()) { +if (!VerifyPositiveIntegerConstantInClause(Facto

[clang] [flang] [flang][driver] Separate the actions of the `-emit-fir` and `-emit-mlir` options (PR #139857)

2025-05-15 Thread via cfe-commits
NexMing wrote: > I tend to prefer @jeanPerier's suggestion of having the option name reflect > that only the LLVM dialect is being used. > > In the future, do you intend to provide a way to choose the set of dialects > to use? In that case, we could consider something a bit more general like

[clang] [sanitizer] Fix empty string in unsupported argument error for -fsanitize-trap (PR #136549)

2025-05-15 Thread Sinkevich Artem via cfe-commits
https://github.com/ArtSin updated https://github.com/llvm/llvm-project/pull/136549 >From 626d7e1fa3ce19c0bed7273f07439ff85f3de58c Mon Sep 17 00:00:00 2001 From: Artem Sinkevich Date: Mon, 21 Apr 2025 12:48:51 +0400 Subject: [PATCH] [sanitizer] Fix empty string in unsupported argument error for

[clang] [OpenMP] Add assertion for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-15 Thread ALBIN BABU VARGHESE via cfe-commits
@@ -58,8 +58,17 @@ void func(int n) { // expected-error@+1 {{argument to 'partial' clause must be a strictly positive integer value}} #pragma omp unroll partial(0) for (int i = 0; i < n; ++i) {} - - // expected-error@+1 {{directive '#pragma omp unroll' cannot conta

[clang] [sanitizer] Fix empty string in unsupported argument error for -fsanitize-trap (PR #136549)

2025-05-15 Thread Sinkevich Artem via cfe-commits
ArtSin wrote: > Perhaps a better fix would be to correct the toString function I agree, but adding groups to `toString` breaks its other uses. What do you think about separate `toStringWithGroups`? https://github.com/llvm/llvm-project/pull/136549 ___

[clang] [clang][analyzer] Fix a nullptr dereference when -ftime-trace is used (Reland) (PR #139980)

2025-05-15 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: > > I think this would still trip on the same memory issue. The problem to me > > is that we read uninitialized memory. So even if you limit the bounds of > > the result of the read of such uninitialized memory, it would only mask and > > limit the effect

[clang] [clang][analyzer] Fix a nullptr dereference when -ftime-trace is used (Reland) (PR #139980)

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

[clang] [clang][analyzer] Fix a nullptr dereference when -ftime-trace is used (Reland) (PR #139980)

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

[clang] [clang][analyzer] Fix a nullptr dereference when -ftime-trace is used (Reland) (PR #139980)

2025-05-15 Thread Balazs Benics via cfe-commits
@@ -101,9 +101,17 @@ class SymbolConjured : public SymbolData { // It might return null. const Stmt *getStmt() const { +if (const auto *Parent = Elem.getParent()) { + // Sometimes the CFG element is invalid, avoid dereferencing it. + if (Elem.getIndexInBlock(

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Balazs Benics via cfe-commits
steakhal wrote: > This is the cleanup of `ExplodedGraph::trim()` that I promised at > [31e981c](https://github.com/llvm/llvm-project/commit/31e981ca1dc323c8a32012cb60a0a8fe3985db1a). > This significantly simplifies the algorithm and should be equivalent in a > theoretical sense, but unfortunat

[clang] [clang][bytecode] Diagnose failed constexpr assertions differently (PR #140000)

2025-05-15 Thread Timm Baeder via cfe-commits
@@ -851,6 +851,19 @@ bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) { if (F->isLambdaStaticInvoker()) return true; + // Diagnose failed assertions specially. + if (S.Current->getLocation(OpPC).isMacroID() && + F->getDecl()->getIdentifier()) {

[clang] [Clang] Profile singly-resolved UnresolvedLookupExpr with the declaration (PR #140029)

2025-05-15 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/140029 For a dependent variable template specialization, we don't build a dependent Decl node or a DeclRefExpr to represent it. Instead, we preserve the UnresolvedLookupExpr until instantiation. However, this approac

[clang] [Clang][AArch64] Add pessimistic vscale_range for sve/sme (PR #137624)

2025-05-15 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/137624 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [clang][analyzer] Fix a nullptr dereference when -ftime-trace is used (Reland) (PR #139980)

2025-05-15 Thread Fangyi Zhou via cfe-commits
@@ -101,9 +101,17 @@ class SymbolConjured : public SymbolData { // It might return null. const Stmt *getStmt() const { +if (const auto *Parent = Elem.getParent()) { + // Sometimes the CFG element is invalid, avoid dereferencing it. + if (Elem.getIndexInBlock(

[clang] [Clang] Fix deduction of explicit object member functions (PR #140030)

2025-05-15 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/140030 When taking the address of an overload set containing an explicit object member, we should not take the explicit object parameter into account. Rate limit · GitHub body

[clang] [Clang] Fix deduction of explicit object member functions (PR #140030)

2025-05-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes When taking the address of an overload set containing an explicit object member, we should not take the explicit object parameter into account. --- Full diff: https://github.com/llvm/llvm-project/pull/140030.di

[clang] [clang][analyzer] Fix a nullptr dereference when -ftime-trace is used (Reland) (PR #139980)

2025-05-15 Thread Fangyi Zhou via cfe-commits
fangyi-zhou wrote: valgrind result: ``` $ valgrind ./bin/clang -cc1 -analyze -analyzer-checker=apiModeling -ftime-trace=test.json ../clang/test/Analysis/ftime-trace-no-init.cpp ==825619== Memcheck, a memory error detector ==825619== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al

[clang] [Clang][AArch64] Add pessimistic vscale_range for sve/sme (PR #137624)

2025-05-15 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/137624 >From 9bed3ae2f1bb98fc6f53a17cca98da4b1562e1a7 Mon Sep 17 00:00:00 2001 From: Matthew Devereau Date: Wed, 23 Apr 2025 12:27:02 + Subject: [PATCH 1/7] [Clang][AArch64] Add pessimistic vscale_range when sve

[clang] [Clang] Bypass TAD during overload resolution if a perfect match exists (PR #136203)

2025-05-15 Thread via cfe-commits
cor3ntin wrote: @alexfh Unfortunately, I will need a repro. I'm very curious to see what case we forgot to account for. Thanks in advance! https://github.com/llvm/llvm-project/pull/136203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [Clang] Bypass TAD during overload resolution if a perfect match exists (PR #136203)

2025-05-15 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Reduced test case: https://gcc.godbolt.org/z/qG1Yv35rb https://github.com/llvm/llvm-project/pull/136203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Separate the actions of the `-emit-fir` and `-emit-mlir` options (PR #139857)

2025-05-15 Thread Tom Eccles via cfe-commits
tblah wrote: > Who said it is a temporary solution? Can you point to an RFC? This specific patch wasn't discussed in the RFC but there is some discussion here https://discourse.llvm.org/t/rfc-add-fir-affine-optimization-fir-pass-pipeline/86190/5 https://github.com/llvm/llvm-project/pull/13985

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-05-15 Thread Ryotaro Kasuga via cfe-commits
kasuga-fj wrote: Printing an error message looks reasonable to me, but I think we first need to clarify what codes are "unsupported". https://github.com/llvm/llvm-project/pull/131985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [Clang] Add `noalias` to `this` pointer in C++ constructors (PR #136792)

2025-05-15 Thread Florian Hahn via cfe-commits
https://github.com/fhahn commented: > > I just got a case: > > ``` > > class A { > > public: > >class B { > >public: > > B(A *); > > > > // some non static data fields > >}; > > Does this a valid prove that this optimization is not valid ? > > This example is fine

[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--precompile` (PR #121046)

2025-05-15 Thread Sharadh Rajaraman via cfe-commits
https://github.com/sharadhr updated https://github.com/llvm/llvm-project/pull/121046 >From b6bda7bd5980f3ff9bb9bd680846eb1bb05ac7c7 Mon Sep 17 00:00:00 2001 From: Sharadh Rajaraman Date: Fri, 7 Feb 2025 21:24:12 + Subject: [PATCH 1/3] Accept /Fo and -Fo in `-fmodule-output` when running un

[clang] [clang][bytecode] Fix discarded LValueToRValueBitCasts (PR #140034)

2025-05-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140034 We handle discarding fine, but we used to ignore all discarded cast expressions. Handle bitcasts differently. Rate limit · GitHub body { background-color: #f6f8f

[clang] [analyzer][NFC] Move PrettyStackTraceLocationContext into dispatchWorkItem (PR #140035)

2025-05-15 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource created https://github.com/llvm/llvm-project/pull/140035 This change helps with ensuring that the abstract machine call stack is only dumped exactly once no matter what checker callback we have the crash in. Note that some checker callbacks happen o

[clang] [analyzer][NFC] Move PrettyStackTraceLocationContext into dispatchWorkItem (PR #140035)

2025-05-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Benics (balazs-benics-sonarsource) Changes This change helps with ensuring that the abstract machine call stack is only dumped exactly once no matter what checker callback we have the crash in. Note that some chec

[clang] [OpenMP] Add assertion for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-15 Thread ALBIN BABU VARGHESE via cfe-commits
https://github.com/albus-droid updated https://github.com/llvm/llvm-project/pull/139986 >From 3cc8334092853442f85c5a17a3bd31e373f30da8 Mon Sep 17 00:00:00 2001 From: albus-droid Date: Wed, 14 May 2025 15:49:11 -0400 Subject: [PATCH 1/5] Added two conditions to check for width of the factor var

[clang] [clang][bytecode] Fix discarded LValueToRValueBitCasts (PR #140034)

2025-05-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We handle discarding fine, but we used to ignore all discarded cast expressions. Handle bitcasts differently. --- Full diff: https://github.com/llvm/llvm-project/pull/140034.diff 3 Files Affected: - (modi

[clang] [analyzer][NFC] Move PrettyStackTraceLocationContext into dispatchWorkItem (PR #140035)

2025-05-15 Thread Balázs Benics via cfe-commits
balazs-benics-sonarsource wrote: /CC @pdschbrt https://github.com/llvm/llvm-project/pull/140035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Move PrettyStackTraceLocationContext into dispatchWorkItem (PR #140035)

2025-05-15 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource edited https://github.com/llvm/llvm-project/pull/140035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Separate the actions of the `-emit-fir` and `-emit-mlir` options (PR #139857)

2025-05-15 Thread Valentin Clement バレンタイン クレメン via cfe-commits
clementval wrote: > > Who said it is a temporary solution? Can you point to an RFC? > > This specific patch wasn't discussed in the RFC but there is some discussion > here > https://discourse.llvm.org/t/rfc-add-fir-affine-optimization-fir-pass-pipeline/86190/5 So is that only for the affine p

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-15 Thread CHANDRA GHALE via cfe-commits
@@ -937,15 +937,7 @@ OpenMP Support - Added support 'no_openmp_constructs' assumption clause. - Added support for 'self_maps' in map and requirement clause. - Added support for 'omp stripe' directive. -- Fixed a crashing bug with ``omp unroll partial`` if the argument to - ``p

[clang] [Flang][Sanitizer] Support sanitizer flag for Flang Driver. (PR #137759)

2025-05-15 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/137759 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,

[clang] [flang] [Flang][Sanitizer] Support sanitizer flag for Flang Driver. (PR #137759)

2025-05-15 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/137759 >From aa3caaeaa72ab2f0de8beac416875dc466ac1051 Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Thu, 1 May 2025 13:51:12 +0530 Subject: [PATCH 1/2] [Flang][Sanitizer] Support sanitizer flag for Flang Driv

[clang] [flang] [lld] [lldb] [llvm] [mlir] [polly] [CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS in standalone builds (PR #138587)

2025-05-15 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > I rebased this on top of #138783 and adjusted the title and description. Now > it should be in a good state to push cmake changes for other projects. The changes look good, but it looks like the changes from #138783 still show up when viewing the changes; can you check that y

[clang] [clang][bytecode] Check destructors for temporaries (PR #140039)

2025-05-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Also, increase the EvalID in isPotentialConstantExpr(), since this is its own evaluation. --- Full diff: https://github.com/llvm/llvm-project/pull/140039.diff 3 Files Affected: - (modified) clang/lib/AST/

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/139825 >From a28452d50023ca12435e2d60933852e1b6728fe1 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Tue, 13 May 2025 19:17:27 -0700 Subject: [PATCH 1/2] [NFC] Address bit-field storage sizes to ensure ideal packing

[clang] [analyzer][NFC] Move PrettyStackTraceLocationContext into dispatchWorkItem (PR #140035)

2025-05-15 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource updated https://github.com/llvm/llvm-project/pull/140035 From 42343959f623153dc9421e3bb569b2f0527ec119 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 15 May 2025 11:17:24 +0200 Subject: [PATCH 1/2] [analyzer][NFC] Move PrettyStackTraceLocati

[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--precompile` (PR #121046)

2025-05-15 Thread Sharadh Rajaraman via cfe-commits
https://github.com/sharadhr updated https://github.com/llvm/llvm-project/pull/121046 >From d6c2b9b7ef542975d9313dacd10003a9a6629504 Mon Sep 17 00:00:00 2001 From: Sharadh Rajaraman Date: Fri, 7 Feb 2025 21:24:12 + Subject: [PATCH 1/3] Accept /Fo and -Fo in `-fmodule-output` when running un

[clang] [clang][bytecode] Check destructors for temporaries (PR #140039)

2025-05-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140039 Also, increase the EvalID in isPotentialConstantExpr(), since this is its own evaluation. Rate limit · GitHub body { background-color: #f6f8fa; color: #2

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-05-15 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: One thing that worries me is that before this commit, there was no ICE caused by compiling this snippet of code (regardless its validity or usefulness), and now there is. It would be great if it could print a normal error message (which would encourage my resistant colleagues

[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--precompile` (PR #121046)

2025-05-15 Thread Sharadh Rajaraman via cfe-commits
https://github.com/sharadhr updated https://github.com/llvm/llvm-project/pull/121046 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--precompile` (PR #121046)

2025-05-15 Thread Sharadh Rajaraman via cfe-commits
https://github.com/sharadhr updated https://github.com/llvm/llvm-project/pull/121046 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [Clang][AArch64] Add pessimistic vscale_range for sve/sme (PR #137624)

2025-05-15 Thread Matthew Devereau via cfe-commits
MDevereau wrote: > I really don't want the dependency chain that involves clang converting the > target feature list to an LLVM attribute string, then grabbing the attribute > out of the llvm::Function to parse it back into a feature list. That ties > together the target info and codegen in a

[clang] [Sema] Warn about omitting deprecated enumerator in switch (PR #138562)

2025-05-15 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem updated https://github.com/llvm/llvm-project/pull/138562 >From e221ba3b0f7b08bcfc56bf75f7505265c332637d Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Mon, 5 May 2025 20:24:15 +0200 Subject: [PATCH 1/4] [Sema] Warn about omitting deprecated enumerator in switch T

[clang] [Sema] Warn about omitting deprecated enumerator in switch (PR #138562)

2025-05-15 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem updated https://github.com/llvm/llvm-project/pull/138562 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[clang] f8f11c5 - [AArch64] Add a test case for the coerced arguments. NFC

2025-05-15 Thread David Green via cfe-commits
Author: David Green Date: 2025-05-15T11:51:58+01:00 New Revision: f8f11c541dec9bfc19f80918cf12da71d6ae7b99 URL: https://github.com/llvm/llvm-project/commit/f8f11c541dec9bfc19f80918cf12da71d6ae7b99 DIFF: https://github.com/llvm/llvm-project/commit/f8f11c541dec9bfc19f80918cf12da71d6ae7b99.diff L

[clang] [Sema] Warn about omitting deprecated enumerator in switch (PR #138562)

2025-05-15 Thread Hans Wennborg via cfe-commits
zmodem wrote: I've added suppression of deprecated values in case expressions. Please take another look! https://github.com/llvm/llvm-project/pull/138562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [clang][bytecode] Fix discarded LValueToRValueBitCasts (PR #140034)

2025-05-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/140034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-05-15 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: Rebased to incorporate https://github.com/llvm/llvm-project/pull/139190. Thanks again @topperc. https://github.com/llvm/llvm-project/pull/130973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-05-15 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/130973 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial

[clang] [OpenMP] Add diagnostic for 'factor' width mismatch in 'unroll partial' (PR #139986)

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

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-05-15 Thread St. Muench via cfe-commits
stmuench wrote: @vbvictor since is there no further activity by reviewers here, any idea on how to continue with this PR? https://github.com/llvm/llvm-project/pull/132924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [Clang] Allow parsing arbitrary order of attributes for declarations (PR #133107)

2025-05-15 Thread kadir çetinkaya via cfe-commits
kadircet wrote: I'd like to chime in for the issue with source locations and its implications. Seems like it has been brought up already along the thread. These might not be as crucial for diagnostic locations (or other clang purposes) when they're slightly off, but they actually result in big

[clang] [llvm] [NVPTX] Add errors for incorrect CUDA addrpaces (PR #138706)

2025-05-15 Thread Lewis Crawford via cfe-commits
@@ -1399,19 +1399,27 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) { if (PTy) { O << "\t.param .u" << PTySizeInBits << " .ptr"; +bool IsCUDA = static_cast(TM).getDrvInterface() == + NVPTX::CUDA;

[clang] [OpenMP] Add diagnostic for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-15 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG with a nit https://github.com/llvm/llvm-project/pull/139986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Add diagnostic for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-15 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/139986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 767a203 - [clang][bytecode] Fix discarded LValueToRValueBitCasts (#140034)

2025-05-15 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-15T13:17:29+02:00 New Revision: 767a203a9e61e307086be96288947d130367a267 URL: https://github.com/llvm/llvm-project/commit/767a203a9e61e307086be96288947d130367a267 DIFF: https://github.com/llvm/llvm-project/commit/767a203a9e61e307086be96288947d130367a267.diff L

[clang] [OpenMP] Add diagnostic for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-15 Thread Alexey Bataev via cfe-commits
@@ -14924,8 +14924,25 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, SourceLocation FactorLoc; if (Expr *FactorVal = PartialClause->getFactor(); FactorVal && !FactorVal->containsErrors()) { +if (!VerifyPositiveIntegerConstantInClause(Facto

[clang] [Driver] Fix _XOPEN_SOURCE definition on Solaris (PR #137141)

2025-05-15 Thread Rainer Orth via cfe-commits
rorth wrote: Drats, I'd hoped the markup would inhibit the cherry pick directive from being picked up. I've now dropped the patch into local LLVM 20.1.5 builds on both `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`. It applied cleanly and introduced no regressions. I'll try a regular

[clang] [Driver] Fix _XOPEN_SOURCE definition on Solaris (PR #137141)

2025-05-15 Thread Rainer Orth via cfe-commits
rorth wrote: /cherry-pick e71c8ea3cc73c8f7b0382468f355a254166d3a72 https://github.com/llvm/llvm-project/pull/137141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow parsing arbitrary order of attributes for declarations (PR #133107)

2025-05-15 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Yeah, I think I can live with this. I think not supporting the arbitrary > order is more annoying to users than a slight degradation in source location > reporting. The point @kadircet brings up about tooling is a good one, though. I'm not certain we need to revert the p

[clang] [Driver] Fix _XOPEN_SOURCE definition on Solaris (PR #137141)

2025-05-15 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#140044 https://github.com/llvm/llvm-project/pull/137141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I https://github.com/llvm/llvm-project/pull/140015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,17 @@ +import os + +from clang.cindex import Config, conf, FUNCTION_LIST + +if "CLANG_LIBRARY_PATH" in os.environ: +Config.set_library_path(os.environ["CLANG_LIBRARY_PATH"]) + +import unittest + + +class TestIndex(unittest.TestCase): +def test_functions_register

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/140015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/140015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139939 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Donát Nagy via cfe-commits
@@ -442,109 +442,65 @@ std::unique_ptr ExplodedGraph::trim(ArrayRef Sinks, InterExplodedGraphMap *ForwardMap, InterExplodedGraphMap *InverseMap) const { - // FIXME: The two-pass algorithm of this function (which was introduced in - // 2

[clang] [clang] Add new warning: not eliding copy on return (missed NRVO) (PR #139973)

2025-05-15 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Thanks! > > You should make sure to include a release note before merging. > > Also, perhaps these should be remarks instead of warnings. Seems like a > better fit to me, it would be similar to remarks we provide about function > inlining. Did you consider that? > > FYI

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-15 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,17 @@ +// Regression test for #139375 +// Clang uses 1-based indexing for source locations given from the command-line. +// Verify that `clang-refactor` rejects 0 as an invalid value for line or column number. + +// For range start: +// RUN: not clang-refactor local-r

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Other than a nit, LGTM! https://github.com/llvm/llvm-project/pull/139457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

2025-05-15 Thread Aaron Ballman via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: AaronBallman wrote: > @AaronBallman, @c

[clang] [flang] [flang][driver] Separate the actions of the `-emit-fir` and `-emit-mlir` options (PR #139857)

2025-05-15 Thread via cfe-commits
NexMing wrote: > > > Who said it is a temporary solution? Can you point to an RFC? > > > > > > This specific patch wasn't discussed in the RFC but there is some > > discussion here > > https://discourse.llvm.org/t/rfc-add-fir-affine-optimization-fir-pass-pipeline/86190/5 > > So is that only

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-15 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -479,25 +479,20 @@ ExplodedGraph::trim(ArrayRef Sinks, // in the trimmed graph, then add the corresponding edges with // `addPredecessor()`, otherwise add them to the worklist. for (const ExplodedNode *Pred : N->

[clang] [clang][analyzer] Fix a nullptr dereference when -ftime-trace is used (Reland) (PR #139980)

2025-05-15 Thread Balazs Benics via cfe-commits
@@ -101,9 +101,17 @@ class SymbolConjured : public SymbolData { // It might return null. const Stmt *getStmt() const { +if (const auto *Parent = Elem.getParent()) { + // Sometimes the CFG element is invalid, avoid dereferencing it. + if (Elem.getIndexInBlock(

[clang] [llvm] [CMake] Add a linker test for -Bsymbolic-functions to AddLLVM (PR #79539)

2025-05-15 Thread Rainer Orth via cfe-commits
@@ -355,6 +349,9 @@ function(add_link_opts target_name) set_property(TARGET ${target_name} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-brtl") endif() + + check_linker_flag(CXX "-Wl,-Bsymbolic-functions" rorth wrote: **Please** don't go thi

[clang] 5f53ca3 - [NFC][Clang] Adopt simplified `getTrailingObjects` in Decl/DeclTemplate (#139977)

2025-05-15 Thread via cfe-commits
Author: Rahul Joshi Date: 2025-05-15T05:33:01-07:00 New Revision: 5f53ca30da249b2d46f61791e12e74efef9a8bb6 URL: https://github.com/llvm/llvm-project/commit/5f53ca30da249b2d46f61791e12e74efef9a8bb6 DIFF: https://github.com/llvm/llvm-project/commit/5f53ca30da249b2d46f61791e12e74efef9a8bb6.diff L

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Decl/DeclTemplate (PR #139977)

2025-05-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/139977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b26adac - [clang][bytecode] Check destructors for temporaries (#140039)

2025-05-15 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-15T14:34:35+02:00 New Revision: b26adacc8550bc8786ecba08ec87d0b228930bf4 URL: https://github.com/llvm/llvm-project/commit/b26adacc8550bc8786ecba08ec87d0b228930bf4 DIFF: https://github.com/llvm/llvm-project/commit/b26adacc8550bc8786ecba08ec87d0b228930bf4.diff L

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-15 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/139457 >From 5f246435b9784113ada3f82328433487391f40ab Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Sun, 11 May 2025 14:24:00 + Subject: [PATCH 1/8] [clang] Enforce 1-based indexing for command line source

[clang] [clang][bytecode] Check dtor calls for one-past-end pointers (PR #140047)

2025-05-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140047 None >From abf8f9f5411f8ee9ee9df31ce1a5faaf0b6e8f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 May 2025 12:50:56 +0200 Subject: [PATCH] [clang][bytecode] Check dtor calls for on

[clang] [clang][bytecode] Check dtor calls for one-past-end pointers (PR #140047)

2025-05-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/140047.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.cpp (+2) - (modified) clang/test/AST/ByteCode/cxx20.cpp (+8) `

[clang] 9273091 - [clang][OpenMP] Improve handling of non-C/C++ directives (#139961)

2025-05-15 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2025-05-15T07:37:41-05:00 New Revision: 9273091502994f9b68ca0d1fd04fadd02c0a36df URL: https://github.com/llvm/llvm-project/commit/9273091502994f9b68ca0d1fd04fadd02c0a36df DIFF: https://github.com/llvm/llvm-project/commit/9273091502994f9b68ca0d1fd04fadd02c0a36df

[clang] [llvm] [clang][OpenMP] Improve handling of non-C/C++ directives (PR #139961)

2025-05-15 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/139961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Ensure all library functions are registered (PR #140015)

2025-05-15 Thread Jannick Kremer via cfe-commits
@@ -0,0 +1,17 @@ +import os + +from clang.cindex import Config, conf, FUNCTION_LIST + +if "CLANG_LIBRARY_PATH" in os.environ: +Config.set_library_path(os.environ["CLANG_LIBRARY_PATH"]) + +import unittest + + +class TestIndex(unittest.TestCase): +def test_functions_register

  1   2   3   4   5   6   7   >