[clang] [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit checker for unretained member variables and ivars. (PR #128641)

2025-03-08 Thread Rashmi Mudduluru via cfe-commits
@@ -3487,6 +3487,19 @@ Raw pointers and references to an object which supports CheckedPtr or CheckedRef See `WebKit Guidelines for Safer C++ Programming `_ for details. +alpha.webkit.NoUnretainedMemberChecker +

[clang] [llvm] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (PR #128651)

2025-03-08 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud edited https://github.com/llvm/llvm-project/pull/128651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM] Using cp15 while mtp =auto and arch is arm_arch6k and support thumb2 (PR #130027)

2025-03-08 Thread via cfe-commits
@@ -240,7 +247,7 @@ arm::ReadTPMode arm::getReadTPMode(const Driver &D, const ArgList &Args, D.Diag(diag::err_drv_invalid_mtp) << A->getAsString(Args); return ReadTPMode::Invalid; } - return (isHardTPSupported(Triple) ? ReadTPMode::TPIDRURO : ReadTPMode::Soft); +

[clang] [C2y] Implement WG14 N3411 (PR #130180)

2025-03-08 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/130180 This paper (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3411.pdf) allows a source file to end without a newline. Clang has supported this as a conforming extension for a long time, so this suppresses

[clang] [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit checker for unretained member variables and ivars. (PR #128641)

2025-03-08 Thread Rashmi Mudduluru via cfe-commits
@@ -0,0 +1,57 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.NoUnretainedMemberChecker -verify %s + +#include "objc-mock-types.h" + +namespace members { + + struct Foo { + private: +SomeObj* a = nullptr; +// expected-warning@-1{{Member variable 'a' in 'member

[clang] [clang][modules][deps] Add mutex as an alternative to file lock (PR #129751)

2025-03-08 Thread Michael Spencer via cfe-commits
@@ -95,6 +96,10 @@ class DependencyScanningService { return SharedCache; } + ModuleCacheMutexes &getSharedModuleCacheMutexes() { Bigcheese wrote: I don't think we need shared_ptr here, the lifetime of workers is already bound to the service. https://

[clang] CodeGen: support static linking for libclosure (PR #125384)

2025-03-08 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: @steakhal bleh, is the "New Features" a sub item of "Static Analyzer"? https://github.com/llvm/llvm-project/pull/125384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix typos in options text. (PR #130129)

2025-03-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -515,7 +515,7 @@ VALUE_LANGOPT(FuchsiaAPILevel, 32, 0, "Fuchsia API level") // on large _BitInts. BENIGN_VALUE_LANGOPT(MaxBitIntWidth, 32, 128, "Maximum width of a _BitInt") -COMPATIBLE_LANGOPT(IncrementalExtensions, 1, 0, " True if we want to process statements" +COMPATIB

[clang] Fobbid co_await and co_yield in invalid expr context (PR #130455)

2025-03-08 Thread via cfe-commits
https://github.com/NewSigma created https://github.com/llvm/llvm-project/pull/130455 Fix #78426 C++26 introduced braced initializer lists as template arguments. However, such contexts should be considered invalid for co_await and co_yield. This commit explicitly rules out the possibility of

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-08 Thread Congcong Cai via cfe-commits
@@ -159,6 +159,12 @@ static bool sameValue(const Expr *E1, const Expr *E2) { case Stmt::UnaryOperatorClass: return sameValue(cast(E1)->getSubExpr(), cast(E2)->getSubExpr()); + case Stmt::BinaryOperatorClass: { HerrCai0907 wrote: Sho

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/129370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][NFC] Fix typos in comments (PR #130456)

2025-03-08 Thread Ben Shi via cfe-commits
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/130456 None >From 256a8383066dcc20f87296bc0ec659a9b5764a64 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Thu, 20 Feb 2025 18:01:42 +0800 Subject: [PATCH] [clang][analyzer][NFC] Fix typos in comments --- .../Core/Pa

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-03-08 Thread JJ Marr via cfe-commits
https://github.com/jj-marr created https://github.com/llvm/llvm-project/pull/130458 Take this piece of code: ```cpp #include consteval int square(int x) { int result = x * x; assert(result == 42); return result; } void test() { auto val = square(2); } ``` The assertion will fail, and

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: JJ Marr (jj-marr) Changes Take this piece of code: ```cpp #include consteval int square(int x) { int result = x * x; assert(result == 42); return result; } void test() { auto val = square(2); } ``` The assertion will fai

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-03-08 Thread JJ Marr via cfe-commits
https://github.com/jj-marr updated https://github.com/llvm/llvm-project/pull/130458 >From d61892d8546944000118ad0312886da75cd6509b Mon Sep 17 00:00:00 2001 From: JJ Marr Date: Sat, 8 Mar 2025 22:00:45 -0500 Subject: [PATCH] Explain which assertion failed during consteval --- .../clang/Basic/D

[clang] Fobbid co_await and co_yield in invalid expr context (PR #130455)

2025-03-08 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] Fobbid co_await and co_yield in invalid expr context (PR #130455)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines Author: None (NewSigma) Changes Fix #78426 C++26 introduced braced initializer lists as template arguments. However, such contexts should be considered invalid for co_await and co_yield. This commit explicitly rules out the possibility of

[clang] Fobbid co_await and co_yield in invalid expr context (PR #130455)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (NewSigma) Changes Fix #78426 C++26 introduced braced initializer lists as template arguments. However, such contexts should be considered invalid for co_await and co_yield. This commit explicitly rules out the possibility of using

[clang-tools-extra] [clangd] Add `BuiltinHeaders` flag to Config file (PR #129459)

2025-03-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/129459 >From 103a6843690182640d661e71517faf693c9e1c7d Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Sat, 1 Mar 2025 14:29:42 -0800 Subject: [PATCH 1/4] [clangd] Add `BuiltinHeaders` flag to Config file Usa

[clang] [clang][analyzer][NFC] Fix typos in comments (PR #130456)

2025-03-08 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/130456 >From 065275c3bb8d3935d66f2b4cf7a2766bccd1 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Thu, 20 Feb 2025 18:01:42 +0800 Subject: [PATCH] [clang][analyzer][NFC] Fix typos in comments --- .../Core/PathSens

[clang] [HLSL] select scalar overloads for vector conditions (PR #129396)

2025-03-08 Thread Chris B via cfe-commits
@@ -0,0 +1,71 @@ +//===- hlsl_intrinsic_helpers.h - HLSL helpers intrinsics -===// +// +// 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

[clang] [clang][bytecode] Implement __builtin_{memchr,strchr,char_memchr} (PR #130420)

2025-03-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/130420 llvm has recently started to use `__builitn_memchr` at compile time, so implement this. Still needs some work but the basics are done. >From 956594d8c47169a9f45eb2aae03085f79d295390 Mon Sep 17 00:00:00 2001 Fr

[clang] [clang][bytecode] Implement __builtin_{memchr,strchr,char_memchr} (PR #130420)

2025-03-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/130420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Surround bcp condition with Start/EndSpeculation (PR #130427)

2025-03-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/130427 This is similar to what the current interpreter is doing - the FoldConstant RAII object surrounds the entire HandleConditionalOperator call, which means the condition and both TrueExpr or FalseExpr. >From ad5

[clang] [clang][bytecode] Implement __builtin_{memchr,strchr,char_memchr} (PR #130420)

2025-03-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vls-2stage` running on `linaro-g3-04` while building `clang` at step 12 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/4/builds/5499 Here is the relevant piece of

[clang] CodeGen: support static linking for libclosure (PR #125384)

2025-03-08 Thread Balazs Benics via cfe-commits
steakhal wrote: > @steakhal bleh, is the "New Features" a sub item of "Static Analyzer"? Ah you are right. Its at the right place. Nvm. https://github.com/llvm/llvm-project/pull/125384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] 46d218d - [clang][bytecode] Implement __builtin_{memchr,strchr,char_memchr} (#130420)

2025-03-08 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-08T16:52:06+01:00 New Revision: 46d218d1af5d285a646a1e5d3be6a43940fb4a9d URL: https://github.com/llvm/llvm-project/commit/46d218d1af5d285a646a1e5d3be6a43940fb4a9d DIFF: https://github.com/llvm/llvm-project/commit/46d218d1af5d285a646a1e5d3be6a43940fb4a9d.diff L

[clang] [clang][bytecode] Surround bcp condition with Start/EndSpeculation (PR #130427)

2025-03-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win` running on `sie-win-worker` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/13232 Here is th

[clang] [clang][bytecode] Surround bcp condition with Start/EndSpeculation (PR #130427)

2025-03-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/130427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improve the -Wundefined-func-template diagnostic note for invisible template functions (PR #129031)

2025-03-08 Thread Shafik Yaghmour via cfe-commits
@@ -759,13 +759,11 @@ Sema::BuildDependentDeclRefExpr(const CXXScopeSpec &SS, TemplateArgs); } -bool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, - NamedDecl *Instantiation, -

[clang] [clang][modules][deps] Add mutex as an alternative to file lock (PR #129751)

2025-03-08 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,31 @@ +#ifndef LLVM_CLANG_SERIALIZATION_MODULECACHELOCK_H +#define LLVM_CLANG_SERIALIZATION_MODULECACHELOCK_H + +#include "clang/Basic/LLVM.h" +#include "llvm/Support/LockFileManager.h" + +namespace clang { +enum class LockResult { Owned, Shared, Error }; +enum class Wa

[clang] [SPARC][Driver] Set correct IAS mode defaults for Linux and Free/OpenBSD (PR #130108)

2025-03-08 Thread Kurt Miller via cfe-commits
bsdkurt wrote: I back ported this to llvm 19 and confirm it works to set VIS by default on OpenBSD. Thanks for the fix. https://github.com/llvm/llvm-project/pull/130108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [llvm] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (PR #128651)

2025-03-08 Thread Rashmi Mudduluru via cfe-commits
@@ -3487,6 +3487,18 @@ Raw pointers and references to an object which supports CheckedPtr or CheckedRef See `WebKit Guidelines for Safer C++ Programming `_ for details. +alpha.webkit.UnretainedLambdaCapturesChecker

[clang] [llvm] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (PR #128651)

2025-03-08 Thread Rashmi Mudduluru via cfe-commits
@@ -0,0 +1,296 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.UnretainedLambdaCapturesChecker -verify %s + +#include "objc-mock-types.h" + +namespace std { + +template +class unique_ptr { +private: + T *t; + +public: + unique_ptr() : t(nullptr) { } + unique_ptr

[clang] [llvm] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (PR #128651)

2025-03-08 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/128651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][Driver] Use temporary files correctly (PR #130436)

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

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-08 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/130447 When checking the template template parameters of template template parameters, the PartialOrdering context was not correctly propagated. This also has a few drive-by fixes, such as checking the template param

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes When checking the template template parameters of template template parameters, the PartialOrdering context was not correctly propagated. This also has a few drive-by fixes, such as checking the template

[clang-tools-extra] 85d60a4 - [clangd] Add `BuiltinHeaders` config option (#129459)

2025-03-08 Thread via cfe-commits
Author: Khalil Estell Date: 2025-03-08T19:16:37-05:00 New Revision: 85d60a441ab810e25605fb4555971b1d0a996e5c URL: https://github.com/llvm/llvm-project/commit/85d60a441ab810e25605fb4555971b1d0a996e5c DIFF: https://github.com/llvm/llvm-project/commit/85d60a441ab810e25605fb4555971b1d0a996e5c.diff

[clang-tools-extra] [clangd] Add `BuiltinHeaders` flag to Config file (PR #129459)

2025-03-08 Thread via cfe-commits
github-actions[bot] wrote: @kammce Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang-tools-extra] [clangd] Add `BuiltinHeaders` flag to Config file (PR #129459)

2025-03-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/129459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add `BuiltinHeaders` flag to Config file (PR #129459)

2025-03-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/129459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-08 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: carlosgalvezp wrote: Thank you for the discussion, I'm okey with changing the code based on the feedback, namely: - move the logic to ASTMatchers, off by default - clang tidy actively enables it - document techni

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-03-08 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/128979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-03-08 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
@@ -6749,6 +6749,21 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope *S, Decl *D) { CodeCompleteExpression(S, Data); } +void SemaCodeCompletion::CodeCompleteIfConstExpr(Scope *S) const { + ResultBuilder Results(SemaRef, CodeCompleter->getAllocator(), +

[clang] [clang][bytecode][NFC] Bail out on non constant evaluated builtins (PR #130431)

2025-03-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/130431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks! I tried out the patch with clangd and it seems to be working pretty well. A further enhancement that occurs to me is that we could offer these patterns slightly earlier, e.g. when you're at the beginning of an em

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-08 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From e3c5641ee3a398d8fe12c0dcd030ee84667cc86e Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 02:09:02 -0500 Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list in

[clang] 227f954 - [clang][bytecode][NFC] Bail out on non constant evaluated builtins (#130431)

2025-03-08 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-09T06:35:19+01:00 New Revision: 227f9544a4d4bf9ab4da8a78cc801de697d4bc6d URL: https://github.com/llvm/llvm-project/commit/227f9544a4d4bf9ab4da8a78cc801de697d4bc6d DIFF: https://github.com/llvm/llvm-project/commit/227f9544a4d4bf9ab4da8a78cc801de697d4bc6d.diff L

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-08 Thread David Rivera via cfe-commits
@@ -159,6 +159,12 @@ static bool sameValue(const Expr *E1, const Expr *E2) { case Stmt::UnaryOperatorClass: return sameValue(cast(E1)->getSubExpr(), cast(E2)->getSubExpr()); + case Stmt::BinaryOperatorClass: { RiverDave wrote: That'

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-08 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From 236cd9f21bd71b118a79356eb859dda31031bf80 Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 02:09:02 -0500 Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list in

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
@@ -6749,6 +6749,55 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope *S, Decl *D) { CodeCompleteExpression(S, Data); } +void SemaCodeCompletion::CodeCompleteIfConst(Scope *S, HighCommander4 wrote: The function does not use the `S` parameter, pleas

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
@@ -0,0 +1,26 @@ +template +void test() { + if constexpr (Flag) { +return; + } + // RUN: %clang_cc1 -fsyntax-only -std=c++17 -code-completion-at=%s:3:7 %s | FileCheck -check-prefix=CHECK-CXX17 %s + // RUN: %clang_cc1 -fsyntax-only -std=c++17 -code-completion-patterns -c

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
@@ -0,0 +1,26 @@ +template +void test() { + if constexpr (Flag) { +return; + } + // RUN: %clang_cc1 -fsyntax-only -std=c++17 -code-completion-at=%s:3:7 %s | FileCheck -check-prefix=CHECK-CXX17 %s + // RUN: %clang_cc1 -fsyntax-only -std=c++17 -code-completion-patterns -c

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
@@ -6749,6 +6749,55 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope *S, Decl *D) { CodeCompleteExpression(S, Data); } +void SemaCodeCompletion::CodeCompleteIfConst(Scope *S, + bool AfterExclaim) const {

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/124315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement address sanitizer on AIX (1/3) (PR #129925)

2025-03-08 Thread Jake Egan via cfe-commits
https://github.com/jakeegan updated https://github.com/llvm/llvm-project/pull/129925 >From 072f4eca3825729d69d423d774c8a3298cb624a8 Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Wed, 5 Mar 2025 01:57:38 -0500 Subject: [PATCH 1/2] [clang] Implement address sanitizer on AIX (1/3) The PR include

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-08 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From 64cec5f09ff2a9b2cb3811d52c66fabae90887be Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 02:09:02 -0500 Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list in

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
@@ -1553,6 +1553,13 @@ StmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) { IsConsteval = true; ConstevalLoc = ConsumeToken(); } + +if (Tok.is(tok::code_completion)) { HighCommander4 wrote: This needs to go in an `else` a

[clang] [clang-format] Don't remove parentheses separated from ellipsis by comma (PR #130471)

2025-03-08 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/130471 Also clean up `case tok::r_paren` in UnwrappedLineParser::parseParens() Fix #130359 >From 1f12041d3e28ee0de3277f6718967fd5d84e2161 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 8 Mar 2025 22:41:51 -0800 Su

[clang] [clang-format] Don't remove parentheses separated from ellipsis by comma (PR #130471)

2025-03-08 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/130471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
@@ -6749,6 +6749,55 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope *S, Decl *D) { CodeCompleteExpression(S, Data); } +void SemaCodeCompletion::CodeCompleteIfConst(Scope *S, + bool AfterExclaim) const { + ResultBuilder

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-03-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/130473 Fixes https://github.com/llvm/llvm-project/issues/130468 >From 0999f2fb15b6703fc9f5c4ba5c9e21c14a90b4ed Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 9 Mar 2025 01:36:25 -0500 Subject: [PATCH 1/

[clang-tools-extra] [clang-tidy] Add check on constexpr & static values in modernize-use-default-member-init (PR #129425)

2025-03-08 Thread David Rivera via cfe-commits
RiverDave wrote: Ping https://github.com/llvm/llvm-project/pull/129425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2172a5e - [clang][analyzer][NFC] Fix typos in comments (#130456)

2025-03-08 Thread via cfe-commits
Author: Ben Shi Date: 2025-03-09T08:23:51+01:00 New Revision: 2172a5edcf9357d24006a3c1032f2d52e199915d URL: https://github.com/llvm/llvm-project/commit/2172a5edcf9357d24006a3c1032f2d52e199915d DIFF: https://github.com/llvm/llvm-project/commit/2172a5edcf9357d24006a3c1032f2d52e199915d.diff LOG:

[clang] [clang][analyzer][NFC] Fix typos in comments (PR #130456)

2025-03-08 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/130456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-08 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/129370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check on constexpr & static values in modernize-use-default-member-init (PR #129425)

2025-03-08 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129425 >From 4f25319a076bddd11de886dbb35693cbfd2a3a73 Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sun, 2 Mar 2025 01:12:05 -0500 Subject: [PATCH] [clang-tidy] Add check on constexpr & static values on member i

[clang] [clang-format] Don't remove parentheses separated from ellipsis by comma (PR #130471)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Also clean up `case tok::r_paren` in UnwrappedLineParser::parseParens() Fix #130359 --- Full diff: https://github.com/llvm/llvm-project/pull/130471.diff 2 Files Affected: - (modified) clang/lib/Format/U

[clang] [clang][analyzer][NFC] Fix typos in comments (PR #130456)

2025-03-08 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/130456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] disable unary, vector mask (PR #130400)

2025-03-08 Thread via cfe-commits
https://github.com/wsehjk updated https://github.com/llvm/llvm-project/pull/130400 >From 2bae9c70106ffb96dc237ee539dd7e3438025b01 Mon Sep 17 00:00:00 2001 From: wang shiwen Date: Sat, 8 Mar 2025 15:40:22 +0800 Subject: [PATCH] disable unary, vector mask --- clang/lib/Sema/SemaChecking.cpp

[clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-08 Thread Balazs Benics via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: steakhal wrote: > I highly discourage implicit slowdowns > - If I understand correctly, you mean that this patch could lead to people > manually traversing the AST instead of using the MatchFinder, thus making >

[clang] [clang][bytecode] Loosen assertion This() for array elements (PR #130399)

2025-03-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/130399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Loosen assertion This() for array elements (PR #130399)

2025-03-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win` running on `sie-win-worker` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/13224 Here is th

[clang-tools-extra] [clang-tidy] `modernize-use-trailing-return-type`: add an option to apply to `void`-returning functions as well (PR #129406)

2025-03-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/129406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] added Conflicting Global Accesses checker (PR #130421)

2025-03-08 Thread via cfe-commits
https://github.com/ConcreteCactus created https://github.com/llvm/llvm-project/pull/130421 None >From a166904d772319901abd3ca5f71b32d4d5607f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ron=20H=C3=A1rn=C3=A1si?= Date: Fri, 22 Nov 2024 21:43:04 +0100 Subject: [PATCH] added Conflicting Globa

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-08 Thread Ricardo Jesus via cfe-commits
https://github.com/rj-jesus closed https://github.com/llvm/llvm-project/pull/129732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Implement __builtin_{memchr,strchr,char_memchr} (PR #130420)

2025-03-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-win-x-aarch64` running on `as-builder-2` while building `clang` at step 9 "test-check-llvm". Full details are available at: https://lab.llvm.org/buildbot/#/builders/193/builds/6155 Here is the relevant piece of th

[clang] [clang][bytecode][NFC] Check conditional op condition for ConstantExprs (PR #130425)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Same thing we now do in if statements. Check the condition of a conditional operator for a statically known true/false value. --- Full diff: https://github.com/llvm/llvm-project/pull/130425.diff 1 Files Af

[clang] [clang][bytecode][NFC] Check conditional op condition for ConstantExprs (PR #130425)

2025-03-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/130425 Same thing we now do in if statements. Check the condition of a conditional operator for a statically known true/false value. >From 6543c75f7b5ea03b6061637f18b8a97c3ce48410 Mon Sep 17 00:00:00 2001 From: =?UTF

[clang] e4fe22a - [clang][bytecode][NFC] Check conditional op condition for ConstantExprs (#130425)

2025-03-08 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-08T18:29:19+01:00 New Revision: e4fe22a8bd1853331d4811546ac038252baee79d URL: https://github.com/llvm/llvm-project/commit/e4fe22a8bd1853331d4811546ac038252baee79d DIFF: https://github.com/llvm/llvm-project/commit/e4fe22a8bd1853331d4811546ac038252baee79d.diff L

[clang] [clang][bytecode][NFC] Check conditional op condition for ConstantExprs (PR #130425)

2025-03-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/130425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Surround bcp condition with Start/EndSpeculation (PR #130427)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This is similar to what the current interpreter is doing - the FoldConstant RAII object surrounds the entire HandleConditionalOperator call, which means the condition and both TrueExpr or FalseExpr. --- Ful

[clang] aff6ab9 - [clang][bytecode] Surround bcp condition with Start/EndSpeculation (#130427)

2025-03-08 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-08T19:37:20+01:00 New Revision: aff6ab9d90d23c46bc5f4b909d54bfa9c95c9f03 URL: https://github.com/llvm/llvm-project/commit/aff6ab9d90d23c46bc5f4b909d54bfa9c95c9f03 DIFF: https://github.com/llvm/llvm-project/commit/aff6ab9d90d23c46bc5f4b909d54bfa9c95c9f03.diff L

[clang] Change `ASTUnit::getASTContext() const` to return a non-const `ASTContext` (PR #130096)

2025-03-08 Thread Boaz Brickner via cfe-commits
bricknerb wrote: Thanks for the feedback! Is there a way to call `ASTContext::createMangleContext()` when I have a `const ASTUnit`? I've tried to make `ASTContext::createMangleContext()` const but this failed as it seems to actually call methods that potentially modify the context. However, w

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-08 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,27 @@ +//===-- lib/extendhfdf2.c - half -> single conversion -*- 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

[clang] [clang] Fix FP -Wformat in functions with 2+ attribute((format)) (PR #129954)

2025-03-08 Thread via cfe-commits
https://github.com/bgra8 approved this pull request. Successfully tested this locally! Thanks for the fix! https://github.com/llvm/llvm-project/pull/129954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] 3b8f9a2 - [clang][bytecode] Loosen assertion This() for array elements (#130399)

2025-03-08 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-08T13:13:52+01:00 New Revision: 3b8f9a228c5f12f282778b18117b9a88c07e87cb URL: https://github.com/llvm/llvm-project/commit/3b8f9a228c5f12f282778b18117b9a88c07e87cb DIFF: https://github.com/llvm/llvm-project/commit/3b8f9a228c5f12f282778b18117b9a88c07e87cb.diff L

[clang] [ARM] Using cp15 while mtp =auto and arch is arm_arch6k and support thumb2 (PR #130027)

2025-03-08 Thread via cfe-commits
@@ -208,10 +208,17 @@ bool arm::useAAPCSForMachO(const llvm::Triple &T) { bool arm::isHardTPSupported(const llvm::Triple &Triple) { int Ver = getARMSubArchVersionNumber(Triple); llvm::ARM::ArchKind AK = llvm::ARM::parseArch(Triple.getArchName()); - return Triple.isARM() ||

[clang] [Clang] Treat `ext_vector_type` as a regular type attribute (PR #130177)

2025-03-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/130177 >From 728e1bd9cccb56a0acaf5abb35fe64cacc5b4ae9 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 6 Mar 2025 15:08:25 -0600 Subject: [PATCH 1/7] [Clang] Treat `ext_vector_type` as a regular type attribute

[clang] c4ed0ad - [Clang] Fix typo 'dereferencable' to 'dereferenceable' (#116761)

2025-03-08 Thread via cfe-commits
Author: Liberty Date: 2025-03-08T19:35:20Z New Revision: c4ed0ad1f52a7bec7377bbaf75f812527ec739bd URL: https://github.com/llvm/llvm-project/commit/c4ed0ad1f52a7bec7377bbaf75f812527ec739bd DIFF: https://github.com/llvm/llvm-project/commit/c4ed0ad1f52a7bec7377bbaf75f812527ec739bd.diff LOG: [Clan

[clang] [Clang] Fix typo 'dereferencable' to 'dereferenceable' (PR #116761)

2025-03-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `clang` at step 8 "Add check check-llvm". Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/899 Here is the rele

[clang] [clang][bytecode][NFC] Bail out on non constant evaluated builtins (PR #130431)

2025-03-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/130431 If the ASTContext says so, don't bother trying to constant evaluate the given builtin. >From 1a085cf37983ca5acef83939371a5fee9d5f1813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 8

[clang] [clang][bytecode][NFC] Bail out on non constant evaluated builtins (PR #130431)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes If the ASTContext says so, don't bother trying to constant evaluate the given builtin. --- Full diff: https://github.com/llvm/llvm-project/pull/130431.diff 1 Files Affected: - (modified) clang/lib/AST/Byt

[clang] [Clang] Fix typo 'dereferencable' to 'dereferenceable' (PR #116761)

2025-03-08 Thread via cfe-commits
github-actions[bot] wrote: @kordood Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] [Clang] Fix typo 'dereferencable' to 'dereferenceable' (PR #116761)

2025-03-08 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue closed https://github.com/llvm/llvm-project/pull/116761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-08 Thread David Rivera via cfe-commits
RiverDave wrote: Ping https://github.com/llvm/llvm-project/pull/129370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-08 Thread David Rivera via cfe-commits
RiverDave wrote: ping https://github.com/llvm/llvm-project/pull/129408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][Driver] Use temporary files correctly (PR #130436)

2025-03-08 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/130436 This updates the DXV and Metal Converter actions to properly use temporary files created by the driver. I've abstracted away a check to determine if an action is the last in the sequence because we may have

  1   2   >