[clang] [Clang][ASTMatcher] Add `dependentNameType` Matcher (PR #121263)

2024-12-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/121263 >From bdbd11db849506c4d99036dd674f03d1eda815cc Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 28 Dec 2024 13:23:33 +0100 Subject: [PATCH] [Clang][ASTMatcher] Add `dependentNameType` Matcher --- cl

[clang] [clang-tools-extra] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/118872 >From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 5 Dec 2024 22:18:37 +0100 Subject: [PATCH 1/5] [Clang] Warning as error Array Comparisons from C++26 St

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/118872 Starting from C++26 the array comparison warning should converted to an error. Fixes: #117859 >From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 5 Dec 20

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/118872 >From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 5 Dec 2024 22:18:37 +0100 Subject: [PATCH 1/4] [Clang] Warning as error Array Comparisons from C++26 St

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/118872 >From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 5 Dec 2024 22:18:37 +0100 Subject: [PATCH 1/3] [Clang] Warning as error Array Comparisons from C++26 St

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-06 Thread Amr Hesham via cfe-commits
@@ -428,6 +428,9 @@ New Compiler Flags - The ``-Warray-compare`` warning has been added to warn about array comparison on versions older than C++20. +- The ``-Warray-compare-cxx26`` warning has been added to warn about array comparison + starting from C++26, this warn is e

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-06 Thread Amr Hesham via cfe-commits
@@ -239,7 +239,7 @@ C++2c implementation status Remove Deprecated Array Comparisons from C++26 https://wg21.link/P2865R6";>P2865R6 - No + Clang 20 AmrDeveloper wrote: Done, thanks https://github.com/llvm/llvm-project/pull/118872 __

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/118872 >From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 5 Dec 2024 22:18:37 +0100 Subject: [PATCH 1/3] [Clang] Warning as error Array Comparisons from C++26 St

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/118872 >From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 5 Dec 2024 22:18:37 +0100 Subject: [PATCH 1/2] [Clang] Warning as error Array Comparisons from C++26 St

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-06 Thread Amr Hesham via cfe-commits
@@ -10274,6 +10274,11 @@ def warn_array_comparison : Warning< "to compare array addresses, use unary '+' to decay operands to pointers">, InGroup>; +def warn_array_comparison_cxx26 : Warning< + "comparison between two arrays compare their addresses not their contents; " -

[clang] [clang-tools-extra] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-07 Thread Amr Hesham via cfe-commits
@@ -10274,6 +10274,11 @@ def warn_array_comparison : Warning< "to compare array addresses, use unary '+' to decay operands to pointers">, InGroup>; +def warn_array_comparison_cxx26 : Warning< + "comparison between two arrays compare their addresses not their contents; " -

[clang] [clang-tools-extra] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/118872 >From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 5 Dec 2024 22:18:37 +0100 Subject: [PATCH 1/6] [Clang] Warning as error Array Comparisons from C++26 St

[clang] [Clang][ASTMatcher] Extend `hasDependentName` to match DependentNameType name (PR #121975)

2025-01-08 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/121975 >From 353f3ca4e997f658c65570e75749220e1abcad72 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 7 Jan 2025 19:13:26 +0100 Subject: [PATCH 1/2] [Clang][ASTMatcher] Extend `hasDependentName` matcher to

[clang] [Clang][ASTMatcher] Extend `hasDependentName` to match DependentNameType name (PR #121975)

2025-01-08 Thread Amr Hesham via cfe-commits
@@ -2251,6 +2251,14 @@ TEST_P(ASTMatchersTest, HasDependentName_DependentScopeDeclRefExpr) { EXPECT_TRUE(matches("template struct S { static T foo(); };" "template void x() { S::foo(); }", dependentScopeDeclRefExpr(hasDependentNa

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-22 Thread Amr Hesham via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-22 Thread Amr Hesham via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-22 Thread Amr Hesham via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-22 Thread Amr Hesham via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-22 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-24 Thread Amr Hesham via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-24 Thread Amr Hesham via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-18 Thread Amr Hesham via cfe-commits
@@ -8469,7 +8489,7 @@ void Sema::CheckInfNaNFunction(const CallExpr *Call, bool IsInfOrIsFinite = AmrDeveloper wrote: Yes, I agree, i am thinking to change the structure of the function `CheckInfNaNFunction ` too, because if `HasIdentifier` is false that's

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/123417 >From 51dd53feb7a35d4fac648dd165fb5b99f73c6c24 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 17 Jan 2025 23:32:48 +0100 Subject: [PATCH 1/2] [Clang] Fix invalid use of infinity warning --- clang/

[clang] [Clang] Fix invalid warning for non std functions with name `infinity` (PR #123417)

2025-01-17 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/123417 Fix reporting diagnostic for non std functions that has the name `infinity` Fixes: #123231 >From 51dd53feb7a35d4fac648dd165fb5b99f73c6c24 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 17 Jan 2025

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-17 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
@@ -8454,26 +8454,43 @@ static bool IsInfOrNanFunction(StringRef calleeName, MathCheck Check) { llvm_unreachable("unknown MathCheck"); } +static bool IsInfinityFunction(const FunctionDecl *FDecl) { + if (FDecl->getName() != "infinity") +return false; + + if (const CXX

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
@@ -8454,26 +8454,43 @@ static bool IsInfOrNanFunction(StringRef calleeName, MathCheck Check) { llvm_unreachable("unknown MathCheck"); } +static bool IsInfinityFunction(const FunctionDecl *FDecl) { + if (FDecl->getName() != "infinity") +return false; + + if (const CXX

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
@@ -8454,26 +8454,43 @@ static bool IsInfOrNanFunction(StringRef calleeName, MathCheck Check) { llvm_unreachable("unknown MathCheck"); } +static bool IsInfinityFunction(const FunctionDecl *FDecl) { + if (FDecl->getName() != "infinity") +return false; + + if (const CXX

[clang] [Clang] Improve testing of non std functions with name infinity (PR #123806)

2025-01-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/123806 Follow up for improving the test after https://github.com/llvm/llvm-project/pull/123417 >From 38031e9aed519f4fd3b21dff7e79c69a0150efd9 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 21 Jan 2025 20

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-21 Thread Amr Hesham via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-18 Thread Amr Hesham via cfe-commits
@@ -8469,7 +8489,7 @@ void Sema::CheckInfNaNFunction(const CallExpr *Call, bool IsInfOrIsFinite = AmrDeveloper wrote: I think it's better now, early return if there is no identifier and check `NoHonor.. `first before checking for function name https://gith

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/123417 >From 51dd53feb7a35d4fac648dd165fb5b99f73c6c24 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 17 Jan 2025 23:32:48 +0100 Subject: [PATCH 1/3] [Clang] Fix invalid use of infinity warning --- clang/

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-18 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > Can you add a changelog entry? Thanks Done, thanks https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/123417 >From 51dd53feb7a35d4fac648dd165fb5b99f73c6c24 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 17 Jan 2025 23:32:48 +0100 Subject: [PATCH 1/4] [Clang] Fix invalid use of infinity warning --- clang/

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-18 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > LGTM with nits Thank you, I addressed the nits https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper approved this pull request. Thanks, LGTM! https://github.com/llvm/llvm-project/pull/121435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ASTMatcher] Add a matcher for the name of a DependentScopeDeclRefExpr (PR #121656)

2025-01-04 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/121656 Add the `hasDependentName` matcher to match the name of `DependentScopeDeclRefExpr` Example: `dependentScopeDeclRefExpr(hasDependentName("name"))` Fixes: #121610 >From 4cd48886384570e0e5bb0b712f4fd45f8de

[clang] [Clang][ASTMatcher] Add a matcher for the name of a DependentScopeDeclRefExpr (PR #121656)

2025-01-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/121656 >From 4cd48886384570e0e5bb0b712f4fd45f8decd27e Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 4 Jan 2025 17:36:05 +0100 Subject: [PATCH 1/2] [Clang][ASTMatcher] Add a matcher for the name of a Depe

[clang] [Clang][ASTMatcher] Add a matcher for the name of a DependentScopeDeclRefExpr (PR #121656)

2025-01-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/121656 >From 4cd48886384570e0e5bb0b712f4fd45f8decd27e Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 4 Jan 2025 17:36:05 +0100 Subject: [PATCH 1/3] [Clang][ASTMatcher] Add a matcher for the name of a Depe

[clang] [Clang][ASTMatcher] Add a matcher for the name of a DependentScopeDeclRefExpr (PR #121656)

2025-01-05 Thread Amr Hesham via cfe-commits
@@ -2235,6 +2235,21 @@ TEST_P(ASTMatchersTest, ArgumentCountIs_CXXConstructExpr) { Constructor1Arg)); } +TEST_P(ASTMatchersTest, hasDependentName_DependentScopeDeclRefExpr) { + if (!GetParam().isCXX() || GetParam().hasDelayedTemplateParsing()) { +// FIXM

[clang] [Clang][ASTMatcher] Add a matcher for the name of a DependentScopeDeclRefExpr (PR #121656)

2025-01-05 Thread Amr Hesham via cfe-commits
@@ -2235,6 +2235,21 @@ TEST_P(ASTMatchersTest, ArgumentCountIs_CXXConstructExpr) { Constructor1Arg)); } +TEST_P(ASTMatchersTest, hasDependentName_DependentScopeDeclRefExpr) { AmrDeveloper wrote: Done https://github.com/llvm/llvm-project/pul

[clang] [Clang][ASTMatcher] Add `dependentScopeDeclRefExpr` Matcher (PR #120996)

2024-12-23 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/120996 >From a0b71504fa31e55d42cb54e349838b2669f6fde5 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 23 Dec 2024 19:42:30 +0100 Subject: [PATCH] [Clang][ASTMatcher] Add `dependentScopeDeclRefExpr` Matcher

[clang] [Clang][ASTMatcher] Add `dependentScopeDeclRefExpr` Matcher (PR #120996)

2024-12-23 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/120996 Add AST Matcher for `DependentScopeDeclRefExpr` Fixes: #120937 >From 0e6e3334dafa4aa3a613ff996d55fb452b3fc350 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 23 Dec 2024 19:42:30 +0100 Subject: [PA

[clang] [Clang][ASTMatcher] Add `dependentScopeDeclRefExpr` Matcher (PR #120996)

2024-12-23 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/120996 >From 56b650ffe1634833b3147261a32b7b2d1c84c079 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 23 Dec 2024 19:42:30 +0100 Subject: [PATCH] [Clang][ASTMatcher] Add `dependentScopeDeclRefExpr` Matcher

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-02-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/126793 Previously in case of multiable aliases exists for the same base we just accept the first one https://github.com/llvm/llvm-project/blob/2cf6663d3c86b065edeb693815e6a4b325045cc2/clang/lib/ASTMatchers/ASTMat

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-18 Thread Amr Hesham via cfe-commits
@@ -290,9 +378,23 @@ mlir::Attribute ConstantEmitter::tryEmitPrivate(const APValue &value, cgm.errorNYI("ConstExprEmitter::tryEmitPrivate member pointer"); return {}; } - case APValue::LValue: -cgm.errorNYI("ConstExprEmitter::tryEmitPrivate lvalue"); + case APV

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-19 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/131657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Follow up for addressing style comment (PR #132093)

2025-03-19 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/132093 Follow up PR to address style comment (https://github.com/llvm/llvm-project/pull/131657#discussion_r2004197917) >From 04499c516d36a84a632e58e64a9800af1bdfbc4c Mon Sep 17 00:00:00 2001 From: AmrDeveloper D

[clang] [CIR] Upstream basic support for sizeof and alignof (PR #130847)

2025-03-14 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/130847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/131657 >From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 14 Mar 2025 21:46:57 +0100 Subject: [PATCH 1/2] [CIR] Upstream global initialization for ArrayType ---

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-18 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: CI is red because unrelated error ``` fatal: Could not read from remote repository.   Please make sure you have the correct access rights ``` https://github.com/llvm/llvm-project/pull/131657 ___ cfe-commits mailing list cfe-commits

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/131657 >From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 14 Mar 2025 21:46:57 +0100 Subject: [PATCH 1/2] [CIR] Upstream global initialization for ArrayType ---

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/131657 >From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 14 Mar 2025 21:46:57 +0100 Subject: [PATCH 1/3] [CIR] Upstream global initialization for ArrayType ---

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-18 Thread Amr Hesham via cfe-commits
@@ -271,16 +314,61 @@ mlir::Attribute ConstantEmitter::tryEmitPrivate(const APValue &value, cgm.getASTContext().getTargetInfo().useFP16ConversionIntrinsics()) { cgm.errorNYI("ConstExprEmitter::tryEmitPrivate half"); return {}; -} else { - mlir::Typ

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/131657 >From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 14 Mar 2025 21:46:57 +0100 Subject: [PATCH 1/2] [CIR] Upstream global initialization for ArrayType ---

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-18 Thread Amr Hesham via cfe-commits
@@ -158,13 +158,56 @@ class ConstExprEmitter // TODO(cir): this can be shared with LLVM's codegen static QualType getNonMemoryType(CIRGenModule &cgm, QualType type) { - if (auto at = type->getAs()) { + if (const auto *at = type->getAs()) { return cgm.getASTContext().get

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/131657 >From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 14 Mar 2025 21:46:57 +0100 Subject: [PATCH 1/3] [CIR] Upstream global initialization for ArrayType ---

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-18 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: @andykaylor All comments addressed except two points related to NYI https://github.com/llvm/llvm-project/pull/131657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Follow up for addressing style comment (PR #132093)

2025-03-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/132093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-19 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/131657 >From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 14 Mar 2025 21:46:57 +0100 Subject: [PATCH 1/4] [CIR] Upstream global initialization for ArrayType ---

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-19 Thread Amr Hesham via cfe-commits
@@ -45,6 +45,41 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { return false; } + // Return true if this is the null value AmrDeveloper wrote: That's right, I updated the comment to describe the implemented cases https://github.com/llvm/llvm

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-19 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > If you just set commonElementType to {} as is done in the incubator, this > will eventually reach the NYI state in emitConstantArray and this code won't > need to be updated later. @andykaylor Yes, this is a better approach, I updated the code Thanks https://github.com/

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-19 Thread Amr Hesham via cfe-commits
@@ -228,6 +257,42 @@ mlir::Value CIRAttrToValue::visitCirAttr(cir::FPAttr fltAttr) { loc, converter->convertType(fltAttr.getType()), fltAttr.getValue()); } +// ConstArrayAttr visitor +mlir::Value CIRAttrToValue::visitCirAttr(cir::ConstArrayAttr attr) { + mlir::Type llv

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/134536 This change adds ArraySubscriptExpr for fixed size ArrayType Issue #130197 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 S

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-04-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/5] [CIR] [Upstream local initialization for ArrayType ---

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/132974 This change adds local initialization for ArrayType Issue #130197 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject:

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-26 Thread Amr Hesham via cfe-commits
@@ -67,6 +67,40 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return create(loc, attr.getType(), attr); } + mlir::TypedAttr getConstNullPtrAttr(mlir::Type t) { +assert(mlir::isa(t) && "expected cir.ptr"); +return getConstPtrAttr(t, 0); + } + + mlir::Typ

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/133100 >From b4aafe8bdb2754597d440e256c33b9f8b9a92a91 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 26 Mar 2025 05:52:17 -0700 Subject: [PATCH] [CIR] Upstream zero init for global variables --- .../CIR/

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/133100 This change adds zero initialization for global variables >From 999b8e47c0a8506a983d7d3ac5ce1b82b41966b0 Mon Sep 17 00:00:00 2001 From: JaydeepChauhan14 Date: Wed, 26 Mar 2025 05:52:17 -0700 Subject: [PATC

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-26 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > I'm not suggesting errorNYI. I'm suggesting op.emitError(). We can't do that > here either, but maybe we could do it in the function from which this is > called? I think it's easier to keep it as assert, llvm_unreachable or a missing features as the error message mention

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/5] [CIR] [Upstream local initialization for ArrayType ---

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-26 Thread Amr Hesham via cfe-commits
@@ -620,6 +684,28 @@ mlir::LogicalResult CIRToLLVMStoreOpLowering::matchAndRewrite( return mlir::LogicalResult::success(); } +/// Switches on the type of attribute and calls the appropriate conversion. +mlir::Value lowerCirAttrAsValue(mlir::Operation *parentOp, +

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-26 Thread Amr Hesham via cfe-commits
@@ -0,0 +1,150 @@ +//- LoweringHelpers.cpp - Lowering helper functions ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/4] [CIR] [Upstream local initialization for ArrayType ---

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/2] [CIR] [Upstream local initialization for ArrayType ---

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-27 Thread Amr Hesham via cfe-commits
@@ -67,6 +67,40 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return create(loc, attr.getType(), attr); } + mlir::TypedAttr getConstNullPtrAttr(mlir::Type t) { +assert(mlir::isa(t) && "expected cir.ptr"); +return getConstPtrAttr(t, 0); + } + + mlir::Typ

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-08 Thread Amr Hesham via cfe-commits
@@ -29,8 +29,15 @@ int f[5] = {1, 2}; void func() { int arr[10]; - // CHECK: %[[ARR:.*]] = cir.alloca !cir.array, !cir.ptr>, ["arr"] + + int e = arr[1]; + // CHECK: %[[INIT:.*]] = cir.alloca !s32i, !cir.ptr, ["e", init] + // CHECK: %[[IDX:.*]] = cir.const #cir.int<1>

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-08 Thread Amr Hesham via cfe-commits
@@ -232,6 +233,161 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-08 Thread Amr Hesham via cfe-commits
@@ -232,6 +233,152 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-08 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/5] [CIR] Upstream ArraySubscriptExpr for fixed size array -

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-08 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/5] [CIR] Upstream ArraySubscriptExpr for fixed size array -

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-08 Thread Amr Hesham via cfe-commits
@@ -232,6 +233,152 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/134536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-09 Thread Amr Hesham via cfe-commits
@@ -390,6 +391,148 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-09 Thread Amr Hesham via cfe-commits
@@ -390,6 +391,148 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

[clang] [CIR][NFC] Upstream LValueBaseInfo handling (PR #134928)

2025-04-09 Thread Amr Hesham via cfe-commits
@@ -27,7 +27,8 @@ using namespace cir; /// Given an expression of pointer type, try to /// derive a more accurate bound on the alignment of the pointer. -Address CIRGenFunction::emitPointerWithAlignment(const Expr *expr) { +Address CIRGenFunction::emitPointerWithAlignment(cons

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-10 Thread Amr Hesham via cfe-commits
@@ -390,6 +391,148 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/7] [CIR] Upstream ArraySubscriptExpr for fixed size array -

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/7] [CIR] Upstream ArraySubscriptExpr for fixed size array -

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/8] [CIR] Upstream ArraySubscriptExpr for fixed size array -

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/8] [CIR] Upstream ArraySubscriptExpr for fixed size array -

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-04-01 Thread Amr Hesham via cfe-commits
@@ -110,6 +110,10 @@ class CIRGenFunction : public CIRGenTypeCache { public: mlir::Value createDummyValue(mlir::Location loc, clang::QualType qt); + void emitAggExpr(const clang::Expr *e, AggValueSlot slot); AmrDeveloper wrote: Done, thanks https://github

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-15 Thread Amr Hesham via cfe-commits
@@ -280,6 +280,25 @@ def CIR_BoolType : }]; } +//===--===// +// ArrayType +//===--===// + +def CIR_ArrayType : CIR_Type<"Array", "array", +

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-08 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/3] [CIR] Upstream ArraySubscriptExpr for fixed size array -

<    1   2   3   4   5   >