[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread Björn Schäpers via cfe-commits
@@ -26846,6 +26846,26 @@ TEST_F(FormatTest, BreakAdjacentStringLiterals) { Style.BreakAdjacentStringLiterals = false; verifyFormat(Code, Style); } + +TEST_F(FormatTest, EmptyLinesAfterInclude) { + auto Style = getLLVMStyle(); + Style.EmptyLinesAfterIncludes = 2; + Style.

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread Björn Schäpers via cfe-commits
@@ -4827,6 +4873,8 @@ struct FormatStyle { DerivePointerAlignment == R.DerivePointerAlignment && DisableFormat == R.DisableFormat && EmptyLineAfterAccessModifier == R.EmptyLineAfterAccessModifier && + EmptyLinesAfterIncludes == R.Empty

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread Björn Schäpers via cfe-commits
@@ -0,0 +1,70 @@ +//===--- TopLevelCommentSeparator.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: Apa

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread Björn Schäpers via cfe-commits
@@ -0,0 +1,112 @@ +//===- unittest/Format/TopLevelCommentSeparatorTest.cpp - Formatting unit tests +//-===// +// +// 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-Id

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread Björn Schäpers via cfe-commits
@@ -26846,6 +26846,26 @@ TEST_F(FormatTest, BreakAdjacentStringLiterals) { Style.BreakAdjacentStringLiterals = false; verifyFormat(Code, Style); } + +TEST_F(FormatTest, EmptyLinesAfterInclude) { + auto Style = getLLVMStyle(); + Style.EmptyLinesAfterIncludes = 2; + Style.

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread Björn Schäpers via cfe-commits
@@ -2459,6 +2459,52 @@ struct FormatStyle { /// \version 12 EmptyLineBeforeAccessModifierStyle EmptyLineBeforeAccessModifier; + /// \brief Number of lines after includes. + /// If set, determines the number of lines to insert after includes. + /// Limited by MaxEmptyLin

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread Björn Schäpers via cfe-commits
@@ -1035,6 +1039,8 @@ template <> struct MappingTraits { IO.mapOptional("MaxEmptyLinesToKeep", Style.MaxEmptyLinesToKeep); IO.mapOptional("NamespaceIndentation", Style.NamespaceIndentation); IO.mapOptional("NamespaceMacros", Style.NamespaceMacros); +IO.mapOption

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread Björn Schäpers via cfe-commits
@@ -0,0 +1,70 @@ +//===--- TopLevelCommentSeparator.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: Apa

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread Björn Schäpers via cfe-commits
@@ -2459,6 +2459,52 @@ struct FormatStyle { /// \version 12 EmptyLineBeforeAccessModifierStyle EmptyLineBeforeAccessModifier; + /// \brief Number of lines after includes. + /// If set, determines the number of lines to insert after includes. + /// Limited by MaxEmptyLin

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread Björn Schäpers via cfe-commits
@@ -2459,6 +2459,52 @@ struct FormatStyle { /// \version 12 EmptyLineBeforeAccessModifierStyle EmptyLineBeforeAccessModifier; + /// \brief Number of lines after includes. + /// If set, determines the number of lines to insert after includes. + /// Limited by MaxEmptyLin

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited https://github.com/llvm/llvm-project/pull/77918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-19 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks requested changes to this pull request. I think splitting the two features would be better. Also please add a note to the changelog. https://github.com/llvm/llvm-project/pull/77918 ___ cfe-commits mailing list cfe

[clang] [llvm] [mlir] [AMDGPU] Add GFX12 WMMA and SWMMAC instructions (PR #77795)

2024-01-19 Thread Mirko Brkušanin via cfe-commits
mbrkusanin wrote: Rebased. https://github.com/llvm/llvm-project/pull/77795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] CI Test - Please ignore (PR #78712)

2024-01-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/78712 >From 1c17da188035ec39c23c62f9f467cfbee05f4f63 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 19 Jan 2024 14:40:38 +0100 Subject: [PATCH] CI Test - Please ignore --- clang/utils/ci/buildkite-pipel

[clang] [clang-format] Add SkipMacroDefinitionBody option (PR #78682)

2024-01-19 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/78682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[clang] Fix CTAD for aggregates for nested template classes" (PR #78670)

2024-01-19 Thread via cfe-commits
cor3ntin wrote: @antangelo do you need me to merge this for you? https://github.com/llvm/llvm-project/pull/78670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Add a interpreter-specific overload of operator new for C++ (PR #76218)

2024-01-19 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @vitalybuka, thank you! I am trying to add a fix but I get `unsupported option '-fsanitize=hwaddress' for target 'x86_64-apple-darwin21.6.0'`. If you have a compatible platform, do you mind testing: ```diff diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clan

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From c3856543fd56ec33bab6bcdcd3d833c0e19f58f9 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] fix --- clang/lib/Sema/SemaTemplateInstantiate.cpp | 12 ++--

[clang] Add option -fstdlib-hardening= (PR #78763)

2024-01-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Akira Hatanaka (ahatanak) Changes The option allows users to enable libc++ hardening, which was discussed in the following RFC: https://discourse.llvm.org/t/rfc-hardening-in-libc/73925 Users specifiy the hardening mode by passing

[clang] Add option -fstdlib-hardening= (PR #78763)

2024-01-19 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/78763 The option allows users to enable libc++ hardening, which was discussed in the following RFC: https://discourse.llvm.org/t/rfc-hardening-in-libc/73925 Users specifiy the hardening mode by passing one of the fo

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-19 Thread Vassil Vassilev via cfe-commits
@@ -3924,6 +3925,154 @@ class ASTDeclContextNameLookupTrait { } // namespace +namespace { +class SpecializationsLookupTrait { + ASTWriter &Writer; + llvm::SmallVector DeclIDs; + +public: + using key_type = unsigned; + using key_type_ref = key_type; + + /// A start and en

[compiler-rt] [mlir] [libcxx] [llvm] [clang] [asan] Enable StackSafetyAnalysis by default (PR #77210)

2024-01-19 Thread Fangrui Song via cfe-commits
MaskRay wrote: @uweigand Thanks for the analysis. `bot = alloca(i);` is a dynamic alloca that cannot be optimized out. It triggers `FunctionStackPoisoner::createDynamicAllocasInitStorage`, which creates an alloca of 32-byte alignment. In x86-64, aarch64, riscv, and others, the alloca translat

[llvm] [clang] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-19 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave closed https://github.com/llvm/llvm-project/pull/78489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add missing stream related functions to StdLibraryFunctionsChecker. (PR #76979)

2024-01-19 Thread via cfe-commits
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= , =?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= , =?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= Message-ID: In-Reply-To: https://github.com/NagyDonat approved this pull request. https://github.com/llvm/llvm-project/pull/76979 ___ cfe-commi

[clang] 5330daa - [RISCV] Add support for Smepmp 1.0 (#78489)

2024-01-19 Thread via cfe-commits
Author: Min-Yih Hsu Date: 2024-01-19T11:09:35-08:00 New Revision: 5330daad41d761aaa1aea554dbeca7c050da7fb6 URL: https://github.com/llvm/llvm-project/commit/5330daad41d761aaa1aea554dbeca7c050da7fb6 DIFF: https://github.com/llvm/llvm-project/commit/5330daad41d761aaa1aea554dbeca7c050da7fb6.diff L

[clang] [clang][Sema] Fix for enums overflowing (#24667) (PR #78742)

2024-01-19 Thread via cfe-commits
https://github.com/wheatman updated https://github.com/llvm/llvm-project/pull/78742 >From 58d6df871eed40db23a4f182f9cb7989de1b2677 Mon Sep 17 00:00:00 2001 From: Brian Wheatman Date: Fri, 19 Jan 2024 11:13:33 -0500 Subject: [PATCH] [clang][Sema] Fix for enums overflowing (#24667) Enums which d

[clang] [clang][analyzer] Add missing stream related functions to StdLibraryFunctionsChecker. (PR #76979)

2024-01-19 Thread via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -2201,6 +2214,56 @@ void StdLibraryFunctionsChecker::initFunctionSummaries( ErrnoNEZeroIrrelevant, GenericFailureMsg) .ArgConstraint(NotNull(A

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread Balazs Benics via cfe-commits
@@ -318,17 +396,87 @@ static Messages getTaintMsgs(const SubRegion *Region, const char *OffsetName) { RegName, OffsetName)}; } -void ArrayBoundCheckerV2::performCheck(const Expr *E, CheckerContext &C) const { - // NOTE: Instead of using ProgramState::assum

[clang] [clang][analyzer] Add function 'fscanf' to StreamChecker. (PR #78180)

2024-01-19 Thread via cfe-commits
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= Message-ID: In-Reply-To: https://github.com/NagyDonat approved this pull request. https://github.com/llvm/llvm-project/pull/78180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [llvm] [clang-tools-extra] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-19 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 updated https://github.com/llvm/llvm-project/pull/78338 >From b98f02d4c155b5be9bd4f5b2e4bf73720a81f39a Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Wed, 17 Jan 2024 01:24:17 +0530 Subject: [PATCH 1/8] Fix : more detailed no expected directive message --- clang

[clang] [llvm] [clang-tools-extra] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-19 Thread Shourya Goel via cfe-commits
Sh0g0-1758 wrote: Please see the desired behavior in this screenshot : ![Screenshot from 2024-01-20 00-23-12](https://github.com/llvm/llvm-project/assets/114918019/c8c7dcca-a1eb-4ee5-8fe7-53c7c2ac99ca) With `-verify=` we get `expected-no-diagnostics` and with `-verify=foo` we get `foo-no-dia

[clang] [llvm] [clang-tools-extra] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-19 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 51afb101743855e2ae2624ebbe087da77128d92c 75c02dbdc6ce9ba6a7b9df47ff9540943f543f9f --

[clang] Add a "don't override" mapping for -fvisibility-from-dllstorageclass (PR #74629)

2024-01-19 Thread via cfe-commits
https://github.com/bd1976bris updated https://github.com/llvm/llvm-project/pull/74629 >From 5bae541608ffacfee767da592afe65003ccdad79 Mon Sep 17 00:00:00 2001 From: Ben Dunbobbin Date: Wed, 6 Dec 2023 15:47:52 + Subject: [PATCH 1/2] Add a "don't override" mapping for -fvisibility-from-dllst

[llvm] [clang-tools-extra] [clang] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-19 Thread Shourya Goel via cfe-commits
@@ -11,7 +11,7 @@ #error // expected-error@-1 {{}} -// CHECK: error: no expected directives found: consider use of 'expected-no-diagnostics' +// CHECK: error: no expected directives found: consider use of '{{.*}}-no-diagnostics' Sh0g0-1758 wrote:

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-01-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (mmoadeli) Changes - Address space cast of nullptr in local_space into a generic_space for the CUDA backend. The reason for this cast was having invalid local memory base address for the associated variable. - In the context of AMD G

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-01-19 Thread via cfe-commits
https://github.com/mmoadeli created https://github.com/llvm/llvm-project/pull/78759 - Address space cast of nullptr in local_space into a generic_space for the CUDA backend. The reason for this cast was having invalid local memory base address for the associated variable. - In the context of A

[llvm] [clang-tools-extra] [clang] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-19 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 updated https://github.com/llvm/llvm-project/pull/78338 >From b98f02d4c155b5be9bd4f5b2e4bf73720a81f39a Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Wed, 17 Jan 2024 01:24:17 +0530 Subject: [PATCH 1/7] Fix : more detailed no expected directive message --- clang

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-01-19 Thread via cfe-commits
https://github.com/NorthBlue333 updated https://github.com/llvm/llvm-project/pull/77456 >From 1c794e5544d5f4d1a73a4410a00412f445e5c1f9 Mon Sep 17 00:00:00 2001 From: NorthBlue333 Date: Tue, 9 Jan 2024 14:01:14 +0100 Subject: [PATCH] [clang-format] Do not update cursor pos if no includes replac

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-01-19 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 42b160356fe5d3b41bf07c428d0142d3721b1d44 490343ec3461a8a3a5703198f6b9af57a853ef24 --

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)

2024-01-19 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I had an offline discussion with @Endilll during my morning office hours today, and our current plan is: 1) Remove `Implicit` from the enumeration, rename `Call` and `List` to `ParenList` and `BraceList`, respectively 2) Add a new bit to the bit-field for `CXXNewExpr` to tr

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-01-19 Thread via cfe-commits
https://github.com/NorthBlue333 updated https://github.com/llvm/llvm-project/pull/77456 >From 7ee61d585faf393921f8964451ddc97e4cfb7444 Mon Sep 17 00:00:00 2001 From: NorthBlue333 Date: Tue, 9 Jan 2024 14:01:14 +0100 Subject: [PATCH] [clang-format] Do not update cursor pos if no includes replac

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-01-19 Thread via cfe-commits
https://github.com/NorthBlue333 updated https://github.com/llvm/llvm-project/pull/77456 >From 490343ec3461a8a3a5703198f6b9af57a853ef24 Mon Sep 17 00:00:00 2001 From: NorthBlue333 Date: Tue, 9 Jan 2024 14:01:14 +0100 Subject: [PATCH] [clang-format] Do not update cursor pos if no includes replac

[clang] [flang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-01-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Mats Petersson (Leporacanthicus) Changes This adds the support to add the target-feature. It will be fully supported once the generic support for adding target-cpu and target-features attributes to functi

[clang] [flang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)

2024-01-19 Thread Mats Petersson via cfe-commits
https://github.com/Leporacanthicus created https://github.com/llvm/llvm-project/pull/78755 This adds the support to add the target-feature. It will be fully supported once the generic support for adding target-cpu and target-features attributes to functions has landed. See #78289. Regression

[clang] [lld] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-19 Thread Rahman Lavaee via cfe-commits
@@ -1401,17 +1406,48 @@ void AsmPrinter::emitBBAddrMapSection(const MachineFunction &MF) { uint8_t BBAddrMapVersion = OutStreamer->getContext().getBBAddrMapVersion(); OutStreamer->emitInt8(BBAddrMapVersion); OutStreamer->AddComment("feature"); - auto FeaturesBits = stat

[llvm] [clang] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-19 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/78489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [lldb] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2024-01-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM once CI passes and Flang conflicts are resolved. https://github.com/llvm/llvm-project/pull/75530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang-format] Add MainIncludeChar option. (PR #78752)

2024-01-19 Thread via cfe-commits
https://github.com/j-jorge updated https://github.com/llvm/llvm-project/pull/78752 >From 11c7a60c5487d01e49b113bc264bb166d6df5457 Mon Sep 17 00:00:00 2001 From: Julien Jorge Date: Fri, 19 Jan 2024 18:44:58 +0100 Subject: [PATCH] [clang-format] Add MainIncludeChar option. Resolves #27008, #3973

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
NagyDonat wrote: @steakhal Thanks for the review! I'll apply your suggestions on the next week. https://github.com/llvm/llvm-project/pull/78315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/78315 >From c75c05c6e894a46797913c5bdccb240cbcc01ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 12 Dec 2023 13:07:54 +0100 Subject: [PATCH 1/2] [analyzer] Support interestingness in Array

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
@@ -0,0 +1,128 @@ +// RUN: %clang_analyze_cc1 -Wno-array-bounds -analyzer-output=text\ +// RUN: -analyzer-checker=core,alpha.security.ArrayBoundV2,unix.Malloc,alpha.security.taint,debug.ExprInspection -verify %s + +int array[10]; + +void clang_analyzer_value(unsigned

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
@@ -0,0 +1,128 @@ +// RUN: %clang_analyze_cc1 -Wno-array-bounds -analyzer-output=text\ +// RUN: -analyzer-checker=core,alpha.security.ArrayBoundV2,unix.Malloc,alpha.security.taint,debug.ExprInspection -verify %s + +int array[10]; + +void clang_analyzer_value(unsigned

[clang] [clang-format] Add MainIncludeChar option. (PR #78752)

2024-01-19 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 b6677835fed3a204fa043e079a135c4a225d2c0e db59f23f7dff603b00c40761c8fa935876b1654b --

[clang] [clang-format] Add MainIncludeChar option. (PR #78752)

2024-01-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (j-jorge) Changes Resolves #27008, #39735, #53013, #63619. Hello, this PR adds the MainIncludeChar option to clang-format, allowing to select which include syntax must be considered when searching for the main header: quotes (`#incl

[clang] [Clang][NFC] Optimize isAsciiIdentifierContinue (PR #78699)

2024-01-19 Thread via cfe-commits
cor3ntin wrote: I tried a whole bunch of stuffs, this is the best we can do to improve `LexIdentifierContinue` https://github.com/llvm/llvm-project/pull/78699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [clang-format] Add MainIncludeChar option. (PR #78752)

2024-01-19 Thread via cfe-commits
https://github.com/j-jorge created https://github.com/llvm/llvm-project/pull/78752 Resolves #27008, #39735, #53013, #63619. Hello, this PR adds the MainIncludeChar option to clang-format, allowing to select which include syntax must be considered when searching for the main header: quotes (`#

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
@@ -318,17 +396,87 @@ static Messages getTaintMsgs(const SubRegion *Region, const char *OffsetName) { RegName, OffsetName)}; } -void ArrayBoundCheckerV2::performCheck(const Expr *E, CheckerContext &C) const { - // NOTE: Instead of using ProgramState::assum

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
@@ -318,17 +396,87 @@ static Messages getTaintMsgs(const SubRegion *Region, const char *OffsetName) { RegName, OffsetName)}; } -void ArrayBoundCheckerV2::performCheck(const Expr *E, CheckerContext &C) const { - // NOTE: Instead of using ProgramState::assum

[llvm] [clang] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-19 Thread Min-Yih Hsu via cfe-commits
@@ -116,6 +116,7 @@ // CHECK-NOT: __riscv_smaia {{.*$}} // CHECK-NOT: __riscv_ssaia {{.*$}} +// CHECK-NOT: __riscv_smepmp {{.*$}} mshockwave wrote: It's fixed now. https://github.com/llvm/llvm-project/pull/78489 __

[clang] [llvm] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-19 Thread Min-Yih Hsu via cfe-commits
@@ -1047,6 +1048,14 @@ // RUN: -o - | FileCheck --check-prefix=CHECK-SSAIA-EXT %s // CHECK-SSAIA-EXT: __riscv_ssaia 100{{$}} +// RUN: %clang --target=riscv32 -menable-experimental-extensions \ +// RUN: -march=rv32ismepmp1p0 -x c -E -dM %s \ +// RUN: -o - | FileCheck --che

[clang] [llvm] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-19 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave updated https://github.com/llvm/llvm-project/pull/78489 >From ab316ea2c76320ec2f044c43bb9f6ed82f6802c3 Mon Sep 17 00:00:00 2001 From: Min Hsu Date: Wed, 17 Jan 2024 10:28:14 -0800 Subject: [PATCH 1/4] [RISCV] Add support for Smepmp 1.0 Smepmp is a supervisor exten

[mlir] [libc] [clang] [clang-tools-extra] [compiler-rt] [flang] [llvm] [MLIR] Setting MemorySpace During Bufferization + Fixes (PR #78484)

2024-01-19 Thread ian Bearman via cfe-commits
manbearian wrote: Based on the work discussed here: https://discourse.llvm.org/t/using-tensor-encoding-attribute/69142 https://github.com/llvm/llvm-project/pull/78484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[flang] [libc] [clang] [llvm] [compiler-rt] [clang-tools-extra] [mlir] [MLIR] Setting MemorySpace During Bufferization + Fixes (PR #78484)

2024-01-19 Thread ian Bearman via cfe-commits
https://github.com/manbearian edited https://github.com/llvm/llvm-project/pull/78484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-19 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: Any other comments from @arsenm and @andykaylor? https://github.com/llvm/llvm-project/pull/76873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-19 Thread Zahira Ammarguellat via cfe-commits
@@ -13861,6 +13897,36 @@ Sema::CheckReturnValExpr(Expr *RetValExp, QualType lhsType, CheckPPCMMAType(RetValExp->getType(), ReturnLoc); } +/// Diagnose comparison to NAN or INFINITY in fast math modes. +/// The comparison to NaN or INFINITY is always false in +/// fast mod

[clang-tools-extra] [llvm] [flang] [mlir] [libc] [clang] [compiler-rt] port fixes from local llvm (PR #78484)

2024-01-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-bufferization Author: ian Bearman (manbearian) Changes Collection of changes with the goal of being able to convert `encoding` to `memorySpace` during bufferization - new API for encoder to allow implementation to select destination memory space

[clang-tools-extra] [llvm] [flang] [mlir] [libc] [clang] [compiler-rt] port fixes from local llvm (PR #78484)

2024-01-19 Thread ian Bearman via cfe-commits
https://github.com/manbearian ready_for_review https://github.com/llvm/llvm-project/pull/78484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [flang] [mlir] [libc] [clang] [compiler-rt] port fixes from local llvm (PR #78484)

2024-01-19 Thread ian Bearman via cfe-commits
https://github.com/manbearian updated https://github.com/llvm/llvm-project/pull/78484 >From b83074fa260d2ce4b876b71d507224cb9476a944 Mon Sep 17 00:00:00 2001 From: Ian Bearman Date: Wed, 17 Jan 2024 17:54:25 + Subject: [PATCH] port fixes from local llvm --- .../IR/BufferizableOpInterface.

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-01-19 Thread via cfe-commits
Logikable wrote: Updated with suggestions. How does this look? https://github.com/llvm/llvm-project/pull/73176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AIX] Only export libclang.map symbols from libclang (PR #78748)

2024-01-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM, thank you! https://github.com/llvm/llvm-project/pull/78748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LTO] Fix Veclib flags correctly pass to LTO flags (PR #78749)

2024-01-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Paschalis Mpeis (paschalis-mpeis) Changes Flags `-fveclib=name` were not passed to LTO flags. This pass fixes that by converting the `-fveclib` flags to their relevant names for opt's `-vector-lib=name` fl

[clang] [LTO] Fix Veclib flags correctly pass to LTO flags (PR #78749)

2024-01-19 Thread Paschalis Mpeis via cfe-commits
https://github.com/paschalis-mpeis created https://github.com/llvm/llvm-project/pull/78749 Flags `-fveclib=name` were not passed to LTO flags. This pass fixes that by converting the `-fveclib` flags to their relevant names for opt's `-vector-lib=name` flags. For example: `-fveclib=SLEEF` would

[clang] [libc++] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2024-01-19 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,556 @@ +// RUN: mkdir -p %t +// RUN: %clang++ %s -o %t/run +// RUN: %t/run ldionne wrote: I'm not sure if this is going to work on all configurations, for example when they cross compile. Is there a precedent for these kinds of runtime tests in the c

[clang] [libc++] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2024-01-19 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,556 @@ +// RUN: mkdir -p %t ldionne wrote: Are these files missing a license? https://github.com/llvm/llvm-project/pull/75371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [clang-tools-extra] [llvm] [HLSL] Vector standard conversions (PR #71098)

2024-01-19 Thread Chris B via cfe-commits
llvm-beanz wrote: @rjmccall, do my latest updates here cover all your concerns? https://github.com/llvm/llvm-project/pull/71098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AIX] Only export libclang.map symbols from libclang (PR #78748)

2024-01-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jake Egan (jakeegan) Changes This will prevent unnecessary symbols being exported in libclang, which could cause issues with non-unique objects. --- Full diff: https://github.com/llvm/llvm-project/pull/78748.diff 14 Files Affected: - (

[clang] [clang][AIX] Only export libclang.map symbols from libclang (PR #78748)

2024-01-19 Thread Jake Egan via cfe-commits
https://github.com/jakeegan created https://github.com/llvm/llvm-project/pull/78748 This will prevent unnecessary symbols being exported in libclang, which could cause issues with non-unique objects. >From a51256cdab8a04474d4ae168d969516af1878c29 Mon Sep 17 00:00:00 2001 From: Jake Egan <53264

[clang] [clang-tools-extra] [llvm] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-01-19 Thread via cfe-commits
sethp wrote: Yeah, I've still got some history editing to do: for now, the merge made the "all commits" diff look like it represents just the changes this PR represents. Thank you very much for your review feedback: I really like how it ended up coming out. I think we got something that's at a

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2024-01-19 Thread Mark Adler via cfe-commits
madler wrote: > > We have provided a fix for zlib > > ([madler/zlib#895](https://github.com/madler/zlib/pull/895)) which was > > accepted by @madler. > > But nowhere released, not even in the repository :( This should be fixed in the zlib develop branch. Have you tried it? https://github.com

[clang-tools-extra] [llvm] [clang] [CLANG] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-19 Thread Shourya Goel via cfe-commits
@@ -11,7 +11,7 @@ #error // expected-error@-1 {{}} -// CHECK: error: no expected directives found: consider use of 'expected-no-diagnostics' +// CHECK: error: no expected directives found: consider use of '{{.*}}-no-diagnostics' Sh0g0-1758 wrote:

[openmp] [mlir] [llvm] [libc] [lldb] [clang] [compiler-rt] [flang] [clang-tools-extra] [libcxx] [lld] [libc++][format] P2637R3: Member `visit` (`std::basic_format_arg`) (PR #76449)

2024-01-19 Thread Mark de Wever via cfe-commits
@@ -144,7 +144,8 @@ _LIBCPP_HIDE_FROM_ABI decltype(auto) __visit_format_arg(_Visitor&& __vis, basic_ __libcpp_unreachable(); } -# if _LIBCPP_STD_VER >= 26 +# if _LIBCPP_STD_VER >= 26 && (!defined(_LIBCPP_COMPILER_CLANG_BASED) || _LIBCPP_CLANG_VER >= 1800) ---

[clang] [openmp] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2024-01-19 Thread via cfe-commits
carlobertolli wrote: Automatic zero-copy doesn't work on some of the bbot's. I will have to land this once the lit test harness extension in #77851 re-lands. https://github.com/llvm/llvm-project/pull/76571 ___ cfe-commits mailing list cfe-commits@lis

[clang] [clang-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)

2024-01-19 Thread via cfe-commits
tomasz-kaminski-sonarsource wrote: Reworked response to provide constructive feedback. > What I don't want to lose from this patch are the changes to places like > `InitializationStyle getInitializationStyle() const` and > `CXXNewExpr::CXXNewExpr` where the old code was unclear and the new cod

[clang] [libc++] fix _Atomic c11 compare exchange does not update expected results (PR #78707)

2024-01-19 Thread Louis Dionne via cfe-commits
@@ -408,7 +409,15 @@ static void emitAtomicCmpXchg(CodeGenFunction &CGF, AtomicExpr *E, bool IsWeak, CGF.Builder.SetInsertPoint(StoreExpectedBB); // Update the memory at Expected with Old's value. - CGF.Builder.CreateStore(Old, Val1); + + llvm::Type *ExpectedType = Expe

[clang-tools-extra] [llvm] [clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-01-19 Thread via cfe-commits
https://github.com/sethp updated https://github.com/llvm/llvm-project/pull/74852 >From f281d34a51f662c934f158e4770774b0dc3588a2 Mon Sep 17 00:00:00 2001 From: Seth Pellegrino Date: Thu, 7 Dec 2023 08:45:51 -0800 Subject: [PATCH 01/12] [Clang][Sema] Print more static_assert exprs This change int

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
@@ -318,17 +396,87 @@ static Messages getTaintMsgs(const SubRegion *Region, const char *OffsetName) { RegName, OffsetName)}; } -void ArrayBoundCheckerV2::performCheck(const Expr *E, CheckerContext &C) const { - // NOTE: Instead of using ProgramState::assum

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-19 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/AaronBallman approved this pull request. LGTM but please do not land until after the Clang 18 branch next Tuesday. https://github.c

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
@@ -133,12 +195,19 @@ computeOffset(ProgramStateRef State, SValBuilder &SVB, SVal Location) { return std::nullopt; } -// TODO: once the constraint manager is smart enough to handle non simplified -// symbolic expressions remove this function. Note that this can not be used

[compiler-rt] [clang] [flang] [clang-tools-extra] [llvm] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-19 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/77761 >From 62f31654ec66fe0e2a27200d0484d3c70d4ce2c1 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Wed, 20 Dec 2023 15:12:04 -0600 Subject: [PATCH 01/11] [Flang][OpenMP] Separate creation of work-sharing an

[clang-tools-extra] [llvm] [mlir] [libcxx] [compiler-rt] [clang] [libc] [lldb] [libcxxabi] [polly] [libunwind] [flang] [libc++][any] LWG3305: `any_cast` (PR #78215)

2024-01-19 Thread Mark de Wever via cfe-commits
https://github.com/mordante edited https://github.com/llvm/llvm-project/pull/78215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [llvm] [mlir] [libcxx] [lldb] [libcxxabi] [polly] [flang] [libunwind] [compiler-rt] [clang] [clang-tools-extra] [libc++][any] LWG3305: `any_cast` (PR #78215)

2024-01-19 Thread Mark de Wever via cfe-commits
@@ -555,6 +556,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType template inline _LIBCPP_HIDE_FROM_ABI add_pointer_t> any_cast(any const* __any) _NOEXCEPT { + static_assert(!is_void_v<_ValueType>, "_ValueType may not be void."); -

[libcxxabi] [mlir] [llvm] [libc] [lldb] [libunwind] [clang] [compiler-rt] [flang] [clang-tools-extra] [libcxx] [polly] [libc++][any] LWG3305: `any_cast` (PR #78215)

2024-01-19 Thread Mark de Wever via cfe-commits
https://github.com/mordante approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/78215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-19 Thread via cfe-commits
@@ -133,12 +195,19 @@ computeOffset(ProgramStateRef State, SValBuilder &SVB, SVal Location) { return std::nullopt; } -// TODO: once the constraint manager is smart enough to handle non simplified -// symbolic expressions remove this function. Note that this can not be used

[clang] [Cygwin] Cygwin CGCall.h (PR #74977)

2024-01-19 Thread 徐持恒 Xu Chiheng via cfe-commits
https://github.com/xu-chiheng closed https://github.com/llvm/llvm-project/pull/74977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -6124,7 +6124,11 @@ QualType TreeTransform::TransformFunctionProtoType( // "pointer to cv-qualifier-seq X" between the optional cv-qualifer-seq // and the end of the function-definition, member-declarator, or // declarator. - Sema::CXXThisScopeR

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-19 Thread Aaron Ballman via cfe-commits
@@ -7081,10 +7085,10 @@ QualType TreeTransform::TransformAttributedType( // FIXME: dependent operand expressions? if (getDerived().AlwaysRebuild() || modifiedType != oldType->getModifiedType()) { -// TODO: this is really lame; we should really be rebuilding the -

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Please be sure to add a release note about the fix to clang/docs/ReleaseNotes.rst. https://github.com/llvm/llvm-project/pull/78088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/78088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [flang] [compiler-rt] [clang] [clang-tools-extra] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-19 Thread Kiran Chandramohan via cfe-commits
@@ -2223,37 +,100 @@ static void createBodyOfOp( mlir::omp::YieldOp>( firOpBuilder, eval.getNestedEvaluations()); - // Insert the terminator. - Fortran::lower::genOpenMPTerminator(firOpBuilder, op.getOperation(), loc);

[compiler-rt] [clang] [flang] [clang-tools-extra] [llvm] [Flang][OpenMP] Restructure recursive lowering in `createBodyOfOp` (PR #77761)

2024-01-19 Thread Kiran Chandramohan via cfe-commits
@@ -2223,37 +2247,64 @@ static void createBodyOfOp( mlir::omp::YieldOp>( firOpBuilder, eval.getNestedEvaluations()); - // Insert the terminator. - Fortran::lower::genOpenMPTerminator(firOpBuilder, op.getOperation(), loc); -

<    1   2   3   4   5   6   >