[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

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

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/81976 >From 07c73f087a430f5115ecdfec23730c5afcab37f3 Mon Sep 17 00:00:00 2001 From: 11happy Date: Fri, 16 Feb 2024 14:26:36 +0530 Subject: [PATCH 1/4] fix unnecessary warning when using bitand with boolean

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-18 Thread Aaron Ballman via cfe-commits
@@ -250,6 +250,11 @@ Improvements to Clang's diagnostics such as attempting to call ``free`` on an unallocated object. Fixes `#79443 `_. +- Clang now does not warn in cases where bitand operator is + intentionally used

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM with a small tweak to the release notes. https://github.com/llvm/llvm-project/pull/81976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/81976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-18 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > currently the macro definition for both `&` and `bitand` is not giving any > warning however should the `&` one warn? or current working is correct > behaviour as expected? The current behavior is what I'd expect. The idea being: if the user is using `&` directly, it's

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-16 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy updated https://github.com/llvm/llvm-project/pull/81976 >From 07c73f087a430f5115ecdfec23730c5afcab37f3 Mon Sep 17 00:00:00 2001 From: 11happy Date: Fri, 16 Feb 2024 14:26:36 +0530 Subject: [PATCH 1/3] fix unnecessary warning when using bitand with boolean

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-16 Thread Bhuminjay Soni via cfe-commits
11happy wrote: currently the macro definition for both `&` and `bitand` is not giving any warning however should the `&` one warn? or current working is correct behaviour as expected? https://github.com/llvm/llvm-project/pull/81976 ___ cfe-commits

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-16 Thread Bhuminjay Soni via cfe-commits
@@ -45,8 +45,8 @@ void test(boolean a, boolean b, int *p, volatile int *q, int i) { b = bar() & (i > 4); b = (i == 7) & foo(); #ifdef __cplusplus - b = foo() bitand bar(); // expected-warning {{use of bitwise '&' with boolean operands}} - //

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-16 Thread Bhuminjay Soni via cfe-commits
@@ -16191,12 +16191,24 @@ static void AnalyzeImplicitConversions( BO->getRHS()->isKnownToHaveBooleanValue() && BO->getLHS()->HasSideEffects(S.Context) && BO->getRHS()->HasSideEffects(S.Context)) { - S.Diag(BO->getBeginLoc(),

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-16 Thread Bhuminjay Soni via cfe-commits
@@ -16191,12 +16191,24 @@ static void AnalyzeImplicitConversions( BO->getRHS()->isKnownToHaveBooleanValue() && BO->getLHS()->HasSideEffects(S.Context) && BO->getRHS()->HasSideEffects(S.Context)) { - S.Diag(BO->getBeginLoc(),

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-16 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy updated https://github.com/llvm/llvm-project/pull/81976 >From 07c73f087a430f5115ecdfec23730c5afcab37f3 Mon Sep 17 00:00:00 2001 From: 11happy Date: Fri, 16 Feb 2024 14:26:36 +0530 Subject: [PATCH 1/2] fix unnecessary warning when using bitand with boolean

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-15 Thread Aaron Ballman via cfe-commits
@@ -45,8 +45,8 @@ void test(boolean a, boolean b, int *p, volatile int *q, int i) { b = bar() & (i > 4); b = (i == 7) & foo(); #ifdef __cplusplus - b = foo() bitand bar(); // expected-warning {{use of bitwise '&' with boolean operands}} - //

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/81976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-15 Thread Aaron Ballman via cfe-commits
@@ -16191,12 +16191,24 @@ static void AnalyzeImplicitConversions( BO->getRHS()->isKnownToHaveBooleanValue() && BO->getLHS()->HasSideEffects(S.Context) && BO->getRHS()->HasSideEffects(S.Context)) { - S.Diag(BO->getBeginLoc(),

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-15 Thread Aaron Ballman via cfe-commits
@@ -16191,12 +16191,24 @@ static void AnalyzeImplicitConversions( BO->getRHS()->isKnownToHaveBooleanValue() && BO->getLHS()->HasSideEffects(S.Context) && BO->getRHS()->HasSideEffects(S.Context)) { - S.Diag(BO->getBeginLoc(),

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-03-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for the improvement! Please be sure to add a release note about the changes as well. https://github.com/llvm/llvm-project/pull/81976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-02-24 Thread Bhuminjay Soni via cfe-commits
11happy wrote: Humble Ping! https://github.com/llvm/llvm-project/pull/81976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix unnecessary warning when using bitand with boolean operators (PR #81976)

2024-02-16 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy edited https://github.com/llvm/llvm-project/pull/81976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits