[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread via cfe-commits
@@ -1635,6 +1635,17 @@ void TypePrinter::printElaboratedBefore(const ElaboratedType *T, if (T->getKeyword() != ElaboratedTypeKeyword::None) OS << " "; NestedNameSpecifier *Qualifier = T->getQualifier(); +if (!Policy.SuppressTagKeyword && Policy.SuppressScope

[clang] [llvm] [RISCV] Improve error message when the extension is not supported (PR #83989)

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

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread via cfe-commits
@@ -3741,7 +3741,10 @@ ExprResult Sema::BuildPredefinedExpr(SourceLocation Loc, else { // Pre-defined identifiers are of type char[x], where x is the length of // the string. -auto Str = PredefinedExpr::ComputeName(IK, currentDecl); +bool ForceElaboratedPrinti

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread via cfe-commits
@@ -55,9 +55,14 @@ struct A { clang_analyzer_dump(__func__); clang_analyzer_dump(__FUNCTION__); clang_analyzer_dump(__PRETTY_FUNCTION__); -// expected-warning@-3 {{&Element{"A",0 S64b,char}}} -// expected-warning@-3 {{&Element{"A",0 S64b,char}}} -// expe

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread via cfe-commits
Sirraide wrote: I’m not entirely sure this change is a good idea: some people might be relying on Clang’s behaviour wrt `__FUNCTION__`, especially with how long it’s been around; Clang may not be fully MSVC-compatible in this case, but that incompatibilty seems unlikely to cause problems imo s

[clang-tools-extra] ec7062d - [clangd] Add metric for rename decl kind (#83867)

2024-03-05 Thread via cfe-commits
Author: David Goldman Date: 2024-03-05T11:10:57-05:00 New Revision: ec7062d9d822df42dee6dccada13f42798976f3c URL: https://github.com/llvm/llvm-project/commit/ec7062d9d822df42dee6dccada13f42798976f3c DIFF: https://github.com/llvm/llvm-project/commit/ec7062d9d822df42dee6dccada13f42798976f3c.diff

[clang-tools-extra] [clangd] Add metric for rename decl kind (PR #83867)

2024-03-05 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman closed https://github.com/llvm/llvm-project/pull/83867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > I’m not entirely sure this change is a good idea: some people might be > relying on Clang’s behaviour wrt `__FUNCTION__`, especially with how long > it’s been around; Clang may not be fully MSVC-compatible in this case, but > that incompatibilty seems unlikely to cause proble

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam ready_for_review https://github.com/llvm/llvm-project/pull/84014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Zahira Ammarguellat (zahiraam) Changes Predefined macro FUNCTION in clang is not returning the same string than MS for templated functions. See https://godbolt.org/z/q3EKn5zq4 For the same test case MSVC is returning: function: TestClas

[clang] [HIP] fix host-used external kernel (PR #83870)

2024-03-05 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/83870 >From 9c6991bbcdce6f24c8f99c8f2a6ff0e5b6c2ac5a Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Mon, 4 Mar 2024 11:38:06 -0500 Subject: [PATCH] [HIP] fix host-used external kernel In -fgpu-rdc mode, when

[clang] [HIP] fix host-used external kernel (PR #83870)

2024-03-05 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/83870 >From 902f09d9124b387ad02bd758e9c54bf44746b0fd Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Mon, 4 Mar 2024 11:38:06 -0500 Subject: [PATCH] [HIP] fix host-used external kernel In -fgpu-rdc mode, when

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread via cfe-commits
@@ -55,9 +55,14 @@ struct A { clang_analyzer_dump(__func__); clang_analyzer_dump(__FUNCTION__); clang_analyzer_dump(__PRETTY_FUNCTION__); -// expected-warning@-3 {{&Element{"A",0 S64b,char}}} -// expected-warning@-3 {{&Element{"A",0 S64b,char}}} -// expe

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > We can enable it as an extension in older language modes later as a separate > patch in case there is user's demand on this. @cor3ntin , @AaronBallman > please let me know what you think. Thank you for investigating this! I'm perfectly fine not enabling this as an extens

[clang] [clang][NFC] Trim license header comments to 81 characters (PR #82919)

2024-03-05 Thread Paul T Robinson via cfe-commits
pogo59 wrote: I grepped `clang` for "^/+=[^/]*/.*\.(h|cpp) " and found only 35 files with directory components. So, the majority of files have only the filename in the header line. The example in the Coding Standard does not reflect common practice. I think it's fine to remove everything but

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread via cfe-commits
Sirraide wrote: Oh, I just noticed that you’ve tried to land this change before (https://github.com/llvm/llvm-project/pull/66120), but it seems it was reverted because of some problems; if those are fixed now, then I’d say going forward with this is probably fine, seeing as it was approved the

[clang] 7df43cc - [clang] Add -Wmissing-designated-field-initializers (#81364)

2024-03-05 Thread via cfe-commits
Author: Vadim D Date: 2024-03-05T11:27:58-05:00 New Revision: 7df43ccf08e40468354d0564f9bcd7dfe681590b URL: https://github.com/llvm/llvm-project/commit/7df43ccf08e40468354d0564f9bcd7dfe681590b DIFF: https://github.com/llvm/llvm-project/commit/7df43ccf08e40468354d0564f9bcd7dfe681590b.diff LOG:

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

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

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-03-05 Thread via cfe-commits
github-actions[bot] wrote: @vvd170501 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 buil

[clang] [clang][RISCV] Reorder sema check for RVV type (PR #83553)

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

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > Oh, I just noticed that you’ve tried to land this change before (#66120), but > it seems it was reverted because of some problems; if those are fixed now, > then I’d say going forward with this is probably fine, seeing as it was > approved the first time round. > > This woul

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs updated https://github.com/llvm/llvm-project/pull/83279 From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep 17 00:00:00 2001 From: Botond Istvan Horvath Date: Wed, 28 Feb 2024 13:09:15 +0100 Subject: [PATCH 01/10] Bugfix for choosing the more specialized overload Th

[clang-tools-extra] [clangd] Add container field to remote index Refs grpc method (PR #71605)

2024-03-05 Thread via cfe-commits
https://github.com/tdupes updated https://github.com/llvm/llvm-project/pull/71605 >From 4282c39fd0b40c26c68f57257c150b984264f50b Mon Sep 17 00:00:00 2001 From: dup Date: Fri, 3 Nov 2023 09:03:24 -0700 Subject: [PATCH 1/2] Add container field to remote index Refs grpc method --- clang-tools-ex

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-05 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Okay then, could you please review or give me an LGTM if everything is ok? The patch transformed a bit since it was first approved. It doesn't enable feature as extension now, it incorporates changes and test highlighted by https://github.com/llvm/llvm-project/pull/77753#issue

[clang] Don't do casting of atomic FP loads/stores in FE. (PR #83446)

2024-03-05 Thread Matt Arsenault via cfe-commits
@@ -1453,9 +1457,11 @@ void AtomicInfo::EmitAtomicLoadLibcall(llvm::Value *AddForLoaded, } llvm::Value *AtomicInfo::EmitAtomicLoadOp(llvm::AtomicOrdering AO, - bool IsVolatile) { + bool IsVolati

[clang] Don't do casting of atomic FP loads/stores in FE. (PR #83446)

2024-03-05 Thread Matt Arsenault via cfe-commits
@@ -1453,9 +1457,11 @@ void AtomicInfo::EmitAtomicLoadLibcall(llvm::Value *AddForLoaded, } llvm::Value *AtomicInfo::EmitAtomicLoadOp(llvm::AtomicOrdering AO, - bool IsVolatile) { + bool IsVolati

[clang] Don't do casting of atomic FP loads/stores in FE. (PR #83446)

2024-03-05 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: %clang_cc1 -triple s390x-linux-gnu -O1 -emit-llvm %s -o - | FileCheck %s +// +// Test that floating point atomic stores and loads do not get casted to/from +// integer. + +#include + +_Atomic float Af; +_Atomic double Ad; +_Atomic long double Ald; + +//

[clang] [llvm] [HLSL] implement the any intrinsic (PR #83903)

2024-03-05 Thread Xiang Li via cfe-commits
https://github.com/python3kgae approved this pull request. https://github.com/llvm/llvm-project/pull/83903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement the rcp intrinsic (PR #83857)

2024-03-05 Thread Xiang Li via cfe-commits
https://github.com/python3kgae approved this pull request. https://github.com/llvm/llvm-project/pull/83857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Allow target version definitions in any order. (PR #83887)

2024-03-05 Thread Pavel Iliin via cfe-commits
https://github.com/ilinpv approved this pull request. Thanks for tests! https://github.com/llvm/llvm-project/pull/83887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I found some possible changes to be made to the diagnostics. https://github.com/llvm/llvm-project/pull/77753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

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

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -2809,10 +2813,13 @@ def note_non_literal_virtual_base : Note<"%select{struct|interface|class}0 " "with virtual base %plural{1:class|:classes}1 is not a literal type">; def note_constexpr_virtual_base_here : Note<"virtual base class declared here">; def err_constexpr_non

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -2809,10 +2813,13 @@ def note_non_literal_virtual_base : Note<"%select{struct|interface|class}0 " "with virtual base %plural{1:class|:classes}1 is not a literal type">; def note_constexpr_virtual_base_here : Note<"virtual base class declared here">; def err_constexpr_non

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -2774,9 +2774,13 @@ def err_constexpr_tag : Error< def err_constexpr_dtor : Error< "destructor cannot be declared %sub{select_constexpr_spec_kind}0">; def err_constexpr_dtor_subobject : Error< - "destructor cannot be declared %sub{select_constexpr_spec_kind}0 because " +

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -2809,10 +2813,13 @@ def note_non_literal_virtual_base : Note<"%select{struct|interface|class}0 " "with virtual base %plural{1:class|:classes}1 is not a literal type">; def note_constexpr_virtual_base_here : Note<"virtual base class declared here">; def err_constexpr_non

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -2809,10 +2813,13 @@ def note_non_literal_virtual_base : Note<"%select{struct|interface|class}0 " "with virtual base %plural{1:class|:classes}1 is not a literal type">; def note_constexpr_virtual_base_here : Note<"virtual base class declared here">; def err_constexpr_non

[clang] [llvm] [HLSL] implement the rcp intrinsic (PR #83857)

2024-03-05 Thread Matt Arsenault via cfe-commits
@@ -18057,6 +18057,14 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, /*ReturnType*/ Op0->getType(), Intrinsic::dx_frac, ArrayRef{Op0}, nullptr, "dx.frac"); } + case Builtin::BI__builtin_hlsl_elementwise_rcp: { +Value *Op0 = EmitScalar

[clang] [llvm] [RISCV] Improve error message when the extension is not supported (PR #83989)

2024-03-05 Thread David Blaikie via cfe-commits
dwblaikie wrote: perhaps the llvm libSupport prats of this change should be unit tested in LLVM, rather than only tested indirectly in clang? https://github.com/llvm/llvm-project/pull/83989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [clang][analyzer] Improve documentation of StreamChecker (NFC). (PR #83858)

2024-03-05 Thread Balázs Kéri via cfe-commits
@@ -3020,44 +3020,82 @@ Check for misuses of stream APIs. Check for misuses of stream APIs: ``fopen, fcl alpha.unix.Stream (C) " -Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite, fseek, ftell, rewind, fgetpos,`` -``fsetpos, cleare

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

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

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

2024-03-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! One thing I would like to see are some tests added to `clang/test/C/C2x/` (`n3029.c` and `n3030.c`) that tests the examples and changes from the original papers/final standard to demonstrate the features are complete. Th

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

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -211,6 +217,8 @@ Bug Fixes in This Version - Clang now doesn't produce false-positive warning `-Wconstant-logical-operand` for logical operators in C23. Fixes (`#64356 `_). +- Fixes miscompilation when an enum has a spec

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

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -135,6 +135,12 @@ C23 Feature Support ``__TYPE_FMTb__`` (e.g., ``__UINT_FAST64_FMTB__``) in C23 mode for use with macros typically exposed from , such as ``PRIb8``. (`#81896: `_). +- Enumerations should allow value

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

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -19797,6 +19797,19 @@ EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, // - If an initializer is specified for an enumerator, the // initializing value has the same type as the expression. EltTy = Val->getType(); +} e

[clang] [HIP] fix host-used external kernel (PR #83870)

2024-03-05 Thread Yaxun Liu via cfe-commits
@@ -24,6 +24,7 @@ // NEG-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel2v // NEG-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel3v +// XEG-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel5v yxsamliu wrote: fixed https://github.com/llvm/llvm-proje

[clang] [llvm] [HLSL] implement `mad` intrinsic (PR #83826)

2024-03-05 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/83826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 643b31d - [HLSL] implement `mad` intrinsic (#83826)

2024-03-05 Thread via cfe-commits
Author: Farzon Lotfi Date: 2024-03-05T12:23:26-05:00 New Revision: 643b31dbe8a515e007a0f1b2e1072c34e461b778 URL: https://github.com/llvm/llvm-project/commit/643b31dbe8a515e007a0f1b2e1072c34e461b778 DIFF: https://github.com/llvm/llvm-project/commit/643b31dbe8a515e007a0f1b2e1072c34e461b778.diff

[clang] [llvm] [HLSL] implement `mad` intrinsic (PR #83826)

2024-03-05 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/83826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement the rcp intrinsic (PR #83857)

2024-03-05 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/83857 >From 0060612b4fc1b7f5f5cc51a41a5fae7535ba2b02 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Sun, 3 Mar 2024 16:14:35 -0500 Subject: [PATCH 1/2] [HLSL] implement the rcp intrinsic This PR implements the fro

[clang] [llvm] [HLSL] implement the rcp intrinsic (PR #83857)

2024-03-05 Thread Farzon Lotfi via cfe-commits
@@ -18057,6 +18057,14 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, /*ReturnType*/ Op0->getType(), Intrinsic::dx_frac, ArrayRef{Op0}, nullptr, "dx.frac"); } + case Builtin::BI__builtin_hlsl_elementwise_rcp: { +Value *Op0 = EmitScalar

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-05 Thread Balázs Kéri via cfe-commits
balazske wrote: Currently it looks OK to add `getentropy` to this checker because it is a string related function in a way. Otherwise it looks like that many of the checks (for buffer access, and buffer invalidations) that are implemented in `CStringChecker` could be moved to `StdLibraryFuncti

[clang] [llvm] [HLSL] implement the rcp intrinsic (PR #83857)

2024-03-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 5105f1551b4bc800f564e7c105fc95e2c51f1239 512a90253652db73fbc5a6bb65165f8624b9f5e3 --

[clang] [llvm] [HLSL] implement the rcp intrinsic (PR #83857)

2024-03-05 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/83857 >From 710cef1e42c50c935a2fdd535b48002db3796497 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Sun, 3 Mar 2024 16:14:35 -0500 Subject: [PATCH 1/2] [HLSL] implement the rcp intrinsic This PR implements the fro

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread Botond István Horváth via cfe-commits
@@ -5548,13 +5504,100 @@ static bool isAtLeastAsSpecializedAs(Sema &S, FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, -

[clang] [llvm] [HLSL] implement exp intrinsic (PR #83832)

2024-03-05 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/83832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2807ea6 - [HLSL] implement the any intrinsic (#83903)

2024-03-05 Thread via cfe-commits
Author: Farzon Lotfi Date: 2024-03-05T12:46:01-05:00 New Revision: 2807ea6b8047780b5e66a122faf09fae786c917b URL: https://github.com/llvm/llvm-project/commit/2807ea6b8047780b5e66a122faf09fae786c917b DIFF: https://github.com/llvm/llvm-project/commit/2807ea6b8047780b5e66a122faf09fae786c917b.diff

[clang] [llvm] [HLSL] implement the any intrinsic (PR #83903)

2024-03-05 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/83903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC) (PR #83702)

2024-03-05 Thread David Blaikie via cfe-commits
dwblaikie wrote: > I did the first part of the renaming @dwblaikie : looks good? Hmm - this patch still seems to have both renamings in it, if I'm reading the PR correctly? I take it from the subject that isn't the intent/the intent is that his patch only does the ThreadPool->DefaultThreadPool

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC) (PR #83702)

2024-03-05 Thread David Blaikie via cfe-commits
dwblaikie wrote: Oh, maybe issues related to layered patches - this is intended to be submitted after the introduction of the ThreadPoolInterface? But includes those changes in this review at the moment (I still haven't figured out what we're doing for dependent changes - and I thought the Th

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-03-05 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/84050 Consider the following: ```cpp template struct A { auto f() { return this->x; } }; ``` Although `A` has no dependent base classes and the lookup context for `x` is the current instantiation

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes Consider the following: ```cpp template struct A { auto f() { return this->x; } }; ``` Although `A` has no dependent base classes and the lookup context for `x` is th

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

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

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-05 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/83933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-05 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp requested changes to this pull request. https://github.com/llvm/llvm-project/pull/83933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-05 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,312 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-03-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 a642eb89bdaf10c6b4994fc1187de27b441236ed 5fc710a43e7799d2721e56dd53d5828e55090a0d --

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-03-05 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/84050 >From 1495e87d7cbbab6a824d9d1d2bf53d0ef9ec9125 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 1 Mar 2024 08:08:52 -0500 Subject: [PATCH 1/7] [Clang][Sema] Earlier resolution of class member acce

[clang] [llvm] [HLSL] implement the rcp intrinsic (PR #83857)

2024-03-05 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/83857 >From 786d0b41971dcd39fd76ae24ef16c8d086abb092 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Tue, 5 Mar 2024 12:52:39 -0500 Subject: [PATCH] fix merge conflict, address pr concerns --- clang/include/clang/B

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-03-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I like the direction of this, and look forward to seeing how this turns out! https://github.com/llvm/llvm-project/pull/84050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [llvm] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-03-05 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/80480 >From 1946ea0be5b87da44e05a5e668e383c3c463cdd7 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Tue, 22 Aug 2023 15:24:03 + Subject: [PATCH 1/3] [CMAKE] Enable FatLTO as a build option for LLVM --- clang/cma

[clang] [llvm] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-03-05 Thread Paul Kirth via cfe-commits
@@ -1251,6 +1253,10 @@ elseif(LLVM_ENABLE_LTO) endif() endif() +if(LLVM_ENABLE_FATLTO AND (FUCHSIA OR UNIX)) +append("-ffat-lto-objects" CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS) ilovepi wrote: done. Thanks for the suggestion. https://github.c

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-05 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/83641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ee044d5 - [clang] Diagnose config_macros before building modules (#83641)

2024-03-05 Thread via cfe-commits
Author: Michael Spencer Date: 2024-03-05T10:15:21-08:00 New Revision: ee044d5e651787c5d73b37b2cbb7ca6444bb0502 URL: https://github.com/llvm/llvm-project/commit/ee044d5e651787c5d73b37b2cbb7ca6444bb0502 DIFF: https://github.com/llvm/llvm-project/commit/ee044d5e651787c5d73b37b2cbb7ca6444bb0502.dif

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

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

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC) (PR #83702)

2024-03-05 Thread Mehdi Amini via cfe-commits
joker-eph wrote: Actually no: the first patch landed already, so `ThreadPoolInterface` is now the base class in the codebase. I have some mixup here in that when renaming ThreadPool -> DefaultThreadPool, I used the base class ThreadPoolInterface when updating some of the uses. I will push the

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-05 Thread Chris B via cfe-commits
@@ -0,0 +1,312 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-05 Thread Xiang Li via cfe-commits
@@ -0,0 +1,312 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Clang][Driver] Merge the different strategies of how libc++ is included (PR #83721)

2024-03-05 Thread Fangrui Song via cfe-commits
@@ -705,6 +705,47 @@ class ToolChain { AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const; + struct IncludeStrategy { +enum AvailabilityOptions { + // Check whether the director

[clang] [clang] Implement __builtin_{clzg,ctzg} (PR #83431)

2024-03-05 Thread via cfe-commits
overmighty wrote: cc @nickdesaulniers https://github.com/llvm/llvm-project/pull/83431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix __builtin_popcountg not matching GCC (PR #83313)

2024-03-05 Thread via cfe-commits
overmighty wrote: cc @nickdesaulniers https://github.com/llvm/llvm-project/pull/83313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread Richard Smith via cfe-commits
zygoloid wrote: > +1 for this, it will be the 95%/5% rule, you might think all cases of > (identifier) is a cast, but I'm pretty sure it won't be Specifically, what I suggested was: when disambiguating whether `(identifier)&...` or `(identifier)*...` is a cast vs a multiplication or bitwise a

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread Zahira Ammarguellat via cfe-commits
@@ -463,8 +463,72 @@ void ctor_tests() { constexpr SL global_sl = SL::current(); static_assert(is_equal(global_sl.function(), "")); +template +class TestBI { +public: + TestBI() { +#ifdef MS + static_assert(is_equal(__FUNCTION__, "test_func::TestBI::TestBI")); + sta

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH] Implement a subset of builtin_cpu_supports() features --- clang/lib

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy updated https://github.com/llvm/llvm-project/pull/82872 >From 557ee75d60f0fdb4dd2b353c819b4f22f71b46d7 Mon Sep 17 00:00:00 2001 From: 11happy Date: Sat, 24 Feb 2024 13:50:30 +0530 Subject: [PATCH 1/3] add new flag -Wreturn-mismatch Signed-off-by: 11happy --- clang/

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s + +// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled. + +int foo(void) __attribute__((noreturn)); +int bar(void); + +void test1() { + return 1; // expected-warni

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wreturn-type -Wno-return-mismatch -fsyntax-only -verify %s 11happy wrote: done https://github.com/llvm/llvm-project/pull/82872 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s 11happy wrote: done https://github.com/llvm/llvm-project/pull/82872 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s + +// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled. + +int foo(void) __attribute__((noreturn)); +int bar(void); + +void test1() { + return 1; // expected-warni

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s + +// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled. + +int foo(void) __attribute__((noreturn)); +int bar(void); + +void test1() { + return 1; // expected-warni

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s + +// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled. + +int foo(void) __attribute__((noreturn)); +int bar(void); + +void test1() { + return 1; // expected-warni

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/2] Implement a subset of builtin_cpu_supports() features --- clang

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s + +// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled. + +int foo(void) __attribute__((noreturn)); +int bar(void); + +void test1() { 11happy wrote

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
@@ -94,6 +94,7 @@ Deprecated Compiler Flags Modified Compiler Flags --- +- The `-Wreturn-type` flag has been modified to split some of its functionality into `-Wreturn-mismatch` flag. 11happy wrote: done https://github.com/llvm/llvm-proj

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-03-05 Thread Jun Wang via cfe-commits
@@ -194,3 +204,105 @@ __global__ void non_cexpr_waves_per_eu_2() {} // expected-error@+1{{'amdgpu_waves_per_eu' attribute requires parameter 1 to be an integer constant}} __attribute__((amdgpu_waves_per_eu(2, ipow2(2 __global__ void non_cexpr_waves_per_eu_2_4() {} + +// ex

[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-05 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/83949 >From 8c5829c6eb9607152b85dd0e99ccb39770d536fd Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Mon, 6 Mar 2023 19:31:13 + Subject: [PATCH] [Fuchsia] Include baremetal ARM builtins and libc For now we only

[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-05 Thread Petr Hosek via cfe-commits
@@ -300,10 +300,43 @@ if(FUCHSIA_SDK) set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS "aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "") endif() +foreach(target armv6m-unknown-eabi) + list(APPEND BUILTIN_TARGETS "${target}") + set(BUILTINS_${target}_CMAK

[clang] b3b408b - [Fuchsia] Include baremetal ARM builtins and libc (#83949)

2024-03-05 Thread via cfe-commits
Author: Petr Hosek Date: 2024-03-05T11:42:51-08:00 New Revision: b3b408bbb379a1cfdac66a71534d86c23a9cf3f1 URL: https://github.com/llvm/llvm-project/commit/b3b408bbb379a1cfdac66a71534d86c23a9cf3f1 DIFF: https://github.com/llvm/llvm-project/commit/b3b408bbb379a1cfdac66a71534d86c23a9cf3f1.diff LO

[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-05 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/83949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread Botond István Horváth via cfe-commits
HoBoIs wrote: @erichkeane Thank you for the suggestions, I have removed the checking for C++20 and I also changed to the `Args.resize(std::min(...))` based on what you suggested. Is there anything else to be done? https://github.com/llvm/llvm-project/pull/83279

  1   2   3   4   5   6   >