[clang] [clang codegen] Fix MS ABI detection of user-provided constructors. (PR #90151)

2024-04-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/90151 In the context of determining whether a class counts as an "aggregate", a constructor template counts as a user-provided constructor. Fixes #86384 >From 9adeffc9ee780c84a525ce0535a84508105e05ae Mon Sep 17

[clang] [clang codegen] Fix MS ABI detection of user-provided constructors. (PR #90151)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Eli Friedman (efriedma-quic) Changes In the context of determining whether a class counts as an "aggregate", a constructor template counts as a user-provided constructor. Fixes #86384 --- Full diff: https://github.com/llvm/llvm-p

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-25 Thread Pranav Kant via cfe-commits
pranavk wrote: Yes, I also think that this should be reverted. This commit seems to erroneously fail on cases like this: https://github.com/tink-crypto/tink-cc/blob/4501627fe9ee312ad5d413600f050827b5f725ed/tink/util/secret_proto.h#L62 Note that ParseFromArray is being on an instance of T. So c

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-25 Thread Justin Stitt via cfe-commits
JustinStitt wrote: @efriedma-quic: > Attributes mostly do modify the type. The few that don't, like "aligned" and > "may_alias", are a constant source of problems because they get accidentally > stripped off. (I don't have any personal experience with "noderef".) So do you believe the current

[clang] 45fc0e6 - Revert "[Clang][Sema] Fix warnings after #84050 (#90104)"

2024-04-25 Thread Pranav Kant via cfe-commits
Author: Pranav Kant Date: 2024-04-26T00:17:28Z New Revision: 45fc0e6b38b62a61b0ddcda2e7fe9b4fee7e3e58 URL: https://github.com/llvm/llvm-project/commit/45fc0e6b38b62a61b0ddcda2e7fe9b4fee7e3e58 DIFF: https://github.com/llvm/llvm-project/commit/45fc0e6b38b62a61b0ddcda2e7fe9b4fee7e3e58.diff LOG: R

[clang] 0c6e1ca - Revert "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classe

2024-04-25 Thread Pranav Kant via cfe-commits
Author: Pranav Kant Date: 2024-04-26T00:18:08Z New Revision: 0c6e1ca1c704a3a0fb53ae54f7e3723736f477c7 URL: https://github.com/llvm/llvm-project/commit/0c6e1ca1c704a3a0fb53ae54f7e3723736f477c7 DIFF: https://github.com/llvm/llvm-project/commit/0c6e1ca1c704a3a0fb53ae54f7e3723736f477c7.diff LOG: R

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-25 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @pranavk @ilovepi I have a potential fix ready... give me a few to test some edge cases https://github.com/llvm/llvm-project/pull/84050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-25 Thread Pranav Kant via cfe-commits
pranavk wrote: Sorry, I just pushed the reverts. I reverted the commits for now. Feel free to re-land with fixes. https://github.com/llvm/llvm-project/pull/84050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-25 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/90152 Reapplies #84050, addressing a bug which cases a crash when an expression with the type of the current instantiation is used as the _postfix-expression_ in a class member access expression (arrow form). >Fro

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Krystian Stasiowski (sdkrystian) Changes Reapplies #84050, addressing a bug which cases a crash when an expression with the type of the current instantiation is used as the _postfix-expression_ in a class member access expression (ar

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-25 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Will add tests tomorrow... https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-25 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/89809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-25 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/89809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Helena Kotas (hekota) Changes Add `environment` parameter to Clang availability attribute. The allowed values for this parameter are a subset of values allowed in the `llvm::Triple` environment component. If the `environment` parame

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes Add `environment` parameter to Clang availability attribute. The allowed values for this parameter are a subset of values allowed in the `llvm::Triple` environment component. If the

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-25 Thread Fangrui Song via cfe-commits
@@ -1462,6 +1460,14 @@ floating point semantic models: precise (the default), strict, and fast. "allow_approximate_fns", "off", "off", "on" "allow_reassociation", "off", "off", "on" +The ``-fp-model`` option does not modify the "fdenormal-fp-math" or +"fdenormal-fp-math-f

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-25 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/89477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-25 Thread Fangrui Song via cfe-commits
@@ -75,6 +76,7 @@ // RUN: --check-prefix=WARN12 %s // RUN: %clang -### -ffast-math -ffp-model=strict -c %s 2>&1 | FileCheck \ // RUN: --check-prefix=WARN12 %s +// WARN12: clang MaskRay wrote: `clang` is unneeded. For diagnostics or -cc1 options, we just av

[clang-tools-extra] 5a12f28 - LLVM_FALLTHROUGH => [[fallthrough]]. NFC

2024-04-25 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-04-25T17:50:59-07:00 New Revision: 5a12f2867a167bbe11099150f3cb6b6cb77d767c URL: https://github.com/llvm/llvm-project/commit/5a12f2867a167bbe11099150f3cb6b6cb77d767c DIFF: https://github.com/llvm/llvm-project/commit/5a12f2867a167bbe11099150f3cb6b6cb77d767c.diff

[clang] [clang-scan-deps] Fix contention when updating `TrackingStatistic`s in hot code paths in `FileManager`. (PR #88427)

2024-04-25 Thread Fangrui Song via cfe-commits
MaskRay wrote: (BTW: https://discourse.llvm.org/t/hidden-emails-on-github-should-we-do-something-about-it/74223 The recommendation is to avoid the github "hidden email" feature.) https://github.com/llvm/llvm-project/pull/88427 ___ cfe-commits mailing

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-25 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: Overall I really like the direction of this. I'm curious if any of the maintainers from Apple have thoughts since they're the primary users of availability annotations. I think this dramatically simplifies things for what we need, but it might also hav

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-25 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/89809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-25 Thread Chris B via cfe-commits
@@ -3859,7 +3862,7 @@ def warn_availability_fuchsia_unavailable_minor : Warning< InGroup; def warn_unguarded_availability : - Warning<"%0 is only available on %1 %2 or newer">, + Warning<"%0 %select{is only|is not}5 available %select{|in %4 environment }3on %1 %2 %select{

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-25 Thread Helena Kotas via cfe-commits
@@ -3859,7 +3862,7 @@ def warn_availability_fuchsia_unavailable_minor : Warning< InGroup; def warn_unguarded_availability : - Warning<"%0 is only available on %1 %2 or newer">, + Warning<"%0 %select{is only|is not}5 available %select{|in %4 environment }3on %1 %2 %select{

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-25 Thread via cfe-commits
nihui wrote: @ostannard hi, would you please review my fix :) https://github.com/llvm/llvm-project/pull/89062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-25 Thread David Truby via cfe-commits
DavidTruby wrote: > Great work David, thanks! Could you add some documentation explaining _where_ > `main` would be coming from in the case of mixed-source compilation? In fact, > is that tested anywhere? > > Also, IMHO it would be good to advertise this on Discourse (thinking > specifically

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-25 Thread David Truby via cfe-commits
DavidTruby wrote: As regards the backwards compatibility break here, I guess my take is that this change needs to happen some time and sooner is always going to be better than later. While we are still called flang-new and marked experimental I'm inclined to think we should just rip the band a

[clang] [alpha.webkit.UncountedCallArgsChecker] Avoid emitting warnings for Ref, RefPtr, and their variants. (PR #90153)

2024-04-25 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/90153 Skip the analysis of Ref, RefPtr, and their variant classes in UncountedCallArgsChecker since these classes are "trusted" to not do anything dangerous. >From 04d9b292a48604ec0601e869d48d4f2c481f91bc Mon Sep 17 00:

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-25 Thread Nikita Popov via cfe-commits
nikic wrote: FYI this change has some visible compile-time impact, with some 0.5-1% regressions on various LLVM files (https://llvm-compile-time-tracker.com/compare_clang.php?from=2f2e31c3c980407b2660b4f5d10e7cdb3fa79138&to=a8fd0d029dca7d17eee72d0445223c2fe1ee7758&stat=instructions%3Au&sortBy=i

[clang] [alpha.webkit.UncountedCallArgsChecker] Avoid emitting warnings for Ref, RefPtr, and their variants. (PR #90153)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes Skip the analysis of Ref, RefPtr, and their variant classes in UncountedCallArgsChecker since these classes are "trusted" to not do anything dangerous. --- Full di

[clang] [Driver] Don't default to -mrelax-all for non-RISCV -O0 (PR #90013)

2024-04-25 Thread Nikita Popov via cfe-commits
nikic wrote: FYI I'm seeing about 0.6% compile-time regressions for `O0` test-suite builds with this change (https://llvm-compile-time-tracker.com/compare.php?from=ef2ca97f48f1aee1483f0c29de5ba52979bec454&to=18376810f359dbd39d2a0aa0ddfc0f7f50eac199&stat=instructions:u). Though there is also a

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-25 Thread A. Jiang via cfe-commits
@@ -8340,8 +8340,17 @@ void Sema::checkInitializerLifetime(const InitializedEntity &Entity, << Entity.getType()->isReferenceType() << CLE->getInitializer() << 2 << DiagRange; } else { -Diag(DiagLoc, diag::warn_ret_local_temp_addr_ref) -

[clang] [llvm] [SCCP] Swap out range metadata to range attribute (PR #90134)

2024-04-25 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 93de97d - [SCCP] Swap out range metadata to range attribute (#90134)

2024-04-25 Thread via cfe-commits
Author: Andreas Jonson Date: 2024-04-26T11:04:47+09:00 New Revision: 93de97d750548cd90c53efd4367dbd0367aa30fd URL: https://github.com/llvm/llvm-project/commit/93de97d750548cd90c53efd4367dbd0367aa30fd DIFF: https://github.com/llvm/llvm-project/commit/93de97d750548cd90c53efd4367dbd0367aa30fd.diff

[clang] [llvm] [SCCP] Swap out range metadata to range attribute (PR #90134)

2024-04-25 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/90134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] adds a space after not inside macros (PR #78176)

2024-04-25 Thread Owen Pan via cfe-commits
https://github.com/owenca unassigned https://github.com/llvm/llvm-project/pull/78176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improve documented sampling profiler steps to best known methods (PR #88438)

2024-04-25 Thread Tim Creech via cfe-commits
https://github.com/tcreech-intel updated https://github.com/llvm/llvm-project/pull/88438 >From fe3404cbdf78b434f16f8351dc242175b4543112 Mon Sep 17 00:00:00 2001 From: Tim Creech Date: Thu, 11 Apr 2024 16:03:52 -0400 Subject: [PATCH 1/3] Improve documented sampling profiler steps to best known

[clang] [alpha.webkit.UncountedCallArgsChecker] Avoid emitting warnings for Ref, RefPtr, and their variants. (PR #90153)

2024-04-25 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/90153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] make kernel stub ICF-proof (PR #90155)

2024-04-25 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/90155 MSVC linker merges functions having comdat which have identical set of instructions. CUDA uses kernel stub function as key to look up kernels in device executables. If kernel stub function for different kernels

[clang] [CUDA] make kernel stub ICF-proof (PR #90155)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Yaxun (Sam) Liu (yxsamliu) Changes MSVC linker merges functions having comdat which have identical set of instructions. CUDA uses kernel stub function as key to look up kernels in device executables. If kernel stub function for di

[clang] [Clang][C++23] Core language changes from P1467R9 extended floating-point types and standard names. (PR #78503)

2024-04-25 Thread M. Zeeshan Siddiqui via cfe-commits
codemzs wrote: > @codemzs Any news? Thanks a lot for your work! @cor3ntin Sorry for the delay, I plan to get back to this PR in the next few weeks. Do you need this change for something? https://github.com/llvm/llvm-project/pull/78503 ___ cfe-commits

[clang] [clang-tools-extra] [clangd] Show struct fields and enum members in hovers (PR #89557)

2024-04-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/89557 >From fcb2ac4c68554d9c708b3db779b5570ff94725e8 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 21 Apr 2024 20:30:16 -0400 Subject: [PATCH] [clangd] Show struct fields and enum members in hovers Fix

[clang] [clang-tools-extra] [clangd] Show struct fields and enum members in hovers (PR #89557)

2024-04-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 ready_for_review https://github.com/llvm/llvm-project/pull/89557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd] Show struct fields and enum members in hovers (PR #89557)

2024-04-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I'm planning to revise the patch to make the following changes: > >1. Put the new behaviour behind a config option (I'm thinking `Hover` --> > `ShowFields`) >2. Add C language mode tests >3. Use `PrintingCallbacks` instead of a `PrintingPolicy` flag These ch

[clang] [clang-format] Add a space after a word token only if required (PR #90161)

2024-04-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/90161 Fixes #78166. >From 3f59076142bd6a87f4875dc79e95e4570f4af7c2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 25 Apr 2024 20:08:03 -0700 Subject: [PATCH] [clang-format] Add a space after a word token only if r

[clang] [clang-format] Add a space after a word token only if required (PR #90161)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #78166. --- Full diff: https://github.com/llvm/llvm-project/pull/90161.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+7-19) - (modified) clang/unittests/Format/FormatTes

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-25 Thread Andrew Sukach via cfe-commits
soukatch wrote: Looking at the logs, and the error seems to be unrelated to the changes made https://buildkite.com/llvm-project/clang-ci/builds/16430#018f132d-506e-440c-b18b-fed98237def9/54-5446 https://github.com/llvm/llvm-project/pull/90012 ___ cfe-c

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

2024-04-25 Thread via cfe-commits
Author: NorthBlue333 Date: 2024-04-25T20:34:49-07:00 New Revision: 2de0bedfebb77a6c8a5b0d00902f796fa4022fd6 URL: https://github.com/llvm/llvm-project/commit/2de0bedfebb77a6c8a5b0d00902f796fa4022fd6 DIFF: https://github.com/llvm/llvm-project/commit/2de0bedfebb77a6c8a5b0d00902f796fa4022fd6.diff

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

2024-04-25 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/77456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add processor definition for XiangShan-KunMingHu (PR #89359)

2024-04-25 Thread via cfe-commits
https://github.com/Khao7342 updated https://github.com/llvm/llvm-project/pull/89359 >From e51498e67409836b099fa892b17d71e44a7d403b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=9D=E5=BA=B7=E8=BE=BE?= Date: Fri, 19 Apr 2024 17:18:10 +0800 Subject: [PATCH] [RISCV] Add processor definition for X

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-04-25 Thread via cfe-commits
@@ -27,3 +26,20 @@ namespace rdar10544564 { X (Y::*func_mem_ptr1)() = &Y::memfunc1; X (Y::*func_mem_ptr2)() = &Y::memfunc2; } + +namespace test2 { + struct A { +int val; +void func() {} + }; + + void test() { +decltype(&(A::val)) ptr1; // expected-error {{inv

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Here is a reduced testcase for the OpenMP test failure: ```c++ #pragma omp declare target static long double ld_return1e() { return 0; } void external() { void *p1 = reinterpret_cast(&ld_return1e); } #pragma omp end declare target ``` When built with the following com

[clang] [compiler-rt] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-25 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 d26002ac38ee1dea32053e7d12f1bb5dc420ac2d 2fa7299db558c2a953f641ffe760369f31a98b3d --

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-25 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/89727 >From a43014cf3daa1b0fd9092bfe41da979205ba64aa Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 23 Apr 2024 02:16:04 -0700 Subject: [PATCH 1/4] [RISCV] Teach .option arch to support experimental extensions.

[clang] 4b25508 - Notifying assume directive as 'worked on'. (#90022)

2024-04-25 Thread via cfe-commits
Author: SunilKuravinakop Date: 2024-04-26T10:31:55+05:30 New Revision: 4b255085833b58392d7699aaf5c20ea49559fda9 URL: https://github.com/llvm/llvm-project/commit/4b255085833b58392d7699aaf5c20ea49559fda9 DIFF: https://github.com/llvm/llvm-project/commit/4b255085833b58392d7699aaf5c20ea49559fda9.di

[clang] Notifying assume directive as 'worked on'. (PR #90022)

2024-04-25 Thread Sandeep Kosuri via cfe-commits
https://github.com/sandeepkosuri closed https://github.com/llvm/llvm-project/pull/90022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-25 Thread Yeting Kuo via cfe-commits
yetingk wrote: I fix the issue by using feature to control the permission of experimental extension. > Does this disable use of experimental extensions for a `.option arch` in an > inline assembly block without -menable-experimental-extensions. https://github.com/llvm/llvm-project/pull/8972

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-25 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > Looking at the logs, and the error seems to be unrelated to the changes made > https://buildkite.com/llvm-project/clang-ci/builds/16430#018f132d-506e-440c-b18b-fed98237def9/54-5446 You can try using `--allow-empty` to do an empty commit to kick off the build again. https://git

[clang] f4efa06 - [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (#84384)

2024-04-25 Thread via cfe-commits
Author: Daniil Kovalev Date: 2024-04-26T08:26:15+03:00 New Revision: f4efa067435c8137718c907bf0de2b891b76552d URL: https://github.com/llvm/llvm-project/commit/f4efa067435c8137718c907bf0de2b891b76552d DIFF: https://github.com/llvm/llvm-project/commit/f4efa067435c8137718c907bf0de2b891b76552d.diff

[clang] [clang-tools-extra] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-25 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/84384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-25 Thread Andrew Sukach via cfe-commits
https://github.com/soukatch updated https://github.com/llvm/llvm-project/pull/90012 >From b8e20a5a3e37ab9a657ac640b848f638387215fa Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Wed, 24 Apr 2024 22:50:50 -0400 Subject: [PATCH 1/2] [clang] MangledSymbol: remove pointless copy of vector ---

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-25 Thread Andrew Sukach via cfe-commits
https://github.com/soukatch updated https://github.com/llvm/llvm-project/pull/90012 >From 9007597af4f138d2744405bb7980fce4555d7508 Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Wed, 24 Apr 2024 22:50:50 -0400 Subject: [PATCH] [clang] MangledSymbol: remove pointless copy of vector --- cla

[clang] [Clang][CodeGen] Segfault when compiling weird code (PR #90165)

2024-04-25 Thread Tim Pham via cfe-commits
https://github.com/timmyhoa created https://github.com/llvm/llvm-project/pull/90165 Closes #88917 Do I really know what is going on? Nope. Do I know what the bug is? Enough to fix it (hopefully) :) I'm just a beginner so sorry for any obvious mistake. >From 99a85014b6dd2193afcaff1cb92b92a

[clang] [Clang][CodeGen] Segfault when compiling weird code (PR #90165)

2024-04-25 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] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-25 Thread Andrew Sukach via cfe-commits
https://github.com/soukatch updated https://github.com/llvm/llvm-project/pull/90012 >From 9007597af4f138d2744405bb7980fce4555d7508 Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Wed, 24 Apr 2024 22:50:50 -0400 Subject: [PATCH 1/2] [clang] MangledSymbol: remove pointless copy of vector ---

[clang] [Clang][CodeGen] Segfault when compiling weird code (PR #90165)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Tim Pham (timmyhoa) Changes Closes #88917 Do I really know what is going on? Nope. Do I know what the bug is? Enough to fix it (hopefully) :) I'm just a beginner so sorry for any obvious mistake. --- Full diff: https://githu

[clang] [Clang][CodeGen] Segfault when compiling weird code (PR #90165)

2024-04-25 Thread Tim Pham via cfe-commits
https://github.com/timmyhoa converted_to_draft https://github.com/llvm/llvm-project/pull/90165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Segfault when compiling weird code (PR #90165)

2024-04-25 Thread Tim Pham via cfe-commits
https://github.com/timmyhoa edited https://github.com/llvm/llvm-project/pull/90165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-25 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/89942 >From 8c5f1d0f92d77bffec88759c19133a0bac130f32 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 24 Apr 2024 23:36:10 +0800 Subject: [PATCH 1/3] [Clang] Implement P2748R5 "Disallow Binding a Returned Glvalue t

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-25 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 21ef187654c819fd097171afcc6c9855dccdb36d 0ee6abe93159a29052af3ef9befff6a7e029eb31 --

[clang] [Clang][CodeGen] Segfault when compiling weird code (PR #90165)

2024-04-25 Thread Tim Pham via cfe-commits
https://github.com/timmyhoa edited https://github.com/llvm/llvm-project/pull/90165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Segfault when compiling weird code (PR #90165)

2024-04-25 Thread Tim Pham via cfe-commits
https://github.com/timmyhoa edited https://github.com/llvm/llvm-project/pull/90165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-25 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/89942 >From 8c5f1d0f92d77bffec88759c19133a0bac130f32 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 24 Apr 2024 23:36:10 +0800 Subject: [PATCH 1/6] [Clang] Implement P2748R5 "Disallow Binding a Returned Glvalue t

[clang] [alpha.webkit.UncountedCallArgsChecker] Treat true/false as trivial (PR #90169)

2024-04-25 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/90169 Treat boolean literal "true" and "false" as trivial. >From c44d58eb513325c52199788aafa9d4112e3bfbb6 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Thu, 25 Apr 2024 23:03:00 -0700 Subject: [PATCH] [alpha.webkit.U

[clang] [alpha.webkit.UncountedCallArgsChecker] Treat true/false as trivial (PR #90169)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes Treat boolean literal "true" and "false" as trivial. --- Full diff: https://github.com/llvm/llvm-project/pull/90169.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/Web

[clang] [alpha.webkit.UncountedCallArgsChecker] Treat true/false as trivial (PR #90169)

2024-04-25 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/90169 >From f7640709bf3cebbd3f1b04f6eba4b8f60bb18c13 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Thu, 25 Apr 2024 23:03:00 -0700 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Treat true/false as trivial

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-25 Thread Hubert Tong via cfe-commits
@@ -14547,6 +14547,17 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { default: return false; + case Builtin::BI__builtin_frexpf: + case Builtin::BI__builtin_frexp: { hubert-reinterpretcast wrote: Why no `long double`? https://github.c

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-25 Thread Hubert Tong via cfe-commits
@@ -14638,6 +14649,8 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { return true; } + case Builtin::BIfmin: + case Builtin::BIfminf: hubert-reinterpretcast wrote: Don't make these evaluate in `constexpr`. Not only does this extend C (n

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-25 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,57 @@ +// RUN: %clang_cc1 -DWIN -verify -std=c++23 -fsyntax-only %s +// RUN: %clang_cc1 -verify -std=c++23 -fsyntax-only %s + +// expected-no-diagnostics + + +#ifdef WIN +#define INFINITY ((float)(1e+300 * 1e+300)) +#define NAN (-(float)(INFINITY * 0.0F)) +#else

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-25 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,55 @@ +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -DWIN -emit-llvm -o - %s | FileCheck %s --check-prefixes=WIN + +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -emit-llvm -o - %s | FileCheck %s --check

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-25 Thread Hubert Tong via cfe-commits
@@ -3440,7 +3440,7 @@ def Fmod : FPMathTemplate, LibBuiltin<"math.h"> { def Frexp : FPMathTemplate, LibBuiltin<"math.h"> { let Spellings = ["frexp"]; - let Attributes = [NoThrow]; + let Attributes = [NoThrow, Constexpr]; let Prototype = "T(T, int*)"; let AddBuiltinPr

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-04-25 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: The pre-merge windows test failure in `Clang :: Driver/amdgpu-toolchain.c` seems unrelated to this PR. https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [Clang][C++23] Core language changes from P1467R9 extended floating-point types and standard names. (PR #78503)

2024-04-25 Thread via cfe-commits
cor3ntin wrote: > > @codemzs Any news? Thanks a lot for your work! > > @cor3ntin Sorry for the delay, I plan to get back to this PR in the next few > weeks. Do you need this change for something? Nothing specific, I was just wondering sifting through PRs and our conformance page https://githu

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @shafik I wonder how checking size of a vector is now considered an expensive check. (I stumbled upon it while reviewing) https://github.com/llvm/llvm-project/blob/47682e4b4a0c8e7637d65868a7208aa6806a50f4/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp#L99-L101 https://gith

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Thank you for spotting and fixing this! https://github.com/llvm/llvm-project/pull/90012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

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

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/89807 >From 3f6e50edc7b4d4bf4781c71bd29f48224b62822d Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 9 Apr 2024 01:14:28 -0300 Subject: [PATCH] [clang] Enable C++17 relaxed template template argument matchi

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-04-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ensure nullable variable is not accessed without validity test (PR #90173)

2024-04-25 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny created https://github.com/llvm/llvm-project/pull/90173 None From f8e0509e0586ae7cb1a236e27b8be27a94bf7cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Fri, 26 Apr 2024 08:38:40 +0200 Subject: [PATCH] [clang-tidy] Ensure nullable variable i

[clang-tools-extra] [clang-tidy] Ensure nullable variable is not accessed without validity test (PR #90173)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Danny Mösch (SimplyDanny) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/90173.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/AvoidReturnWithVoidValueCheck.cpp (+5-2) ```

[clang-tools-extra] [clang-tidy] Add fix-its to `readability-avoid-return-with-void-value` check (PR #81420)

2024-04-25 Thread Danny Mösch via cfe-commits
@@ -42,10 +44,30 @@ void AvoidReturnWithVoidValueCheck::check( const auto *VoidReturn = Result.Nodes.getNodeAs("void_return"); if (IgnoreMacros && VoidReturn->getBeginLoc().isMacroID()) return; - if (!StrictMode && !Result.Nodes.getNodeAs("compound_parent")) + const a

<    1   2   3   4