[clang-tools-extra] da95d92 - [clang][lex] Always pass suggested module to `InclusionDirective()` callback (#81061)

2024-02-08 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-02-08T10:19:18-08:00 New Revision: da95d926f6fce4ed9707c77908ad96624268f134 URL: https://github.com/llvm/llvm-project/commit/da95d926f6fce4ed9707c77908ad96624268f134 DIFF: https://github.com/llvm/llvm-project/commit/da95d926f6fce4ed9707c77908ad96624268f134.diff L

[clang] [clang-tools-extra] [clang][lex] Always pass suggested module to `InclusionDirective()` callback (PR #81061)

2024-02-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/81061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jon Roelofs (jroelofs) Changes We should only warn if the default version is the one that is unused. Fixes: https://github.com/llvm/llvm-project/issues/80227 --- Full diff: https://github.com/llvm/llvm-project/pull/81167.diff 4 Files Af

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-08 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 ff8c865838b46d0202963b816fbed50aaf96a7f4 96e3020eaa69f7f14b67617a250df3041cc1996b --

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-08 Thread Stanislav Mekhanoshin via cfe-commits
@@ -1562,8 +1562,9 @@ bool IRTranslator::translateBitCast(const User &U, bool IRTranslator::translateCast(unsigned Opcode, const User &U, MachineIRBuilder &MIRBuilder) { - if (U.getType()->getScalarType()->isBFloatTy() || - U.getOperand(0

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-08 Thread Stanislav Mekhanoshin via cfe-commits
@@ -521,8 +521,11 @@ void AMDGPUInstPrinter::printImmediateV216(uint32_t Imm, uint8_t OpType, if (printImmediateFloat32(Imm, STI, O)) return; break; + case AMDGPU::OPERAND_REG_IMM_V2BF16: case AMDGPU::OPERAND_REG_IMM_V2FP16: + case AMDGPU::OPERAND_REG_INLINE

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-08 Thread Stanislav Mekhanoshin via cfe-commits
@@ -79,17 +79,17 @@ define amdgpu_ps void @test_llvm_amdgcn_fdot2_bf16_bf16_sis( ; GFX11: ; %bb.0: ; %entry ; GFX11-NEXT:v_mov_b32_e32 v2, s1 ; GFX11-NEXT:s_delay_alu instid0(VALU_DEP_1) -; GFX11-NEXT:v_dot2_bf16_bf16 v2, s0, 0x10001, v2 +; GFX11-NEXT:v_do

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-08 Thread Stanislav Mekhanoshin via cfe-commits
@@ -4181,13 +4181,20 @@ bool SIInstrInfo::isInlineConstant(const MachineOperand &MO, case AMDGPU::OPERAND_REG_INLINE_C_V2INT16: case AMDGPU::OPERAND_REG_INLINE_AC_V2INT16: return AMDGPU::isInlinableLiteralV2I16(Imm); + case AMDGPU::OPERAND_REG_IMM_V2BF16:

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81167 >From 96e3020eaa69f7f14b67617a250df3041cc1996b Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 10:02:50 -0800 Subject: [PATCH 1/2] [clang][sema] Fix -Wunused-function on target_version'd file-s

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-08 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec edited https://github.com/llvm/llvm-project/pull/80908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80171 >From 6f8851bf21ff0a6bc9b4f2ff39df6bf00f30ee34 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 31 Jan 2024 11:09:11 -0500 Subject: [PATCH 1/2] [Clang][Sema] Diagnose friend declarations with enum

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-08 Thread Krystian Stasiowski via cfe-commits
@@ -17242,6 +17242,23 @@ Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, return true; } + if (TUK == TUK_Friend && Kind == TagTypeKind::Enum) { +// C++23 [dcl.type.elab]p4: +// If an elaborated-type-specifier appears with th

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-08 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > Good example. This pass should be run post-inline. @aeubanks, any reason we > want to run it early in the pipeline? We want the main function simplification pipeline to see these function attributes because some optimizations trigger or don't trigger depending on the presenc

[clang] 687304a - [clang][lex] Fix build failure after da95d926

2024-02-08 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2024-02-08T10:28:48-08:00 New Revision: 687304a018d36c4b0def4618a98fee6975172453 URL: https://github.com/llvm/llvm-project/commit/687304a018d36c4b0def4618a98fee6975172453 DIFF: https://github.com/llvm/llvm-project/commit/687304a018d36c4b0def4618a98fee6975172453.diff L

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-08 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > I'm suggesting that we modify Clang so that `-ffast-math` _doesn't affect_ > `denormal-fp-math`, by (as I mentioned before) removing the overload > [Linux::getDefaultDenormalModeForType](https://github.com/llvm/llvm-project/blob/d4c5acac99e83ffa12d2d720c9e502a181cbd7ea/clang

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Looks like there is a test (`clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp`) that contains the following: ```cpp #ifdef PR64602 // Should not crash template struct S { auto foo(auto); }; template <> auto S<>::foo(auto) { return 1; } // CHECK8: error

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-08 Thread David Goldman via cfe-commits
@@ -538,11 +564,205 @@ std::optional checkName(const NamedDecl &RenameDecl, Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Re

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

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

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-08 Thread Vlad Serebrennikov via cfe-commits
@@ -17242,6 +17242,23 @@ Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, return true; } + if (TUK == TUK_Friend && Kind == TagTypeKind::Enum) { +// C++23 [dcl.type.elab]p4: +// If an elaborated-type-specifier appears with th

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-08 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/80171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-08 Thread via cfe-commits
Sirraide wrote: > > We also need to figure out what to do w/ `clang::assume`, because the > > entire situation with the two being separate attributes is a bit of a mess, > > as @erichkeane also pointed out. That can probably be resolved separately > > from the RFC, however—though I’m not that

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-08 Thread Erich Keane via cfe-commits
erichkeane wrote: > Looks like there is a test > (`clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp`) that > contains the following: > > ```c++ > #ifdef PR64602 // Should not crash > template > struct S > { > auto foo(auto); > }; > > template <> > auto S<>::foo(auto) > { >

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-08 Thread Erich Keane via cfe-commits
erichkeane wrote: > > > We also need to figure out what to do w/ `clang::assume`, because the > > > entire situation with the two being separate attributes is a bit of a > > > mess, as @erichkeane also pointed out. That can probably be resolved > > > separately from the RFC, however—though I’m

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-08 Thread via cfe-commits
https://github.com/jkorous-apple edited https://github.com/llvm/llvm-project/pull/80084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-08 Thread Nico Weber via cfe-commits
nico wrote: This breaks check-clang-tools: http://45.33.8.238/linux/130320/step_8.txt Please take a look and revert for now if it takes a while to fix. https://github.com/llvm/llvm-project/pull/80864 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang-tools-extra] [clang-tidy] Fix failing test after 17f0680f69f44d340fd0205f7763b2830357c0d5 (PR #81171)

2024-02-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/81171 The following test case in `clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp` is failing: ```cpp #ifdef PR64602 // Should not crash template struct S { auto foo(auto); }; template <> auto

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-08 Thread Erich Keane via cfe-commits
erichkeane wrote: > Looks like there is a test > (`clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp`) that > contains the following: > > ```c++ > #ifdef PR64602 // Should not crash > template > struct S > { > auto foo(auto); > }; > > template <> > auto S<>::foo(auto) > { >

[clang-tools-extra] [clang-tidy] Fix failing test after #80864 (PR #81171)

2024-02-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/81171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix failing test after #80864 (PR #81171)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Krystian Stasiowski (sdkrystian) Changes The following test case in `clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp` is failing: ```cpp #ifdef PR64602 // Should not crash template struct S {

[clang-tools-extra] [clang-tidy] Fix failing test after #80864 (PR #81171)

2024-02-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/81171 >From ca871fca01e07bd1dcbdab3256cb1631dabca853 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 8 Feb 2024 13:42:38 -0500 Subject: [PATCH] [clang-tidy] Fix failing test after 17f0680f69f44d340fd0

[clang] [-Wunsafe-buffer-usage] Fixits for array decayed to pointer (PR #80347)

2024-02-08 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80347 >From 463a9904c1ae85fbdc0bd6029c6effea3fb16ea6 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Tue, 23 Jan 2024 16:16:10 -0800 Subject: [PATCH 01/18] [-Wunsafe-buffer-usage] Move Strategy class to the head

[clang-tools-extra] [clang-tidy] Fix failing test after #80864 (PR #81171)

2024-02-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This seems right to me, though a 2nd reviewer would be nice. I don't think we should wait for CI on this due to it fixing a bot-breakage. https://github.com/llvm/llvm-project/pull/81171 ___ cf

[clang-tools-extra] [clang-tidy] Fix failing test after #80864 (PR #81171)

2024-02-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, purpose of this test is just to verify that errors (any) are shown in clang-tidy https://github.com/llvm/llvm-project/pull/81171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang-tools-extra] [clang-tidy] Fix failing test after #80864 (PR #81171)

2024-02-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane I'm building the check-clang-extra target locally just to make sure that the test passes... should be done in ~5 mins https://github.com/llvm/llvm-project/pull/81171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81172)

2024-02-08 Thread via cfe-commits
https://github.com/mahtohappy created https://github.com/llvm/llvm-project/pull/81172 For templates, isDependentContext() is true, that's why the previous if check was failing. Here, we traverse the RD and upon finding a Union declaration we check if at least one member of the union is initial

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81172)

2024-02-08 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][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81172)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (mahtohappy) Changes For templates, isDependentContext() is true, that's why the previous if check was failing. Here, we traverse the RD and upon finding a Union declaration we check if at least one member of the union is initialized

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81172)

2024-02-08 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 ab4a793e8bc78f50f9f104c9c732e2dd91bf70a2 aeb0686c76f2745111acd92c0d6b77faf69d2ed6 --

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/81173 This refactors the fast-math handling in the clang driver, moving the settings into a lambda that is shared by the -ffp-model=fast and -ffast-math code. Previously the -ffp-model=fast handler changed the loca

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Andy Kaylor (andykaylor) Changes This refactors the fast-math handling in the clang driver, moving the settings into a lambda that is shared by the -ffp-model=fast and -ffast-math code. Previously the -ff

[clang-tools-extra] a56fa16 - [clang-tidy] Fix failing test after #80864 (#81171)

2024-02-08 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-02-08T13:59:47-05:00 New Revision: a56fa161ab2617fa3aab3f91285fc757b6a8e09b URL: https://github.com/llvm/llvm-project/commit/a56fa161ab2617fa3aab3f91285fc757b6a8e09b DIFF: https://github.com/llvm/llvm-project/commit/a56fa161ab2617fa3aab3f91285fc757b6a8e09b

[clang-tools-extra] [clang-tidy] Fix failing test after #80864 (PR #81171)

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

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Fangrui Song via cfe-commits
@@ -3061,22 +3080,7 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, continue; [[fallthrough]]; MaskRay wrote: Should fallthrough still be used? https://github.com/llvm/llvm-project/pull/81173 _

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80171 >From 921ee093c7366210a8e8587baab6f5d26ae506c3 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 31 Jan 2024 11:09:11 -0500 Subject: [PATCH] [Clang][Sema] Diagnose friend declarations with enum el

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Andy Kaylor via cfe-commits
@@ -3061,22 +3080,7 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, continue; [[fallthrough]]; andykaylor wrote: This is falling through from OPT_Ofast to OPT_ffast_math. I think we still want that to happen. It's

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81172)

2024-02-08 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/81172 >From aeb0686c76f2745111acd92c0d6b77faf69d2ed6 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Thu, 8 Feb 2024 10:51:22 -0800 Subject: [PATCH 1/2] [Clang][Sema] Diagnosis for constexpr constructor not initial

[clang] Revert "[X86][clang] Lift _BitInt() supported max width." (PR #81175)

2024-02-08 Thread Harald van Dijk via cfe-commits
https://github.com/hvdijk created https://github.com/llvm/llvm-project/pull/81175 This reverts commit def720726b73e0d7ab139376ab3ea955f25f4d89. As noted in #60925 and in D86310, with the current implementation of `_BitInt` in Clang, we can have either a correct `__int128` implementation, or a

[clang] Revert "[X86][clang] Lift _BitInt() supported max width." (PR #81175)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Harald van Dijk (hvdijk) Changes This reverts commit def720726b73e0d7ab139376ab3ea955f25f4d89. As noted in #60925 and in D86310, with the current implementation of `_BitInt` in Clang, we can have either a correct `__int128` implementation

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/81173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-08 Thread Justin Stitt via cfe-commits
JustinStitt wrote: ping! https://github.com/llvm/llvm-project/pull/80089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIR-V] Add create.handle intrinsic (PR #81038)

2024-02-08 Thread Michal Paszkowski via cfe-commits
https://github.com/michalpaszkowski approved this pull request. https://github.com/llvm/llvm-project/pull/81038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] Use relative includes to allow source-based dependencies without `-I` (PR #80443)

2024-02-08 Thread Louis Dionne via cfe-commits
ldionne wrote: Doing ad-hoc changes like that to provide an apparent guarantee without actually documenting it, testing it and enforcing it throughout is just churning the code base. Unless we actually have a plan to do that properly, I would push back this change. I understand you're just try

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Nemanja Ivanovic via cfe-commits
https://github.com/nemanjai commented: Do we really want to support only `__builtin_cpu_is` on AIX? It doesn't seem like this would achieve the desired goal. Most users will use these builtins to test for some capability on the target machine. It almost never really matters to a user whether t

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Nemanja Ivanovic via cfe-commits
https://github.com/nemanjai edited https://github.com/llvm/llvm-project/pull/80069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Nemanja Ivanovic via cfe-commits
@@ -10347,6 +10347,8 @@ def err_x86_builtin_tile_arg_duplicate : Error< def err_builtin_target_unsupported : Error< "builtin is not supported on this target">; +def err_builtin_aix_os_unsupported : Error< + "this builtin is available only in AIX 7.2 and later operating syst

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Nemanja Ivanovic via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" nemanjai wrote: This is getting a bit tangled. Can you please provide t

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Nemanja Ivanovic via cfe-commits
@@ -362,8 +362,18 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { // We support __builtin_cpu_supports/__builtin_cpu_is on targets that // have Glibc since it is Glibc that provides the HWCAP[2] in the auxv. +#define MINIMUM_AIX_OS_MAJOR 7 ---

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Nemanja Ivanovic via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Nemanja Ivanovic via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] 35c4f02 - [NFC][clang][Driver] Specify options for with -save-temps= (#80921)

2024-02-08 Thread via cfe-commits
Author: Jacob Lambert Date: 2024-02-08T11:35:04-08:00 New Revision: 35c4f025f9d4c398eff0c8e49a47a5c7067939ba URL: https://github.com/llvm/llvm-project/commit/35c4f025f9d4c398eff0c8e49a47a5c7067939ba DIFF: https://github.com/llvm/llvm-project/commit/35c4f025f9d4c398eff0c8e49a47a5c7067939ba.diff

[clang] [NFC][clang][Driver] Specify options for with -save-temps= (PR #80921)

2024-02-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/80921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3b57b64 - [HLSL][SPIR-V] Add create.handle intrinsic (#81038)

2024-02-08 Thread via cfe-commits
Author: Natalie Chouinard Date: 2024-02-08T14:35:44-05:00 New Revision: 3b57b647a9bb821137f91dfbc2172a9947f620cc URL: https://github.com/llvm/llvm-project/commit/3b57b647a9bb821137f91dfbc2172a9947f620cc DIFF: https://github.com/llvm/llvm-project/commit/3b57b647a9bb821137f91dfbc2172a9947f620cc.d

[clang] [llvm] [HLSL][SPIR-V] Add create.handle intrinsic (PR #81038)

2024-02-08 Thread Natalie Chouinard via cfe-commits
https://github.com/sudonatalie closed https://github.com/llvm/llvm-project/pull/81038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-08 Thread James Y Knight via cfe-commits
jyknight wrote: > I don't see why the current denormal-fp-math setting behavior is a blocking > issue for this change Because this PR as-is causes us to start parsing the "-shared" flag for compilation actions in order to determine which denormal-fp-math setting to use. Users should not pass

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-08 Thread Nemanja Ivanovic via cfe-commits
@@ -2540,6 +2540,10 @@ def ffp_contract : Joined<["-"], "ffp-contract=">, Group, HelpText<"Form fused FP ops (e.g. FMAs)">, Values<"fast,on,off,fast-honor-pragmas">; +def fcomplex_ppc_gnu_abi : Flag<["-"], "fcomplex-ppc-gnu-abi">, Group, Visibility<[ClangOption, CC1Optio

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-08 Thread Nemanja Ivanovic via cfe-commits
@@ -78,6 +78,13 @@ class CodeGenOptions : public CodeGenOptionsBase { SRCK_InRegs// Small structs in registers (-freg-struct-return). }; + enum ComplexArgumentConventionKind { +CMPLX_Default, +CMPLX_OnStack, +CMPLX_OnGPR, // if ppc32 -fcomplex-ppc-gnu-ab

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-08 Thread Nemanja Ivanovic via cfe-commits
@@ -486,7 +486,8 @@ std::unique_ptr createAIXTargetCodeGenInfo(CodeGenModule &CGM, bool Is64Bit); std::unique_ptr -createPPC32TargetCodeGenInfo(CodeGenModule &CGM, bool SoftFloatABI); +createPPC32TargetCodeGenInfo(CodeGenModule &CGM, bool SoftFloatABI, +

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-08 Thread Nemanja Ivanovic via cfe-commits
nemanjai wrote: My review is not complete, I just submitted what I have so far so at least we can get started on answering the questions I have so far. https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm

[libunwind] Use relative includes to allow source-based dependencies without `-I` (PR #80443)

2024-02-08 Thread Yuriy Chernyshov via cfe-commits
georgthegreat wrote: I am OK with fixing this particular guarantee with a test. However, I am not familiar with libc++ testset organization and I need to be guided. Could you, please, provide me with some clues to start wtih? https://github.com/llvm/llvm-project/pull/80443

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-08 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 created https://github.com/llvm/llvm-project/pull/81183 Fixes: #79580 **PR SUMMARY**: Changed LibASTMatcher to give an appropriate warning when a const loop bound is initialized with a function declaration. >From 88dac6713284ee4f0b7ce73c944f78085412645f Mon Sep

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Shourya Goel (Sh0g0-1758) Changes Fixes: #79580 **PR SUMMARY**: Changed LibASTMatcher to give an appropriate warning when a const loop bound is initialized with a function declaration. --- Full diff: https://github.com/llvm/llvm-pr

[clang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-02-08 Thread Tony Tye via cfe-commits
https://github.com/t-tye approved this pull request. https://github.com/llvm/llvm-project/pull/76955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][docs] Fix version (PR #81185)

2024-02-08 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks created https://github.com/llvm/llvm-project/pull/81185 #78752 was not merged in time for clang-format 18. From 0a6d07033cbc8218763bbee44df688b29bf7aa55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= Date: Thu, 8 Feb 2024 21:08:52 +0

[clang] [clang-format][docs] Fix version (PR #81185)

2024-02-08 Thread via cfe-commits
=?utf-8?q?Björn_Schäpers?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Björn Schäpers (HazardyKnusperkeks) Changes #78752 was not merged in time for clang-format 18. --- Full diff: https://github.com/llvm/llvm-project/pull/81185.diff 2 Files Affected:

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81172)

2024-02-08 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/81172 >From aeb0686c76f2745111acd92c0d6b77faf69d2ed6 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Thu, 8 Feb 2024 10:51:22 -0800 Subject: [PATCH 1/2] [Clang][Sema] Diagnosis for constexpr constructor not initial

[clang] [clang-format] Add BreakAfterReturnType option to deprecate AlwaysBreakAfterReturnType. (PR #80827)

2024-02-08 Thread Björn Schäpers via cfe-commits
@@ -1010,7 +1010,8 @@ struct FormatStyle { /// \version 3.7 DefinitionReturnTypeBreakingStyle AlwaysBreakAfterDefinitionReturnType; - /// The function declaration return type breaking style to use. + /// The function declaration return type breaking style to use. This +

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-08 Thread Björn Schäpers via cfe-commits
@@ -833,13 +885,207 @@ class AnnotatingParser { Left->setType(TT_ArrayInitializerLSquare); } FormatToken *Tok = CurrentToken; + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::minus, tok::ellipsis)) { + // '-' and

[clang] [clang-format] Update FormatToken::isSimpleTypeSpecifier() (PR #80241)

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

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-08 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > @Sirraide, would you be comfortable if you, @erichkeane, and I co-authored > > an RFC to the community? > > Sure, I’d be happy to help with that as best I can. An RFC makes sense imo > seeing as this really impacts more parts of LLVM than just Clang. Excellent, thanks!

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -10347,6 +10347,8 @@ def err_x86_builtin_tile_arg_duplicate : Error< def err_builtin_target_unsupported : Error< "builtin is not supported on this target">; +def err_builtin_aix_os_unsupported : Error< + "this builtin is available only in AIX 7.2 and later operating syst

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, am

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -904,8 +904,17 @@ bool PPCTargetInfo::validateCpuSupports(StringRef FeatureStr) const { } bool PPCTargetInfo::validateCpuIs(StringRef CPUName) const { + llvm::Triple Triple = getTriple(); + if (Triple.isOSLinux()) { amy-kwan wrote: Can if we do somethin

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -0,0 +1,83 @@ +// RUN: echo "int main() { return __builtin_cpu_is(\"ppc970\");}" > %t.c +// RUN: %clang_cc1 -triple powerpc-ibm-aix7.2.0.0 -emit-llvm -o - %t.c | FileCheck %s \ +// RUN: --check-prefix=CHECKBOOL + +// RUN: echo "int main() { return __builtin_cpu_is(\"ppc-cel

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -0,0 +1,83 @@ +// RUN: echo "int main() { return __builtin_cpu_is(\"ppc970\");}" > %t.c +// RUN: %clang_cc1 -triple powerpc-ibm-aix7.2.0.0 -emit-llvm -o - %t.c | FileCheck %s \ +// RUN: --check-prefix=CHECKBOOL + +// RUN: echo "int main() { return __builtin_cpu_is(\"ppc-cel

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Aaron Ballman via cfe-commits
@@ -3061,22 +3080,7 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, continue; [[fallthrough]]; AaronBallman wrote: Oh! Thank you for mentioning they're in different `switch` statements, I had missed that as well.

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Aaron Ballman via cfe-commits
@@ -2842,9 +2862,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, << Args.MakeArgString("-ffp-model=" + FPModel) << Args.MakeArgString("-ffp-model=" + Val); if (Val.equals("fast")) { -optID = options::OPT_f

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-08 Thread David Goldman via cfe-commits
@@ -53,13 +55,34 @@ struct RenameInputs { struct RenameResult { // The range of the symbol that the user can attempt to rename. Range Target; + // Placeholder text for the rename operation if non-empty. + std::string Placeholder; // Rename occurrences for the current m

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-08 Thread David Goldman via cfe-commits
@@ -569,8 +840,13 @@ renameWithinFile(ParsedAST &AST, const NamedDecl &RenameDecl, // } if (!isInsideMainFile(RenameLoc, SM)) continue; +Locs.push_back(RenameLoc); + } + if (const auto *MD = dyn_cast(&RenameDecl)) +return renameObjCMethodWithinFile(AS

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-08 Thread David Goldman via cfe-commits
DavidGoldman wrote: Thanks, PTAL, I'll save the remaining comments for follow ups. https://github.com/llvm/llvm-project/pull/76466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Open acc ast start[OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/81188 'serial', 'parallel', and 'kernel' constructs are all considered 'Compute' constructs. This patch creates the AST type, plus the required infrastructure for such a type, plus some base types that will be useful

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/81188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Erich Keane (erichkeane) Changes 'serial', 'parallel', and 'kernel' constructs are all considered 'Compute' constructs. This patch creates the AST type, plus the required infrastructure for such a type, plus some base types that wil

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang-static-analyzer-1 Author: Erich Keane (erichkeane) Changes 'serial', 'parallel', and 'kernel' constructs are all considered 'Compute' constructs. This patch creates the AST type, plus the required infrastructure f

[clang] [OpenACC] Implement AST for OpenACC Compute Constructs (PR #81188)

2024-02-08 Thread Erich Keane via cfe-commits
@@ -2838,6 +2838,27 @@ void ASTStmtWriter::VisitOMPTargetParallelGenericLoopDirective( Code = serialization::STMT_OMP_TARGET_PARALLEL_GENERIC_LOOP_DIRECTIVE; } +//===--===// +// OpenACC Constructs/Directive

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81167 >From 96e3020eaa69f7f14b67617a250df3041cc1996b Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 10:02:50 -0800 Subject: [PATCH 1/2] [clang][sema] Fix -Wunused-function on target_version'd file-s

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Andy Kaylor via cfe-commits
@@ -2842,9 +2862,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, << Args.MakeArgString("-ffp-model=" + FPModel) << Args.MakeArgString("-ffp-model=" + Val); if (Val.equals("fast")) { -optID = options::OPT_f

<    1   2   3   4   5   >