[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-09 Thread Stanislav Gatev via cfe-commits
https://github.com/sgatev created https://github.com/llvm/llvm-project/pull/68558 This adds support for copy, ref, and this lambda captures to the core framework and also adds relevant test in UncheckedOptionalAccessTest. >From 85dc5eea1810d5d7af207e211799aa92a0f9f154 Mon Sep 17 00:00:00 2001

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes This adds support for copy, ref, and this lambda captures to the core framework and also adds relevant test in UncheckedOptionalAccessTest. --- Patch is 20.50 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-09 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 c98bf1e45e22e2a7d107b187f5d3e7abf5e81375 85dc5eea1810d5d7af207e211799aa92a0f9f154 --

[clang] [PowerPC] Fix use of FPSCR builtins in smmintrin.h (PR #67299)

2023-10-09 Thread Qiu Chaofan via cfe-commits
@@ -68,10 +68,10 @@ extern __inline __m128d __asm__("mffsce %0" : "=f"(__fpscr_save.__fr)); __enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8; #else -__fpscr_save.__fr = __builtin_mffs(); +__fpscr_save.__fr = __builtin_ppc_mffs(); ecnelises w

[PATCH] D154581: [clang][Interp] Track existing InitMaps in InterpState

2023-10-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154581/new/ https://reviews.llvm.org/D154581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D157252: [clang][ExprConst] Handle 0 type size in builtin_memcpy etc.

2023-10-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157252/new/ https://reviews.llvm.org/D157252 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-09 Thread Stanislav Gatev via cfe-commits
https://github.com/sgatev updated https://github.com/llvm/llvm-project/pull/68558 >From 77d474bd7f7885cc454aeb0fdb5b25788d261e41 Mon Sep 17 00:00:00 2001 From: Stanislav Gatev Date: Fri, 6 Oct 2023 04:32:06 + Subject: [PATCH] [clang][dataflow] Add support for lambda captures This adds supp

[PATCH] D153131: [clang analysis][thread-safety] Handle return-by-reference...

2023-10-09 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. In D153131#4653362 , @aaronpuchert wrote: > In D153131#4653345 , @aeubanks > wrote: > >> This is finding lots of real issues in code, which is awesome, but could I >> request that this

[clang] d7b18d5 - Use llvm::endianness{,::little,::native} (NFC)

2023-10-09 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-10-09T00:54:47-07:00 New Revision: d7b18d5083648c26b94adc2651edb87848138728 URL: https://github.com/llvm/llvm-project/commit/d7b18d5083648c26b94adc2651edb87848138728 DIFF: https://github.com/llvm/llvm-project/commit/d7b18d5083648c26b94adc2651edb87848138728.diff L

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/67663 From 9aea93ddeb70245a07984188aa98577d54e8e560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 8 Sep 2023 14:20:00 +0200 Subject: [PATCH 1/9] [analyzer][clangsa] Add new option to

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-09 Thread via cfe-commits
https://github.com/DaMatrix updated https://github.com/llvm/llvm-project/pull/66894 >From f05f52ed4e74cf857bf07aef5dbd5d0861591a14 Mon Sep 17 00:00:00 2001 From: DaPorkchop_ Date: Sun, 13 Aug 2023 22:39:12 +0200 Subject: [PATCH] [clang] Implement constexpr bit_cast for vectors --- .../include

[clang] 42c564d - [clang-format][NFC] Make InsertNewlineAtEOF a little more efficient

2023-10-09 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-10-09T01:09:45-07:00 New Revision: 42c564df2f479efb38e6f02340e370815b439eb1 URL: https://github.com/llvm/llvm-project/commit/42c564df2f479efb38e6f02340e370815b439eb1 DIFF: https://github.com/llvm/llvm-project/commit/42c564df2f479efb38e6f02340e370815b439eb1.diff LOG:

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 updated https://github.com/llvm/llvm-project/pull/67663 From 9aea93ddeb70245a07984188aa98577d54e8e560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20F=C3=BCl=C3=B6p?= Date: Fri, 8 Sep 2023 14:20:00 +0200 Subject: [PATCH 01/10] [analyzer][clangsa] Add new option to

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread Endre Fülöp via cfe-commits
@@ -94,23 +119,40 @@ REGISTER_MAP_WITH_PROGRAMSTATE(PreviousCallResultMap, const FunctionDecl *, void InvalidPtrChecker::EnvpInvalidatingCall(const CallEvent &Call, CheckerContext &C) const { StringRef FunctionName = Call.getCalle

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread Endre Fülöp via cfe-commits
@@ -1,15 +1,49 @@ +// Default options. // RUN: %clang_analyze_cc1 \ // RUN: -analyzer-checker=core,alpha.security.cert.env.InvalidPtr \ // RUN: -verify -Wno-unused %s +// +// Test the laxer handling of getenv function (this is the defau

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread Endre Fülöp via cfe-commits
@@ -94,23 +119,40 @@ REGISTER_MAP_WITH_PROGRAMSTATE(PreviousCallResultMap, const FunctionDecl *, void InvalidPtrChecker::EnvpInvalidatingCall(const CallEvent &Call, CheckerContext &C) const { StringRef FunctionName = Call.getCalle

[clang-tools-extra] [mlir] Add DenseUI32ArrayAttr (PR #68230)

2023-10-09 Thread Maya Amrami via cfe-commits
https://github.com/amrami updated https://github.com/llvm/llvm-project/pull/68230 >From 0b4f0d2c6c0aac64343e78f95b1bf6b30f63b3ae Mon Sep 17 00:00:00 2001 From: Maya Amrami Date: Thu, 21 Sep 2023 18:11:50 +0300 Subject: [PATCH] [mlir] Add DenseUI32ArrayAttr --- mlir/include/mlir/IR/Builders.h

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-09 Thread Sam Tebbs via cfe-commits
https://github.com/SamTebbs33 created https://github.com/llvm/llvm-project/pull/68565 The svldr_vnum_za and svstr_vnum_za builtins/intrinsics currently require that the vnum argument be an immediate, since the instructions take an immediate vector number. However, we emit 0 as the immediate fo

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes The svldr_vnum_za and svstr_vnum_za builtins/intrinsics currently require that the vnum argument be an immediate, since the instructions take an immediate vector number. However, we emit 0 as the immediate for the instruction no matter wh

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-09 Thread Sam Tebbs via cfe-commits
https://github.com/SamTebbs33 updated https://github.com/llvm/llvm-project/pull/68565 >From f57f952989ee64d419dc51e9ecf9786720ece3ff Mon Sep 17 00:00:00 2001 From: Samuel Tebbs Date: Fri, 6 Oct 2023 17:09:36 +0100 Subject: [PATCH 1/2] [AArch64][SME] Remove immediate argument restriction for sv

[clang] [clang][Sema] Emit more specific diagnostic for auto in lambda before C++14 (#46059) (PR #68540)

2023-10-09 Thread via cfe-commits
cor3ntin wrote: Thanks for this patch! Our policy is to not mix functional changes and formatting changes. Could you change the PR to have only the changes you made, wit no formatting change? You can format your patch with `git clang-format` which only formats the lines that you changed. htt

[clang] [C++20] [Modules] Don't emit function bodies which is noinline and av… (PR #68501)

2023-10-09 Thread Iain Sandoe via cfe-commits
https://github.com/iains approved this pull request. I think it would be better to have a coherent plan to deal with the underlying issue; starting with separating the AST used for code-gen from that used for interfaces. Having said that, this LGTM (it will be interesting to see what performa

[clang] [Clang][Frontend] Fix a crash when -Wdocumentation is used (PR #68525)

2023-10-09 Thread via cfe-commits
cor3ntin wrote: Is there a way we could come up with a test for this? https://github.com/llvm/llvm-project/pull/68525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] llvm-canon (PR #68176)

2023-10-09 Thread Nikita Popov via cfe-commits
nikic wrote: Using the term for MIR is okay, because it does not have a pre-existing notion of canonical form. Doing the same for IR is not okay, because it already has a canonical form and this pass does not produce it. Calling this `ir-normalizer` instead of `ir-canonicalizer` should convey

[clang] llvm-canon (PR #68176)

2023-10-09 Thread Nikita Popov via cfe-commits
nikic wrote: Using the term for MIR is okay, because it does not have a pre-existing notion of canonical form. Doing the same for IR is not okay, because it already has a canonical form and this pass does not produce it. Calling this `ir-normalizer` instead of `ir-canonicalizer` should convey

[clang] e0809bd - Fix Wparentheses warning. NFC.

2023-10-09 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2023-10-09T10:26:00+01:00 New Revision: e0809bd062220eb2eeb8ca23d3731839e18f3eee URL: https://github.com/llvm/llvm-project/commit/e0809bd062220eb2eeb8ca23d3731839e18f3eee DIFF: https://github.com/llvm/llvm-project/commit/e0809bd062220eb2eeb8ca23d3731839e18f3eee.diff

[clang] [analyzer][NFC] Remove outdated FIXME comment (PR #68211)

2023-10-09 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 approved this pull request. I can confirm the claims about HeapSpaceRegion being used: ![image](https://github.com/llvm/llvm-project/assets/3802256/682c69f1-7129-4d0f-873f-44aee0fa5f2f) https://github.com/llvm/llvm-project/pull/68211 ___

[clang] [analyzer][NFC] Remove outdated FIXME comment (PR #68211)

2023-10-09 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/68211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -45,6 +45,10 @@ class GlobalCompilationDatabase { return std::nullopt; } + virtual std::vector getAllFilesInProjectOf(PathRef File) const { ChuanqiXu9 wrote: Done by adding ProjectModules class in ProjectModules.cpp file. https://github.com/llvm/ll

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.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: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.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: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.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: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.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: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.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: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.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: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -442,6 +448,9 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs, std::move(CI), PreamblePCH, llvm::MemoryBuffer::getMemBufferCopy(Inputs.Contents, Filename), VFS, *DiagConsumer); + + // Clangd Modules TODO: refactor the command line

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,118 @@ +//===- ModuleFilesInfo.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: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,118 @@ +//===- ModuleFilesInfo.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: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,118 @@ +//===- ModuleFilesInfo.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: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.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: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,78 @@ +//===-- ModuleDependencyScanner.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: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,118 @@ +//===- ModuleFilesInfo.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: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,118 @@ +//===- ModuleFilesInfo.h -*- C++-*-===// ChuanqiXu9 wrote: Done by renaming. I don't quite understand the sentence "the modules are the inputs for something in particular.". https://github.com/llvm/llv

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,118 @@ +//===- ModuleFilesInfo.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: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,118 @@ +//===- ModuleFilesInfo.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: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,118 @@ +//===- ModuleFilesInfo.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: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,282 @@ +//===- ModuleFilesInfo.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-tools-extra] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

2023-10-09 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. Thanks for the detailed summary. LG. https://github.com/llvm/llvm-project/pull/67723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[libunwind] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

2023-10-09 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. Thanks for the detailed summary. LG. https://github.com/llvm/llvm-project/pull/67723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)

2023-10-09 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. Thanks for the detailed summary. LG. https://github.com/llvm/llvm-project/pull/67723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [Clang][Frontend] Fix a crash when -Wdocumentation is used (PR #68525)

2023-10-09 Thread Byoungchan Lee via cfe-commits
bc-lee wrote: > Is there a way we could come up with a test for this? Unfortunately, I don't think so. I cannot reduce the 600k lines of preprocessed code to a small test case that will crash the clang frontend. https://github.com/llvm/llvm-project/pull/68525 __

[clang] [clang] [MinGW] Explicitly always pass the -fno-use-init-array (PR #68571)

2023-10-09 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/68571 On MinGW targets, the .ctors section is always used for constructors. Make sure that all layers of code generation is aware of this, wherever it matters, by passing the -fno-use-init-array option, setting the T

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,282 @@ +//===- ModuleFilesInfo.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-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,282 @@ +//===- ModuleFilesInfo.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] [MinGW] Explicitly always pass the -fno-use-init-array (PR #68571)

2023-10-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Changes On MinGW targets, the .ctors section is always used for constructors. Make sure that all layers of code generation is aware of this, wherever it matters, by passing the -fno-use-init-array option, setting the TargetOptions field Us

[clang] [clang] [MinGW] Explicitly always pass the -fno-use-init-array (PR #68571)

2023-10-09 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: This is an alternative to #68570. This has the upside that the `UseInitArray` flag is set to the correct value throughout the chain, for any other potential users of the field, in case it would affect code generation in other places. The downside is that if we only go with this

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall thanks for your high qualified comments! I think I've addressed most of them. I am not so familiar with the Github review system. Tell me if you're more happy with other practices. https://github.com/llvm/llvm-project/pull/66462 __

[clang] [clang][Interp] Fix `ArrayInitLoopExpr` handling (PR #67886)

2023-10-09 Thread via cfe-commits
isuckatcs wrote: ping @tbaederr https://github.com/llvm/llvm-project/pull/67886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Compute length of string literal initializers (#66990) (PR #68368)

2023-10-09 Thread via cfe-commits
https://github.com/DonatNagyE edited https://github.com/llvm/llvm-project/pull/68368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Compute length of string literal initializers (#66990) (PR #68368)

2023-10-09 Thread via cfe-commits
https://github.com/DonatNagyE requested changes to this pull request. As far as I see the code that you added doesn't check whether the global variable is a constant or not. Please add a check for this (examine the type of the declaration `decl`) and consider adding test cases which validate th

[clang] [analyzer] Compute length of string literal initializers (#66990) (PR #68368)

2023-10-09 Thread via cfe-commits
@@ -930,9 +930,24 @@ SVal CStringChecker::getCStringLength(CheckerContext &C, ProgramStateRef &state, const StringLiteral *strLit = cast(MR)->getStringLiteral(); return svalBuilder.makeIntVal(strLit->getLength(), sizeTy); } + case MemRegion::NonParamVarRegionKind: {

[clang] [analyzer] Compute length of string literal initializers (#66990) (PR #68368)

2023-10-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes Fix issue https://github.com/llvm/llvm-project/issues/66990 --- Full diff: https://github.com/llvm/llvm-project/pull/68368.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp (+16-1) - (modified) cla

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-09 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle created https://github.com/llvm/llvm-project/pull/68572 …… (#68394)" The new warnings are now under a separate flag `-Wthread-safety-reference-return`. The plan is: - Start with a period where people can opt into the new warnings with `-Wthread-safety-referenc

[libunwind] [OpenMPIRBuilder] Add ThreadLimit and NumTeamsUpper clauses to teams clause (PR #68364)

2023-10-09 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/68364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [OpenMPIRBuilder] Add ThreadLimit and NumTeamsUpper clauses to teams clause (PR #68364)

2023-10-09 Thread Kiran Chandramohan via cfe-commits
@@ -1917,8 +1917,13 @@ class OpenMPIRBuilder { /// /// \param Loc The location where the teams construct was encountered. /// \param BodyGenCB Callback that will generate the region code. + /// \param NumTeamsUpper Upper bound on the number of teams. + /// \param Thread

[libunwind] [OpenMPIRBuilder] Add ThreadLimit and NumTeamsUpper clauses to teams clause (PR #68364)

2023-10-09 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan commented: Is this change for OMP 5.0 and before? https://github.com/llvm/llvm-project/pull/68364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [OpenMPIRBuilder] Add ThreadLimit and NumTeamsUpper clauses to teams clause (PR #68364)

2023-10-09 Thread Kiran Chandramohan via cfe-commits
@@ -1917,8 +1917,13 @@ class OpenMPIRBuilder { /// /// \param Loc The location where the teams construct was encountered. /// \param BodyGenCB Callback that will generate the region code. + /// \param NumTeamsUpper Upper bound on the number of teams. + /// \param Thread

[clang-tools-extra] [OpenMPIRBuilder] Add ThreadLimit and NumTeamsUpper clauses to teams clause (PR #68364)

2023-10-09 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan commented: Is this change for OMP 5.0 and before? https://github.com/llvm/llvm-project/pull/68364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMPIRBuilder] Add ThreadLimit and NumTeamsUpper clauses to teams clause (PR #68364)

2023-10-09 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/68364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes …… (#68394)" The new warnings are now under a separate flag `-Wthread-safety-reference-return`. The plan is: - Start with a period where people can opt into the new warnings with `-Wthread-safety-reference-return` or `-Wthread-safety-bet

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-09 Thread Clement Courbet via cfe-commits
legrosbuffle wrote: @aeubanks FYI https://github.com/llvm/llvm-project/pull/68572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Various formatting tweaks to HTMLLogger. (PR #68392)

2023-10-09 Thread via cfe-commits
https://github.com/martinboehme edited https://github.com/llvm/llvm-project/pull/68392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Various formatting tweaks to HTMLLogger. (PR #68392)

2023-10-09 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. https://github.com/llvm/llvm-project/pull/68392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle delegating constructors (PR #67823)

2023-10-09 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle variadic functions (PR #67814)

2023-10-09 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Fix returning nullptr from functions (PR #67229)

2023-10-09 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

2023-10-09 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: https://github.com/DonatNagyE edited

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -84,33 +104,70 @@

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -84,33 +104,70 @@

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread via cfe-commits
Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: https://github.com/DonatNagyE edited

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-09 Thread via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: https://github.com/DonatNagyE edited

[clang-tools-extra] [clang-tidy] add namespace qualifier NFC (PR #68579)

2023-10-09 Thread Mikhail Goncharov via cfe-commits
https://github.com/metaflow created https://github.com/llvm/llvm-project/pull/68579 for daca97216cf132d733513f992d49e3c722aabf40 #68134 adds a namespace as we are not using llvm::StringRef yet >From c91b8034ddcd97fb255ccafe7a153056c0c2f446 Mon Sep 17 00:00:00 2001 From: Mikhail Goncharov Date

[clang-tools-extra] [clang-tidy] add namespace qualifier NFC (PR #68579)

2023-10-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Changes for daca97216cf132d733513f992d49e3c722aabf40 #68134 adds a namespace as we are not using llvm::StringRef yet --- Full diff: https://github.com/llvm/llvm-project/pull/68579.diff 1 Files Affected: - (modified) clang-tools-extra/clang

[clang] 2856e72 - [analyzer][NFC] Remove outdated FIXME comment (#68211)

2023-10-09 Thread via cfe-commits
Author: DonatNagyE Date: 2023-10-09T13:56:20+02:00 New Revision: 2856e729f3640c500499a84fb741b15775e529cf URL: https://github.com/llvm/llvm-project/commit/2856e729f3640c500499a84fb741b15775e529cf DIFF: https://github.com/llvm/llvm-project/commit/2856e729f3640c500499a84fb741b15775e529cf.diff LO

[clang] [analyzer][NFC] Remove outdated FIXME comment (PR #68211)

2023-10-09 Thread via cfe-commits
https://github.com/DonatNagyE closed https://github.com/llvm/llvm-project/pull/68211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Ben Boeckel via cfe-commits
@@ -45,6 +45,10 @@ class GlobalCompilationDatabase { return std::nullopt; } + virtual std::vector getAllFilesInProjectOf(PathRef File) const { mathstuf wrote: Probably easiest to see it by the writer code [here](https://gitlab.kitware.com/ben.boeckel/

[clang-tools-extra] 60f7aa1 - [clang-tidy] add namespace qualifier NFC (#68579)

2023-10-09 Thread via cfe-commits
Author: Mikhail Goncharov Date: 2023-10-09T13:58:13+02:00 New Revision: 60f7aa1a6ccb4214aec8838096abbdc1b37169a5 URL: https://github.com/llvm/llvm-project/commit/60f7aa1a6ccb4214aec8838096abbdc1b37169a5 DIFF: https://github.com/llvm/llvm-project/commit/60f7aa1a6ccb4214aec8838096abbdc1b37169a5.d

[clang-tools-extra] [clang-tidy] add namespace qualifier NFC (PR #68579)

2023-10-09 Thread Mikhail Goncharov via cfe-commits
https://github.com/metaflow closed https://github.com/llvm/llvm-project/pull/68579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Ben Boeckel via cfe-commits
https://github.com/mathstuf edited https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diagnose problematic uses of constructor/destructor attribute (PR #67673)

2023-10-09 Thread Aaron Ballman via cfe-commits
@@ -2352,26 +2352,126 @@ static void handleUnusedAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) UnusedAttr(S.Context, AL)); } -static void handleConstructorAttr(Sema &S, Decl *D, const ParsedAttr &AL) { - uint32_t priority = ConstructorAttr::De

[clang] Diagnose problematic uses of constructor/destructor attribute (PR #67673)

2023-10-09 Thread Aaron Ballman via cfe-commits
@@ -2352,26 +2352,126 @@ static void handleUnusedAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) UnusedAttr(S.Context, AL)); } -static void handleConstructorAttr(Sema &S, Decl *D, const ParsedAttr &AL) { - uint32_t priority = ConstructorAttr::De

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Ben Boeckel via cfe-commits
https://github.com/mathstuf edited https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-10-09 Thread Ben Boeckel via cfe-commits
https://github.com/mathstuf edited https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diagnose problematic uses of constructor/destructor attribute (PR #67673)

2023-10-09 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/67673 >From 02565df450927fac88062f526a167c9beb518c2f Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 28 Sep 2023 09:20:12 -0400 Subject: [PATCH 1/5] Diagnose problematic uses of constructor/destructor att

[clang] [Clang][Frontend] Fix a crash when -Wdocumentation is used (PR #68525)

2023-10-09 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Is there a way we could come up with a test for this? > > Unfortunately, I don't think so. I cannot reduce the 600k lines of > preprocessed code to a small test case that will crash the clang frontend. Have you tried using creduce or other such tool? (We generally don't

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Canonicalise ADD+GEP

2023-10-09 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. In D155688#4653347 , @fiigii wrote: > How does this patch work with `visitGEPOfGEP` that does a reverse > transformation? > > // Replace: gep (gep %P, long B), long A, ... > // With:T = long A+B; gep %P, T, ... The reverse

[clang] 85feb93 - [OpenMP] Fix setting visibility on declare target variables

2023-10-09 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-10-09T07:56:43-05:00 New Revision: 85feb9347f77859a877e767692e1c11d00cf6ffd URL: https://github.com/llvm/llvm-project/commit/85feb9347f77859a877e767692e1c11d00cf6ffd DIFF: https://github.com/llvm/llvm-project/commit/85feb9347f77859a877e767692e1c11d00cf6ffd.diff

  1   2   3   4   5   >