[clang-tools-extra] [clang-include-cleaner] Fix incorrect directory issue for writing files (PR #111375)

2024-10-14 Thread kadir çetinkaya via cfe-commits
@@ -305,8 +307,46 @@ int main(int argc, const char **argv) { } } - clang::tooling::ClangTool Tool(OptionsParser->getCompilations(), - OptionsParser->getSourcePathList()); + auto VFS = llvm::vfs::getRealFileSystem(); + auto &CDB = Option

[clang-tools-extra] [clang-include-cleaner] Fix incorrect directory issue for writing files (PR #111375)

2024-10-14 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/111375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-include-cleaner] Fix incorrect directory issue for writing files (PR #111375)

2024-10-14 Thread kadir çetinkaya via cfe-commits
@@ -305,8 +307,46 @@ int main(int argc, const char **argv) { } } - clang::tooling::ClangTool Tool(OptionsParser->getCompilations(), - OptionsParser->getSourcePathList()); + auto VFS = llvm::vfs::getRealFileSystem(); + auto &CDB = Option

[clang] [CLANG]Add Scalable vectors for mfloat8_t (PR #101644)

2024-10-14 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/101644 >From 7134302c7e1054021af36a207dbfd0c40c9e8c51 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Fri, 2 Aug 2024 08:47:18 + Subject: [PATCH 1/2] [CLANG]Add Scalable vectors for mfloat8_t This

[clang] [HIP] Replace use of `llvm-mc` with `clang` (PR #112041)

2024-10-14 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > This seems to be failing all of the precommit CI pipelines in Clang: > > https://buildkite.com/llvm-project/github-pull-requests/builds/109413#01928af0-a546-4bf9-bd4c-a229b8ebc005 > > Can this be fixed or reverted? I'm confused, that test was modified in this patch and no long

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-10-14 Thread Kristóf Umann via cfe-commits
Szelethus wrote: Damn, look at this project, thriving as strong as ever 18 years after its conception! Great discussions! Let me throw in my two cents. Overall, I think we should go with this patch. I agree with a great many things previously said, this one summarizes the argument for the vis

[clang] [HIP] Replace use of `llvm-mc` with `clang` (PR #112041)

2024-10-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Huh, I'm also confused -- you're right, this file has changed and shouldn't be failing in that way. Maybe the pre-commit CI bot is not replacing the files as expected? I'm not seeing anything in the logs about that kind of problem, though. CC @tstellar @asl for additional e

[clang] [llvm] [ARM] [AArch32] Add support for Arm China STAR-MC1 CPU (PR #110085)

2024-10-14 Thread Jonathan Thackray via cfe-commits
jthackray wrote: > Hi David, rebase done. Could you help to merge? It doesn't look like it builds at the moment. Happy to help merge when it's ready :) https://github.com/llvm/llvm-project/pull/110085 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [C2y] Add test coverage for N3298 (PR #112033)

2024-10-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: There, after fixing my mistakes with git, tests are passing again aside from the hip test that continues to fail all precommit CI checks. https://github.com/llvm/llvm-project/pull/112033 ___ cfe-commits mailing list cfe-commits@lis

[clang] [HIP] Replace use of `llvm-mc` with `clang` (PR #112041)

2024-10-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: This seems to be failing all of the precommit CI pipelines in Clang: https://buildkite.com/llvm-project/github-pull-requests/builds/109413#01928af0-a546-4bf9-bd4c-a229b8ebc005 Can this be fixed or reverted? https://github.com/llvm/llvm-project/pull/112041 _

[clang] [lldb] [llvm] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-10-14 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw commented: Middle-end/CodeGen/RISC-V changes LGTM. https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Link to libatomic with openmp and rtlib=libgcc (PR #112202)

2024-10-14 Thread David Truby via cfe-commits
https://github.com/DavidTruby created https://github.com/llvm/llvm-project/pull/112202 Currently when using OpenMP atomics we depend on some symbols from libatomic. These symbols are provided in a separate library for the libgcc runtime, so we should link to that when rtlib=libgcc. For the comp

[clang] [flang] [flang] Link to libatomic with openmp and rtlib=libgcc (PR #112202)

2024-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: David Truby (DavidTruby) Changes Currently when using OpenMP atomics we depend on some symbols from libatomic. These symbols are provided in a separate library for the libgcc runtime, so we should link to that when rtlib=libgcc. For

[clang] [flang] [flang] Link to libatomic with openmp and rtlib=libgcc (PR #112202)

2024-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Truby (DavidTruby) Changes Currently when using OpenMP atomics we depend on some symbols from libatomic. These symbols are provided in a separate library for the libgcc runtime, so we should link to that when rtlib=libgcc. For the co

[clang] [analyzer] Modernize FuchsiaHandleChecker (PR #111588)

2024-10-14 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: > The problem in our code is that function that releases a handle calls a > syscall via macro, so it's not possible to directly annotate it. Ah, I see! Thanks for sharing! I think there are a couple potential workarounds here if you cannot change the macros: * Use something l

[clang] [clang-format] Stop crashing when formatting Verilog (PR #112043)

2024-10-14 Thread via cfe-commits
https://github.com/sstwcw updated https://github.com/llvm/llvm-project/pull/112043 >From 4bac5516b251f75ea105fcf79afbc1ca7b9e7d04 Mon Sep 17 00:00:00 2001 From: sstwcw Date: Fri, 11 Oct 2024 18:03:00 + Subject: [PATCH] [clang-format] Stop crashing when formatting Verilog The part of the co

[clang] [clang-format] Stop crashing when formatting Verilog (PR #112043)

2024-10-14 Thread via cfe-commits
https://github.com/sstwcw closed https://github.com/llvm/llvm-project/pull/112043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 253ff32 - [clang-format] Stop crashing when formatting Verilog (#112043)

2024-10-14 Thread via cfe-commits
Author: sstwcw Date: 2024-10-14T13:57:35Z New Revision: 253ff327241be2b6d4f6321d0e917357d5f310df URL: https://github.com/llvm/llvm-project/commit/253ff327241be2b6d4f6321d0e917357d5f310df DIFF: https://github.com/llvm/llvm-project/commit/253ff327241be2b6d4f6321d0e917357d5f310df.diff LOG: [clang

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

2024-10-14 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @ilya-biryukov This is caused by the change to `CheckFunctionTemplateSpecialization` in `SemaTemplate.cpp`; we previously called `DeduceTemplateArguments` with the canonical declaration of the primary template, but now we call it with the passed in primary template declaratio

[clang] 8e5aa53 - [C2y] Add test coverage for N3298 (#112033)

2024-10-14 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-10-14T11:40:10-04:00 New Revision: 8e5aa538caccef167e8096b2173fdaf2be9cc129 URL: https://github.com/llvm/llvm-project/commit/8e5aa538caccef167e8096b2173fdaf2be9cc129 DIFF: https://github.com/llvm/llvm-project/commit/8e5aa538caccef167e8096b2173fdaf2be9cc129.diff

[clang] [C2y] Add test coverage for N3298 (PR #112033)

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

[clang] [Sema]Use tag name lookup for class names (PR #112166)

2024-10-14 Thread via cfe-commits
=?utf-8?q?G=C3=A1bor?= Spaits ,Gabor Spaits Message-ID: In-Reply-To: https://github.com/Sirraide approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/112166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [Sema]Use tag name lookup for class names (PR #112166)

2024-10-14 Thread via cfe-commits
=?utf-8?q?Gábor?= Spaits ,Gabor Spaits Message-ID: In-Reply-To: https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/112166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [Sema]Use tag name lookup for class names (PR #112166)

2024-10-14 Thread via cfe-commits
=?utf-8?q?Gábor?= Spaits ,Gabor Spaits Message-ID: In-Reply-To: @@ -494,6 +494,7 @@ Bug Fixes to C++ Support - Fix a crash when parsing a pseudo destructor involving an invalid type. (#GH111460) - Fixed an assertion failure when invoking recovery call expressions with expl

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-14 Thread via cfe-commits
@@ -1391,22 +1411,60 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { -// Check if the underlying value for the parameter is an argum

[clang] cef66aa - [Clang] Diagnose additional ObjC statements as function effect violations (#112148)

2024-10-14 Thread via cfe-commits
Author: Doug Wyatt Date: 2024-10-14T17:49:30+02:00 New Revision: cef66aa04d3713afc4d0dfa66491b7af77322090 URL: https://github.com/llvm/llvm-project/commit/cef66aa04d3713afc4d0dfa66491b7af77322090 DIFF: https://github.com/llvm/llvm-project/commit/cef66aa04d3713afc4d0dfa66491b7af77322090.diff LO

[clang] [clang][bytecode] Diagnose reference to non-constexpr variable of const type in C23 constexpr (PR #112211)

2024-10-14 Thread Timm Baeder via cfe-commits
@@ -348,6 +348,12 @@ bool CheckConstant(InterpState &S, CodePtr OpPC, const Descriptor *Desc) { if (D->isConstexpr()) return true; + if (const auto *VD = dyn_cast_if_present(S.EvaluatingDecl); + VD && VD->isConstexpr() && S.getLangOpts().C23) { +S.FFDiag(S.Cur

[clang] [clang][bytecode] Diagnose reference to non-constexpr variable of const type in C23 constexpr (PR #112211)

2024-10-14 Thread Timm Baeder via cfe-commits
@@ -348,6 +348,12 @@ bool CheckConstant(InterpState &S, CodePtr OpPC, const Descriptor *Desc) { if (D->isConstexpr()) return true; + if (const auto *VD = dyn_cast_if_present(S.EvaluatingDecl); tbaederr wrote: ```suggestion // If we're evaluating the

[clang] [Clang] Diagnose additional ObjC statements as function effect violations (PR #112148)

2024-10-14 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/112148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add explicit visibility symbol macros (PR #108276)

2024-10-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 10 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/7029 Here is the r

[clang] [CLANG][AArch64]Add Neon vectors for mfloat8_t (PR #99865)

2024-10-14 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/99865 >From bfcf7c00a0f7e2c619666d72bad4a48928c4b786 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Mon, 24 Jun 2024 09:59:24 + Subject: [PATCH 1/3] [CLANG][AArch64] Add the modal 8 bit floating-p

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-14 Thread via cfe-commits
@@ -1391,22 +1411,60 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { -// Check if the underlying value for the parameter is an argum

[clang] [CLANG][AArch64]Add Neon vectors for mfloat8_t (PR #99865)

2024-10-14 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/99865 >From bfcf7c00a0f7e2c619666d72bad4a48928c4b786 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Mon, 24 Jun 2024 09:59:24 + Subject: [PATCH 1/4] [CLANG][AArch64] Add the modal 8 bit floating-p

[clang] [Sema]Use tag name lookup for class names (PR #112166)

2024-10-14 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/112166 From e9d43ef25b882071822cf3f16a988197c07967b1 Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Mon, 14 Oct 2024 10:12:42 +0200 Subject: [PATCH 1/9] Use tag name lookup for class names This PR would fix #16855 .

[clang] [Sema]Use tag name lookup for class names (PR #112166)

2024-10-14 Thread Gábor Spaits via cfe-commits
spaits wrote: Thank you @Sirraide for reviewing. I will wait a few hours if other also want to take a look at this, then I will squash the commits and merge the changes. https://github.com/llvm/llvm-project/pull/112166 ___ cfe-commits mailing list cfe

[clang] [Sema]Use tag name lookup for class names (PR #112166)

2024-10-14 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/112166 From e9d43ef25b882071822cf3f16a988197c07967b1 Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Mon, 14 Oct 2024 10:12:42 +0200 Subject: [PATCH 01/10] Use tag name lookup for class names This PR would fix #16855

[clang] [Sema]Use tag name lookup for class names (PR #112166)

2024-10-14 Thread Gábor Spaits via cfe-commits
@@ -357,10 +357,13 @@ ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, return nullptr; } - // FIXME: LookupNestedNameSpecifierName isn't the right kind of - // lookup for class-names. - LookupNameKind Kind = isClassName ? LookupNestedN

[clang] [Sema]Use tag name lookup for class names (PR #112166)

2024-10-14 Thread Erich Keane via cfe-commits
=?utf-8?q?Gábor?= Spaits ,Gabor Spaits , =?utf-8?q?Gábor?= Spaits Message-ID: In-Reply-To: @@ -357,10 +357,13 @@ ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, return nullptr; } - // FIXME: LookupNestedNameSpecifierName isn't the r

[clang] [Sema]Use tag name lookup for class names (PR #112166)

2024-10-14 Thread Erich Keane via cfe-commits
=?utf-8?q?Gábor?= Spaits ,Gabor Spaits , =?utf-8?q?Gábor?= Spaits Message-ID: In-Reply-To: https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/112166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [Sema]Use tag name lookup for class names (PR #112166)

2024-10-14 Thread Erich Keane via cfe-commits
=?utf-8?q?G=C3=A1bor?= Spaits ,Gabor Spaits , =?utf-8?q?G=C3=A1bor?= Spaits Message-ID: In-Reply-To: https://github.com/erichkeane approved this pull request. 1 nit, else LGTM. https://github.com/llvm/llvm-project/pull/112166 ___ cfe-commits mailin

[clang] [clang] Fix segmentation fault caused by stack overflow on deeply nested expressions (PR #111701)

2024-10-14 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov closed https://github.com/llvm/llvm-project/pull/111701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Different info in docs in AST methods (PR #112190)

2024-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mikhnenko Sasha (4JustMe4) Changes [Here](https://github.com/llvm/llvm-project/blob/6a98c4a1602591c942f01dceb3aa29ffd4cf1e5b/clang/include/clang/ASTMatchers/ASTMatchers.h#L4188-L4203) and [here](https://github.com/llvm/llvm-project/blob/6

[clang] Different info in docs in AST methods (PR #112190)

2024-10-14 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] [lldb] [llvm] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-10-14 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/80309 >From ab1d3f23ee1a8402403a61038effb9bb15c91a13 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 19 Sep 2024 17:27:13 +0200 Subject: [PATCH] apint only --- clang/lib/AST/ByteCode/IntegralAP.h | 6 +

[clang] [lldb] [llvm] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-10-14 Thread Nikita Popov via cfe-commits
nikic wrote: Ping. The PR no longer contains MLIR changes now. https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd] Support parsing comments without ASTContext (PR #78491)

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

[clang] [clang-tools-extra] [clangd] Support parsing comments without ASTContext (PR #78491)

2024-10-14 Thread Erich Keane via cfe-commits
@@ -1971,7 +1971,7 @@ class BeforeThanCompare { }; /// SourceManager and necessary dependencies (e.g. VFS, FileManager) for a -/// single in-memorty file. +/// single in-memory file. erichkeane wrote: Unrelated chage, please put this in a different patch. ht

[clang] [clang-tools-extra] [clangd] Support parsing comments without ASTContext (PR #78491)

2024-10-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I don't know much about the clang-d implementation, but this seems reasonable. https://github.com/llvm/llvm-project/pull/78491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang-tools-extra] [clangd] Support parsing comments without ASTContext (PR #78491)

2024-10-14 Thread Erich Keane via cfe-commits
@@ -316,5 +319,26 @@ std::string getReturnType(const CodeCompletionString &CCS) { return ""; } +comments::FullComment *parseComment(llvm::StringRef Comment, +llvm::BumpPtrAllocator &Allocator, +comments

[clang] [clang-tools-extra] [clangd] Support parsing comments without ASTContext (PR #78491)

2024-10-14 Thread Erich Keane via cfe-commits
@@ -316,5 +319,26 @@ std::string getReturnType(const CodeCompletionString &CCS) { return ""; } +comments::FullComment *parseComment(llvm::StringRef Comment, +llvm::BumpPtrAllocator &Allocator, +comments

[libunwind] [llvm] [AArch64][Libunwind] Add Support for FEAT_PAuthLR DWARF Instruction (PR #112171)

2024-10-14 Thread Jonathan Thackray via cfe-commits
@@ -799,6 +802,24 @@ bool CFI_Parser::parseFDEInstructions(A &addressSpace, } break; +#if defined(_LIBUNWIND_TARGET_AARCH64) + case DW_CFA_AARCH64_negate_ra_state_with_pc: { +int64_t value = +results->savedRegisters[UNW_AARCH64_RA_SIGN_

[clang] [clang] Mark `__builtin_convertvector` and `__builtin_shufflevector` as `constexpr`. (PR #112129)

2024-10-14 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/112129 >From 34518391101653e9ef84d8a80b70ae2df8551b3d Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 13 Oct 2024 19:16:57 +0800 Subject: [PATCH] Update Builtins.td --- clang/include/clang/Basic/Builtins.td | 4 ++-- 1 fi

[clang] [clang] Mark `__builtin_convertvector` and `__builtin_shufflevector` as `constexpr`. (PR #112129)

2024-10-14 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/112129 >From 34518391101653e9ef84d8a80b70ae2df8551b3d Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 13 Oct 2024 19:16:57 +0800 Subject: [PATCH 1/2] Update Builtins.td --- clang/include/clang/Basic/Builtins.td | 4 ++--

[clang-tools-extra] [clang-tidy] [docs] Replace _not_ in reserved-identifier.rst with *not* (PR #112162)

2024-10-14 Thread Nick Riasanovsky via cfe-commits
njriasan wrote: > @njriasan Thanks for the contribution! I see the commit message would include > this: > > ``` > Co-authored-by: Nicholas Riasanovsky > > ``` > > Do you want to keep that? @carlosgalvezp That message is because I got a new computer and it wasn't properly setup yet. I would

[clang] Focused taint (PR #112212)

2024-10-14 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp created https://github.com/llvm/llvm-project/pull/112212 None >From 972c3089bffbce3516b711c4fc02df561b98433f Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Mon, 3 Jun 2024 13:45:17 +0200 Subject: [PATCH 1/8] taint example code --- .../StaticAnalyzer/taint_focused

[clang] [clang][bytecode] Diagnose reference to non-constexpr variable of const type in C23 constexpr (PR #112211)

2024-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes ```cpp const int V33 = 4; const int V34 = 0; const int V35 = 2; constexpr int V36 = V33 / V34; // expected-error@-1 {{constexpr variable 'V36' must be initialized by a constant expression}} constexpr int V37 = V33

[clang] [clang][bytecode] Diagnose reference to non-constexpr variable of const type in C23 constexpr (PR #112211)

2024-10-14 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/112211 ```cpp const int V33 = 4; const int V34 = 0; const int V35 = 2; constexpr int V36 = V33 / V34; // expected-error@-1 {{constexpr variable 'V36' must be initialized by a constant expression}} constexpr int V37 =

[clang] Focused taint (PR #112215)

2024-10-14 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp created https://github.com/llvm/llvm-project/pull/112215 None >From 972c3089bffbce3516b711c4fc02df561b98433f Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Mon, 3 Jun 2024 13:45:17 +0200 Subject: [PATCH 1/8] taint example code --- .../StaticAnalyzer/taint_focused

[clang] Focused taint (PR #112212)

2024-10-14 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp closed https://github.com/llvm/llvm-project/pull/112212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Focused taint (PR #112212)

2024-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Krupp (dkrupp) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/112212.diff 8 Files Affected: - (modified) clang/include/clang/StaticAnalyzer/Checkers/Checkers.td (+8-1) - (modified) clang/include/clang/StaticAn

[clang] Focused taint (PR #112215)

2024-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Krupp (dkrupp) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/112215.diff 8 Files Affected: - (modified) clang/include/clang/StaticAnalyzer/Checkers/Checkers.td (+8-1) - (modified) clang/include/clang/StaticAn

[clang] [clang][bytecode] Diagnose reference to non-constexpr variable of const type in C23 constexpr (PR #112211)

2024-10-14 Thread Timm Baeder via cfe-commits
@@ -348,6 +348,12 @@ bool CheckConstant(InterpState &S, CodePtr OpPC, const Descriptor *Desc) { if (D->isConstexpr()) return true; + if (const auto *VD = dyn_cast_if_present(S.EvaluatingDecl); tbaederr wrote: Why are you checking `EvaluatingDecl` here

[clang] Focused taint (PR #112215)

2024-10-14 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 39babbffc9f44244efaeca8951782a2a6ef814db 470cb4bbdeaa2f5238b28966a8557d7920f21bf1 --e

[clang] Focused taint (PR #112215)

2024-10-14 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 39babbffc9f44244efaeca8951782a2a6ef814db 470cb4bbdeaa2f5238b28966a8557d7920f21bf1 --e

[clang] [lldb] [llvm] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-10-14 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: `APInt::getAllOnes` will assert if `BitWidth == 0`. ``` [--] 6 tests from APFloatTest [ RUN ] APFloatTest.MinimumNumber [ OK ] APFloatTest.MinimumNumber (0 ms) [ RUN ] APFloatTest.Float8E8M0FNUValues ADTTests: /home/dtcxzyw/WorkSpace/Projects/compilers/llvm

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

2024-10-14 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: cc @gribozavr because this commit seems to break the nullability analysis (not upstream, but we've had previous discussions about it and have made changes to keep it working) https://github.com/llvm/llvm-project/pull/111852 ___ c

[clang-tools-extra] c79e5ac - [clang-tidy][readability-identifier-naming] Support namespace aliases (#112112)

2024-10-14 Thread via cfe-commits
Author: Keith Smiley Date: 2024-10-14T09:35:20-07:00 New Revision: c79e5acfe8d4bb01d5ae7297dcb900ad8c39c580 URL: https://github.com/llvm/llvm-project/commit/c79e5acfe8d4bb01d5ae7297dcb900ad8c39c580 DIFF: https://github.com/llvm/llvm-project/commit/c79e5acfe8d4bb01d5ae7297dcb900ad8c39c580.diff

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-14 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/112047 >From ee3c9625fd3ca39e5c393972c3445c5b9463e009 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Fri, 11 Oct 2024 17:09:13 -0400 Subject: [PATCH] Make [[clang::lifetimebound]] work for expressio

[clang] [Headers] [ARM64EC] Fix extra tokens inside intrin0.h preprocessor directive (PR #112066)

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

[clang] [RISCV][FMV] Remove support for negative priority (PR #112161)

2024-10-14 Thread Craig Topper via cfe-commits
@@ -3073,7 +3073,7 @@ bool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, Decl *D, DuplicateAttr = true; HasPriority = true; int Digit; -if (AttrStr.getAsInteger(0, Digit)) +if (AttrStr.getAsInteger(0, Digit) || Digit < 0) ---

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-14 Thread Utkarsh Saxena via cfe-commits
@@ -34,13 +38,20 @@ namespace usage_ok { struct A { A(); A(int); +A(const char*, const int& def3 [[clang::lifetimebound]] = 0); // #def3 int *class_member() [[clang::lifetimebound]]; operator int*() [[clang::lifetimebound]]; +static const int &defaul

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-14 Thread Utkarsh Saxena via cfe-commits
@@ -465,17 +466,27 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call, for (unsigned I = 0, N = std::min(Callee->getNumParams(), Args.size()); I != N; ++I) { +Expr *Arg = Args[I]; +auto *DAE = dyn_cast(Arg); +if (

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-14 Thread Utkarsh Saxena via cfe-commits
@@ -34,13 +38,20 @@ namespace usage_ok { struct A { A(); A(int); +A(const char*, const int& def3 [[clang::lifetimebound]] = 0); // #def3 int *class_member() [[clang::lifetimebound]]; operator int*() [[clang::lifetimebound]]; +static const int &defaul

[clang] [RISCV][FMV] Remove support for negative priority (PR #112161)

2024-10-14 Thread Craig Topper via cfe-commits
@@ -3073,7 +3073,7 @@ bool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, Decl *D, DuplicateAttr = true; HasPriority = true; int Digit; -if (AttrStr.getAsInteger(0, Digit)) +if (AttrStr.getAsInteger(0, Digit) || Digit < 0) ---

[clang] [RISCV][FMV] Remove support for negative priority (PR #112161)

2024-10-14 Thread Craig Topper via cfe-commits
https://github.com/topperc deleted https://github.com/llvm/llvm-project/pull/112161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

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

[clang] [llvm] [AArch64] Introduce new armv9.6 features (PR #111677)

2024-10-14 Thread via cfe-commits
@@ -522,6 +522,39 @@ def FeatureTLBIW : ExtensionWithMArch<"tlbiw", "TLBIW", "FEAT_TLBIW", // Armv9.6 Architecture Extensions //===--===// +def FeatureCMPBR : ExtensionWithMArch<"cmpbr", "CMPBR", "FEAT_CMPB

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

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

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

2024-10-14 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: Thanks for working on this. Mostly LG. Couple of nits and more ideas for tests. https://github.com/llvm/llvm-project/pull/112047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

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

[clang] [llvm] [llvm][opt][Transforms][SPIR-V] Enable `InferAddressSpaces` for SPIR-V (PR #110897)

2024-10-14 Thread Matt Arsenault via cfe-commits
@@ -91,6 +97,100 @@ SPIRVTargetMachine::SPIRVTargetMachine(const Target &T, const Triple &TT, setRequiresStructuredCFG(false); } +enum AddressSpace { + Function = storageClassToAddressSpace(SPIRV::StorageClass::Function), + CrossWorkgroup = + storageClassToAddressSpa

[clang] [llvm] [llvm][opt][Transforms][SPIR-V] Enable `InferAddressSpaces` for SPIR-V (PR #110897)

2024-10-14 Thread Matt Arsenault via cfe-commits
@@ -91,6 +97,100 @@ SPIRVTargetMachine::SPIRVTargetMachine(const Target &T, const Triple &TT, setRequiresStructuredCFG(false); } +enum AddressSpace { + Function = storageClassToAddressSpace(SPIRV::StorageClass::Function), + CrossWorkgroup = + storageClassToAddressSpa

[clang] [NFC] [MTE] Use aarch64-linux-android34 for globals test (PR #112050)

2024-10-14 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/112050 >From 78e91cb54bed6ee8deda61a054776bbd3102d79d Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Fri, 11 Oct 2024 14:28:59 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] Enable matrices in HLSL (PR #111415)

2024-10-14 Thread Greg Roth via cfe-commits
@@ -1381,7 +1381,7 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target, if (LangOpts.OpenACC && !LangOpts.OpenMP) { InitBuiltinType(ArraySectionTy, BuiltinType::ArraySection); } - if (LangOpts.MatrixTypes) + if (LangOpts.MatrixTypes || LangOpts.HLSL) --

[clang] [OpenACC] implement loop 'worker' clause. (PR #112206)

2024-10-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/112206 The worker clause specifies iterations of the loop/ that are executed in parallel by distributing the iterations among the multiple works within a single gang. The sema rules for this type are simply that i

[clang] [OpenACC] implement loop 'worker' clause. (PR #112206)

2024-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Erich Keane (erichkeane) Changes The worker clause specifies iterations of the loop/ that are executed in parallel by distributing the iterations among the multiple works within a single gang. The sema rules for this type are sim

[clang] [OpenACC] implement loop 'worker' clause. (PR #112206)

2024-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes The worker clause specifies iterations of the loop/ that are executed in parallel by distributing the iterations among the multiple works within a single gang. The sema rules for this type are simply that

[clang] [clang] Mark `__builtin_convertvector` and `__builtin_shufflevector` as `constexpr`. (PR #112129)

2024-10-14 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. https://github.com/llvm/llvm-project/pull/112129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix exception specification comparison for functions with different template depths (PR #111561)

2024-10-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/111561 >From 5c4f2cfef564a0e6fc363e2f79fa7488b4f39eb9 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 8 Oct 2024 12:54:26 -0400 Subject: [PATCH 1/2] [Clang][Sema] Fix exception specification comparison

[clang] [lldb] [llvm] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-10-14 Thread Simon Pilgrim via cfe-commits
@@ -171,7 +171,7 @@ bool HexagonGenExtract::convert(Instruction *In) { // this value. if (!LogicalSR && (SR > SL)) return false; -APInt A = APInt(BW, ~0ULL).lshr(SR).shl(SL); +APInt A = APInt(BW, ~0ULL, true).lshr(SR).shl(SL); RKSimon wrot

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

2024-10-14 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Could you dive a little deeper why this change is necessary? E.g. does the most recent redecl have some properties that the canonical declaration (which would be the first one) does not? Also, how do we emulate the old behavior in places that are needed? E.g. in the examp

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/112209 This commit is a collection of several very minor code quality improvements. The main goal is removing the misleading "Bin" substring from the names of several methods and variables (like `evalEagerlyAssumedB

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang Author: Donát Nagy (NagyDonat) Changes This commit is a collection of several very minor code quality improvements. The main goal is removing the misleading "Bin" substring from the names of several methods and var

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-14 Thread Donát Nagy via cfe-commits
@@ -3742,20 +3742,18 @@ void ExprEngine::evalLocation(ExplodedNodeSet &Dst, BldrTop.addNodes(Tmp); } -std::pair -ExprEngine::geteagerlyAssumeBinOpBifurcationTags() { - static SimpleProgramPointTag - eagerlyAssumeBinOpBifurcationTrue(TagProviderName, -

[clang] [clang] When checking for covariant return types, make sure the pointers or references are to *classes* (PR #111856)

2024-10-14 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb updated https://github.com/llvm/llvm-project/pull/111856 >From 786d31e2657964e578cd1fdf2006b0fb3b19fab6 Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Thu, 10 Oct 2024 15:15:23 + Subject: [PATCH 1/5] [clang] When checking for covariant return types, make su

[clang] [clang] When checking for covariant return types, make sure the pointers or references are to *classes* (PR #111856)

2024-10-14 Thread Boaz Brickner via cfe-commits
@@ -289,3 +289,13 @@ namespace PR8168 { static void foo() {} // expected-error{{'static' member function 'foo' overrides a virtual function}} }; } + +namespace T13 { + struct A { +virtual const int *f() const; // expected-note{{overridden virtual function is here}}

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-14 Thread via cfe-commits
@@ -3767,28 +3765,27 @@ void ExprEngine::evalEagerlyAssumeBinOpBifurcation(ExplodedNodeSet &Dst, continue; } -ProgramStateRef state = Pred->getState(); -SVal V = state->getSVal(Ex, Pred->getLocationContext()); +ProgramStateRef State = Pred->getState(); +

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-14 Thread via cfe-commits
https://github.com/isuckatcs commented: LGTM apart from some typos. Maybe we also want to add the unary negation part to the documentation of `ShouldEagerlyAssume` in `AnalyzerOptions.def`. https://github.com/llvm/llvm-project/pull/112209 ___ cfe-com

[clang] Focused taint (PR #112215)

2024-10-14 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp closed https://github.com/llvm/llvm-project/pull/112215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [analyzer][clang-tidy][NFC] Clean up eagerly-assume handling (PR #112209)

2024-10-14 Thread via cfe-commits
@@ -583,14 +583,14 @@ class ExprEngine { ExplodedNode *Pred, ExplodedNodeSet &Dst); - /// evalEagerlyAssumeBinOpBifurcation - Given the nodes in 'Src', eagerly assume symbolic - /// expressions of the form 'x

<    1   2   3   4   5   6   >