[clang] [analyzer] EnumCastOutOfRangeChecker: report the value (PR #74503)

2023-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (DonatNagyE) Changes ...that is causing the bug report when it's converted to the enum type. This commit only improves the diagnostics and does not affect the set of reports. --- Patch is 26.77 KiB, truncated to 20.00 KiB below,

[clang] [analyzer] EnumCastOutOfRangeChecker: report the value (PR #74503)

2023-12-05 Thread via cfe-commits
https://github.com/DonatNagyE created https://github.com/llvm/llvm-project/pull/74503 ...that is causing the bug report when it's converted to the enum type. This commit only improves the diagnostics and does not affect the set of reports. >From 747642a5f2dad784b1c9af20d33d12bc509f909e Mon

[mlir] [llvm] [clang] [AMDGPU] - Add address space for strided buffers (PR #74471)

2023-12-05 Thread Jessica Del via cfe-commits
https://github.com/OutOfCache updated https://github.com/llvm/llvm-project/pull/74471 >From 94ed734c0d8864a08e3b77600dda811040270bd9 Mon Sep 17 00:00:00 2001 From: Jessica Del Date: Tue, 5 Dec 2023 13:45:58 +0100 Subject: [PATCH 1/2] [AMDGPU] - Add address space for strided buffers This is an

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-05 Thread Julian Schmidt via cfe-commits
5chmidti wrote: That email is fine with me https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-05 Thread Arthur Eubanks via cfe-commits
@@ -57,6 +57,16 @@ global variable or function should be in after translation. let Heading = "section, __declspec(allocate)"; } +def CodeModelDocs : Documentation { + let Category = DocCatVariable; + let Content = [{ +The ``model`` attribute allows you to use a different

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Bill Wendling via cfe-commits
@@ -1411,6 +1411,8 @@ class CodeGenFunction : public CodeGenTypeCache { /// decls. DeclMapTy LocalDeclMap; + llvm::SmallDenseMap ExprLValueMap; bwendling wrote: I do this only when the sanitizer is enabled to keep us from building it unnecessarily.

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Bill Wendling via cfe-commits
@@ -1411,6 +1411,8 @@ class CodeGenFunction : public CodeGenTypeCache { /// decls. DeclMapTy LocalDeclMap; + llvm::SmallDenseMap ExprLValueMap; bwendling wrote: It will. I did a test to see how many Exprs are typically stored. For both Linux and Clang,

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-05 Thread Reid Kleckner via cfe-commits
rnk wrote: Here's a [GCC doc link](https://gcc.gnu.org/onlinedocs/gcc/IA-64-Variable-Attributes.html). I think matching GCC is sufficient motivation for me, I just didn't see it mentioned. https://github.com/llvm/llvm-project/pull/72078 ___

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-05 Thread Xi Ruoyao via cfe-commits
xry111 wrote: > is it too late to change the gcc attribute name? It has been released in GCC 13, and GCC 14 is in stage 3 so a change must be deferred into GCC 15. And the kernel code already relies on it. So a change will render all previous kernel releases impossible to build with GCC

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: The PR contains a couple of commits that unless there's disagreement I'm tempted to land directly but have held off just in case there's any buyer remorse about extending ConstantInt/ConstantFP to cover vector types. For similar reasons I've not updated the LangRef as I

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-05 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: is it too late to change the gcc attribute name? https://github.com/llvm/llvm-project/pull/72078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 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 989e8f9d51e6945905b0e26148574c8e1fa88c84 d2ff1c7015265fb26d88b3f574d648f519ea531c --

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-analysis @llvm/pr-subscribers-llvm-transforms Author: Paul Walker (paulwalker-arm) Changes [LLVM][IR] Add native vector support to ConstantInt ConstantFP. NOTE: For brevity the following takes about ConstantInt but everything extends to cover

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm created https://github.com/llvm/llvm-project/pull/74502 [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. NOTE: For brevity the following takes about ConstantInt but everything extends to cover ConstantFP as well. Whilst ConstantInt::get()

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-05 Thread Xi Ruoyao via cfe-commits
xry111 wrote: > Do folks feel like the attribute name is sufficiently descriptive? i.e. > should it be `__attribute__((code_model("asdf")))`? Are we aiming for GCC > compat here? What guides the naming choice? Yes, for GCC compat, so we don't need to add more #ifdef's in kernel. As the

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-05 Thread Reid Kleckner via cfe-commits
rnk wrote: Do folks feel like the attribute name is sufficiently descriptive? i.e. should it be `__attribute__((code_model("asdf")))`? Are we aiming for GCC compat here? What guides the naming choice? https://github.com/llvm/llvm-project/pull/72078

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

2023-12-05 Thread via cfe-commits
apple-fcloutier wrote: Should this only apply in C23 mode? Standard behavior until C23 is that `_Float16` promotes to `double`. What about C++? https://github.com/llvm/llvm-project/pull/74439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Nick Desaulniers via cfe-commits
@@ -1411,6 +1411,8 @@ class CodeGenFunction : public CodeGenTypeCache { /// decls. DeclMapTy LocalDeclMap; + llvm::SmallDenseMap ExprLValueMap; nickdesaulniers wrote: Wont this store all kinds of unrelated Exprs? Is there any way we can minimize the

[llvm] [clang] Include LLVM_VERSION_SUFFIX in the Clang version string. (PR #74469)

2023-12-05 Thread James Y Knight via cfe-commits
https://github.com/jyknight closed https://github.com/llvm/llvm-project/pull/74469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 31aebdd - Include LLVM_VERSION_SUFFIX in the Clang version string. (#74469)

2023-12-05 Thread via cfe-commits
Author: James Y Knight Date: 2023-12-05T12:20:12-05:00 New Revision: 31aebdd8919b7bef4bbfe1d7988708215a8b953f URL: https://github.com/llvm/llvm-project/commit/31aebdd8919b7bef4bbfe1d7988708215a8b953f DIFF:

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Bill Wendling via cfe-commits
@@ -1411,6 +1411,8 @@ class CodeGenFunction : public CodeGenTypeCache { /// decls. DeclMapTy LocalDeclMap; + llvm::SmallDenseMap ExprLValueMap; bwendling wrote: Done. https://github.com/llvm/llvm-project/pull/73730

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Bill Wendling via cfe-commits
@@ -994,31 +1010,55 @@ class MemberExprBaseVisitor // } Expr *Visit(Expr *E) { -return StmtVisitor::Visit(E); +return StmtVisitor::Visit(E); } - Expr *VisitCastExpr(CastExpr *E) { -return IsExpectedRecordDecl(E) ? E : Visit(E->getSubExpr()); - } -

[clang] [Sema] When checking for constraint equivalence, do not calculate satisfaction (PR #74490)

2023-12-05 Thread Ilya Biryukov via cfe-commits
@@ -4077,6 +4084,7 @@ Sema::SubstExpr(Expr *E, const MultiLevelTemplateArgumentList ) { TemplateInstantiator Instantiator(*this, TemplateArgs, SourceLocation(), DeclarationName()); +

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2023-12-05 Thread via cfe-commits
@@ -0,0 +1,107 @@ +// RUN: %clang_cc1 -std=c11 -fsyntax-only -verify -Wformat -Wformat-signedness %s + +int printf(const char *restrict format, ...); +int scanf(const char * restrict, ...); apple-fcloutier wrote: Please add tests with enum values: ```c

[clang] [Sema] When checking for constraint equivalence, do not calculate satisfaction (PR #74490)

2023-12-05 Thread Erich Keane via cfe-commits
@@ -4077,6 +4084,7 @@ Sema::SubstExpr(Expr *E, const MultiLevelTemplateArgumentList ) { TemplateInstantiator Instantiator(*this, TemplateArgs, SourceLocation(), DeclarationName()); +

[clang] [Sema] When checking for constraint equivalence, do not calculate satisfaction (PR #74490)

2023-12-05 Thread Ilya Biryukov via cfe-commits
@@ -4077,6 +4084,7 @@ Sema::SubstExpr(Expr *E, const MultiLevelTemplateArgumentList ) { TemplateInstantiator Instantiator(*this, TemplateArgs, SourceLocation(), DeclarationName()); +

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/74324 >From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 29 Nov 2023 11:12:02 -0800 Subject: [PATCH 1/4] [OpenACC] Implement 'cache' construct parsing The 'cache'

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2023-12-05 Thread via cfe-commits
@@ -918,6 +918,9 @@ def Wdeprecated : Flag<["-"], "Wdeprecated">, Group, HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">; def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group, Visibility<[ClangOption, CC1Option]>; +def

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Nick Desaulniers via cfe-commits
@@ -1411,6 +1411,8 @@ class CodeGenFunction : public CodeGenTypeCache { /// decls. DeclMapTy LocalDeclMap; + llvm::SmallDenseMap ExprLValueMap; nickdesaulniers wrote: Perhaps a comment as to what this map is used for?

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Nick Desaulniers via cfe-commits
@@ -994,31 +1010,55 @@ class MemberExprBaseVisitor // } Expr *Visit(Expr *E) { -return StmtVisitor::Visit(E); +return StmtVisitor::Visit(E); } - Expr *VisitCastExpr(CastExpr *E) { -return IsExpectedRecordDecl(E) ? E : Visit(E->getSubExpr()); - } -

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers commented: linter is complaining about formatting https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor expected directives in C++ DRs 600-699 (PR #74477)

2023-12-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/74477 >From 12cc446ecd55936518cb3e8b13c4840bc008d2c8 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 5 Dec 2023 17:14:37 +0300 Subject: [PATCH 1/3] [clang][NFC] Refactor expected directives in C++ DRs

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-init: Add a hook... (PR #73921)

2023-12-05 Thread Felix Berger via cfe-commits
https://github.com/fberger edited https://github.com/llvm/llvm-project/pull/73921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-init: Add a hook... (PR #73921)

2023-12-05 Thread Felix Berger via cfe-commits
@@ -290,69 +296,72 @@ void UnnecessaryCopyInitialization::check( // instantiations where the types differ and rely on implicit conversion would // no longer compile if we switched to a reference. if (differentReplacedTemplateParams( - NewVar->getType(),

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-init: Add a hook... (PR #73921)

2023-12-05 Thread Felix Berger via cfe-commits
@@ -290,69 +296,72 @@ void UnnecessaryCopyInitialization::check( // instantiations where the types differ and rely on implicit conversion would // no longer compile if we switched to a reference. if (differentReplacedTemplateParams( - NewVar->getType(),

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-init: Add a hook... (PR #73921)

2023-12-05 Thread Felix Berger via cfe-commits
https://github.com/fberger approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/73921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor expected directives in C++ DRs 600-699 (PR #74477)

2023-12-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/74477 >From 12cc446ecd55936518cb3e8b13c4840bc008d2c8 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 5 Dec 2023 17:14:37 +0300 Subject: [PATCH 1/2] [clang][NFC] Refactor expected directives in C++ DRs

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-05 Thread Teresa Johnson via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject , GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -

[clang] [analyzer] Move alpha checker EnumCastOutOfRange to optin (PR #67157)

2023-12-05 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: steakhal wrote: > (Force pushed the branch because I wanted to rebase it onto a recent main and > fix the merge conflicts. Is there a better workflow than this?) I think git also offers conflict resolution for `git merge origin/main`. It

[lldb] [libc] [compiler-rt] [llvm] [flang] [libcxx] [lld] [clang] [clang-tools-extra] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-05 Thread via cfe-commits
https://github.com/elizabethandrews updated https://github.com/llvm/llvm-project/pull/71706 >From 534fad70af45a6a22ba2d03f474089e896f4fcd6 Mon Sep 17 00:00:00 2001 From: Elizabeth Andrews Date: Thu, 26 Oct 2023 08:53:54 -0700 Subject: [PATCH 1/4] [Clang] Fix linker error for function

[clang] [analyzer] Move alpha checker EnumCastOutOfRange to optin (PR #67157)

2023-12-05 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/DonatNagyE updated https://github.com/llvm/llvm-project/pull/67157 >From 5c42d3e5286e041e22776fa496d884454640ffec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Fri, 22 Sep 2023 17:22:53 +0200 Subject:

[clang] [llvm] [Clang][SME2] Add builtins for moving multi-vectors to/from ZA (PR #71191)

2023-12-05 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm edited https://github.com/llvm/llvm-project/pull/71191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Include LLVM_VERSION_SUFFIX in the Clang version string. (PR #74469)

2023-12-05 Thread via cfe-commits
@@ -650,6 +652,7 @@ if (CLANG_ENABLE_BOOTSTRAP) CLANG_VERSION_MAJOR CLANG_VERSION_MINOR CLANG_VERSION_PATCHLEVEL +CLANG_VERSION_SUFFIX zmodem wrote: D'oh, I made assumptions about the context without looking :/ All good then!

[clang] [clang][modules] Reset codegen options (take 2). (PR #74388)

2023-12-05 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka closed https://github.com/llvm/llvm-project/pull/74388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5ad3a32 - [clang][modules] Reset codegen options (take 2). (#74388)

2023-12-05 Thread via cfe-commits
Author: Juergen Ributzka Date: 2023-12-05T08:31:21-08:00 New Revision: 5ad3a32c79319b0721cb26398946b9a59b50d264 URL: https://github.com/llvm/llvm-project/commit/5ad3a32c79319b0721cb26398946b9a59b50d264 DIFF:

[llvm] [clang] Include LLVM_VERSION_SUFFIX in the Clang version string. (PR #74469)

2023-12-05 Thread James Y Knight via cfe-commits
@@ -650,6 +652,7 @@ if (CLANG_ENABLE_BOOTSTRAP) CLANG_VERSION_MAJOR CLANG_VERSION_MINOR CLANG_VERSION_PATCHLEVEL +CLANG_VERSION_SUFFIX jyknight wrote: This list is of CMake variables which automatically get passed through between stages in a

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/74365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4e0275a - [Driver] Mark -arch as TargetSpecific (#74365)

2023-12-05 Thread via cfe-commits
Author: Fangrui Song Date: 2023-12-05T08:27:55-08:00 New Revision: 4e0275a2c8f7f94cc1aacf4803fc827fad8f56d4 URL: https://github.com/llvm/llvm-project/commit/4e0275a2c8f7f94cc1aacf4803fc827fad8f56d4 DIFF: https://github.com/llvm/llvm-project/commit/4e0275a2c8f7f94cc1aacf4803fc827fad8f56d4.diff

[clang] [Sema] When checking for constraint equivalence, do not calculate satisfaction (PR #74490)

2023-12-05 Thread Erich Keane via cfe-commits
@@ -504,3 +504,24 @@ struct bar { bar x; } // namespace GH61763 + +namespace GH74314 { +template constexpr bool is_same_v = __is_same(T, U); +template constexpr bool is_not_same_v = !__is_same(T, U); + +template +concept something_interesting = requires { + true; +

[clang] [Sema] When checking for constraint equivalence, do not calculate satisfaction (PR #74490)

2023-12-05 Thread Erich Keane via cfe-commits
@@ -4077,6 +4084,7 @@ Sema::SubstExpr(Expr *E, const MultiLevelTemplateArgumentList ) { TemplateInstantiator Instantiator(*this, TemplateArgs, SourceLocation(), DeclarationName()); +

[clang] [clang] Exclude non-template classes when checking if constraint refers to containing template arguments (PR #74265)

2023-12-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/74265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Exclude non-template classes when checking if constraint refers to containing template arguments (PR #74265)

2023-12-05 Thread Erich Keane via cfe-commits
@@ -1714,6 +1714,8 @@ class ConstraintRefersToContainingTemplateChecker // Friend, likely because it was referred to without its template arguments. void CheckIfContainingRecord(const CXXRecordDecl *CheckingRD) { CheckingRD = CheckingRD->getMostRecentDecl(); +if

[clang] [llvm] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-12-05 Thread Jonas Paulsson via cfe-commits
https://github.com/JonPsson1 closed https://github.com/llvm/llvm-project/pull/73134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c568927 - [SystemZ] Properly support 16 byte atomic int/fp types and ops. (#73134)

2023-12-05 Thread via cfe-commits
Author: Jonas Paulsson Date: 2023-12-05T17:17:21+01:00 New Revision: c568927f3e2e7d9804ea74ecbf11c16c014ddcbc URL: https://github.com/llvm/llvm-project/commit/c568927f3e2e7d9804ea74ecbf11c16c014ddcbc DIFF:

[clang] [Sema] When checking for constraint equivalence, do not calculate satisfaction (PR #74490)

2023-12-05 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: @cor3ntin I have tried getting some lambda examples, but because lambda produces a unique type every time, I don't see how I can get a matching declaration with a lambda inside `requires` clause. https://github.com/llvm/llvm-project/pull/74490

[clang] [Sema] When checking for constraint equivalence, do not calculate satisfaction (PR #74490)

2023-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ilya Biryukov (ilya-biryukov) Changes ... and only look at equivalence of substituted expressions, not results of constraint satisfaction. Fixes #74314. There is already some existing machinery for that in `TemplateInstantiator` and

[clang] [Sema] When checking for constraint equivalence, do not calculate satisfaction (PR #74490)

2023-12-05 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov created https://github.com/llvm/llvm-project/pull/74490 ... and only look at equivalence of substituted expressions, not results of constraint satisfaction. Fixes #74314. There is already some existing machinery for that in `TemplateInstantiator` and `Sema`

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/74324 >From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 29 Nov 2023 11:12:02 -0800 Subject: [PATCH 1/3] [OpenACC] Implement 'cache' construct parsing The 'cache'

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Erich Keane via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Erich Keane via cfe-commits
@@ -237,19 +240,18 @@ void ParseOpenACCClauseList(Parser ) { } // namespace -// Routine has an optional paren-wrapped name of a function in the local scope. -// We parse the name, emitting any diagnostics -ExprResult Parser::ParseOpenACCRoutineName() { - +ExprResult

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Erich Keane via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-05 Thread Nikita Popov via cfe-commits
nikic wrote: Rebased over the SCEV change. @dtcxzyw Can you please give it another try? https://github.com/llvm/llvm-project/pull/73662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Move alpha checker EnumCastOutOfRange to optin (PR #67157)

2023-12-05 Thread via cfe-commits
DonatNagyE wrote: (Force pushed the branch because I wanted to rebase it onto a recent main and fix the merge conflicts. Is there a better workflow than this?) https://github.com/llvm/llvm-project/pull/67157 ___ cfe-commits mailing list

[clang] [analyzer] Move alpha checker EnumCastOutOfRange to optin (PR #67157)

2023-12-05 Thread via cfe-commits
https://github.com/DonatNagyE updated https://github.com/llvm/llvm-project/pull/67157 >From 5c42d3e5286e041e22776fa496d884454640ffec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Fri, 22 Sep 2023 17:22:53 +0200 Subject: [PATCH] [analyzer] Move alpha checker

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { cor3ntin wrote: Maybe it would be nice to do like C and C++, ie citing the standard + grammar

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread via cfe-commits
@@ -237,19 +240,18 @@ void ParseOpenACCClauseList(Parser ) { } // namespace -// Routine has an optional paren-wrapped name of a function in the local scope. -// We parse the name, emitting any diagnostics -ExprResult Parser::ParseOpenACCRoutineName() { - +ExprResult

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

2023-12-05 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 updated https://github.com/llvm/llvm-project/pull/73077 >From a09d149f050918f6161e5880b4f7e352fc5e52c2 Mon Sep 17 00:00:00 2001 From: dong jianqiang Date: Wed, 22 Nov 2023 11:06:00 +0800 Subject: [PATCH] [clang][Sema] Add -Wswitch-default warning option Adds

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-05 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert approved this pull request. Thanks, looks good to me! https://github.com/llvm/llvm-project/pull/74020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/74324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [mlir] [llvm] [openmp] [libcxxabi] [libunwind] [lldb] [libcxx] [clang] [compiler-rt] [flang] [libc] [clang-tools-extra] [C23] Implement N3018: The constexpr specifier for object definitions (PR

2023-12-05 Thread via cfe-commits
@@ -13816,7 +13862,9 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { VDecl->setStorageClass(SC_Extern); // C99 6.7.8p4. All file scoped initializers need to be constant. -if (!getLangOpts().CPlusPlus && !VDecl->isInvalidDecl())

[compiler-rt] [libunwind] [llvm] [libc] [lldb] [clang] [flang] [clang-tools-extra] [lld] [libcxxabi] [openmp] [libcxx] [mlir] [C23] Implement N3018: The constexpr specifier for object definitions (PR

2023-12-05 Thread via cfe-commits
https://github.com/cor3ntin commented: Modulo comment I'm happy with the StringLiteral aspect of the patch and generally the rest of the patch looks good to me, but I'm not familiar enough with the peculiarities of C to provide an in-depth review

[compiler-rt] [clang-tools-extra] [clang] [llvm] [libc] [libcxx] [libunwind] [lldb] [openmp] [flang] [lld] [libcxxabi] [mlir] [C23] Implement N3018: The constexpr specifier for object definitions (PR

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

[clang] [compiler-rt] [flang] [libcxxabi] [lldb] [clang-tools-extra] [libcxx] [llvm] [libc] [lld] [libunwind] [openmp] [mlir] [C23] Implement N3018: The constexpr specifier for object definitions (PR

2023-12-05 Thread via cfe-commits
@@ -1914,6 +1914,17 @@ class StringLiteral final llvm_unreachable("Unsupported character width!"); } + // Get code unit but preserve sign info. + int64_t getCodeUnitS(size_t I, uint64_t ByteWidth) const { cor3ntin wrote: ```suggestion int64_t

[openmp] [lld] [clang-tools-extra] [clang] [libcxx] [flang] [mlir] [libunwind] [compiler-rt] [lldb] [llvm] [libcxxabi] [libc] [C23] Implement N3018: The constexpr specifier for object definitions (PR

2023-12-05 Thread via cfe-commits
@@ -14270,6 +14318,113 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind GetConversionKind(QualType FromType, +

[clang] [compiler-rt] [llvm] [HIP] support 128 bit int division (PR #71978)

2023-12-05 Thread Yaxun Liu via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance ) { for (const CodeGenOptions::BitcodeFileToLink : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +auto

[clang] [llvm] [clang-tools-extra] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-05 Thread via cfe-commits
elizabethandrews wrote: > > Hmm the build fails with: > > ⚠️ Warning: Checkout failed! checking out commit > > "af600cbf98ce1bf55c51ef88ddf94cd9114181c2": exit status 128 (Attempt 3/3)  > > Error: checking out commit "af600cbf98ce1bf55c51ef88ddf94cd9114181c2": exit > > status 128 > >

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/74324 >From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 29 Nov 2023 11:12:02 -0800 Subject: [PATCH 1/2] [OpenACC] Implement 'cache' construct parsing The 'cache'

[clang-tools-extra] [llvm] [clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-05 Thread via cfe-commits
DanielKristofKiss wrote: > Hmm the build fails with: > > ⚠️ Warning: Checkout failed! checking out commit > "af600cbf98ce1bf55c51ef88ddf94cd9114181c2": exit status 128 (Attempt 3/3)  > Error: checking out commit "af600cbf98ce1bf55c51ef88ddf94cd9114181c2": exit > status 128 > > Would

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Erich Keane via cfe-commits
@@ -298,7 +367,18 @@ void Parser::ParseOpenACCDirective() { T.consumeClose(); break; } +case OpenACCDirectiveKind::Cache: + ParseOpenACCCacheVarList(); + // The ParseOpenACCCacheVarList function manages to recover from failures, + // so we

[clang-tools-extra] [llvm] [clang] [AArch64][Clang] Fix linker error for function multiversioning (PR #74358)

2023-12-05 Thread via cfe-commits
@@ -4178,8 +4184,22 @@ void CodeGenModule::emitMultiVersionFunctions() { } llvm::Constant *ResolverConstant = GetOrCreateMultiVersionResolver(GD); -if (auto *IFunc = dyn_cast(ResolverConstant)) +if (auto *IFunc = dyn_cast(ResolverConstant)) {

[clang-tools-extra] [llvm] [clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-05 Thread via cfe-commits
@@ -4178,8 +4178,29 @@ void CodeGenModule::emitMultiVersionFunctions() { } llvm::Constant *ResolverConstant = GetOrCreateMultiVersionResolver(GD); -if (auto *IFunc = dyn_cast(ResolverConstant)) +if (auto *IFunc = dyn_cast(ResolverConstant)) {

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-12-05 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,DonatNagyE Message-ID: In-Reply-To: https://github.com/DonatNagyE closed https://github.com/llvm/llvm-project/pull/72107

[clang] dfdedaf - [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (#72107)

2023-12-05 Thread via cfe-commits
Author: DonatNagyE Date: 2023-12-05T16:17:35+01:00 New Revision: dfdedaf6dae0b4e54c64c740f8d22567447e0f8d URL: https://github.com/llvm/llvm-project/commit/dfdedaf6dae0b4e54c64c740f8d22567447e0f8d DIFF: https://github.com/llvm/llvm-project/commit/dfdedaf6dae0b4e54c64c740f8d22567447e0f8d.diff

[llvm] [clang] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

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

[clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-12-05 Thread David Sherwood via cfe-commits
david-arm wrote: Hi @AaronBallman, yes the problem I found with always choosing `char` as the alias type is that LLVM will just assume that enum types alias with absolutely everything. This is a conservative approach that works fine, but it does prevent important type-based alias

[llvm] [clang] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-12-05 Thread Nikita Popov via cfe-commits
nikic wrote: I've put up https://github.com/llvm/llvm-project/pull/74467 to use disjoint in SCEV. https://github.com/llvm/llvm-project/pull/73662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][ASTImporter] Fix import of variable template redeclarations. (PR #72841)

2023-12-05 Thread Balázs Kéri via cfe-commits
@@ -5050,6 +5050,59 @@ TEST_P(ImportFriendClasses, RecordVarTemplateDecl) { EXPECT_EQ(ToTUX, ToX); } +TEST_P(ASTImporterOptionSpecificTestBase, VarTemplateDeclConflict) { + getToTuDecl( + R"( + template + constexpr int X = 1; + )", + Lang_CXX14);

[clang] [clang][ASTImporter] Fix import of variable template redeclarations. (PR #72841)

2023-12-05 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/72841 From 99d6169f62862b7b1147da7fd26a85df20a0aba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Mon, 20 Nov 2023 10:14:52 +0100 Subject: [PATCH 1/3] [clang][ASTImporter] Fix import of

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-12-05 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,DonatNagyE Message-ID: In-Reply-To: https://github.com/DonatNagyE updated https://github.com/llvm/llvm-project/pull/72107 >From

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

2023-12-05 Thread dong jianqiang via cfe-commits
https://github.com/dongjianqiang2 updated https://github.com/llvm/llvm-project/pull/73077 >From af54d1f1870ba43e18cb3677d171e916f8c887b2 Mon Sep 17 00:00:00 2001 From: dong jianqiang Date: Wed, 22 Nov 2023 11:06:00 +0800 Subject: [PATCH] [clang][Sema] Add -Wswitch-default warning option Adds

[clang] [analyzer] Fix "sprintf" parameter modeling in CStringChecker (PR #74345)

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

[clang] [analyzer] Fix "sprintf" parameter modeling in CStringChecker (PR #74345)

2023-12-05 Thread via cfe-commits
@@ -1,13 +1,15 @@ -// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s - -// expected-no-diagnostics +// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix,debug.ExprInspection -verify %s // Test functions that are called "memcpy" but aren't the memcpy //

[clang] [analyzer] Fix "sprintf" parameter modeling in CStringChecker (PR #74345)

2023-12-05 Thread via cfe-commits
https://github.com/DonatNagyE approved this pull request. Reasonable semi-automatic refactoring + a small change to fix a nasty crash. It's good to see that you separated the NFC and the bugfix into two commits, it'll make the git history nicer. It's a bit unfortunate that there are many

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-12-05 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/73317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-12-05 Thread Sander de Smalen via cfe-commits
@@ -321,9 +321,18 @@ let TargetGuard = "sme2" in { let TargetGuard = "sme2" in { def SVLDR_ZT : Inst<"svldr_zt", "viQ", "", MergeNone, "aarch64_sme_ldr_zt", [IsOverloadNone, IsStreamingCompatible, IsSharedZA, IsPreservesZA], [ImmCheck<0, ImmCheck0_0>]>; def SVSTR_ZT :

<    1   2   3   4   5   >