[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 Erich Keane 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-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 Erich Keane 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-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 Erich Keane 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 Erich Keane 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-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-21 Thread Erich Keane 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-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-20 Thread Shafik Yaghmour via cfe-commits
@@ -48,24 +48,49 @@ namespace std __attribute__((__visibility__("default"))) { isnan(double __x); bool isnan(long double __x); -bool + bool isfinite(float __x); bool isfinite(double __x); bool isfinte(long double __x); - bool + bool isunordered(float _

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

2025-01-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik 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 Shafik Yaghmour via cfe-commits
https://github.com/shafik 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 Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: quick questions 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 Shafik Yaghmour 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-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] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam approved this pull request. LGTM. 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-20 Thread Zahira Ammarguellat 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 Zahira Ammarguellat 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
@@ -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 Zahira Ammarguellat 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-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] 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 via cfe-commits
https://github.com/cor3ntin 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-18 Thread via cfe-commits
@@ -8454,26 +8454,47 @@ static bool IsInfOrNanFunction(StringRef calleeName, MathCheck Check) { llvm_unreachable("unknown MathCheck"); } +static bool IsInfinityFunction(const FunctionDecl *FDecl) { + if (FDecl->getName() != "infinity") { +return false; + } + + if (co

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

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

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

2025-01-18 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM with 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] 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/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 via cfe-commits
https://github.com/cor3ntin commented: Can you add a changelog entry? 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
@@ -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/2] [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
@@ -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 via cfe-commits
@@ -8469,7 +8489,7 @@ void Sema::CheckInfNaNFunction(const CallExpr *Call, bool IsInfOrIsFinite = cor3ntin wrote: As an aside, this is called on every function call, which seems widely inficient. can we do something like ```cpp FPOptions FPO = Call->getFPF

[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