[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I think the current behavior is reasonable-ish. Rejecting specific types is a > bit weird... I think VLA should model incomplete types (but we currently > don't reject that either, which is a bug) > > IE, I would expect __is_layout_compatible to return false in the presence of

[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-05 Thread via cfe-commits
cor3ntin wrote: We should not reject (ie, make the programm ill-form) _any_ type. Just return `false` in all of these cases https://github.com/llvm/llvm-project/pull/87737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] cfb86ae - [Clang][Sema] Skip checking anonymous enum in using enum declaration (#87144)

2024-04-05 Thread via cfe-commits
Author: Qizhi Hu Date: 2024-04-05T15:18:07+08:00 New Revision: cfb86ae7497e43e9221ab890221789ae320381e9 URL: https://github.com/llvm/llvm-project/commit/cfb86ae7497e43e9221ab890221789ae320381e9 DIFF: https://github.com/llvm/llvm-project/commit/cfb86ae7497e43e9221ab890221789ae320381e9.diff LOG:

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-04-05 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/87144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add support for scalable vectors in __builtin_reduce_* functions (PR #87750)

2024-04-05 Thread Lawrence Benson via cfe-commits
https://github.com/lawben created https://github.com/llvm/llvm-project/pull/87750 Currently, a lot of `__builtin_reduce_*` function do not support scalable vectors, i.e., ARM SVE and RISCV V. This PR adds support for them. The main code change is to use a different path to extract the type fro

[clang] [Clang] Add support for scalable vectors in __builtin_reduce_* functions (PR #87750)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Lawrence Benson (lawben) Changes Currently, a lot of `__builtin_reduce_*` function do not support scalable vectors, i.e., ARM SVE and RISCV V. This PR adds support for them. The main code change is to us

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-04-05 Thread Jay Foad via cfe-commits
jayfoad wrote: Can you add at least one test for a VMEM (flat or scratch or global or buffer or image) atomic without return? That should use vscnt on GFX10. Apart from that the SIInsertWaitcnts.cpp and tests look good to me. I have not reviewed the clang parts but it looks like @Pierre-vh app

[clang] [clang] Add test for CWG593 (PR #87752)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/87752 [CWG593](https://cplusplus.github.io/CWG/issues/593.html) "Falling off the end of a destructor's function-try-block handler". As usual with CWG issues resolved as NAD, we test for status-quo confirmed by CWG. >

[clang] [clang] Add test for CWG593 (PR #87752)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes [CWG593](https://cplusplus.github.io/CWG/issues/593.html) "Falling off the end of a destructor's function-try-block handler". As usual with CWG issues resolved as NAD, we test for status-quo confirmed

[clang] [clang] Claim conformance for CWG466 (PR #87748)

2024-04-05 Thread via cfe-commits
cor3ntin wrote: I agree with that (the new wording in [basic.lookup.qual.general] ignore cv qualifications) https://github.com/llvm/llvm-project/pull/87748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [clang] Claim conformance for CWG466 (PR #87748)

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

[clang-tools-extra] 7e958f6 - [flang][clang] Add Visibility specific help text for options (#81869)

2024-04-05 Thread via cfe-commits
Author: David Spickett Date: 2024-04-05T09:03:16+01:00 New Revision: 7e958f64efea6cb824e96ace51e021afbc150922 URL: https://github.com/llvm/llvm-project/commit/7e958f64efea6cb824e96ace51e021afbc150922 DIFF: https://github.com/llvm/llvm-project/commit/7e958f64efea6cb824e96ace51e021afbc150922.diff

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

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

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread Julian Nagele via cfe-commits
https://github.com/juliannagele created https://github.com/llvm/llvm-project/pull/87753 When generating tbaa.struct metadata we treat multiple adjacent bitfields as a single "field", with one corresponding entry in the metadata. At the moment this is achieved by adding an entry for the first b

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Julian Nagele (juliannagele) Changes When generating tbaa.struct metadata we treat multiple adjacent bitfields as a single "field", with one corresponding entry in the metadata. At the moment this is achieved by adding an entry for the fi

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread Julian Nagele via cfe-commits
https://github.com/juliannagele updated https://github.com/llvm/llvm-project/pull/87753 >From db1ee85ca26d7ddbaa163f4e9b1038c28e3d4a57 Mon Sep 17 00:00:00 2001 From: Julian Nagele Date: Thu, 4 Apr 2024 11:48:19 +0100 Subject: [PATCH] Fix tbaa.struct metadata for bitfields using big endian. Whe

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2024-04-05 Thread Charalampos Mitrodimas via cfe-commits
https://github.com/charmitro updated https://github.com/llvm/llvm-project/pull/74510 >From ffc6db2006ed503369ce79a6507fa237649e6af1 Mon Sep 17 00:00:00 2001 From: Charalampos Mitrodimas Date: Tue, 5 Dec 2023 11:46:56 +0200 Subject: [PATCH] [clang] Disable missing definition warning on pure virt

[clang-tools-extra] aff197f - Reland "[flang][clang] Add Visibility specific help text for options (#81869)"

2024-04-05 Thread David Spickett via cfe-commits
Author: David Spickett Date: 2024-04-05T08:27:59Z New Revision: aff197ff2163a4b7732d08b833906cc21f4a5c89 URL: https://github.com/llvm/llvm-project/commit/aff197ff2163a4b7732d08b833906cc21f4a5c89 DIFF: https://github.com/llvm/llvm-project/commit/aff197ff2163a4b7732d08b833906cc21f4a5c89.diff LOG

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

2024-04-05 Thread Orlando Cazalet-Hyams via cfe-commits
OCHyams wrote: > LLVM IR parts look good to me. Thanks! @pogo59 said: > Converting frame-types.s from v4 to v5 should be done as a separate commit. > Then adding the alias would be a simpler change to review. I've split that into two commits in this PR: upgrade to v5: [18446f2](https://gith

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-04-05 Thread via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/86536 >From fdde1056e8a34ad642f50eef120dbc8ee08f8825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Mon, 18 Mar 2024 14:47:57 +0100 Subject: [PATCH 1/2] [analyzer] Make recognition of hardened __F

[clang] fb299ca - [analyzer] Make recognition of hardened __FOO_chk functions explicit (#86536)

2024-04-05 Thread via cfe-commits
Author: NagyDonat Date: 2024-04-05T11:20:27+02:00 New Revision: fb299cae5167f63933df45979e3e9de97fca1b8f URL: https://github.com/llvm/llvm-project/commit/fb299cae5167f63933df45979e3e9de97fca1b8f DIFF: https://github.com/llvm/llvm-project/commit/fb299cae5167f63933df45979e3e9de97fca1b8f.diff LOG

[clang] [analyzer] Make recognition of hardened __FOO_chk functions explicit (PR #86536)

2024-04-05 Thread via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/86536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 163301d - [analyzer] Remove barely used class 'KnownSVal' (NFC) (#86953)

2024-04-05 Thread via cfe-commits
Author: NagyDonat Date: 2024-04-05T11:22:08+02:00 New Revision: 163301d785a7e6b45d25a4060a239d6af72d6ae6 URL: https://github.com/llvm/llvm-project/commit/163301d785a7e6b45d25a4060a239d6af72d6ae6 DIFF: https://github.com/llvm/llvm-project/commit/163301d785a7e6b45d25a4060a239d6af72d6ae6.diff LOG

[clang] [analyzer] Remove barely used class 'KnownSVal' (NFC) (PR #86953)

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

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread via cfe-commits
@@ -319,7 +320,10 @@ CodeGenTBAA::CollectFields(uint64_t BaseOffset, // base type. if ((*i)->isBitField()) { const CGBitFieldInfo &Info = CGRL.getBitFieldInfo(*i); -if (Info.Offset != 0) +bool IsBE = Context.getTargetInfo().isBigEndian(); +

[clang] [compiler-rt] Fix "[clang][UBSan] Add implicit conversion check for bitfields" (PR #87761)

2024-04-05 Thread Axel Lundberg via cfe-commits
https://github.com/Zonotora created https://github.com/llvm/llvm-project/pull/87761 Fix since #75481 got reverted. - Explicitly set BitfieldBits to 0 to avoid uninitialized field member for the integer checks: ```diff - llvm::ConstantInt::get(Builder.getInt8Ty(), Check.first)}; + ll

[clang] [compiler-rt] Fix "[clang][UBSan] Add implicit conversion check for bitfields" (PR #87761)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Axel Lundberg (Zonotora) Changes Fix since #75481 got reverted. - Explicitly set BitfieldBits to 0 to avoid uninitialized field member for the integer checks: ```diff - llvm::ConstantInt::get(Builder.getInt8Ty(), Check.first)}; +

[clang] [compiler-rt] Fix "[clang][UBSan] Add implicit conversion check for bitfields" (PR #87761)

2024-04-05 Thread Axel Lundberg via cfe-commits
https://github.com/Zonotora updated https://github.com/llvm/llvm-project/pull/87761 >From a2a1ba32654f6b4a6b3d85e7a8733c9f8bd1b5f7 Mon Sep 17 00:00:00 2001 From: Zonotora Date: Thu, 4 Apr 2024 20:27:14 +0200 Subject: [PATCH] Fix "[clang][UBSan] Add implicit conversion check for bitfields" ---

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2024-04-05 Thread Charalampos Mitrodimas via cfe-commits
https://github.com/charmitro updated https://github.com/llvm/llvm-project/pull/74510 >From c0ef5a06026d449aadfadca9948d148b25d1 Mon Sep 17 00:00:00 2001 From: Charalampos Mitrodimas Date: Tue, 5 Dec 2023 11:46:56 +0200 Subject: [PATCH] [clang] Disable missing definition warning on pure virt

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread Julian Nagele via cfe-commits
@@ -319,7 +320,10 @@ CodeGenTBAA::CollectFields(uint64_t BaseOffset, // base type. if ((*i)->isBitField()) { const CGBitFieldInfo &Info = CGRL.getBitFieldInfo(*i); -if (Info.Offset != 0) +bool IsBE = Context.getTargetInfo().isBigEndian(); +

[clang] [NFC] Remove semicolons after function definitions (PR #87764)

2024-04-05 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/87764 They were accidentally left behind when https://github.com/llvm/llvm-project/pull/86536 converted some lambdas into stand-alone methods. This fixes warnings from -Wc++98-compat-extra-semi >From 77e472432c524a

[clang] [NFC] Remove semicolons after function definitions (PR #87764)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (NagyDonat) Changes They were accidentally left behind when https://github.com/llvm/llvm-project/pull/86536 converted some lambdas into stand-alone methods. This fixes warnings from -Wc++98-compat-extra-semi --- Fu

[clang] 9a16c12 - [NFC] Remove semicolons after function definitions (#87764)

2024-04-05 Thread via cfe-commits
Author: NagyDonat Date: 2024-04-05T12:01:43+02:00 New Revision: 9a16c12abe13a06470502370833e7c0e6ff70e2c URL: https://github.com/llvm/llvm-project/commit/9a16c12abe13a06470502370833e7c0e6ff70e2c DIFF: https://github.com/llvm/llvm-project/commit/9a16c12abe13a06470502370833e7c0e6ff70e2c.diff LOG

[clang] [NFC] Remove semicolons after function definitions (PR #87764)

2024-04-05 Thread via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/87764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2024-04-05 Thread Charalampos Mitrodimas via cfe-commits
@@ -18931,7 +18931,7 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func, // constant evaluated bool NeededForConstantEvaluation = isPotentiallyConstantEvaluatedContext(*this) && - isImplicitlyDefinableConstexprFunction(Func); + is

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2024-04-05 Thread Charalampos Mitrodimas via cfe-commits
https://github.com/charmitro updated https://github.com/llvm/llvm-project/pull/74510 >From 0348c138e5a4295d86defbe40259105b64703d13 Mon Sep 17 00:00:00 2001 From: Charalampos Mitrodimas Date: Tue, 5 Dec 2023 11:46:56 +0200 Subject: [PATCH] [clang] Disable missing definition warning on pure virt

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread via cfe-commits
@@ -319,7 +320,10 @@ CodeGenTBAA::CollectFields(uint64_t BaseOffset, // base type. if ((*i)->isBitField()) { const CGBitFieldInfo &Info = CGRL.getBitFieldInfo(*i); -if (Info.Offset != 0) +bool IsBE = Context.getTargetInfo().isBigEndian(); +

[clang] [llvm] Remove remaining uses of Instruction-constructors that insert before another Instruction (PR #85981)

2024-04-05 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/85981 >From b2f6d93d87082dd0ccc91a9a8094a4c3552b81a2 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Wed, 20 Mar 2024 17:43:10 + Subject: [PATCH] Assorted fixes since rebase and outside core llvm --- clang/lib

[clang] Rework the printing of attributes (PR #87281)

2024-04-05 Thread Vassil Vassilev via cfe-commits
@@ -73,3 +73,15 @@ class C { // CHECK: void pwtt(void *, int) __attribute__((pointer_with_type_tag(foo, 2, 3))); void pwtt(void *, int) __attribute__((pointer_with_type_tag(foo, 2, 3))); }; + +#define ANNOTATE_ATTR __attribute__((annotate("Annotated"))) +ANNOTATE_ATTR int

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

2024-04-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/87768 None >From eb6c961896646a62f334284093994160d8c0e38e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 5 Apr 2024 19:12:28 +0800 Subject: [PATCH] [clang][Sema] Avoid guessing unexpanded packs' size in getFu

[clang] Fix formatting of a comment; NFC (PR #87739)

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

[clang] Fix formatting of a comment; NFC (PR #87739)

2024-04-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you for the cleanup! https://github.com/llvm/llvm-project/pull/87739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] 2c0a99f - Fix formatting of a comment; NFC (#87739)

2024-04-05 Thread via cfe-commits
Author: AX网 Date: 2024-04-05T07:40:36-04:00 New Revision: 2c0a99f54fd5045a1b382c03fc5481b648a62a8e URL: https://github.com/llvm/llvm-project/commit/2c0a99f54fd5045a1b382c03fc5481b648a62a8e DIFF: https://github.com/llvm/llvm-project/commit/2c0a99f54fd5045a1b382c03fc5481b648a62a8e.diff LOG: Fix

[clang] Fix formatting of a comment; NFC (PR #87739)

2024-04-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/87739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix formatting of a comment; NFC (PR #87739)

2024-04-05 Thread via cfe-commits
github-actions[bot] wrote: @ax-6 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, yo

[clang] [flang] [FLANG] allow -fopenmp= (PR #86816)

2024-04-05 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Thanks! LGTM https://github.com/llvm/llvm-project/pull/86816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > We should not reject (ie, make the programm ill-form) _any_ type. Just return > `false` in all of these cases GCC rejects incomplete types: https://godbolt.org/z/xWbes5Wsc Both Clang and GCC reject instantiating templates with VLAs but accept it in the builtin: https://go

[libclc] [llvm] [libclc] Refactor build system to allow in-tree builds (PR #87622)

2024-04-05 Thread Romaric Jodin via cfe-commits
@@ -358,3 +399,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) endif() endforeach( d ) endforeach( t ) + +if( NOT LIBCLC_STANDALONE_BUILD ) + add_subdirectory( test ) rjodinchr wrote: There is no `CMakeLists.txt` in `/llvm/libclc/test`. https://github.com

[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-05 Thread via cfe-commits
cor3ntin wrote: The library does require complete types, interesting https://eel.is/c++draft/meta However, at the language level, I cannot find any wording either way. https://github.com/llvm/llvm-project/pull/87737 ___ cfe-commits mailing list cfe-c

[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-05 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I think clang should reject incomplete types when the standard says so. It doesn't seem particularly useful to accept some special cases but reject incomplete types in general. All the traits should probably be audited once. It looks like Clang has other problematic cases: ht

[clang] [llvm] [OpenMP] Add amdgpu-num-work-groups attribute to OpenMP kernels (PR #87695)

2024-04-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/87695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > However, at the language level, I cannot find any wording either way. In my reading, http://eel.is/c++draft/basic.types.general#11 makes any type layout-compatible with itself, and even ignores cv-qualification: > Two types cv1 T1 and cv2 T2 are [layout-compatible > types](ht

[clang] 2650375 - [OpenMP] Add amdgpu-num-work-groups attribute to OpenMP kernels (#87695)

2024-04-05 Thread via cfe-commits
Author: Joseph Huber Date: 2024-04-05T07:38:01-05:00 New Revision: 2650375b3beeb60596ca38e2e06685e48e8ed01f URL: https://github.com/llvm/llvm-project/commit/2650375b3beeb60596ca38e2e06685e48e8ed01f DIFF: https://github.com/llvm/llvm-project/commit/2650375b3beeb60596ca38e2e06685e48e8ed01f.diff

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-05 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/87772 This changes the handling of anonymous TagDecls to the following rules: - If the TagDecl is embedded in the declaration for some VarDecl (this is the only possibility for RecordDecls), then pretend the ch

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Grumberg (daniel-grumberg) Changes This changes the handling of anonymous TagDecls to the following rules: - If the TagDecl is embedded in the declaration for some VarDecl (this is the only possibility for RecordDecls), then pretend

[clang] [flang] [flang][Frontend] Implement printing defined macros via -dM (PR #87627)

2024-04-05 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: The Windows build has the same failure as before (it's a known build breakage): ``` error LNK2019: unresolved external symbol _FortranAioSetForm referenced in function "private: virtual void __cdecl ExternalIOTests_TestWriteAfterEndfile_Test::TestBody(void)" (?TestBody@External

[clang] 6d2f57d - [FLANG] allow -fopenmp= (#86816)

2024-04-05 Thread via cfe-commits
Author: Mats Petersson Date: 2024-04-05T13:48:43+01:00 New Revision: 6d2f57d2c4053af8f0c730bbfed141949149604c URL: https://github.com/llvm/llvm-project/commit/6d2f57d2c4053af8f0c730bbfed141949149604c DIFF: https://github.com/llvm/llvm-project/commit/6d2f57d2c4053af8f0c730bbfed141949149604c.diff

[clang] [flang] [FLANG] allow -fopenmp= (PR #86816)

2024-04-05 Thread Mats Petersson via cfe-commits
https://github.com/Leporacanthicus closed https://github.com/llvm/llvm-project/pull/86816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > However, at the language level, I cannot find any wording either way. > > In my reading, http://eel.is/c++draft/basic.types.general#11 makes any type > layout-compatible with itself, and even ignores cv-qualification: > > > Two types cv1 T1 and cv2 T2 are [layout-compat

[clang] [clang] Catch missing format attributes (PR #70024)

2024-04-05 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70024 From 184fa1b21011d3700f2d501c49882bb87fcb5f38 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribut

[clang] [clang] Catch missing format attributes (PR #70024)

2024-04-05 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia reopened https://github.com/llvm/llvm-project/pull/70024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -30,13 +31,23 @@ class OpenACCConstructStmt : public Stmt { /// the directive. SourceRange Range; - // TODO OPENACC: Clauses should probably be collected in this class. + /// The list of clauses. This is stored here as an ArrayRef, as this is the + /// most convieni

[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-05 Thread Aaron Ballman via cfe-commits
@@ -1741,8 +1741,10 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(unsigned char, signed char)); static_assert(__is_layout_compatible(int[], int[])); static_assert(__is_layout_compatible(int[2], int[2])); - static_assert(!__is_layout_compatible

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -94,9 +94,10 @@ StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K, case OpenACCDirectiveKind::Parallel: case OpenACCDirectiveKind::Serial: case OpenACCDirectiveKind::Kernels: +// TODO OpenACC: Add clauses to the construct here. return OpenA

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public OpenACCConstructStmt { /// those three, as they are semantically identical, and have only minor /// differences in the permitted list of clauses, which can be differentiated by /// the 'Kind'. -class OpenACCC

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Alexey Bataev via cfe-commits
@@ -94,9 +94,10 @@ StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K, case OpenACCDirectiveKind::Parallel: case OpenACCDirectiveKind::Serial: case OpenACCDirectiveKind::Kernels: +// TODO OpenACC: Add clauses to the construct here. return OpenA

[clang] [clang] Catch missing format attributes (PR #70024)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/70024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/70024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -1698,6 +1698,9 @@ class Sema final { ChangedStateAtExit }; + void DiagnoseMissingFormatAttributes(const FunctionDecl *FDecl, Endilll wrote: This declaration is placed among functions implemented in `SemaAttr.cpp`, as you might see around line 1296

[clang] [libTooling] Fix `getFileRangeForEdit` for inner nested template types (PR #87673)

2024-04-05 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/87673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libTooling] Fix `getFileRangeForEdit` for inner nested template types (PR #87673)

2024-04-05 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. Nice work - really subtle! I'd been wondering how clang handles this issue (of relexing returning the wrong token because it lacked context). https://github.com/llvm/llvm-project/pull/87673 ___ cfe-

[clang] [libTooling] Fix `getFileRangeForEdit` for inner nested template types (PR #87673)

2024-04-05 Thread Yitzhak Mandelbaum via cfe-commits
@@ -510,6 +519,26 @@ int c = M3(3); Visitor.runOver(Code.code()); } +TEST(SourceCodeTest, InnerNestedTemplate) { ymand wrote: Add a test case that covers the case of the split being in the BeginToken? https://github.com/llvm/llvm-project/pull/87673 ___

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Alexey Bataev via cfe-commits
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public OpenACCConstructStmt { /// those three, as they are semantically identical, and have only minor /// differences in the permitted list of clauses, which can be differentiated by /// the 'Kind'. -class OpenACCC

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -94,9 +94,10 @@ StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K, case OpenACCDirectiveKind::Parallel: case OpenACCDirectiveKind::Serial: case OpenACCDirectiveKind::Kernels: +// TODO OpenACC: Add clauses to the construct here. return OpenA

[clang] Rework the printing of attributes (PR #87281)

2024-04-05 Thread Aaron Ballman via cfe-commits
@@ -73,3 +73,15 @@ class C { // CHECK: void pwtt(void *, int) __attribute__((pointer_with_type_tag(foo, 2, 3))); void pwtt(void *, int) __attribute__((pointer_with_type_tag(foo, 2, 3))); }; + +#define ANNOTATE_ATTR __attribute__((annotate("Annotated"))) +ANNOTATE_ATTR int

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public OpenACCConstructStmt { /// those three, as they are semantically identical, and have only minor /// differences in the permitted list of clauses, which can be differentiated by /// the 'Kind'. -class OpenACCC

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Alexey Bataev via cfe-commits
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public OpenACCConstructStmt { /// those three, as they are semantically identical, and have only minor /// differences in the permitted list of clauses, which can be differentiated by /// the 'Kind'. -class OpenACCC

[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -1741,8 +1741,10 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(unsigned char, signed char)); static_assert(__is_layout_compatible(int[], int[])); static_assert(__is_layout_compatible(int[2], int[2])); - static_assert(!__is_layout_compatible

[clang] [llvm] Remove remaining uses of Instruction-constructors that insert before another Instruction (PR #85981)

2024-04-05 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -1542,19 +1542,10 @@ class CallBase : public Instruction { OperandBundleDef OB, Instruction *InsertPt = nullptr); - /// Create a clone of \p CB with operand bundle \p OB added. - static CallBase *addO

[clang] [CUDA][HIP] Fix record layout on Windows (PR #87651)

2024-04-05 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > > Keeping layout in sync makes sense to me, but I'm completely unfamiliar > > with the windows side. > > @rnk is there anything else we need to worry about? > > I checked, and I think this routes everything over to the MS record layout > builder, so it should be comprehensive

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public OpenACCConstructStmt { /// those three, as they are semantically identical, and have only minor /// differences in the permitted list of clauses, which can be differentiated by /// the 'Kind'. -class OpenACCC

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread Julian Nagele via cfe-commits
https://github.com/juliannagele updated https://github.com/llvm/llvm-project/pull/87753 >From db1ee85ca26d7ddbaa163f4e9b1038c28e3d4a57 Mon Sep 17 00:00:00 2001 From: Julian Nagele Date: Thu, 4 Apr 2024 11:48:19 +0100 Subject: [PATCH 1/2] Fix tbaa.struct metadata for bitfields using big endian.

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread Julian Nagele via cfe-commits
@@ -319,7 +320,10 @@ CodeGenTBAA::CollectFields(uint64_t BaseOffset, // base type. if ((*i)->isBitField()) { const CGBitFieldInfo &Info = CGRL.getBitFieldInfo(*i); -if (Info.Offset != 0) +bool IsBE = Context.getTargetInfo().isBigEndian(); +

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Aaron Ballman via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle

[clang] [Sema] Remove the duplicated `DeduceTemplateArguments` for partial specialization, NFC (PR #87782)

2024-04-05 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/87782 We have two identical "DeduceTemplateArguments" implementations for class and variable partial template specializations, this patch removes the duplicated code. >From 209ace7709ca176216a94cfd10edee13ea26955d Mo

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman requested changes to this pull request. Marking as requesting changes until we get agreement on the behavior for the Microsoft ABI. https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commit

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread Florian Hahn via cfe-commits
https://github.com/fhahn approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/87753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Remove the duplicated `DeduceTemplateArguments` for partial specialization, NFC (PR #87782)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes We have two identical "DeduceTemplateArguments" implementations for class and variable partial template specializations, this patch removes the duplicated code. --- Full diff: https://github.com/llvm/llvm-pro

[clang] [Sema] Remove the duplicated `DeduceTemplateArguments` for partial specialization, NFC (PR #87782)

2024-04-05 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 6d2f57d2c4053af8f0c730bbfed141949149604c 209ace7709ca176216a94cfd10edee13ea26955d --

[clang] [analyzer] Set and display CSA analysis entry points as notes on debugging (PR #84823)

2024-04-05 Thread Balazs Benics via cfe-commits
@@ -788,7 +791,7 @@ class PathDiagnostic : public llvm::FoldingSetNode { PathDiagnostic(StringRef CheckerName, const Decl *DeclWithIssue, StringRef bugtype, StringRef verboseDesc, StringRef shortDesc, StringRef category, PathDiagnosticLocatio

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread via cfe-commits
https://github.com/dobbelaj-snps approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/87753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] CTAD: build aggregate deduction guides for alias templates. (PR #85904)

2024-04-05 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/85904 >From a1ac905dfbcfd1d615c5326c45c7f599826cc097 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 15 Mar 2024 10:47:09 +0100 Subject: [PATCH 1/4] [clang] Move the aggreate deduction guide cache login to SemaTem

[clang] [clang] CTAD: build aggregate deduction guides for alias templates. (PR #85904)

2024-04-05 Thread Haojian Wu via cfe-commits
@@ -9713,7 +9713,8 @@ class Sema final { /// not already done so. void DeclareImplicitDeductionGuides(TemplateDecl *Template, SourceLocation Loc); - FunctionTemplateDecl *DeclareImplicitDeductionGuideFromInitList( + /// Declare aggreg

[clang] [Sema] Remove the duplicated `DeduceTemplateArguments` for partial specialization, NFC (PR #87782)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/87782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87675 >From 2e05458175478002a14c9316a7fde66f7301dd94 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Thu, 4 Apr 2024 10:59:34 -0700 Subject: [PATCH 1/2] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure A

[clang] [clang] CTAD: build aggregate deduction guides for alias templates. (PR #85904)

2024-04-05 Thread Haojian Wu via cfe-commits
@@ -2792,6 +2811,24 @@ void DeclareImplicitDeductionGuidesForTypeAlias( } else { assert(false && "unhandled RHS type of the alias"); } + return {Template, AliasRhsTemplateArgs}; +} + +// Build deduction guides for a type alias template. +void DeclareImplicitDeductionGu

[clang] [clang] CTAD: build aggregate deduction guides for alias templates. (PR #85904)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -2792,6 +2811,24 @@ void DeclareImplicitDeductionGuidesForTypeAlias( } else { assert(false && "unhandled RHS type of the alias"); } + return {Template, AliasRhsTemplateArgs}; +} + +// Build deduction guides for a type alias template. +void DeclareImplicitDeductionGu

[clang] [clang] CTAD: build aggregate deduction guides for alias templates. (PR #85904)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. https://github.com/llvm/llvm-project/pull/85904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f905935 - Fix tbaa.struct metadata for bitfields using big endian. (#87753)

2024-04-05 Thread via cfe-commits
Author: Julian Nagele Date: 2024-04-05T15:26:41+01:00 New Revision: f905935ff96da4c04d2a6bf431340fd16e3a14ea URL: https://github.com/llvm/llvm-project/commit/f905935ff96da4c04d2a6bf431340fd16e3a14ea DIFF: https://github.com/llvm/llvm-project/commit/f905935ff96da4c04d2a6bf431340fd16e3a14ea.diff

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/87753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >