[clang] [clang][ASTImporter] Fix import of anonymous enums if multiple are present (PR #99281)

2024-07-17 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/99281 After the last change in PR #87144 regressions appeared in some cases. The problem was that if multiple anonymous enums are present in a class and are imported as new the import of the second enum can fail beca

[clang] [clang][ASTImporter] Fix import of anonymous enums if multiple are present (PR #99281)

2024-07-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes After the last change in PR #87144 regressions appeared in some cases. The problem was that if multiple anonymous enums are present in a class and are imported as new the import of the second enum can fail b

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_inplace_task]] (PR #99282)

2024-07-17 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 created https://github.com/llvm/llvm-project/pull/99282 This patch is the frontend implementation of the coroutine elide improvement project detailed in this discourse post: https://discourse.llvm.org/t/language-extension-for-better-more-deterministic-halo-for

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_inplace_task]] (PR #98971)

2024-07-17 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 closed https://github.com/llvm/llvm-project/pull/98971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_inplace_task]] (PR #98971)

2024-07-17 Thread Yuxuan Chen via cfe-commits
yuxuanchen1997 wrote: Deprecated in favor of https://github.com/llvm/llvm-project/pull/99282 https://github.com/llvm/llvm-project/pull/98971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_inplace_task]] (PR #99282)

2024-07-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-clang-modules Author: Yuxuan Chen (yuxuanchen1997) Changes This patch is the frontend implementation of the coroutine elide improvement project detailed in t

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_inplace_task]] (PR #99282)

2024-07-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yuxuan Chen (yuxuanchen1997) Changes This patch is the frontend implementation of the coroutine elide improvement project detailed in this discourse post: https://discourse.llvm.org/t/language-extension-for-better-more-deterministic-halo-

[clang] [libc] [libcxx] [libc][libcxx] Support for building libc++ against LLVM libc (PR #99287)

2024-07-17 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/99287 Provide an option to build libc++ against LLVM libc and set the CMake compile and link options appropriately when the option is enabled. >From 7d7a7882b713e056f9194b2dd7d792fb9bb86bb5 Mon Sep 17 00:00:00 2001

[clang] [libc] [libcxx] [libc][libcxx] Support for building libc++ against LLVM libc (PR #99287)

2024-07-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libc Author: Petr Hosek (petrhosek) Changes Provide an option to build libc++ against LLVM libc and set the CMake compile and link options appropriately when the option is enabled. --- Full diff: https://github.com/llvm/llvm-project/pull/99287.diff 7

[clang] [libc] [libcxx] [libc][libcxx] Support for building libc++ against LLVM libc (PR #99287)

2024-07-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Petr Hosek (petrhosek) Changes Provide an option to build libc++ against LLVM libc and set the CMake compile and link options appropriately when the option is enabled. --- Full diff: https://github.com/llvm/llvm-project/pull/99287.diff

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-17 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. I think it's already in a good shape. I found barely any problems with the wording. https://github.co

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-17 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -363,6 +397,18 @@ class LazyCompoundVal : public NonLoc { /// It might return null. const void *getStore() const; + /// This functi

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-17 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/97407 ___ cfe-commits mailing list cfe

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-17 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -346,6 +350,36 @@ class CompoundVal : public NonLoc { static bool classof(SVal V) { return V.getKind() == CompoundValKind; } }; +/// W

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-17 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -346,6 +350,36 @@ class CompoundVal : public NonLoc { static bool classof(SVal V) { return V.getKind() == CompoundValKind; } }; +/// W

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Pavel Skripkin via cfe-commits
@@ -14,6 +14,13 @@ void free(void *); void __attribute((ownership_takes(malloc, 1))) my_free(void *); +void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t); +void __attribute((ownership_takes(malloc1, 1))) my_free1(void *); + +void __attribute((ownership_returns(

[clang] a5b5208 - [clang] Be careful when choosing "fast path" for initialization with #embed (#99023)

2024-07-17 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2024-07-17T10:00:47+02:00 New Revision: a5b5208ba627da46310db67af0dcbb0a824fab92 URL: https://github.com/llvm/llvm-project/commit/a5b5208ba627da46310db67af0dcbb0a824fab92 DIFF: https://github.com/llvm/llvm-project/commit/a5b5208ba627da46310db67af0dcbb0a824fab

[clang] [clang] Be careful when choosing "fast path" for initialization with #embed (PR #99023)

2024-07-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/99023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 0905732 - [clang-tools-extra] Fix typos in Modularize.rst (#99256)

2024-07-17 Thread via cfe-commits
Author: Abe Date: 2024-07-17T09:07:17+01:00 New Revision: 0905732f75cb0f774972c721810aba74021102f2 URL: https://github.com/llvm/llvm-project/commit/0905732f75cb0f774972c721810aba74021102f2 DIFF: https://github.com/llvm/llvm-project/commit/0905732f75cb0f774972c721810aba74021102f2.diff LOG: [cla

[clang-tools-extra] [clang-tools-extra] Fix typos in Modularize.rst (PR #99256)

2024-07-17 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/99256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tools-extra] Fix typos in Modularize.rst (PR #99256)

2024-07-17 Thread via cfe-commits
github-actions[bot] wrote: @Abe149 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Pavel Skripkin via cfe-commits
@@ -103,14 +103,46 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang-tools-extra] [clang-tools-extra] Fix typos in Modularize.rst (PR #99256)

2024-07-17 Thread David Spickett via cfe-commits
DavidSpickett wrote: I saw your email in the merge box so I've gone ahead and landed it (I think the workflow that checks for a private email may only be re-run when the changes in the PR are updated). https://github.com/llvm/llvm-project/pull/99256

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Pavel Skripkin via cfe-commits
@@ -1918,26 +1982,54 @@ static bool printMemFnName(raw_ostream &os, CheckerContext &C, const Expr *E) { static void printExpectedAllocName(raw_ostream &os, AllocationFamily Family) { - switch(Family) { -case AF_Malloc: os << "malloc()"; return; -case AF_CXXNew: os <

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-17 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 approved this pull request. LGTM, thanks @ahatanak ! https://github.com/llvm/llvm-project/pull/98847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Concepts] Avoid substituting into constraints for invalid TemplateDecls (PR #75697)

2024-07-17 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/75697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Concepts] Avoid substituting into constraints for invalid TemplateDecls (PR #75697)

2024-07-17 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM modulo comments https://github.com/llvm/llvm-project/pull/75697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Concepts] Avoid substituting into constraints for invalid TemplateDecls (PR #75697)

2024-07-17 Thread via cfe-commits
@@ -483,6 +483,13 @@ bool Sema::CheckConstraintSatisfaction( *this, nullptr, ConstraintExprs, ConvertedConstraints, TemplateArgsLists, TemplateIDRange, OutSatisfaction); } + // Invalid templates could make their way here. Substituting them could result + //

[clang] [Concepts] Avoid substituting into constraints for invalid TemplateDecls (PR #75697)

2024-07-17 Thread via cfe-commits
@@ -227,3 +227,20 @@ struct r6 {}; using r6i = r6; // expected-error@-1 {{constraints not satisfied for class template 'r6' [with T = int]}} + +namespace GH73885 { + +template // expected-error {{extraneous}} +template requires(T{}) +bool e_v = true; + +static_assert(e_v);

[clang] [clang-format] Add BinPackBinaryOperations configuration (PR #95013)

2024-07-17 Thread via cfe-commits
mydeveloperday wrote: I'm not finding the true/false every clear, can we use an enum? https://github.com/llvm/llvm-project/pull/95013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-17 Thread Utkarsh Saxena via cfe-commits
@@ -3430,6 +3430,7 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation, llvm::raw_string_ostream OS(Name); usx95 wrote: I think we can do this on a need basis. Most source actions (like Parse*) already have this information (although not structur

[clang] [flang] [mlir] Add basic -mtune support (PR #98517)

2024-07-17 Thread David Spickett via cfe-commits
DavidSpickett wrote: This was failing on our bots that build all backends, I've fixed that: https://github.com/llvm/llvm-project/commit/8bf952d77fbe63f979e4293e95a5ca379e26eede It will help you in future if you set an email address for your commits in this Github project. Buildbot will then use

[clang] [llvm] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/8] Add an option to add source file info to -ftime-trace --- cla

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-17 Thread Haojian Wu via cfe-commits
hokein wrote: Thanks for implementing it! I haven't looked into the implementation details yet. Before doing so, I want to ensure I understand the standard correctly (the standard's wording is a bit hard to follow). Per C++ [over.match.class.deduct#1.10](https://eel.is/c++draft/over.match.cl

[clang] [clang] Fix underlying type of EmbedExpr (PR #99050)

2024-07-17 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: I can add test with sizeof for sure, the problem is that it is already working https://godbolt.org/z/K69v8KPYa and we have similar ones in codebase already. The test I'm struggling with is to check that elements in initializer list that are expanded from embed also have int typ

[clang] 72b3d7b - [clang][Interp] Makre sure we don't overflow Descriptor::AllocSize

2024-07-17 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-07-17T10:56:14+02:00 New Revision: 72b3d7bc87019ba7ef268ce322f90382f01b11af URL: https://github.com/llvm/llvm-project/commit/72b3d7bc87019ba7ef268ce322f90382f01b11af DIFF: https://github.com/llvm/llvm-project/commit/72b3d7bc87019ba7ef268ce322f90382f01b11af.diff LO

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -14,6 +14,13 @@ void free(void *); void __attribute((ownership_takes(malloc, 1))) my_free(void *); +void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t); +void __attribute((ownership_takes(malloc1, 1))) my_free1(void *); + +void __attribute((ownership_returns(

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,46 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [clang][ASTImporter] Fix import of anonymous enums if multiple are present (PR #99281)

2024-07-17 Thread via cfe-commits
vabridgers wrote: LGTM, pending integration tests, but someone else must approve. Thanks for following up on this! https://github.com/llvm/llvm-project/pull/99281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] 39d751a - [clang][Interp] Use an array root's field decl in the LValuePath

2024-07-17 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-07-17T11:26:50+02:00 New Revision: 39d751ad976ba9f5e8a1ad3880559faba38c3c3f URL: https://github.com/llvm/llvm-project/commit/39d751ad976ba9f5e8a1ad3880559faba38c3c3f DIFF: https://github.com/llvm/llvm-project/commit/39d751ad976ba9f5e8a1ad3880559faba38c3c3f.diff LO

[clang] [Concepts] Avoid substituting into constraints for invalid TemplateDecls (PR #75697)

2024-07-17 Thread Younan Zhang via cfe-commits
@@ -227,3 +227,20 @@ struct r6 {}; using r6i = r6; // expected-error@-1 {{constraints not satisfied for class template 'r6' [with T = int]}} + +namespace GH73885 { + +template // expected-error {{extraneous}} +template requires(T{}) +bool e_v = true; + +static_assert(e_v);

[clang] [Concepts] Avoid substituting into constraints for invalid TemplateDecls (PR #75697)

2024-07-17 Thread Younan Zhang via cfe-commits
@@ -227,3 +227,20 @@ struct r6 {}; using r6i = r6; // expected-error@-1 {{constraints not satisfied for class template 'r6' [with T = int]}} + +namespace GH73885 { + +template // expected-error {{extraneous}} +template requires(T{}) +bool e_v = true; + +static_assert(e_v);

[clang] [clang][ASTImporter] Fix import of anonymous enums if multiple are present (PR #99281)

2024-07-17 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/99281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Support `--precompile` and `-fmodule-*` options in Clang-CL (PR #98761)

2024-07-17 Thread Sharadh Rajaraman via cfe-commits
https://github.com/sharadhr updated https://github.com/llvm/llvm-project/pull/98761 >From 1fed92a00f0d732a2575861c2bf6a6d053407255 Mon Sep 17 00:00:00 2001 From: Sharadh Rajaraman Date: Sat, 13 Jul 2024 19:25:47 +0100 Subject: [PATCH 1/7] Allow `--precompile` and `-fprebuilt-module-path` to be

[clang] [clang][driver] Support `--precompile` and `-fmodule-*` options in Clang-CL (PR #98761)

2024-07-17 Thread Sharadh Rajaraman via cfe-commits
https://github.com/sharadhr updated https://github.com/llvm/llvm-project/pull/98761 >From 1fed92a00f0d732a2575861c2bf6a6d053407255 Mon Sep 17 00:00:00 2001 From: Sharadh Rajaraman Date: Sat, 13 Jul 2024 19:25:47 +0100 Subject: [PATCH 1/5] Allow `--precompile` and `-fprebuilt-module-path` to be

[clang] [clang][driver] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-07-17 Thread Sharadh Rajaraman via cfe-commits
https://github.com/sharadhr created https://github.com/llvm/llvm-project/pull/99300 Relates to #98761: `-fmodule-file` requires `/std:c++20` or greater, but passing that option results in an unused argument warning. This resolves that. >From 11aaae5439b33ac636e8580b96d16b6d0d9dbd0a Mon Sep 17

[clang] [clang][driver] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-07-17 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang][driver] Support `--precompile` and `-fmodule-*` options in Clang-CL (PR #98761)

2024-07-17 Thread Sharadh Rajaraman via cfe-commits
@@ -242,7 +242,7 @@ bool types::isCXX(ID Id) { case TY_CXXHUHeader: case TY_PP_CXXHeaderUnit: case TY_ObjCXXHeader: case TY_PP_ObjCXXHeader: - case TY_CXXModule: case TY_PP_CXXModule: + case TY_CXXModule: case TY_PP_CXXModule: case TY_ModuleFile: sharad

[clang] [clang][driver] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-07-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Sharadh Rajaraman (sharadhr) Changes Relates to #98761: `-fmodule-file` requires `/std:c++20` or greater, but passing that option results in an unused argument warning. This resolves that. --- Full diff: https://github.com/llvm/ll

[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-07-17 Thread Sharadh Rajaraman via cfe-commits
https://github.com/sharadhr edited https://github.com/llvm/llvm-project/pull/99300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver][clang-cl] Support `--precompile` and `-fmodule-*` options in Clang-CL (PR #98761)

2024-07-17 Thread Sharadh Rajaraman via cfe-commits
https://github.com/sharadhr edited https://github.com/llvm/llvm-project/pull/98761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-07-17 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Please add a test for this too. We can use any file ends with `.pcm` to mimic module file in the Driver's test and we can use `CHECK-NOT:` to filter the warning. https://github.com/llvm/llvm-project/pull/99300 __

[clang] [clang codegen] Emit int TBAA metadata on FP math libcall expf (PR #96025)

2024-07-17 Thread via cfe-commits
https://github.com/vfdff updated https://github.com/llvm/llvm-project/pull/96025 >From ece0662e3ca7086bbe4950660ad5b04be5a82055 Mon Sep 17 00:00:00 2001 From: zhongyunde 00443407 Date: Tue, 18 Jun 2024 09:21:07 -0400 Subject: [PATCH] [clang codegen] Emit int TBAA metadata on FP math libcall exp

[clang] [Bounds Safety][NFC] Add `SemaBoundsSafety` class and move existing Sema checks there (PR #98954)

2024-07-17 Thread Dan Liew via cfe-commits
delcypher wrote: > > As noted above `-fbounds-safety` **is a C language extension** which makes > > it seem like it would fit nicely into the existing division of Sema into > > multiple objects and relevant source files. > > No, it doesn't fit nicely into the division, which is the reason we'r

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-17 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/99032 >From 9ac7a9543878fc93ea036cfa533c25bbbceeddf2 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 16 Jul 2024 12:29:35 +0200 Subject: [PATCH 1/2] [clang] Extend lifetime analysis to detect dangling assignments

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-17 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/99032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-17 Thread Haojian Wu via cfe-commits
@@ -966,7 +969,8 @@ static bool pathOnlyInitializesGslPointer(IndirectLocalPath &Path) { if (It.Kind == IndirectLocalPathEntry::LifetimeBoundCall) continue; return It.Kind == IndirectLocalPathEntry::GslPointerInit || - It.Kind == IndirectLocalPathEntry:

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-17 Thread Haojian Wu via cfe-commits
@@ -1073,14 +1078,16 @@ static void checkExprLifetimeImpl(Sema &SemaRef, } case LK_Assignment: { - if (!MTE) + if (!MTE || pathContainsInit(Path)) return false; assert(shouldLifetimeExtendThroughPath(Path) == PathLifetimeKind

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-17 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: Thanks for the review. https://github.com/llvm/llvm-project/pull/99032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-17 Thread Haojian Wu via cfe-commits
@@ -1284,16 +1294,26 @@ void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity, auto LTResult = getEntityLifetime(&Entity); LifetimeKind LK = LTResult.getInt(); const InitializedEntity *ExtendingEntity = LTResult.getPointer(); - checkExprLifetimeImpl(Sema

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-17 Thread Haojian Wu via cfe-commits
@@ -1284,16 +1294,26 @@ void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity, auto LTResult = getEntityLifetime(&Entity); LifetimeKind LK = LTResult.getInt(); const InitializedEntity *ExtendingEntity = LTResult.getPointer(); - checkExprLifetimeImpl(Sema

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-17 Thread Haojian Wu via cfe-commits
@@ -966,7 +969,8 @@ static bool pathOnlyInitializesGslPointer(IndirectLocalPath &Path) { if (It.Kind == IndirectLocalPathEntry::LifetimeBoundCall) hokein wrote: Rewrote the `if` with the `switch`. https://github.com/llvm/llvm-project/pull/99032 __

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Michael Kruse via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Alexey Bataev via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [flang] [flang] Add -rtlib flag (PR #99058)

2024-07-17 Thread David Truby via cfe-commits
https://github.com/DavidTruby updated https://github.com/llvm/llvm-project/pull/99058 >From 66e13f92a0680742b552fabde25df7752f8510c9 Mon Sep 17 00:00:00 2001 From: David Truby Date: Tue, 16 Jul 2024 15:39:28 + Subject: [PATCH 1/3] [flang] Add -rtlib flag This patch allows the -rtlib flag w

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Pavel Skripkin via cfe-commits
@@ -60,6 +67,41 @@ void testMalloc8() { operator delete[](p); // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not operator delete[]}} } +void testMalloc9() { + int *p = (int *)my_malloc(sizeof(int)); + my_free(p); // no warning +} + +voi

[clang] [clang][driver][clang-cl] Support `--precompile` and `-fmodule-*` options in Clang-CL (PR #98761)

2024-07-17 Thread Sharadh Rajaraman via cfe-commits
@@ -0,0 +1,65 @@ +// REQUIRES: system-windows + +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t + +// RUN: %clang_cl /std:c++20 --precompile "%/t/Hello.cppm" "/Fo%/t/Hello.pcm" sharadhr wrote: I've looked at the other tests but I don't quite fol

[clang] 440fffa - [Clang][Concepts] Avoid substituting into constraints for invalid TemplateDecls (#75697)

2024-07-17 Thread via cfe-commits
Author: Younan Zhang Date: 2024-07-17T19:17:01+08:00 New Revision: 440fffad7e7231fab766c6e00e47a39ad5a9b95e URL: https://github.com/llvm/llvm-project/commit/440fffad7e7231fab766c6e00e47a39ad5a9b95e DIFF: https://github.com/llvm/llvm-project/commit/440fffad7e7231fab766c6e00e47a39ad5a9b95e.diff

[clang] [Concepts] Avoid substituting into constraints for invalid TemplateDecls (PR #75697)

2024-07-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/75697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Michael Kruse via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Alexey Bataev via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [Clang] fix assertion failure in invalid delete operator declaration check (PR #99308)

2024-07-17 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/99308 Fixes #96191 >From 39de759ac60f2f06953ebe32392c25837ba591f1 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 17 Jul 2024 14:21:31 +0300 Subject: [PATCH] [Clang] fix assertion failure in invalid delete op

[clang] [Clang] fix assertion failure in invalid delete operator declaration check (PR #99308)

2024-07-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #96191 --- Full diff: https://github.com/llvm/llvm-project/pull/99308.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1) - (modified) clang/lib/Sema/SemaExprCXX.cpp (+3) - (mod

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-17 Thread Maciej Gabka via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +dotprod -target-feature +fullfp16 -target-feature +fp16fml -target-feature +i8mm -target-feature +bf16 -verify -emit-llvm -o - %s + +// This test is testing the diagnostics that Clang emits whe

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-17 Thread Balazs Benics via cfe-commits
@@ -60,6 +67,41 @@ void testMalloc8() { operator delete[](p); // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not operator delete[]}} } +void testMalloc9() { + int *p = (int *)my_malloc(sizeof(int)); + my_free(p); // no warning +} + +voi

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Michael Kruse via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [clang][NFC] Move more functions from `Sema` to `SemaObjC` (PR #97172)

2024-07-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/97172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [libcxx] [libc][libcxx] Support for building libc++ against LLVM libc (PR #99287)

2024-07-17 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: I was just about to do something similar, so I'm glad you got to it before me. I think we'll need a CMake check on whether or not `libc` was enabled as a runtime if this option is enabled in `libcxx`, but beyond that it looks very reasonable. All we're doi

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Alexey Bataev via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [clang][Sema] Resolving Inconsistent Arguments Panic in Variadic Template Variables (PR #70280)

2024-07-17 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/70280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Resolving Inconsistent Arguments Panic in Variadic Template Variables (PR #70280)

2024-07-17 Thread via cfe-commits
cor3ntin wrote: Fixed by https://github.com/llvm/llvm-project/commit/7a28a5b3fee6c78ad59af79a3d03c00db153c49f https://github.com/llvm/llvm-project/pull/70280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [Clang] Implement CWG2351 `void{}` (PR #78060)

2024-07-17 Thread via cfe-commits
cor3ntin wrote: @MitalAshok feel free to merge in ~2 days if you don't hear back from @shafik https://github.com/llvm/llvm-project/pull/78060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [Clang] Reuse tail-padding for more types that are not POD for the purpose of layout (PR #90462)

2024-07-17 Thread via cfe-commits
cor3ntin wrote: @MitalAshok ping https://github.com/llvm/llvm-project/pull/90462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix some assertions not looking through type sugar (PR #92299)

2024-07-17 Thread via cfe-commits
cor3ntin wrote: @MitalAshok ping https://github.com/llvm/llvm-project/pull/92299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [C23] Fix typeof_unqual for qualified array types (PR #92767)

2024-07-17 Thread via cfe-commits
cor3ntin wrote: @MitalAshok ping https://github.com/llvm/llvm-project/pull/92767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix qualifier restriction of overriden methods (PR #71696)

2024-07-17 Thread via cfe-commits
cor3ntin wrote: @ecnelises are you still working on that? https://github.com/llvm/llvm-project/pull/71696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bc8a8f5 - [clang][Sema] Improve `Sema::CheckCXXDefaultArguments` (#97338)

2024-07-17 Thread via cfe-commits
Author: MagentaTreehouse Date: 2024-07-17T14:09:35+02:00 New Revision: bc8a8f5415c522f99600171e012d511c010d7309 URL: https://github.com/llvm/llvm-project/commit/bc8a8f5415c522f99600171e012d511c010d7309 DIFF: https://github.com/llvm/llvm-project/commit/bc8a8f5415c522f99600171e012d511c010d7309.di

[clang] [clang][Sema] Improve `Sema::CheckCXXDefaultArguments` (PR #97338)

2024-07-17 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/97338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Warn with -Wpre-c23-compat instead of -Wpre-c++17-compat for u8 character literals in C23 (PR #97210)

2024-07-17 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/97210 >From c6ee783243e1888074778e2cb6de05df41cc8333 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 30 Jun 2024 12:55:04 +0100 Subject: [PATCH] [Clang] Warn with -Wpre-c23-compat instead of -Wpre-c++17-compat

[clang] [Clang] [C23] Implement N2653: u8 strings are char8_t[] (PR #97208)

2024-07-17 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/97208 >From ef0072d1fc9b14f7ee657fa95f44a686b78b525a Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 30 Jun 2024 12:07:54 +0100 Subject: [PATCH 1/9] [Clang] [C23] Implement N2653: u8 strings are char8_t[] ---

[clang] 329e7c8 - [Clang] [C23] Implement N2653: u8 strings are char8_t[] (#97208)

2024-07-17 Thread via cfe-commits
Author: Mital Ashok Date: 2024-07-17T14:14:31+02:00 New Revision: 329e7c80ac2dbc16c267390da5f1baaf1cd438b1 URL: https://github.com/llvm/llvm-project/commit/329e7c80ac2dbc16c267390da5f1baaf1cd438b1 DIFF: https://github.com/llvm/llvm-project/commit/329e7c80ac2dbc16c267390da5f1baaf1cd438b1.diff L

[clang] [Clang] [C23] Implement N2653: u8 strings are char8_t[] (PR #97208)

2024-07-17 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/97208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2024-07-17 Thread Timm Baeder via cfe-commits
tbaederr wrote: Thanks for all the help with this issue. I think I figured it out - there was an unsigned wraparound some time before doing the actual allocation, which caused us to write over the bounds of the allocation. I've pushed https://github.com/llvm/llvm-project/commit/72b3d7bc87019ba

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Michael Kruse via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [libcxx] [Clang] Implement CWG2137 (list-initialization from objects of the same type) (PR #94355)

2024-07-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/94355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

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

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/92916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-07-17 Thread Alexey Bataev via cfe-commits
@@ -14658,6 +14666,193 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-07-17 Thread Fanbo Meng via cfe-commits
https://github.com/fanbo-meng updated https://github.com/llvm/llvm-project/pull/91384 >From 84e5ca4d8987d071d20b9dcba673b0c856762487 Mon Sep 17 00:00:00 2001 From: Fanbo Meng Date: Tue, 7 May 2024 13:36:38 -0400 Subject: [PATCH 01/11] [SystemZ][z/OS] Implement z/OS XPLINK ABI The XPLINK callin

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-07-17 Thread Fanbo Meng via cfe-commits
@@ -529,9 +530,355 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation +//===

  1   2   3   4   5   >