[clang] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChecker (PR #76557)

2023-12-29 Thread Ben Shi via cfe-commits
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/76557 None >From 2eebb462b8a7865684d3baaffbad7560eed10e57 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Fri, 29 Dec 2023 16:44:47 +0800 Subject: [PATCH] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsC

[clang] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChecker (PR #76557)

2023-12-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ben Shi (benshi001) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/76557.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cp

[llvm] [clang] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2023-12-29 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 created https://github.com/llvm/llvm-project/pull/76558 Currently `fp128` math intrinsics are lowered to functions expecting `long double`, which is a problem when `long double` and `f128` do not have the same layout (e.g. `long double` on x86 is `f80`). This patch

[llvm] [clang] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2023-12-29 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 i

[clang] [llvm] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2023-12-29 Thread Trevor Gross via cfe-commits
tgross35 wrote: @efriedma-quic was looking at this on phabricator https://github.com/llvm/llvm-project/pull/76558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChecker (PR #76557)

2023-12-29 Thread via cfe-commits
https://github.com/DonatNagyE approved this pull request. Looks good to me, my only nitpick is that perhaps you could use more descriptive test names instead of distinguishing them with `_0` and `_1` suffixes. Also, perhaps wait a bit (until next year ;) ) before merging this to give other re

[clang] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChecker (PR #76557)

2023-12-29 Thread via cfe-commits
https://github.com/DonatNagyE edited https://github.com/llvm/llvm-project/pull/76557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChecker (PR #76557)

2023-12-29 Thread Balazs Benics via cfe-commits
steakhal wrote: please also update the release notes https://github.com/llvm/llvm-project/pull/76557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChecker (PR #76557)

2023-12-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/76557 >From 2eebb462b8a7865684d3baaffbad7560eed10e57 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Fri, 29 Dec 2023 16:44:47 +0800 Subject: [PATCH 1/2] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChec

[clang] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChecker (PR #76557)

2023-12-29 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/76557 >From 2eebb462b8a7865684d3baaffbad7560eed10e57 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Fri, 29 Dec 2023 16:44:47 +0800 Subject: [PATCH 1/3] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChe

[clang] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChecker (PR #76557)

2023-12-29 Thread Ben Shi via cfe-commits
benshi001 wrote: > Looks good to me, my only nitpick is that perhaps you could use more > descriptive test names instead of using `_0` and `_1` suffixes. > > Also, perhaps wait a bit (until next year ;) ) before merging this to give > other reviewers a chance to look at it. Thanks for your su

[clang] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChecker (PR #76557)

2023-12-29 Thread Ben Shi via cfe-commits
benshi001 wrote: > ~please also update the release notes~ EDIT: Done. Thanks for your support! https://github.com/llvm/llvm-project/pull/76557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang] Correctly implement CWG 2672 (PR #75001)

2023-12-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: DR test changes look good to me, but wait for another reviewer. https://github.com/llvm/llvm-project/pull/75001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AVR] Restrict range of assembly constraint 'G' (PR #76561)

2023-12-29 Thread Ben Shi via cfe-commits
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/76561 According to https://www.nongnu.org/avr-libc/user-manual/inline_asm.html, "G" only represent a float constraint "0.0". And avr-gcc also rejects other non-zero values. >From 0a29621f6c6808668ada014313083f45a60

[clang] [clang][AVR] Restrict range of assembly constraint 'G' (PR #76561)

2023-12-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ben Shi (benshi001) Changes According to https://www.nongnu.org/avr-libc/user-manual/inline_asm.html, "G" only represent a float constraint "0.0". And avr-gcc also rejects other non-zero values. --- Full diff: https://github.com/llvm/llv

[llvm] [clang] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-29 Thread Nikita Popov via cfe-commits
nikic wrote: There are lld test failures. https://github.com/llvm/llvm-project/pull/76553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-29 Thread Nikita Popov via cfe-commits
@@ -27,7 +27,7 @@ #endif // function return types -// CHECK-LABEL: define dso_local <8 x half> @test_ret_v8f16( +// CHECK-LABEL: define dso_local noundef <8 x half> @test_ret_v8f16( nikic wrote: Do you know why clang places the noundef on the argument but not

[llvm] [clang] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/76553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-29 Thread Nikita Popov via cfe-commits
@@ -27,7 +27,7 @@ #endif // function return types -// CHECK-LABEL: define dso_local <8 x half> @test_ret_v8f16( +// CHECK-LABEL: define dso_local noundef <8 x half> @test_ret_v8f16( nikic wrote: Ah, it seems to indeed be a "weird C rule": https://github.com/l

[llvm] [clang] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-29 Thread Nikita Popov via cfe-commits
@@ -1279,6 +1280,43 @@ static void addNonNullAttrs(const SCCNodeSet &SCCNodes, } } +/// Deduce noundef attributes for the SCC. +static void addNoUndefAttrs(const SCCNodeSet &SCCNodes, +SmallSet &Changed) { + // Check each function in turn, determ

[clang] [llvm] [FuncAttrs] Deduce `noundef` attributes for return values (PR #76553)

2023-12-29 Thread Nikita Popov via cfe-commits
@@ -1279,6 +1280,43 @@ static void addNonNullAttrs(const SCCNodeSet &SCCNodes, } } +/// Deduce noundef attributes for the SCC. +static void addNoUndefAttrs(const SCCNodeSet &SCCNodes, +SmallSet &Changed) { + // Check each function in turn, determ

[clang] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChecker (PR #76557)

2023-12-29 Thread via cfe-commits
DonatNagyE wrote: Thanks for updating the test names. I think it's safe to merge this now (as @steakhal also had an opportunity to look at it). https://github.com/llvm/llvm-project/pull/76557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-29 Thread Ben Boeckel via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" mathstuf wrote: I'd like there to be some dist

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-29 Thread Thorsten Schütt via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" tschuett wrote: If the output starts with a /,

[clang] [llvm] [clang-tools-extra] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2023-12-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/69057 >From 8ed4effd114ebd83d4ceaa37655ffd9b7105b28e Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sat, 14 Oct 2023 15:51:42 +0200 Subject: [PATCH 1/5] [analyzer] Trust base to derived casts for dynamic types Wh

[clang] [clang-format] Fix bad indentation with attribute and templated type (PR #76336)

2023-12-29 Thread via cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/76336 >From 24aa5e41505eebb64288e7369a3b4f35ee0214fc Mon Sep 17 00:00:00 2001 From: XDeme Date: Sun, 24 Dec 2023 11:27:31 -0300 Subject: [PATCH 1/2] [clang-format] Fix bad indentation with attribute and templated type -

[clang] [llvm] [clang-tools-extra] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2023-12-29 Thread Balazs Benics via cfe-commits
steakhal wrote: > Thanks for the replies. I'll come back to this PR once I have some time; > maybe during the holidays. Both assertions directly relate to this PR for > sure. I think I've just fixed the reported crash for this PR. For some reason a `CastExpr` does not have a reference type (`

[clang] [clang-format] Fix bad indentation with attribute and templated type (PR #76336)

2023-12-29 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/76336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Add diagnostics for out-of-bounds vector access (PR #76569)

2023-12-29 Thread via cfe-commits
https://github.com/implicitfield created https://github.com/llvm/llvm-project/pull/76569 Fixes #76490 >From 5b95122ede9373bb031061ead75140b9f27bad29 Mon Sep 17 00:00:00 2001 From: implicitfield <114500360+implicitfi...@users.noreply.github.com> Date: Fri, 29 Dec 2023 01:52:49 +0400 Subject: [PA

[clang] [clang][Sema] Add diagnostics for out-of-bounds vector access (PR #76569)

2023-12-29 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 i

[clang] [clang][Sema] Add diagnostics for out-of-bounds vector access (PR #76569)

2023-12-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (implicitfield) Changes Fixes #76490 --- Full diff: https://github.com/llvm/llvm-project/pull/76569.diff 3 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticSemaKinds.td (+8) - (modified) clang/lib/Sema/SemaChecking

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/75468 >From 8f381c760fca8a4abd7550c492ff22fa8972933a Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Thu, 6 Jul 2023 16:47:21 -0400 Subject: [PATCH 1/3] [OpenMP] Introduce -fopenmp-force-usm flag The new flag implements l

[clang] [OpenMP][USM] Adds test for -fopenmp-force-usm flag (PR #75467)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: I updated the feature PR (#75468) with a different solution. Will update the test after feedback if the route I took in the other PR is seen as OK. https://github.com/llvm/llvm-project/pull/75467 ___ cfe-commits mailing list cfe-commits@

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-29 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 3c92011b600bdf70424e2547594dd461fe411a41 f0aaefbe923d2daa1752f3a9664dab3958346c51 --

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: Hmm.. I guess I screwed something up with git and the history. https://github.com/llvm/llvm-project/pull/75468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr created https://github.com/llvm/llvm-project/pull/76571 This flag forces the compiler to generate code for OpenMP target regions as if the user specified the #pragma omp requires unified_shared_memory in each source file. The option does not have a -fno-* friend sinc

[clang] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2023-12-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jan Patrick Lehr (jplehr) Changes This flag forces the compiler to generate code for OpenMP target regions as if the user specified the #pragma omp requires unified_shared_memory in each source file. The option does not have a -fn

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-29 Thread Mark de Wever via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" mordante wrote: > I'd like there to be some di

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr closed https://github.com/llvm/llvm-project/pull/75468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -492,11 +492,13 @@ void check_required_cast() { void check_cast_behavior(OSObject *obj) { OSArray *arr1 = OSDynamicCast(OSArray, obj); - clang_analyzer_eval(arr1 == obj); // expected-warning{{TRUE}} -// expected-note@-1{{TRUE}} -

[clang] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2023-12-29 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: Needs a test. There should be some difference in codegen we can key off of. https://github.com/llvm/llvm-project/pull/76571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: Is the approach taken in this approach acceptable as opposed to the header solution I put up earlier? https://github.com/llvm/llvm-project/pull/76571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2023-12-29 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Is the approach taken in this approach acceptable as opposed to the header > solution I put up earlier? Yes, it's pretty much exactly what I had in mind from my suggestion in the last PR. Thanks. https://github.com/llvm/llvm-project/pull/76571

[clang] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: > > Is the approach taken in this approach acceptable as opposed to the header > > solution I put up earlier? > > Yes, it's pretty much exactly what I had in mind from my suggestion in the > last PR. Thanks. Perfect. I'll go ahead and add lit and runtime tests. https://github.c

[clang] [AVR] make the AVR ABI Swift compatible (PR #72298)

2023-12-29 Thread Carl Peto via cfe-commits
carlos4242 wrote: @benshi001 Have you got any thoughts on this as the AVR maintainer? I've been using various versions of this patch in my own branches for years. Should we merge? I think ultimately it's your call as you're the AVR backend owner? https://github.com/llvm/llvm-project/pull/7229

[clang] [clang] Sema::isSimpleTypeSpecifier return true for _Bool in c99 (PR #72204)

2023-12-29 Thread Carl Peto via cfe-commits
carlos4242 wrote: Hi @AaronBallman what do you think about this PR? Is it good to merge or is there something else I can add? https://github.com/llvm/llvm-project/pull/72204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [Clang][RISCV] bfloat uses 'y' instead of 'b' (PR #76575)

2023-12-29 Thread Michael Maitland via cfe-commits
https://github.com/michaelmaitland created https://github.com/llvm/llvm-project/pull/76575 Builtins.def says that bfloat should be represented by the 'y' character, not the 'b' character. The 'b' character is specified to use 'b'. The implementation currently uses 'b' correctly for boolean and

[clang] [Clang][RISCV] bfloat uses 'y' instead of 'b' (PR #76575)

2023-12-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Michael Maitland (michaelmaitland) Changes Builtins.def says that bfloat should be represented by the 'y' character, not the 'b' character. The 'b' character is specified to use 'b'. The implementation currently uses 'b' correctl

[clang] [Clang][RISCV] bfloat uses 'y' instead of 'b' (PR #76575)

2023-12-29 Thread Craig Topper via cfe-commits
topperc wrote: > The 'b' character is specified to use 'b'. Was this sentence supposed to say `bool`? https://github.com/llvm/llvm-project/pull/76575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [Clang][RISCV] bfloat uses 'y' instead of 'b' (PR #76575)

2023-12-29 Thread Michael Maitland via cfe-commits
https://github.com/michaelmaitland edited https://github.com/llvm/llvm-project/pull/76575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] bfloat uses 'y' instead of 'b' (PR #76575)

2023-12-29 Thread Michael Maitland via cfe-commits
michaelmaitland wrote: > > The 'b' character is specified to use 'b'. > > Was this sentence supposed to say `bool`? yes, updated. https://github.com/llvm/llvm-project/pull/76575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [Clang][RISCV] bfloat uses 'y' instead of 'b' (PR #76575)

2023-12-29 Thread Craig Topper via cfe-commits
https://github.com/topperc commented: LGTM other than the comment about the commit message https://github.com/llvm/llvm-project/pull/76575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [Clang][RISCV] bfloat uses 'y' instead of 'b' (PR #76575)

2023-12-29 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM other than the comment about the commit message https://github.com/llvm/llvm-project/pull/76575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[llvm] [clang] [RISCV] Add MC layer support for Zicfiss. (PR #66043)

2023-12-29 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/66043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Gábor Spaits via cfe-commits
https://github.com/spaits created https://github.com/llvm/llvm-project/pull/76580 Add a checker to detect bad `std::any` type accesses. It warns, when the active type is different from the requested type when calling `std::any_cast`: ```cpp void anyCast() { std::any a = 5; char c = std::any

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Gábor Spaits (spaits) Changes Add a checker to detect bad `std::any` type accesses. It warns, when the active type is different from the requested type when calling `std::any_cast`: ```cpp void anyCast() { std::any a = 5; char c = std:

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-29 Thread Ben Boeckel via cfe-commits
@@ -2164,6 +2164,12 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { return false; } + if (C.getArgs().hasArg(options::OPT_print_library_module_manifest_path)) { +llvm::outs() << "module: =" mathstuf wrote: I suppose that's good enough;

[clang-tools-extra] [llvm] [clang] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2023-12-29 Thread Balazs Benics via cfe-commits
steakhal wrote: To illustrate the case of my previous argument, here are two examples: https://godbolt.org/z/5vWadfPM9 ```c++ // base.h BEGIN: class Base { public: virtual int fun() const = 0; }; class Derived1 final : public Base { public: int fun() const override { return 1; } }; // base.h

[clang] [clang][analyzer] Support 'fflush' in the StdLibraryFunctionsChecker (PR #76557)

2023-12-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/76557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/76580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. First batch of review. https://github.com/llvm/llvm-project/pull/76580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/76580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-format] Fix bad indentation with attribute and templated type (PR #76336)

2023-12-29 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > Hi, Thanks for reviewing, could you merge this for me? I don't have write > access I could. But I'm no fan of submitting just because one person approved without others having the chance to say something. (As has happened here.) https://github.com/llvm/llvm-project

[clang] 41ef6fc - [clang-format] Fix bad indentation with attribute and templated type (#76336)

2023-12-29 Thread via cfe-commits
Author: XDeme Date: 2023-12-29T21:27:53+01:00 New Revision: 41ef6fc54f612000fe2e498b3931fa3229c7a78c URL: https://github.com/llvm/llvm-project/commit/41ef6fc54f612000fe2e498b3931fa3229c7a78c DIFF: https://github.com/llvm/llvm-project/commit/41ef6fc54f612000fe2e498b3931fa3229c7a78c.diff LOG: [c

[clang] [clang-format] Fix bad indentation with attribute and templated type (PR #76336)

2023-12-29 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks closed https://github.com/llvm/llvm-project/pull/76336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add .clang-format-ignore for ignoring files (PR #76327)

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

[openmp] [clang] [llvm] [clang-tools-extra] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2023-12-29 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough created https://github.com/llvm/llvm-project/pull/76587 This pull request is the first part of an ongoing effort to extends PGO instrumentation to GPU device code. This PR makes the following changes: - Adds blank registration functions to device RTL - Giv

[clang-tools-extra] [llvm] [openmp] [clang] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2023-12-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-pgo Author: Ethan Luis McDonough (EthanLuisMcDonough) Changes This pull request is the first part of an ongoing effort to extends PGO instrumentation to GPU device code. This PR makes the following changes: - Adds b

[clang] [clang-format] Fix handling of C-Style variable definition of a struct (PR #76344)

2023-12-29 Thread via cfe-commits
https://github.com/XDeme converted_to_draft https://github.com/llvm/llvm-project/pull/76344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From 98b52eb390438402562de96a74771b0132fc71cb Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 1/7] [analyzer] Add std::any checker --- clang/docs/analyzer/checke

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2023-12-29 Thread Boris Kolpackov via cfe-commits
boris-kolpackov wrote: If I understand correctly, this invents a new option just to print the std modules path. Is there a reason why we cannot just print this information as part of `-print-search-dirs`? The benefit of this will be saving an extra compiler invocation in case the build system

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Gábor Spaits via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 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 90802e652db348fd3218fcbfc3e6ac9e90702acd 1a96db3c48782b0ec6f2de403ce862b9a95917bf --

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Gábor Spaits via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Gábor Spaits via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm] [clang-tools-extra] [openmp] [clang] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2023-12-29 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/76587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2023-12-29 Thread Joseph Huber via cfe-commits
@@ -428,13 +428,22 @@ std::string getPGOFuncNameVarName(StringRef FuncName, return VarName; } +bool isGPUProfTarget(const Module &M) { + const auto &triple = M.getTargetTriple(); + return triple.rfind("nvptx", 0) == 0 || triple.rfind("amdgcn", 0) == 0 || + triple.r

[openmp] [llvm] [clang] [clang-tools-extra] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2023-12-29 Thread Joseph Huber via cfe-commits
@@ -959,8 +959,14 @@ void CodeGenPGO::emitCounterIncrement(CGBuilderTy &Builder, const Stmt *S, unsigned Counter = (*RegionCounterMap)[S]; - llvm::Value *Args[] = {FuncNameVar, - Builder.getInt64(FunctionHash), + // Make sure that pointer to globa

[openmp] [clang-tools-extra] [llvm] [clang] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2023-12-29 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,21 @@ +//=== Profiling.h - OpenMP interface -- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[openmp] [clang] [llvm] [clang-tools-extra] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2023-12-29 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: Some quick nits, will look more later. https://github.com/llvm/llvm-project/pull/76587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add build type to LibASTMatchersTutorial.rst cmake (PR #76301)

2023-12-29 Thread Craig Hesling via cfe-commits
linux4life798 wrote: @tbaederr, thanks for the review! Can you merge the change or should I reach out to another reviewer? Best, Craig https://github.com/llvm/llvm-project/pull/76301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/76596 Background https://godbolt.org/z/hv53svTrq for reference on all of the below. In games debug performance is critical as much as optimized performance. We mainly accomplish this by reducing the amount

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2023-12-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Max Winkler (MaxEW707) Changes Background https://godbolt.org/z/hv53svTrq for reference on all of the below. In games debug performance is critical as much as optimized performance. We mainly accomplish this by reducing the amo

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/76596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2023-12-29 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 updated https://github.com/llvm/llvm-project/pull/76558 >From 7df4ef93989b1913d9200fbc29d6d04f9e59d51a Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 11 Aug 2023 22:16:01 -0400 Subject: [PATCH 1/4] [IR] Add an xpassing test for `f128` intrinsic lowering `f12

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/76596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/76596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >