[flang] [clang] [Flang][Driver] Enable gpulibc/nogpulibc options for Flang, which allows linking of GPU LIBC for the fortran and OpenMP runtime (PR #77135)

2024-01-08 Thread via cfe-commits
agozillon wrote: > Thanks for the discussion! > > > It defaults to on if it finds the `libc` wrapper headers in the `clang` > > resource directory, > > `lib/clang/18/include/llvm_libc_wrappers/llvm-libc-decls`. I'm assuming > > that Fortran doesn't have this? > > It shouldn't, which means th

[clang-tools-extra] [clang] [llvm] [X86] Emit Warnings for frontend options to enable knl/knm specific ISAs. (PR #75580)

2024-01-08 Thread Phoebe Wang via cfe-commits
@@ -69,7 +69,10 @@ // RUN: %clang_cl -m32 -arch:avx2 --target=i386-pc-windows -### -- 2>&1 %s | FileCheck -check-prefix=avx2 %s // avx2: invalid /arch: argument -// RUN: %clang_cl -m32 -arch:AVX512F --target=i386-pc-windows /c /Fo%t.obj -Xclang -verify -DTEST_32_ARCH_AVX512F

[clang] [clang] Fix assertion failure when initializing union with FAM (PR #77298)

2024-01-08 Thread Timm Baeder via cfe-commits
tbaederr wrote: Needs a short release note. https://github.com/llvm/llvm-project/pull/77298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [ASan][Driver] Add sanitize-target flag to support enabling ASan in device or host compilation (PR #76127)

2024-01-08 Thread via cfe-commits
jinge90 wrote: Hi, @MaskRay and @AaronBallman Kind ping~. Thanks very much. https://github.com/llvm/llvm-project/pull/76127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-08 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/76873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-08 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/76873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Add warning when comparing to INF or NAN in fast math mode. (PR #76873)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Zahira Ammarguellat (zahiraam) Changes Check for comparisons to INF and NaN when in ffast-math mode and generate a warning. --- Full diff: https://github.com/llvm/llvm-project/pull/76873.diff 5 Files Affected: - (modified) clang/includ

[clang] [CLANG] Add warning when comparing to INF or NAN in fast math mode. (PR #76873)

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

[clang] [clang][Interp] Implement __builtin_addressof (PR #77303)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We don't need to do anything here, since the input is already a Pointer. The only complexity is that we pre-classify the parameters as PT_Ptr, but they might end up being of a different pointer type, e.g. PT

[clang] [clang][Interp] Implement __builtin_addressof (PR #77303)

2024-01-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/77303 We don't need to do anything here, since the input is already a Pointer. The only complexity is that we pre-classify the parameters as PT_Ptr, but they might end up being of a different pointer type, e.g. PT_Fn

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-08 Thread Ilya Biryukov via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-08 Thread Ilya Biryukov via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-08 Thread Ilya Biryukov via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [llvm] [clang-tools-extra] [AArch64] Add an AArch64 pass for loop idiom transformations (PR #72273)

2024-01-08 Thread David Green via cfe-commits
@@ -0,0 +1,816 @@ +//===- AArch64LoopIdiomTransform.cpp - Loop idiom recognition -===// +// +// 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] [clang-tools-extra] [AArch64] Add an AArch64 pass for loop idiom transformations (PR #72273)

2024-01-08 Thread David Green via cfe-commits
https://github.com/davemgreen approved this pull request. Thanks for the updates. From what I can tell this LGTM, but it will need a rebase. You might want to commit it with the option disabled, and then flip the switch in a followup to avoid the commit-revert cycles in case there are any issu

[clang-tools-extra] [clang] [llvm] [AArch64] Add an AArch64 pass for loop idiom transformations (PR #72273)

2024-01-08 Thread David Green via cfe-commits
https://github.com/davemgreen edited https://github.com/llvm/llvm-project/pull/72273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [libcxx] [compiler-rt] [llvm] [lld] [clang] [clang-tools-extra] [lldb] [mlir] [MLIR][LLVM] Add Continuous Loop Peeling transform to SCF (PR #71555)

2024-01-08 Thread via cfe-commits
https://github.com/muneebkhan85 updated https://github.com/llvm/llvm-project/pull/71555 >From 7bb2f9793b2a2cccbaa401f6e2ac850b587f2b59 Mon Sep 17 00:00:00 2001 From: Muneeb Khan Date: Tue, 7 Nov 2023 23:52:17 +0800 Subject: [PATCH 01/11] [MLIR][LLVM] Add Continuous Loop Peeling transform to SC

[flang] [clang] [llvm] [clang-tools-extra] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2024-01-08 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: Hi, @jeanPerier welcome back! I've made quite a few changes, mainly on memory allocate and deallocate, test improvements, and have moved some commonly used descriptor functions into `tools.cpp` to re-use some code instead of creating duplicates of them. Could you review the re

[compiler-rt] [libc] [lldb] [clang] [llvm] [flang] [libcxx] [clang-tools-extra] [flang] FDATE extension implementation: get date and time in ctime format (PR #71222)

2024-01-08 Thread Yi Wu via cfe-commits
yi-wu-arm wrote: Hi @jeanPerier I have made some changes, mainly on test cases and use `char *` instead of `std::int_8t` for arg input. Saw your activity on GitHub, could you review the changes? Thanks in advance! https://github.com/llvm/llvm-project/pull/71222

[clang] [clang] Fix assertion failure when initializing union with FAM (PR #77298)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikita Popov (nikic) Changes When initializing a union that constrain a struct with a flexible array member, and the initializer list is empty, we currently trigger an assertion failure. This happens because getFlexibleArrayInitChars() as

[clang] [clang] Fix assertion failure when initializing union with FAM (PR #77298)

2024-01-08 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/77298 When initializing a union that constrain a struct with a flexible array member, and the initializer list is empty, we currently trigger an assertion failure. This happens because getFlexibleArrayInitChars() assumes

[clang] [clang][dataflow] Fix bug in `Value` comparison. (PR #76746)

2024-01-08 Thread via cfe-commits
@@ -53,8 +53,8 @@ TEST(ValueTest, EquivalentValuesWithDifferentPropsEquivalent) { TopBoolValue V2(A.makeAtomRef(Atom(3))); V1.setProperty("foo", Prop1); V2.setProperty("bar", Prop2); - EXPECT_TRUE(areEquivalentValues(V1, V2)); - EXPECT_TRUE(areEquivalentValues(V2, V1))

[clang] [clang][dataflow] Fix bug in `Value` comparison. (PR #76746)

2024-01-08 Thread via cfe-commits
@@ -27,9 +27,13 @@ static bool areEquivalentIndirectionValues(const Value &Val1, } bool areEquivalentValues(const Value &Val1, const Value &Val2) { - return &Val1 == &Val2 || (Val1.getKind() == Val2.getKind() && -(isa(&Val1) || -

[clang] [clang][dataflow] Fix bug in `Value` comparison. (PR #76746)

2024-01-08 Thread via cfe-commits
https://github.com/martinboehme requested changes to this pull request. https://github.com/llvm/llvm-project/pull/76746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Fix bug in `Value` comparison. (PR #76746)

2024-01-08 Thread via cfe-commits
https://github.com/martinboehme edited https://github.com/llvm/llvm-project/pull/76746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][coverage] fixing "if constexpr" and "if consteval" coverage report (PR #77214)

2024-01-08 Thread Hana Dusíková via cfe-commits
hanickadot wrote: Added some tests. And also adding @ornata for review. https://github.com/llvm/llvm-project/pull/77214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Format] Fix isStartOfName to recognize attributes (PR #76804)

2024-01-08 Thread kadir çetinkaya via cfe-commits
@@ -1698,8 +1698,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) { /*BasedOnStyle=*/"google", }, }; - GoogleStyle.AttributeMacros.push_back("GUARDED_BY"); kadircet wrote: FWIW, not recognizing `foo` in `int foo BAR` as s

[clang] [Format] Fix isStartOfName to recognize attributes (PR #76804)

2024-01-08 Thread Ilya Biryukov via cfe-commits
@@ -1698,8 +1698,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) { /*BasedOnStyle=*/"google", }, }; - GoogleStyle.AttributeMacros.push_back("GUARDED_BY"); ilya-biryukov wrote: @HazardyKnusperkeks friendly ping. Any thoug

[clang] [clang][coverage] fixing "if constexpr" and "if consteval" coverage report (PR #77214)

2024-01-08 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/77214 From 413517b2a1d4e45b6c58ab282c7990e83f429ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Mon, 8 Jan 2024 11:54:45 +0100 Subject: [PATCH] [coverage] fix incorrect coverage repo

[clang] [mlir] [llvm] [clang][coverage] fixing "if constexpr" and "if consteval" coverage report (PR #77214)

2024-01-08 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/77214 From 8f1370aae4db2048c35516a85fb72c742557942b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Sun, 7 Jan 2024 00:13:08 +0100 Subject: [PATCH] [coverage] fix incorrect coverage repo

[clang] [clang][coverage] fixing "if constexpr" and "if consteval" coverage report (PR #77214)

2024-01-08 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/77214 From 2dc9d821aa3d100f99ac603a0880498226c94323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Sun, 7 Jan 2024 00:13:08 +0100 Subject: [PATCH 1/2] [coverage] fix incorrect coverage

[clang] [clang] Fix a crash when referencing the result if the overload fails (PR #77288)

2024-01-08 Thread Haojian Wu via cfe-commits
hokein wrote: Thanks for the review. https://github.com/llvm/llvm-project/pull/77288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a crash when referencing the result if the overload fails (PR #77288)

2024-01-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/77288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 10b5b5d - [clang] Fix a crash when referencing the result if the overload fails (#77288)

2024-01-08 Thread via cfe-commits
Author: Haojian Wu Date: 2024-01-08T11:49:36+01:00 New Revision: 10b5b5d6e2df25dab86fe89a78c5df6f507f6e50 URL: https://github.com/llvm/llvm-project/commit/10b5b5d6e2df25dab86fe89a78c5df6f507f6e50 DIFF: https://github.com/llvm/llvm-project/commit/10b5b5d6e2df25dab86fe89a78c5df6f507f6e50.diff LO

[clang] [clang] Bounds checking on unclosed parentheses, brackets or braces in Expanded Tokens (PR #69849)

2024-01-08 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: I second everything that @HighCommander4 said. It would be really useful to add an assertion that we never get out-of-bounds here, but this indicates a logic error somewhere in the code that should be fixed. I am slightly suspicious of source locations pointing at `eof` in

[clang-tools-extra] [clang] [llvm] [X86] Emit Warnings for frontend options to enable knl/knm specific ISAs. (PR #75580)

2024-01-08 Thread Simon Pilgrim via cfe-commits
@@ -933,6 +933,9 @@ X86 Support - Support ISA of ``AVX10.1``. - ``-march=pantherlake`` and ``-march=clearwaterforest`` are now supported. - Added ABI handling for ``__float128`` to match with GCC. +- Emit Warnings for clang options to enable knl/knm. From next version + (LLVM

[clang] Improve modeling of 'getcwd' in the StdLibraryFunctionsChecker (PR #77040)

2024-01-08 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/77040 >From 10a0e9aae5effdd6e26476e78a778b89373358df Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Fri, 5 Jan 2024 10:05:15 +0800 Subject: [PATCH 1/3] Improve modeling of 'getcwd' in the StdLibraryFunctionsChecker 1

[clang] [clang][Interp] Implement ComplexToReal casts (PR #77294)

2024-01-08 Thread Timm Baeder via cfe-commits
@@ -37,6 +37,18 @@ constexpr _Complex int I2 = {}; static_assert(__real(I2) == 0, ""); static_assert(__imag(I2) == 0, ""); +constexpr int ignoredCast() { + I2; + (int)I2; + /* (float)I2; FIXME*/ + D1; + /* (int)D1; FIXME*/ tbaederr wrote: The commented-o

[clang] [clang][Interp] Fix discarded integral and floating casts (PR #77295)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We need to handle this at the CastExpr level. --- Full diff: https://github.com/llvm/llvm-project/pull/77295.diff 2 Files Affected: - (modified) clang/lib/AST/Interp/ByteCodeExprGen.cpp (+7) - (modified)

[clang] [clang][Interp] Fix discarded integral and floating casts (PR #77295)

2024-01-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/77295 We need to handle this at the CastExpr level. >From 4cecdb9bf613e7c4f42d6e735324a6d155467551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 8 Jan 2024 11:23:45 +0100 Subject: [PATCH] [c

[clang] [clang][analyzer] Add missing stream related functions to StdLibraryFunctionsChecker. (PR #76979)

2024-01-08 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/76979 From e24b90eebfff7a352dd2c0df7f948ffef26ea3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Thu, 4 Jan 2024 18:16:12 +0100 Subject: [PATCH 1/3] [clang][analyzer] Add missing stream rel

[clang] [clang] Fix a crash when referencing the result if the overload fails (PR #77288)

2024-01-08 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Thank you very much for the fix. I apologize for the trouble. https://github.com/llvm/llvm-project/pull/77288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [clang][Interp] Implement ComplexToReal casts (PR #77294)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Add a new emitComplexReal() helper function and use that for the new casts as well as the old __real implementation. --- Full diff: https://github.com/llvm/llvm-project/pull/77294.diff 3 Files Affected: -

[clang] [clang][Interp] Implement ComplexToReal casts (PR #77294)

2024-01-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/77294 Add a new emitComplexReal() helper function and use that for the new casts as well as the old __real implementation. >From 1d657e65f69f3b6d4be3ce08c5f39f73d8fc04b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=

[clang] 27f5479 - [clang-format] Break after string literals with trailing line breaks (#76795)

2024-01-08 Thread via cfe-commits
Author: kadir çetinkaya Date: 2024-01-08T11:11:02+01:00 New Revision: 27f547968cce89d4706ae2b27a0c15254d1670ee URL: https://github.com/llvm/llvm-project/commit/27f547968cce89d4706ae2b27a0c15254d1670ee DIFF: https://github.com/llvm/llvm-project/commit/27f547968cce89d4706ae2b27a0c15254d1670ee.dif

[clang] [clang-format] Break after string literals with trailing line breaks (PR #76795)

2024-01-08 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/76795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] CodeGen of RVE and ilp32e/lp64e ABIs (PR #76777)

2024-01-08 Thread Nemanja Ivanovic via cfe-commits
nemanjai wrote: > @nemanjai I'm curious if you have an interest / need to support RVE or not? I most certainly do. Thank you for alerting me to this PR. https://github.com/llvm/llvm-project/pull/76777 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Vassil Vassilev via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } vgvassilev wrote: If the example of @hahnjo works, perhaps a

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-08 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-08 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/77066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-08 Thread Chuanqi Xu via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [clang-format] Break after string literals with trailing line breaks (PR #76795)

2024-01-08 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/76795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-08 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-08 Thread Utkarsh Saxena via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-08 Thread David Chisnall via cfe-commits
@@ -2210,7 +2219,12 @@ CGObjCGNU::CGObjCGNU(CodeGenModule &cgm, unsigned runtimeABIVersion, // void objc_exception_throw(id); ExceptionThrowFn.init(&CGM, "objc_exception_throw", VoidTy, IdTy); - ExceptionReThrowFn.init(&CGM, "objc_exception_throw", VoidTy, IdTy); + if (

[clang] [clang][AST] Invalidate DecompositionDecl if it has invalid initializer. (PR #72428)

2024-01-08 Thread Haojian Wu via cfe-commits
hokein wrote: Friendly ping. https://github.com/llvm/llvm-project/pull/72428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-08 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Invalidate DecompositionDecl if it has invalid initializer. (PR #72428)

2024-01-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/72428 >From 662be3d00eed883db6b1babe489b981847e9b907 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 15 Nov 2023 20:31:12 +0100 Subject: [PATCH 1/3] [clang][AST] Invalidate DecompositionDecl if it has invalid init

[lld] [llvm] [compiler-rt] [libc] [clang] [flang] [libunwind] [clang-tools-extra] [libcxx] [lldb] [GVN] Disable GVN PRE on target hasBranchDivergence (PR #77069)

2024-01-08 Thread via cfe-commits
https://github.com/fengfeng09 updated https://github.com/llvm/llvm-project/pull/77069 >From 17a9072758d9f443d0f7bca8862fec5a793c3dba Mon Sep 17 00:00:00 2001 From: "feng.feng" Date: Mon, 11 Dec 2023 15:14:32 +0800 Subject: [PATCH] [GVN] Disable GVN PRE on target hasBranchDivergence Signed-off-

[libcxx] [clang] [flang] [llvm] [mlir] [WebAssembly] Correctly consider signext/zext arg flags at function declaration (PR #77281)

2024-01-08 Thread Juneyoung Lee via cfe-commits
https://github.com/aqjune updated https://github.com/llvm/llvm-project/pull/77281 >From 1bbfe05bc50e1fbdb207f21a178b6fc7ab24e8cf Mon Sep 17 00:00:00 2001 From: Juneyoung Lee Date: Mon, 8 Jan 2024 02:01:41 -0600 Subject: [PATCH] [WebAssembly] Correctly consider signext/zext arg flags at functio

[clang] 442f67c - [Sema][test] Split format attribute test cases for _Float16

2024-01-08 Thread Lu Haocong via cfe-commits
Author: Lu Haocong Date: 2024-01-08T17:24:51+08:00 New Revision: 442f67c8702a792a135d61765909b732827d6bf2 URL: https://github.com/llvm/llvm-project/commit/442f67c8702a792a135d61765909b732827d6bf2 DIFF: https://github.com/llvm/llvm-project/commit/442f67c8702a792a135d61765909b732827d6bf2.diff LO

[clang] [clang] Fix a crash when referencing the result if the overload fails (PR #77288)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes after 20a05677f9394d4bc9467fe7bc93a4ebd3aeda61 If the overload fails, the `Best` might point to the `end()`, referencing it leads to asan crashes. --- Full diff: https://github.com/llvm/llvm-project/pull/77288

[clang] [clang] Fix a crash when referencing the result if the overload fails (PR #77288)

2024-01-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/77288 after 20a05677f9394d4bc9467fe7bc93a4ebd3aeda61 If the overload fails, the `Best` might point to the `end()`, referencing it leads to asan crashes. >From 5061fbfe8c8840dc49c12bb533fa5d537efc8333 Mon Sep 17 00:00:

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-08 Thread Chuanqi Xu via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-08 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/77066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-08 Thread Utkarsh Saxena via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [clang-format] Break after string literals with trailing line breaks (PR #76795)

2024-01-08 Thread kadir çetinkaya via cfe-commits
@@ -5151,6 +5151,14 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, return true; if (Left.IsUnterminatedLiteral) return true; + // FIXME: Breaking after newlines seems useful in general. Turn this into an + // option and recognize more cases like

[clang] Improve modeling of 'getcwd' in the StdLibraryFunctionsChecker (PR #77040)

2024-01-08 Thread Balázs Kéri via cfe-commits
@@ -75,13 +75,16 @@ void errno_mkdtemp(char *template) { } } -void errno_getcwd(char *Buf, size_t sz) { - char *Path = getcwd(Buf, sz); - if (Path == NULL) { -clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}} -if (errno) {} /

[clang] [clang][Interp] Add inline descriptor to global variables (PR #72892)

2024-01-08 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/72892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [clang][Interp] Fix diagnosing non-const variables pre-C++11 (PR #76718)

2024-01-08 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/76718 >From 64039561ffa3bad6e5a0c98c729478e59777e782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 9 Nov 2023 15:45:05 +0100 Subject: [PATCH

[clang] [clang-format] Fix crash involving array designators and dangling comma (PR #77045)

2024-01-08 Thread Owen Pan via cfe-commits
@@ -1444,16 +1444,26 @@ WhitespaceManager::CellDescriptions WhitespaceManager::getCells(unsigned Start, } else if (C.Tok->is(tok::comma)) { if (!Cells.empty()) Cells.back().EndIndex = i; -if (C.Tok->getNextNonComment()->isNot(tok::r_brace)) // d

[clang] Improve modeling of 'getcwd' in the StdLibraryFunctionsChecker (PR #77040)

2024-01-08 Thread Balázs Kéri via cfe-commits
@@ -2519,12 +2519,17 @@ void StdLibraryFunctionsChecker::initFunctionSummaries( addToFunctionSummaryMap( "getcwd", Signature(ArgTypes{CharPtrTy, SizeTy}, RetType{CharPtrTy}), Summary(NoEvalCall) -.Case({ReturnValueCondition(BO_EQ, ArgNo(0))}, +

[clang] Improve modeling of 'getcwd' in the StdLibraryFunctionsChecker (PR #77040)

2024-01-08 Thread Balázs Kéri via cfe-commits
@@ -2519,12 +2519,17 @@ void StdLibraryFunctionsChecker::initFunctionSummaries( addToFunctionSummaryMap( "getcwd", Signature(ArgTypes{CharPtrTy, SizeTy}, RetType{CharPtrTy}), Summary(NoEvalCall) -.Case({ReturnValueCondition(BO_EQ, ArgNo(0))}, +

[clang] 2c213c4 - [Clang] Fix reference to sve in rvv driver test comment. NFC

2024-01-08 Thread Luke Lau via cfe-commits
Author: Luke Lau Date: 2024-01-08T16:04:33+07:00 New Revision: 2c213c45046b78eac48809b013e7a80099607ebb URL: https://github.com/llvm/llvm-project/commit/2c213c45046b78eac48809b013e7a80099607ebb DIFF: https://github.com/llvm/llvm-project/commit/2c213c45046b78eac48809b013e7a80099607ebb.diff LOG:

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-08 Thread Frederik Carlier via cfe-commits
@@ -2210,7 +2219,12 @@ CGObjCGNU::CGObjCGNU(CodeGenModule &cgm, unsigned runtimeABIVersion, // void objc_exception_throw(id); ExceptionThrowFn.init(&CGM, "objc_exception_throw", VoidTy, IdTy); - ExceptionReThrowFn.init(&CGM, "objc_exception_throw", VoidTy, IdTy); + if (

[clang] [clang][Interp] Support __real/__imag on primitives (PR #75485)

2024-01-08 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/75485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Bounds checking on unclosed parentheses, brackets or braces in Expanded Tokens (PR #69849)

2024-01-08 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Anyways, in a case like this, this preferable behaviour would be for `spelledForExpanded()` to return the spelled tokens covering `int main() {` (not including the `eof` token but including everything else), **not** nullopt. https://github.com/llvm/llvm-project/pull/69849

[clang] [clang] Bounds checking on unclosed parentheses, brackets or braces in Expanded Tokens (PR #69849)

2024-01-08 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: I poked at this a bit more. A few more notes: * Since the test case currently in the patch does not trigger the crash (without the fix), and it was not obvious to me what sort of call to `spelledForExpanded()` to formulate to trigger the crash, I instead formulated a te

[clang] [clang][Interp] Diagnose reads from non-const global variables (PR #71919)

2024-01-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71919 >From 720d87366993568f47470761e4a20b071cf8c369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 9 Nov 2023 15:45:05 +0100 Subject: [PATCH] [clang][Interp] Diagnose reads from non-const glo

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > > > This is a great way to start a new year ;) > > > > The phab link is https://reviews.llvm.org/D41416. > > > > In general I was wondering could we simplify the implementation by > > > > loading the specialization hash table upon module load. That should be > > > > relati

[llvm] [clang] [ASAN] For Asan instrumented global, emit two symbols, one with actual size and other with instrumented size. (PR #70166)

2024-01-08 Thread via cfe-commits
skc7 wrote: > Will wait for a rebase on some changes requested in #68865, but it'd also be > really important to write tests for a couple more scenarios: > > 1. Building with `-fsanitize=address -S -emit-llvm` results in GVs with > `sanitized_padded_global` (and results in GVs without > `sani

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: Yeah, I just saw it. My concern for reinven

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-08 Thread David Chisnall via cfe-commits
davidchisnall wrote: The failing format CI isn’t in this PR, rebasing to (hopefully) fix it https://github.com/llvm/llvm-project/pull/77255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-08 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall updated https://github.com/llvm/llvm-project/pull/77255 >From 6195e6c57b5b461dda2bffec0e5497ceb659f82c Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Thu, 4 Jan 2024 11:10:05 -0800 Subject: [PATCH] Objective C: use C++ exceptions on MinGW+GNUstep The GNU

[clang] [clang-tools-extra] [clang-tidy] Improve performance of misc-const-correctness (PR #72705)

2024-01-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/72705 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-08 Thread David Chisnall via cfe-commits
@@ -2210,7 +2219,12 @@ CGObjCGNU::CGObjCGNU(CodeGenModule &cgm, unsigned runtimeABIVersion, // void objc_exception_throw(id); ExceptionThrowFn.init(&CGM, "objc_exception_throw", VoidTy, IdTy); - ExceptionReThrowFn.init(&CGM, "objc_exception_throw", VoidTy, IdTy); + if (

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev edited https://github.com/llvm/llvm-project/pull/76774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev edited https://github.com/llvm/llvm-project/pull/76774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Vassil Vassilev via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } vgvassilev wrote: I guess the comment we are discussing is he

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > This is a great way to start a new year ;) > > > The phab link is https://reviews.llvm.org/D41416. > > > In general I was wondering could we simplify the implementation by > > > loading the specialization hash table upon module load. That should be > > > relatively cheap

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > This is a great way to start a new year ;) > > The phab link is https://reviews.llvm.org/D41416. > > In general I was wondering could we simplify the implementation by loading > > the specialization hash table upon module load. That should be relatively > > cheap as we wil

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-08 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: It looks like the qualified related problem

[clang] [Sema] Warning for _Float16 passed to format specifier '%f' (PR #74439)

2024-01-08 Thread Rainer Orth via cfe-commits
rorth wrote: This patch broke the [Solaris/sparcv9 buildbot](https://lab.llvm.org/buildbot/#/builders/72/builds/1709): the new/changed tests `FAIL` with ``` File /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/SemaCXX/format-strings-scanf.cpp Line 25: _Floa

<    1   2   3   4   5