[clang] clang/OpenCL: set sqrt fp accuracy on call to Z4sqrt (PR #66651)

2023-09-18 Thread Romaric Jodin via cfe-commits
https://github.com/rjodinchr edited https://github.com/llvm/llvm-project/pull/66651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
@@ -30,15 +32,18 @@ void ImplementationInNamespaceCheck::check( return; PiotrZSL wrote: this could be replaced with `decl(isExpansionInMainFile())` https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits m

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Erich Keane via cfe-commits
@@ -10442,32 +10441,54 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, if (getLangOpts().CUDA && !isFunctionTemplateSpecialization) maybeAddCUDAHostDeviceAttrs(NewFD, Previous); -// If it's a friend (and only if it's a friend), it's po

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Erich Keane via cfe-commits
@@ -428,6 +428,8 @@ class ASTNodeTraverser void VisitFunctionDecl(const FunctionDecl *D) { if (const auto *FTSI = D->getTemplateSpecializationInfo()) dumpTemplateArgumentList(*FTSI->TemplateArguments); +else if (const auto *DFTSI = D->getDependentSpecializationI

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Erich Keane via cfe-commits
@@ -2154,6 +2144,15 @@ bool RecursiveASTVisitor::TraverseFunctionHelper(FunctionDecl *D) { TALI->NumTemplateArgs)); } } +// FIXME: Do we want to traverse the explicit template arguments for erichk

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I didn't spend much time in Serialization, so hopefully someone else can take a look, but in general I think I'm warming toward this. https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Erich Keane via cfe-commits
@@ -185,14 +185,11 @@ namespace SameSignatureAfterInstantiation { namespace PR22040 { template struct Foobar { -template <> void bazqux(typename T::type) {} // expected-error 2{{cannot be used prior to '::' because it has no members}} erichkeane wrote

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
@@ -14,7 +14,9 @@ using namespace clang::ast_matchers; namespace clang::tidy::llvm_libc { -const static StringRef RequiredNamespace = "__llvm_libc"; +const static StringRef RequiredNamespaceStart = "__llvm_libc"; +const static StringRef RequiredNamespaceMacroName = "LIBC_NAME

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. As a single small change to make hardcoded namespaces configurable looks fine. I added some comments related to overall issues in this check. Fell free to fix them or ignore them. https://github.com/llvm/llvm-project/pull/66504

[clang] [clang-repl][CUDA] Move CUDA module registration to beginning of global_ctors (PR #66658)

2023-09-18 Thread Anubhab Ghosh via cfe-commits
https://github.com/argentite created https://github.com/llvm/llvm-project/pull/66658 CUDA device code needs to be registered to the runtime before kernels can be launched. This is done through a global constructor. User code in Clang interpreter, is also executed through `global_ctors`. This p

[clang] [clang-repl][CUDA] Move CUDA module registration to beginning of global_ctors (PR #66658)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Changes CUDA device code needs to be registered to the runtime before kernels can be launched. This is done through a global constructor. User code in Clang interpreter, is also executed through `global_ctors`. This patch ensures kernels

[clang] clang/OpenCL: set sqrt fp accuracy on call to Z4sqrt (PR #66651)

2023-09-18 Thread Romaric Jodin via cfe-commits
https://github.com/rjodinchr updated https://github.com/llvm/llvm-project/pull/66651 >From b6df142239256e979a70896f324f9ed3547c640c Mon Sep 17 00:00:00 2001 From: Romaric Jodin Date: Mon, 18 Sep 2023 09:34:56 +0200 Subject: [PATCH 1/2] Revert "clang/OpenCL: Add inline implementations of sqrt i

[clang] [analyzer] Fix StackAddrEscapeChecker crash on temporary object fields (PR #66493)

2023-09-18 Thread via cfe-commits
DonatNagyE wrote: LGTM. https://github.com/llvm/llvm-project/pull/66493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl][CUDA] Move CUDA module registration to beginning of global_ctors (PR #66658)

2023-09-18 Thread Anubhab Ghosh via cfe-commits
https://github.com/argentite updated https://github.com/llvm/llvm-project/pull/66658 >From bed2919f781c5ef71e268c95b31a6b9af5392730 Mon Sep 17 00:00:00 2001 From: Anubhab Ghosh Date: Mon, 18 Sep 2023 20:33:19 +0530 Subject: [PATCH] [clang-repl][CUDA] Move CUDA module registration to beginning

[clang] clang/OpenCL: set sqrt fp accuracy on call to Z4sqrt (PR #66651)

2023-09-18 Thread Matt Arsenault via cfe-commits
@@ -5612,6 +5612,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, BundleList); EmitBlock(Cont); } + if (CI->getCalledFunction() && CI->getCalledFunction()->hasName() && + CI->getCalledFunction()->getName().contain

[clang] [mlir][sparse] refine sparse fusion with empty tensors materialization (PR #66563)

2023-09-18 Thread Aart Bik via cfe-commits
https://github.com/aartbik updated https://github.com/llvm/llvm-project/pull/66563 >From afd923169445f8800365859145c8abd0823c5ef7 Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Fri, 15 Sep 2023 17:22:34 -0700 Subject: [PATCH] [mlir][sparse] refine sparse fusion with empty tensors materializatio

[clang] [mlir][sparse] refine sparse fusion with empty tensors materialization (PR #66563)

2023-09-18 Thread Matthias Springer via cfe-commits
https://github.com/matthias-springer approved this pull request. https://github.com/llvm/llvm-project/pull/66563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang/OpenCL: set sqrt fp accuracy on call to Z4sqrt (PR #66651)

2023-09-18 Thread Romaric Jodin via cfe-commits
@@ -5612,6 +5612,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, BundleList); EmitBlock(Cont); } + if (CI->getCalledFunction() && CI->getCalledFunction()->hasName() && + CI->getCalledFunction()->getName().contain

[PATCH] D158156: [analyzer] Add C++ array delete checker

2023-09-18 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. Looks good, thanks for the improvements! One minor remark: your commit uses backticks (`) around the class names in the bug reports, which is commonly used to mark code fragments e.g. in commit messages; however, in the bug reports IIRC most other checkers use apostr

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Krystian Stasiowski via cfe-commits
@@ -10442,32 +10441,54 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, if (getLangOpts().CUDA && !isFunctionTemplateSpecialization) maybeAddCUDAHostDeviceAttrs(NewFD, Previous); -// If it's a friend (and only if it's a friend), it's po

[clang] [NFC][Clang][Headers] Update refs to ACLE in comments (PR #66662)

2023-09-18 Thread M Iyengar via cfe-commits
https://github.com/Blue-Dot created https://github.com/llvm/llvm-project/pull/2 Non functional change to update section comments in arm_acle.h, in order to align with updated documentation: [https://arm-software.github.io/acle/main/acle.html](https://arm-software.github.io/acle/main/acle.

[clang] [NFC][Clang][Headers] Update refs to ACLE in comments (PR #66662)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Changes Non functional change to update section comments in arm_acle.h, in order to align with updated documentation: [https://arm-software.github.io/acle/main/acle.html](https://arm-software.github.io/acle/main/acle.html) --- Full diff: h

[clang-tools-extra] [mlir][sparse] refine sparse fusion with empty tensors materialization (PR #66563)

2023-09-18 Thread Aart Bik via cfe-commits
https://github.com/aartbik closed https://github.com/llvm/llvm-project/pull/66563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Krystian Stasiowski via cfe-commits
@@ -2154,6 +2144,15 @@ bool RecursiveASTVisitor::TraverseFunctionHelper(FunctionDecl *D) { TALI->NumTemplateArgs)); } } +// FIXME: Do we want to traverse the explicit template arguments for sdkrys

[clang] [analyzer] Fix StackAddrEscapeChecker crash on temporary object fields (PR #66493)

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

[clang] [analyzer] Do not use APInt methods on _BitInt() Types (PR #65887)

2023-09-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. What are the semantics of assigning a wider biting to a smaller one? BTW LGTM. https://github.com/llvm/llvm-project/pull/65887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread Piotr Fusik via cfe-commits
https://github.com/pfusik updated https://github.com/llvm/llvm-project/pull/66643 >From 88028509d7e5b5eaf38075c18abba498cb00087a Mon Sep 17 00:00:00 2001 From: Piotr Fusik Date: Mon, 18 Sep 2023 18:07:44 +0200 Subject: [PATCH] [clang] Fix null dereference on return in lambda attribute statemen

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-18 Thread via cfe-commits
dankm wrote: > Just making sure I follow: the problem with `stem` is that if a filename > includes a dot, but no ".exe" or equivalent suffix, it would drop the bit > from the last dot onwards, even though it might be part of the tool's actual > name. Is that correct? Yes, that's correct. The

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-18 Thread via cfe-commits
dankm wrote: > Do any others exist on other platforms? I don't know. I explicitly tested that `.sh` remains, but that was just because it's relatively common (in my experience) to see tools like clang wrapped in a shell script. On Windows there are several executable extensions but I think th

[clang] [analyzer] Remove inaccurate legacy handling of bad bitwise shifts (PR #66647)

2023-09-18 Thread Balazs Benics via cfe-commits
steakhal wrote: What report diff's should we expect? https://github.com/llvm/llvm-project/pull/66647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D64087: [clang] Correct source locations for instantiations of out-of-line defaulted special member functions. (PR25683)

2023-09-18 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. @cor3ntin, any concerns or suggestions per my recent updates? I'll plan to land this in the next couple of days otherwise. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64087/new/ https://reviews.llvm.org/D64087 _

[clang] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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

[PATCH] D145214: [TSAN] add support for riscv64

2023-09-18 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. ping: @jrtc27 @asb do you have any pending feedback for this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145214/new/ https://reviews.llvm.org/D145214 ___ cfe-commits m

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread via cfe-commits
cor3ntin wrote: I would still move the original test, things in sema usually at least parse (ie, this has unbalanced parens). I won't insist though https://github.com/llvm/llvm-project/pull/66643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Better bitfield access units (PR #65742)

2023-09-18 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan edited https://github.com/llvm/llvm-project/pull/65742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D64087: [clang] Correct source locations for instantiations of out-of-line defaulted special member functions. (PR25683)

2023-09-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. 1 nit but still LGTM Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:4993 - // Copy the inner loc start from the pattern. + // Copy source locations from the pattern. + Function->setLocation(PatternDecl-

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- 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: Ap

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread Piotr Fusik via cfe-commits
pfusik wrote: @cor3ntin to `test/CXX/what` or `test/Parser` ? https://github.com/llvm/llvm-project/pull/66643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] TaintPropagation checker strlen() should not propagate (PR #66086)

2023-09-18 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/66086 >From 889c886c3eed31335531ec61ad2b48bef15414d8 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Fri, 8 Sep 2023 16:57:49 +0200 Subject: [PATCH] [analyzer] TaintPropagation checker strlen() should not propagate

[clang] [analyzer] TaintPropagation checker strlen() should not propagate (PR #66086)

2023-09-18 Thread Daniel Krupp via cfe-commits
dkrupp wrote: > As I'm not a maintainer, I could not push to your branch. Here is a patch > that I think has the missing pieces to satisfy my review. > [0001-fixup-analyzer-TaintPropagation-checker-strlen-shoul.patch.txt](https://github.com/llvm/llvm-project/files/12645128/0001-fixup-analyzer-T

[clang] clang/OpenCL: set sqrt fp accuracy on call to Z4sqrt (PR #66651)

2023-09-18 Thread Romaric Jodin via cfe-commits
https://github.com/rjodinchr updated https://github.com/llvm/llvm-project/pull/66651 >From b6df142239256e979a70896f324f9ed3547c640c Mon Sep 17 00:00:00 2001 From: Romaric Jodin Date: Mon, 18 Sep 2023 09:34:56 +0200 Subject: [PATCH 1/2] Revert "clang/OpenCL: Add inline implementations of sqrt i

[PATCH] D159351: [Sema] Change order of displayed overloads in diagnostics

2023-09-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: cjdb. rnk added a comment. +@cjdb , do you have time to review this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159351/new/ https://reviews.llvm.org/D159351 ___ cfe-commits mai

[clang] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread via cfe-commits
cor3ntin wrote: `test/Parser`. `CXX` is for tests that map very directly to a paragraph in the standard https://github.com/llvm/llvm-project/pull/66643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang-tools-extra] [mlir][sparse] refine sparse fusion with empty tensors materialization (PR #66563)

2023-09-18 Thread Aart Bik via cfe-commits
aartbik wrote: I have to fix a merge conflict on the test. Coming up. https://github.com/llvm/llvm-project/pull/66563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir][sparse] refine sparse fusion with empty tensors materialization (PR #66563)

2023-09-18 Thread Aart Bik via cfe-commits
aartbik wrote: I have to fix a merge conflict on the test. Coming up. https://github.com/llvm/llvm-project/pull/66563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread Piotr Fusik via cfe-commits
https://github.com/pfusik updated https://github.com/llvm/llvm-project/pull/66643 >From 33c94d5bedf8889ab7b7fe2442fa0a3196223c91 Mon Sep 17 00:00:00 2001 From: Piotr Fusik Date: Mon, 18 Sep 2023 18:41:54 +0200 Subject: [PATCH] [clang] Fix null dereference on return in lambda attribute statemen

[clang] [clang-repl][CUDA] Move CUDA module registration to beginning of global_ctors (PR #66658)

2023-09-18 Thread Artem Belevich via cfe-commits
@@ -794,7 +794,7 @@ void CodeGenModule::Release() { AddGlobalCtor(ObjCInitFunction); if (Context.getLangOpts().CUDA && CUDARuntime) { if (llvm::Function *CudaCtorFunction = CUDARuntime->finalizeModule()) - AddGlobalCtor(CudaCtorFunction); + AddGlobalCtor(C

[clang-tools-extra] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))` (PR #65852)

2023-09-18 Thread via cfe-commits
@@ -6380,7 +6380,56 @@ Instruction *InstCombinerImpl::foldICmpUsingBoolRange(ICmpInst &I) { Y->getType()->isIntOrIntVectorTy(1) && Pred == ICmpInst::ICMP_ULE) return BinaryOperator::CreateOr(Builder.CreateIsNull(X), Y); + ICmpInst::Predicate Pred1, Pred2; const

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-18 Thread via cfe-commits
https://github.com/xingxue-ibm updated https://github.com/llvm/llvm-project/pull/66549 >From d42f6f35b8a4f3750b151f29951b215889d2c3e4 Mon Sep 17 00:00:00 2001 From: Xing Xue Date: Fri, 15 Sep 2023 16:09:43 -0400 Subject: [PATCH 1/2] The TOC register (r2) was changed by the glue code if unw_get

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-18 Thread via cfe-commits
https://github.com/xingxue-ibm resolved https://github.com/llvm/llvm-project/pull/66549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-18 Thread via cfe-commits
@@ -305,9 +305,22 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) mflr 0 std 0, PPC64_OFFS_SRR0(3) // store lr as ssr0 PPC64_STR(1) + PPC64_STR(4) // Save r4 first since it will be used for fixing r2. +#if defined(_AIX) + // The TOC register (r2) was changed by t

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-18 Thread via cfe-commits
https://github.com/xingxue-ibm resolved https://github.com/llvm/llvm-project/pull/66549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][NVPTX] Add a warning that device debug info does not work with optimizations (PR #65327)

2023-09-18 Thread Artem Belevich via cfe-commits
@@ -28,6 +28,17 @@ // RUN: --offload-arch=sm_35 --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ // RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM35,RDC %s +// Compiling -O{1,2,3,4,fast,s,z} with -g does not pass -g debug info to ptxas. +// NOTE: This is because ptxas does not

[clang] [Driver][NVPTX] Add a warning that device debug info does not work with optimizations (PR #65327)

2023-09-18 Thread Artem Belevich via cfe-commits
@@ -413,13 +413,25 @@ void NVPTX::Assembler::ConstructJob(Compilation &C, const JobAction &JA, // TODO: Perhaps we should map host -O2 to ptxas -O3. -O3 is ptxas's // default, so it may correspond more closely to the spirit of clang -O2. +bool noOptimization = A->

[clang] [analyzer] TaintPropagation checker strlen() should not propagate (PR #66086)

2023-09-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. I hope in the future we will have a more satisfying solution. LGTM. https://github.com/llvm/llvm-project/pull/66086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-18 Thread via cfe-commits
@@ -1696,6 +1696,38 @@ TEST(Support, ReplacePathPrefix) { EXPECT_EQ(Path, "C:\\old/foo\\bar"); } +TEST(Support, FindProgramName) { + StringRef WindowsProgName = + path::program_name("C:\\Test\\foo.exe", path::Style::windows); + EXPECT_EQ(WindowsProgName, "foo"); + +

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-09-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/static-assert.cpp:287 + static_assert((char16_t)L'ゆ' == L"C̵̭̯̠̎͌ͅť̺"[1], ""); // expected-error {{failed}} \ + // expected-note {{evaluates to ''ゆ' (0

[clang] [analyzer] Do not use APInt methods on _BitInt() Types (PR #65887)

2023-09-18 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/65887 >From ea63aae4c34cf452e684ec0dc943b7dbe52c453f Mon Sep 17 00:00:00 2001 From: Vince Bridgers Date: Sat, 9 Sep 2023 21:08:47 +0200 Subject: [PATCH] [analyzer] Fix crash analyzing _BitInt() in evalIntegralCast

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Piotr Zegar via cfe-commits
@@ -67,7 +67,7 @@ AST_MATCHER_P(CallExpr, hasLastArgument, // function had parameters defined (this is useful to check if there is only one // variadic argument). AST_MATCHER(CXXMemberCallExpr, hasSameNumArgsAsDeclNumParams) { - if (Node.getMethodDecl()->isFunctionTemplateSpe

[clang] [clang-repl][CUDA] Move CUDA module registration to beginning of global_ctors (PR #66658)

2023-09-18 Thread Anubhab Ghosh via cfe-commits
@@ -794,7 +794,7 @@ void CodeGenModule::Release() { AddGlobalCtor(ObjCInitFunction); if (Context.getLangOpts().CUDA && CUDARuntime) { if (llvm::Function *CudaCtorFunction = CUDARuntime->finalizeModule()) - AddGlobalCtor(CudaCtorFunction); + AddGlobalCtor(C

[clang-tools-extra] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))` (PR #65852)

2023-09-18 Thread Yingwei Zheng via cfe-commits
@@ -6380,7 +6380,56 @@ Instruction *InstCombinerImpl::foldICmpUsingBoolRange(ICmpInst &I) { Y->getType()->isIntOrIntVectorTy(1) && Pred == ICmpInst::ICMP_ULE) return BinaryOperator::CreateOr(Builder.CreateIsNull(X), Y); + ICmpInst::Predicate Pred1, Pred2; const

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +int main() { +auto a = []()__attribute__((b(({ return 0; }{}; // expected-warning {{unknown attribute 'b' ignored}} +return 0; +} cor3ntin wrote: This can move to `clang/test/SemaCXX/lam

[PATCH] D157615: [ExtendLifetimes][1/4] Add "disable-post-ra" function attribute to disable the post-regalloc scheduler

2023-09-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D157615#4647235 , @StephenTozer wrote: > In D157615#4646848 , @dblaikie > wrote: > >> Might be worth rewording the commit, or splitting it - I'd say the >> introduction of `optdebu

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread Piotr Fusik via cfe-commits
https://github.com/pfusik updated https://github.com/llvm/llvm-project/pull/66643 >From 81281e52ac76d0c10ddadaf7d75a544eccce39a5 Mon Sep 17 00:00:00 2001 From: Piotr Fusik Date: Mon, 18 Sep 2023 19:54:16 +0200 Subject: [PATCH] [clang] Fix null dereference on return in lambda attribute statemen

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread Piotr Fusik via cfe-commits
https://github.com/pfusik updated https://github.com/llvm/llvm-project/pull/66643 >From b84e2a821a3121fa3597e710da341de66746bb46 Mon Sep 17 00:00:00 2001 From: Piotr Fusik Date: Mon, 18 Sep 2023 19:56:10 +0200 Subject: [PATCH] [clang] Fix null dereference on return in lambda attribute statemen

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/66643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-18 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 01/16] [libc++] Prevent calling the projection more than three

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-18 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 01/16] [libc++] Prevent calling the projection more than three

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-18 Thread Argyrios Kyrtzidis via cfe-commits
https://github.com/akyrtzi updated https://github.com/llvm/llvm-project/pull/66122 >From 5794986079f3eb0f52dd6089d50d994b4559ed06 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 12 Sep 2023 11:26:46 -0700 Subject: [PATCH] [DependencyScanningFilesystem] Make sure the local/shared c

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-18 Thread Argyrios Kyrtzidis via cfe-commits
@@ -330,3 +353,20 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine &Path) { return Result.getError(); return DepScanFile::create(Result.get()); } + +std::error_code DependencyScanningWorkerFilesystem::setCurrentWorkingDirectory( +const Twine &Path)

[clang] Introduce paged vector (PR #66430)

2023-09-18 Thread David Blaikie via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread David Blaikie via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread David Blaikie via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread David Blaikie via cfe-commits
@@ -7944,9 +7944,13 @@ void ASTReader::PrintStats() { std::fprintf(stderr, "*** AST File Statistics:\n"); unsigned NumTypesLoaded = - TypesLoaded.size() - llvm::count(TypesLoaded, QualType()); + TypesLoaded.size() - std::count(TypesLoaded.materialisedBegin(), ---

[clang] Introduce paged vector (PR #66430)

2023-09-18 Thread David Blaikie via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] Introduce paged vector (PR #66430)

2023-09-18 Thread David Blaikie via cfe-commits
@@ -0,0 +1,301 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- 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] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-18 Thread David Blaikie via cfe-commits
@@ -2325,6 +2325,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute(llvm::Attribute::Naked); // OptimizeNone wins over OptimizeForSize and MinSize. +F->removeFnAttr(llvm::Attribute::OptimizeForDebugging); --

[clang] [RISCV] Added definition of Ventana veyron-v1 processor. (PR #65535)

2023-09-18 Thread via cfe-commits
https://github.com/mgudim updated https://github.com/llvm/llvm-project/pull/65535 >From d1ba27988840703b9a7a12ad48ecfb282752e7e2 Mon Sep 17 00:00:00 2001 From: Mikhail Gudim Date: Wed, 6 Sep 2023 17:15:56 -0400 Subject: [PATCH 1/2] [RISCV] Added definition of Ventana veyron-v1 processor. ---

[clang] [RISCV] Added definition of Ventana veyron-v1 processor. (PR #65535)

2023-09-18 Thread via cfe-commits
https://github.com/mgudim updated https://github.com/llvm/llvm-project/pull/65535 >From d1ba27988840703b9a7a12ad48ecfb282752e7e2 Mon Sep 17 00:00:00 2001 From: Mikhail Gudim Date: Wed, 6 Sep 2023 17:15:56 -0400 Subject: [PATCH 1/2] [RISCV] Added definition of Ventana veyron-v1 processor. ---

[clang-tools-extra] [RISCV] Added definition of Ventana veyron-v1 processor. (PR #65535)

2023-09-18 Thread via cfe-commits
https://github.com/mgudim updated https://github.com/llvm/llvm-project/pull/65535 >From d1ba27988840703b9a7a12ad48ecfb282752e7e2 Mon Sep 17 00:00:00 2001 From: Mikhail Gudim Date: Wed, 6 Sep 2023 17:15:56 -0400 Subject: [PATCH 1/2] [RISCV] Added definition of Ventana veyron-v1 processor. ---

[clang] In ExprRequirement building, treat OverloadExpr as dependent (PR #66683)

2023-09-18 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/66683 As reported in #66612, we aren't correctly treating the placeholder expression type correctly, so we ended up trying to get a reference version of it, and this resulted in an assertion, since the placeholder

[clang] In ExprRequirement building, treat OverloadExpr as dependent (PR #66683)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes As reported in #66612, we aren't correctly treating the placeholder expression type correctly, so we ended up trying to get a reference version of it, and this resulted in an assertion, since the placeholder type cannot have a reference a

[clang] In ExprRequirement building, treat OverloadExpr as dependent (PR #66683)

2023-09-18 Thread Erich Keane via cfe-commits
@@ -9063,7 +9063,8 @@ Sema::BuildExprRequirement( concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement) { auto Status = concepts::ExprRequirement::SS_Satisfied; ConceptSpecializationExpr *SubstitutedConstraintExpr = nullptr; - if (E->isInstantiationDe

[PATCH] D158730: [DebugMetadata][DwarfDebug] Don't retain local types with -fno-eliminate-unused-debug-types

2023-09-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. Nice and easy Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158730/new/ https://reviews.llvm.org/D158730 ___ cfe-commits mailing list cfe-commit

[clang-tools-extra] [RISCV] Added definition of Ventana veyron-v1 processor. (PR #65535)

2023-09-18 Thread Michael Maitland via cfe-commits
michaelmaitland wrote: > [Merge branch 'llvm:main' into > mgudim_veyron_def](https://github.com/llvm/llvm-project/pull/65535/commits/454b41eea50a3583ab5c29bffbd46bcd633b) The [LLVM GitHub User Guide](https://llvm.org/docs//GitHub.html) recommends to rebase on main instead of merge main. h

[clang] [RISCV] Added definition of Ventana veyron-v1 processor. (PR #65535)

2023-09-18 Thread via cfe-commits
mgudim wrote: > > [Merge branch 'llvm:main' into > > mgudim_veyron_def](https://github.com/llvm/llvm-project/pull/65535/commits/454b41eea50a3583ab5c29bffbd46bcd633b) > > The [LLVM GitHub User Guide](https://llvm.org/docs//GitHub.html) recommends > to rebase on main instead of merge main.

[clang-tools-extra] [RISCV] Added definition of Ventana veyron-v1 processor. (PR #65535)

2023-09-18 Thread Michael Maitland via cfe-commits
michaelmaitland wrote: > Is there a way to fix this now? I think you can drop the merge commit using `git rebase -i`. You may have to pass `--rebase-merges` to have the ability to drop the merge commit. Then you can pull upstream and `git rebase upstream/main`. https://github.com/llvm/llvm-pr

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-18 Thread via cfe-commits
@@ -5,11 +5,14 @@ # RUN: mkdir %t # RUN: ln -s llvm-ranlib %t/llvm-ranlib-9 # RUN: ln -s llvm-ranlib %t/ranlib.exe +# RUN: ln -s llvm-ranlib %t/x86_64-unknown-freebsd13.2-llvm-ranlib dankm wrote: Yep, your second point is why I didn't bother making the second

[clang] b1e3cd1 - [driver] Conditionally include installed libc++ headers for Android

2023-09-18 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2023-09-18T12:18:45-07:00 New Revision: b1e3cd1d79443603dc003441e07cdd8d30bb7f26 URL: https://github.com/llvm/llvm-project/commit/b1e3cd1d79443603dc003441e07cdd8d30bb7f26 DIFF: https://github.com/llvm/llvm-project/commit/b1e3cd1d79443603dc003441e07cdd8d30bb7f26.diff

  1   2   3   4   5   >