[clang] 89071f3 - [clang] Drop unaligned from calls to readNext (NFC) (#88842)

2024-04-16 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-04-16T00:09:41-07:00 New Revision: 89071f35599ac58cde99923a376d6b75c0d49e4b URL: https://github.com/llvm/llvm-project/commit/89071f35599ac58cde99923a376d6b75c0d49e4b DIFF: https://github.com/llvm/llvm-project/commit/89071f35599ac58cde99923a376d6b75c0d49e4b.diff L

[clang] [clang] Drop unaligned from calls to readNext (NFC) (PR #88842)

2024-04-16 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/88842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-16 Thread antoine moynault via cfe-commits
antmox wrote: Hello @MaskRay @bazuzi, Looks like one of the commit ([Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin) broke the clang-arm64-windows-msvc-2stage bot here: https://lab.llvm.org/buildbot/#/builders/120/builds/6489 Old compiler-rt lib seems still used "--dependent

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme edited https://github.com/llvm/llvm-project/pull/88754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
@@ -0,0 +1,75 @@ +//===-- ASTOps.h ---*- 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: Apache-2.0 WITH LLVM-

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
martinboehme wrote: Can you add this file to clang/docs/tools/clang-formatted-files.txt? https://github.com/llvm/llvm-project/pull/88754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
@@ -0,0 +1,75 @@ +//===-- ASTOps.h ---*- 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: Apache-2.0 WITH LLVM-

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
@@ -0,0 +1,75 @@ +//===-- ASTOps.h ---*- 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: Apache-2.0 WITH LLVM-

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
@@ -0,0 +1,75 @@ +//===-- ASTOps.h ---*- 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: Apache-2.0 WITH LLVM-

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
@@ -0,0 +1,214 @@ +//===-- ASTOps.h ---*- C++ -*-===// martinboehme wrote: ```suggestion //===-- ASTOps.cpp -*- C++ -*-===// ``` https://github.com/llvm/llvm-project/pull/88754 _

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
@@ -0,0 +1,214 @@ +//===-- ASTOps.h ---*- 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: Apache-2.0 WITH LLVM

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme approved this pull request. Thanks for the cleanup! https://github.com/llvm/llvm-project/pull/88754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
martinboehme wrote: Can you add this file to clang/docs/tools/clang-formatted-files.txt? https://github.com/llvm/llvm-project/pull/88754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
@@ -648,36 +563,13 @@ void Environment::initialize() { void Environment::initFieldsGlobalsAndFuncs(const FunctionDecl *FuncDecl) { assert(FuncDecl->doesThisDeclarationHaveABody()); - FieldSet Fields; - llvm::DenseSet Vars; - llvm::DenseSet Funcs; - - // Look for global v

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
@@ -66,6 +66,35 @@ inline bool recordsEqual(const RecordStorageLocation &Loc1, return recordsEqual(Loc1, Env, Loc2, Env); } +/// Helper class for initialization of a record with an `InitListExpr`. +/// `InitListExpr::inits()` contains the initializers for both the base class

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
@@ -0,0 +1,214 @@ +//===-- ASTOps.h ---*- 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: Apache-2.0 WITH LLVM

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
@@ -0,0 +1,75 @@ +//===-- ASTOps.h ---*- 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: Apache-2.0 WITH LLVM-

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread via cfe-commits
@@ -0,0 +1,75 @@ +//===-- ASTOps.h ---*- 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: Apache-2.0 WITH LLVM-

[clang] [X86][test] Added extra cet tests (PR #88736)

2024-04-16 Thread Isha Agarwal via cfe-commits
@@ -2,12 +2,20 @@ // RUN: %clang_cc1 -E -triple i386 -dM -o - -fcf-protection=branch %s | FileCheck %s --check-prefix=BRANCH // RUN: %clang_cc1 -E -triple i386 -dM -o - -fcf-protection=full %s | FileCheck %s --check-prefix=FULL // RUN: not %clang_cc1 -emit-llvm-only -triple

[clang] [X86][test] Added extra cet tests (PR #88736)

2024-04-16 Thread Isha Agarwal via cfe-commits
https://github.com/iagarwa updated https://github.com/llvm/llvm-project/pull/88736 >From 821c61fb4905b491176e00ea9ed322aad04c98e3 Mon Sep 17 00:00:00 2001 From: Isha Agarwal Date: Mon, 15 Apr 2024 06:22:34 -0700 Subject: [PATCH 1/2] [X86][test] Added extra cet tests Updated cet test to: -Check

[clang] d26dd58 - [StmtProfile] Don't profile the body of lambda expressions

2024-04-16 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-16T15:41:26+08:00 New Revision: d26dd58ca5b59032eb371b8f51d9134acdd8d3ad URL: https://github.com/llvm/llvm-project/commit/d26dd58ca5b59032eb371b8f51d9134acdd8d3ad DIFF: https://github.com/llvm/llvm-project/commit/d26dd58ca5b59032eb371b8f51d9134acdd8d3ad.diff LO

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-16 Thread via cfe-commits
@@ -4429,6 +4434,284 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +class Decl; +class CXXMethodDecl; +class FunctionTypeEffectsRef; +class Functio

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-04-16 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/83124 >From 517134e20bafba3509531cdd884d617df4d8d86f Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Tue, 27 Feb 2024 03:13:51 -0800 Subject: [PATCH] [Clang][Sema] placement new initializes typedef array with corre

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-16 Thread via cfe-commits
Sirraide wrote: > I think the code to do this could live in the effect set if it were under > Sema (as I just described) Seeing as the effect set is part of the type, at least the parts that are stored in the `FunctionProtoType` can’t be in Sema and have to stay in the AST library. https://g

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-16 Thread via cfe-commits
@@ -4429,6 +4434,284 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +class Decl; +class CXXMethodDecl; +class FunctionTypeEffectsRef; +class Functio

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-16 Thread via cfe-commits
@@ -4429,6 +4434,284 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +class Decl; +class CXXMethodDecl; +class FunctionTypeEffectsRef; +class Functio

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-16 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -5361,7 +5383,56 @@ static bool IsReconstitutableType(QualType QT) { return T.Reconstitutable; } -std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { +bool CGDebugInfo::HasReconstitutableArgs( +ArrayRef Args) const { + return llvm::all_of(Args, [&

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-16 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -4584,6 +4584,32 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T, } } + // Emit DW_TAG_template_alias for template aliases? True by default for SCE. + const auto *DebugTemplateAlias = Args.getLastArg( + options::OPT_gtemplate_

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-16 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -465,3 +465,15 @@ // MANGLED_TEMP_NAMES: error: unknown argument '-gsimple-template-names=mangled'; did you mean '-Xclang -gsimple-template-names=mangled' // RUN: %clang -### -target x86_64 -c -g %s 2>&1 | FileCheck --check-prefix=FULL_TEMP_NAMES --implicit-check-not=debu

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-16 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang -ggdb -std=c++11 -S -emit-llvm %s -o - | FileCheck %s OCHyams wrote: Agreed, done https://github.com/llvm/llvm-project/pull/87623 _

[clang] Fix UPCAddressofArraySubscriptGadget::getClaimedVarUseSites() (PR #88406)

2024-04-16 Thread via cfe-commits
juanvazquez wrote: Ping A gentle ping in case there is something missing on my side to get this merged. It's my first time contributing to LLVM. Thanks! https://github.com/llvm/llvm-project/pull/88406 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] Fix missing dtor in function calls accepting trivial ABI structs (PR #88751)

2024-04-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/88751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Propagate context into stdlib indexing thread (PR #87611)

2024-04-16 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/87611 From cd8993935f5c5ff8a46d2741ef8c76348ab8e868 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 4 Apr 2024 10:57:44 +0200 Subject: [PATCH] [clangd] Propagate context into stdlib indexing thread Some FS

[clang-tools-extra] [clangd] Propagate context into stdlib indexing thread (PR #87611)

2024-04-16 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/87611 From a5cc9640c05ad06bff6ec28c958669df4b7e8214 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 4 Apr 2024 10:57:44 +0200 Subject: [PATCH] [clangd] Propagate context into stdlib indexing thread Some FS

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-16 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/88602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-16 Thread via cfe-commits
@@ -370,4 +370,7 @@ def warn_missing_symbol_graph_dir : Warning< "Missing symbol graph output directory, defaulting to working directory">, InGroup; +def err_ast_action_on_unparsable_source : Error< + "can not apply ast actions to LLVM IR file '%0'">, Si

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-16 Thread via cfe-commits
https://github.com/Sirraide commented: Not too familiar w/ the driver, but this looks fine to me except for two minor things. https://github.com/llvm/llvm-project/pull/88602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-16 Thread via cfe-commits
@@ -370,4 +370,7 @@ def warn_missing_symbol_graph_dir : Warning< "Missing symbol graph output directory, defaulting to working directory">, InGroup; +def err_ast_action_on_unparsable_source : Error< Sirraide wrote: nit: Maybe a different name for this wou

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-16 Thread via cfe-commits
Sirraide wrote: > I'm not sure if this diagnostic information makes sense, do you have any > suggestions? If passing a specific command-line to Clang causes it to assert, then I’d say issuing a diagnostic instead is better, yeah (if this assert was only reachable by using Clang as a library t

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-16 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/88602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-16 Thread Timm Baeder via cfe-commits
@@ -370,4 +370,7 @@ def warn_missing_symbol_graph_dir : Warning< "Missing symbol graph output directory, defaulting to working directory">, InGroup; +def err_ast_action_on_unparsable_source : Error< + "can not apply ast actions to LLVM IR file '%0'">, tb

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-16 Thread YunQiang Su via cfe-commits
wzssyqa wrote: See: https://github.com/llvm/llvm-project/pull/87866 Can you have a try to add an extra option ``` -resource-dir=%S/Inputs/resource_dir ``` https://github.com/llvm/llvm-project/pull/87866 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Tobias Hieta via cfe-commits
https://github.com/tru created https://github.com/llvm/llvm-project/pull/88857 Previously the trivial_abi was ignored for records when targetting the microsoft abi, the MSVC rules where always enforced to ensure compatibility with MSVC. This commit changes it to be closer to the itanium abi whe

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Tobias Hieta (tru) Changes Previously the trivial_abi was ignored for records when targetting the microsoft abi, the MSVC rules where always enforced to ensure compatibility with MSVC. This commit changes it to be closer to the it

[clang] d6d84b5 - [analyzer] Handle builtin functions in MallocChecker (#88416)

2024-04-16 Thread via cfe-commits
Author: NagyDonat Date: 2024-04-16T10:41:26+02:00 New Revision: d6d84b5d1448e4f2e24b467a0abcf42fe9d543e9 URL: https://github.com/llvm/llvm-project/commit/d6d84b5d1448e4f2e24b467a0abcf42fe9d543e9 DIFF: https://github.com/llvm/llvm-project/commit/d6d84b5d1448e4f2e24b467a0abcf42fe9d543e9.diff LOG

[clang] [analyzer] Handle builtin functions in MallocChecker (PR #88416)

2024-04-16 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy ,NagyDonat Message-ID: In-Reply-To: https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/88416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [llvm] [ValueTracking] Convert `isKnownNonZero` to use SimplifyQuery (PR #85863)

2024-04-16 Thread Harald van Dijk via cfe-commits
@@ -645,7 +645,7 @@ LazyValueInfoImpl::solveBlockValueImpl(Value *Val, BasicBlock *BB) { // instruction is placed, even if it could legally be hoisted much higher. // That is unfortunate. PointerType *PT = dyn_cast(BBI->getType()); - if (PT && isKnownNonZero(BBI, DL)) +

[clang] 5a46123 - Fix missing dtor in function calls accepting trivial ABI structs (#88751)

2024-04-16 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2024-04-16T11:01:03+02:00 New Revision: 5a46123ddf62900d3dc73330f699c73038645198 URL: https://github.com/llvm/llvm-project/commit/5a46123ddf62900d3dc73330f699c73038645198 DIFF: https://github.com/llvm/llvm-project/commit/5a46123ddf62900d3dc73330f699c73038645198.diff

[clang] Fix missing dtor in function calls accepting trivial ABI structs (PR #88751)

2024-04-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/88751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-04-16 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/83124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-04-16 Thread via cfe-commits
@@ -285,6 +285,8 @@ Bug Fixes to C++ Support templates when determining the primary template of an explicit specialization. - Fixed a crash in Microsoft compatibility mode where unqualified dependent base class lookup searches the bases of an incomplete class. +- placemen

[clang] 9141e1c - [clang][Interp] Gracefully handle bitcasts to non-primitive types

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T11:08:30+02:00 New Revision: 9141e1c24f87e5735bc4178a018eba4bdf2750aa URL: https://github.com/llvm/llvm-project/commit/9141e1c24f87e5735bc4178a018eba4bdf2750aa DIFF: https://github.com/llvm/llvm-project/commit/9141e1c24f87e5735bc4178a018eba4bdf2750aa.diff LO

[clang] 485d556 - [clang][Interp][NFC] Add Block::dump()

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T11:15:11+02:00 New Revision: 485d556d8c23b54da952e75c3cadc9db3050fd9e URL: https://github.com/llvm/llvm-project/commit/485d556d8c23b54da952e75c3cadc9db3050fd9e DIFF: https://github.com/llvm/llvm-project/commit/485d556d8c23b54da952e75c3cadc9db3050fd9e.diff LO

[clang] 58b49ce - [clang][Interp] Support __builtin_vectorelements

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T11:21:41+02:00 New Revision: 58b49cef1d772a922a433fd4a42e41db3f18d34b URL: https://github.com/llvm/llvm-project/commit/58b49cef1d772a922a433fd4a42e41db3f18d34b DIFF: https://github.com/llvm/llvm-project/commit/58b49cef1d772a922a433fd4a42e41db3f18d34b.diff LO

[clang] ca4cf97 - [clang][Interp][NFC] Fix Pointer::isZero() for block pointers

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T11:45:03+02:00 New Revision: ca4cf973279a3991248056a73bcb2bac8b37d035 URL: https://github.com/llvm/llvm-project/commit/ca4cf973279a3991248056a73bcb2bac8b37d035 DIFF: https://github.com/llvm/llvm-project/commit/ca4cf973279a3991248056a73bcb2bac8b37d035.diff LO

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/88865 See also discussion in #88726. >From 3da6980d1957c19bdb821c6059c032b1e1c55863 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 16 Apr 2024 09:52:35 + Subject: [PATCH] [clang][dataflow] Refactor

[clang] [clang][dataflow] Fix result object location for builtin `<=>`. (PR #88726)

2024-04-16 Thread via cfe-commits
@@ -508,6 +508,11 @@ class ResultObjectVisitor : public RecursiveASTVisitor { isa(E)) { return; } +if (auto *Op = dyn_cast(E); martinboehme wrote: See https://github.com/llvm/llvm-project/pull/88865 for the PR that refactors this into a

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

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

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
martinboehme wrote: Here's a draft that shows what `PropagateResultObject()` looks like when refactored using a switch statement. I'm not sure if this is an improvement or not. I do see how this makes the case distinction clearer -- OTOH, we have one more level of indentation now (though that

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Reid Kleckner via cfe-commits
@@ -63,6 +63,10 @@ ABI Changes in This Version MSVC uses a different mangling for these objects, compatibility is not affected. (#GH85423). +- The attribute ``trivial_abi`` now works when targetting the Microsoft ABI. Marking rnk wrote: It's overly broa

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s + +// CHECK: %[[STRUCT_TRIVIAL:.*]] = type { ptr } +struct __attribute__((trivial_abi)) Trivial { + int *p; + Trivial() : p(0) {} + Tr

[clang] 31424be - [clang][Interp][NFC] Compare std::optionals directly

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T12:09:49+02:00 New Revision: 31424be3aef4290dd84065b9371fcd0c5014e097 URL: https://github.com/llvm/llvm-project/commit/31424be3aef4290dd84065b9371fcd0c5014e097 DIFF: https://github.com/llvm/llvm-project/commit/31424be3aef4290dd84065b9371fcd0c5014e097.diff LO

[clang] a831c54 - [clang][Interp] Avoid calling invalid functions

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T12:09:49+02:00 New Revision: a831c54357c2bb7b8b457ccea22836c23e8b8625 URL: https://github.com/llvm/llvm-project/commit/a831c54357c2bb7b8b457ccea22836c23e8b8625 DIFF: https://github.com/llvm/llvm-project/commit/a831c54357c2bb7b8b457ccea22836c23e8b8625.diff LO

[clang] b0194d2 - [SEH] Ignore async exception flag when the environment is not MSVC (#88101)

2024-04-16 Thread via cfe-commits
Author: Phoebe Wang Date: 2024-04-16T18:19:50+08:00 New Revision: b0194d2894db49d7cf4d36aed87952c3e0c6a390 URL: https://github.com/llvm/llvm-project/commit/b0194d2894db49d7cf4d36aed87952c3e0c6a390 DIFF: https://github.com/llvm/llvm-project/commit/b0194d2894db49d7cf4d36aed87952c3e0c6a390.diff L

[clang] [SEH] Ignore async exception flag when the environment is not MSVC (PR #88101)

2024-04-16 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/88101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c09384e - [clang][Interp] Support MemberExprs pointing to VarDecls

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T12:34:35+02:00 New Revision: c09384e2b419c7b4e4167e0d0295d9018cc6169c URL: https://github.com/llvm/llvm-project/commit/c09384e2b419c7b4e4167e0d0295d9018cc6169c DIFF: https://github.com/llvm/llvm-project/commit/c09384e2b419c7b4e4167e0d0295d9018cc6169c.diff LO

[clang] 1120d8e - [clang][CodeGen] Add AS for Globals to SPIR & SPIRV datalayouts (#88455)

2024-04-16 Thread via cfe-commits
Author: Alex Voicu Date: 2024-04-16T11:37:29+01:00 New Revision: 1120d8e6f799121b611aa23bdc128e40cf9c6c58 URL: https://github.com/llvm/llvm-project/commit/1120d8e6f799121b611aa23bdc128e40cf9c6c58 DIFF: https://github.com/llvm/llvm-project/commit/1120d8e6f799121b611aa23bdc128e40cf9c6c58.diff LO

[clang] [llvm] [clang][CodeGen] Add AS for Globals to SPIR & SPIRV datalayouts (PR #88455)

2024-04-16 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/88455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CodeGen] Add AS for Globals to SPIR & SPIRV datalayouts (PR #88455)

2024-04-16 Thread Alex Voicu via cfe-commits
AlexVlx wrote: Merged, thanks everyone for the reviews! https://github.com/llvm/llvm-project/pull/88455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/88182 >From 426e74cabb003eb5dc83adf347a5800d49bc87b7 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 18 Mar 2024 11:49:12 + Subject: [PATCH 1/7] Start migrating away from the embedded assumption that the defa

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/88865 >From 440ace1337ed7a06286a4455e3e6e428d14d847d Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 16 Apr 2024 09:52:35 + Subject: [PATCH] [clang][dataflow] Refactor `PropagateResultObject()` with a

[clang] 32b74ca - [clang][Interp] Load value from MemberExpr if required

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T13:04:28+02:00 New Revision: 32b74ca6e41768c91eee8b8ca26235b110a65deb URL: https://github.com/llvm/llvm-project/commit/32b74ca6e41768c91eee8b8ca26235b110a65deb DIFF: https://github.com/llvm/llvm-project/commit/32b74ca6e41768c91eee8b8ca26235b110a65deb.diff LO

[clang] [clang][dataflow] Support `StmtExpr` in `PropagateResultObject()`. (PR #88872)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/88872 This patch adds a test that assert-fails without the fix. >From b2df2208aaee019279afe362ff538e97d59497dd Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 16 Apr 2024 11:03:47 + Subject: [PATCH]

[clang] [clang][dataflow] Support `StmtExpr` in `PropagateResultObject()`. (PR #88872)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes This patch adds a test that assert-fails without the fix. --- Full diff: https://github.com/llvm/llvm-project/pull/88872.diff 2 Files Affected: - (modified) clang/lib/Analysis/FlowSensitive/Dataflow

[clang] [clang][dataflow] Support `StmtExpr` in `PropagateResultObject()`. (PR #88872)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes This patch adds a test that assert-fails without the fix. --- Full diff: https://github.com/llvm/llvm-project/pull/88872.diff 2 Files Affected: - (modified) clang/lib/Analysis/FlowSensitive/DataflowEnvironme

[clang] [llvm] [ValueTracking] Restore isKnownNonZero parameter order. (PR #88873)

2024-04-16 Thread Harald van Dijk via cfe-commits
https://github.com/hvdijk created https://github.com/llvm/llvm-project/pull/88873 Prior to #85863, the required parameters of llvm::isKnownNonZero were Value and DataLayout. After, they are Value, Depth, and SimplifyQuery, where SimplifyQuery is implicitly constructible from DataLayout. The ch

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Tobias Hieta via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s + +// CHECK: %[[STRUCT_TRIVIAL:.*]] = type { ptr } +struct __attribute__((trivial_abi)) Trivial { + int *p; + Trivial() : p(0) {} + Tr

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-04-16 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/83124 >From a6fc7dbd5d71c1484d78e518648fb3f0f8e593d2 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Tue, 27 Feb 2024 03:13:51 -0800 Subject: [PATCH] [Clang][Sema] placement new initializes typedef array with corre

[clang] [llvm] [ValueTracking] Restore isKnownNonZero parameter order. (PR #88873)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Harald van Dijk (hvdijk) Changes Prior to #85863, the required parameters of llvm::isKnownNonZero were Value and DataLayout. After, they are Value, Depth, and SimplifyQuery, where SimplifyQuery is implicitly constructible from DataLayout.

[clang] [llvm] [ValueTracking] Convert `isKnownNonZero` to use SimplifyQuery (PR #85863)

2024-04-16 Thread Harald van Dijk via cfe-commits
@@ -645,7 +645,7 @@ LazyValueInfoImpl::solveBlockValueImpl(Value *Val, BasicBlock *BB) { // instruction is placed, even if it could legally be hoisted much higher. // That is unfortunate. PointerType *PT = dyn_cast(BBI->getType()); - if (PT && isKnownNonZero(BBI, DL)) +

[clang] [llvm] [ValueTracking] Restore isKnownNonZero parameter order. (PR #88873)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Harald van Dijk (hvdijk) Changes Prior to #85863, the required parameters of llvm::isKnownNonZero were Value and DataLayout. After, they are Value, Depth, and SimplifyQuery, where SimplifyQuery is implicitly constructible from Dat

[clang] [clang][dataflow] Treat `BuiltinBitCastExpr` correctly in `PropagateResultObject()`. (PR #88875)

2024-04-16 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/88875 This patch includes a test that assert-fails without the fix. >From c8797bbbdb32d9f153b36b6902f8562af75fb896 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 16 Apr 2024 11:13:00 + Subject: [PA

[clang] [clang][dataflow] Treat `BuiltinBitCastExpr` correctly in `PropagateResultObject()`. (PR #88875)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes This patch includes a test that assert-fails without the fix. --- Full diff: https://github.com/llvm/llvm-project/pull/88875.diff 2 Files Affected: - (modified) clang/lib/Analysis/FlowSensitive/Data

[clang] [clang][dataflow] Treat `BuiltinBitCastExpr` correctly in `PropagateResultObject()`. (PR #88875)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes This patch includes a test that assert-fails without the fix. --- Full diff: https://github.com/llvm/llvm-project/pull/88875.diff 2 Files Affected: - (modified) clang/lib/Analysis/FlowSensitive/DataflowEnvir

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-04-16 Thread Tobias Hieta via cfe-commits
https://github.com/tru updated https://github.com/llvm/llvm-project/pull/88857 >From 08214d87d1a7c83ea25eef3bf18de1568a20a152 Mon Sep 17 00:00:00 2001 From: Tobias Hieta Date: Tue, 16 Apr 2024 09:38:53 +0200 Subject: [PATCH] [clang] Handle trivial_abi attribute for Microsoft ABI. Previously the

[libclc] [WIP] Libclc tests (PR #87989)

2024-04-16 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/87989 >From c53dc3564822f305d09d19dc3b7327b33028fe11 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Thu, 4 Apr 2024 17:49:13 +0100 Subject: [PATCH] [libclc] Add initial LIT tests --- libclc/CMakeLists.txt

[clang] 09e7d75 - [clang][Interp] Don't add 'in call to' diagnostics for builtin frames

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T13:29:41+02:00 New Revision: 09e7d7585cf881fb598eb56738579b84d027318c URL: https://github.com/llvm/llvm-project/commit/09e7d7585cf881fb598eb56738579b84d027318c DIFF: https://github.com/llvm/llvm-project/commit/09e7d7585cf881fb598eb56738579b84d027318c.diff LO

[clang] a8de3ee - [clang][Interp][NFC] Fix some build warnings

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T13:29:41+02:00 New Revision: a8de3ee8994023ea7669397587f8118ae5bba9c9 URL: https://github.com/llvm/llvm-project/commit/a8de3ee8994023ea7669397587f8118ae5bba9c9 DIFF: https://github.com/llvm/llvm-project/commit/a8de3ee8994023ea7669397587f8118ae5bba9c9.diff LO

[clang] [analyzer] Use explicit call description mode (easy cases) (PR #88879)

2024-04-16 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/88879 This commit explicitly specifies the matching mode (C library function, any non-method function, or C++ method) for the `CallDescription`s constructed in various checkers where this transition was easy and str

[clang] [analyzer] Use explicit call description mode (easy cases) (PR #88879)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (NagyDonat) Changes This commit explicitly specifies the matching mode (C library function, any non-method function, or C++ method) for the `CallDescription`s constructed in various checkers where this transition wa

[clang] 71b9f66 - [clang][Index] Use canonical function parameter types in USRs (#68222)

2024-04-16 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-04-16T07:34:27-04:00 New Revision: 71b9f6648222771470473431bc8ef2a2c25e872c URL: https://github.com/llvm/llvm-project/commit/71b9f6648222771470473431bc8ef2a2c25e872c DIFF: https://github.com/llvm/llvm-project/commit/71b9f6648222771470473431bc8ef2a2c25e872c

[clang] [clang][Index] Use canonical function parameter types in USRs (PR #68222)

2024-04-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/68222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement `self` clause for compute constructs (PR #88760)

2024-04-16 Thread Alexey Bataev via cfe-commits
@@ -835,18 +835,23 @@ Parser::OpenACCClauseParseResult Parser::ParseOpenACCClauseParams( case OpenACCClauseKind::Default: { Token DefKindTok = getCurToken(); - if (expectIdentifierOrKeyword(*this)) -break; + if (expectIdentifierOrKeyword(*this)) {

[clang] [OpenACC] Implement `self` clause for compute constructs (PR #88760)

2024-04-16 Thread Alexey Bataev via cfe-commits
@@ -160,12 +169,58 @@ SemaOpenACC::ActOnClause(ArrayRef ExistingClauses, // The parser has ensured that we have a proper condition expr, so there // isn't really much to do here. -// TODO OpenACC: When we implement 'self', this clauses causes us to -// 'ignore

[clang] [OpenACC] Implement `self` clause for compute constructs (PR #88760)

2024-04-16 Thread Alexey Bataev via cfe-commits
@@ -160,12 +169,58 @@ SemaOpenACC::ActOnClause(ArrayRef ExistingClauses, // The parser has ensured that we have a proper condition expr, so there // isn't really much to do here. -// TODO OpenACC: When we implement 'self', this clauses causes us to -// 'ignore

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

2024-04-16 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a created https://github.com/llvm/llvm-project/pull/1 `ArrayInitLoopExpr` AST node has two occurences of its as-written initializing expression in its subexpressions through a non-unique `OpaqueValueExpr`. It causes double-visiting of the initializing expressio

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

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andrey Ali Khan Bolshakov (bolshakov-a) Changes `ArrayInitLoopExpr` AST node has two occurences of its as-written initializing expression in its subexpressions through a non-unique `OpaqueValueExpr`. It causes double-visiting of the initi

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

2024-04-16 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a edited https://github.com/llvm/llvm-project/pull/1 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/86512 >From 10d4b9e505d5ad7476071153d2d13799f5b5cf1f Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 25 Mar 2024 15:10:51 +0100 Subject: [PATCH 1/2] [clang] Implement a bitwise_copyable builtin type trait. This pa

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-04-16 Thread Haojian Wu via cfe-commits
@@ -2667,6 +2667,29 @@ bool QualType::isTriviallyCopyableType(const ASTContext &Context) const { /*IsCopyConstructible=*/false); } +bool QualType::isBitwiseCopyableType(const ASTContext & Context) const { + QualType CanonicalType = getCan

  1   2   3   4   5   >