[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-02-13 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu updated https://github.com/llvm/llvm-project/pull/126846 >From 44673ebf7c3fa773ffc7c52141b889c9ea352a93 Mon Sep 17 00:00:00 2001 From: Yutong Zhu Date: Tue, 11 Feb 2025 22:49:40 -0500 Subject: [PATCH] Force expressions with UO_Not to not be non-negative --- clang

[clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-02-12 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/126846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-02-11 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu created https://github.com/llvm/llvm-project/pull/126846 Fix to issue #18878 This PR issues the bug of not throwing warning for the following code: ```c++ int test13(unsigned a, int *b) { return a > ~(95 != *b); // expected-warning {{comparison of integers

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-10 Thread Yutong Zhu via cfe-commits
@@ -121,6 +121,186 @@ Attribute Changes in Clang Improvements to Clang's diagnostics --- +- Some template related diagnostics have been improved. + + .. code-block:: c++ + + void foo() { template int i; } // error: templates can only be d

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-10 Thread Yutong Zhu via cfe-commits
@@ -121,6 +121,186 @@ Attribute Changes in Clang Improvements to Clang's diagnostics --- +- Some template related diagnostics have been improved. + + .. code-block:: c++ + + void foo() { template int i; } // error: templates can only be d

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-09 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu updated https://github.com/llvm/llvm-project/pull/125370 >From 380ae2020f71cc5006db2e29b0a69f61297f585c Mon Sep 17 00:00:00 2001 From: Yutong Zhu Date: Sat, 1 Feb 2025 20:09:13 -0500 Subject: [PATCH 1/3] Force AttributedStmtClass to not be scope parents --- clang

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-09 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu updated https://github.com/llvm/llvm-project/pull/125370 >From 380ae2020f71cc5006db2e29b0a69f61297f585c Mon Sep 17 00:00:00 2001 From: Yutong Zhu Date: Sat, 1 Feb 2025 20:09:13 -0500 Subject: [PATCH 1/2] Force AttributedStmtClass to not be scope parents --- clang

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-08 Thread Yutong Zhu via cfe-commits
YutongZhuu wrote: > Could you add a test case - check in clang/test to see if other tests for the > diagnostic text in the original bug, and add a test case for that nearby > (maybe the same file the diagnostic is already tested in)? Done https://github.com/llvm/llvm-project/pull/125370 _

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-07 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu updated https://github.com/llvm/llvm-project/pull/125370 >From 380ae2020f71cc5006db2e29b0a69f61297f585c Mon Sep 17 00:00:00 2001 From: Yutong Zhu Date: Sat, 1 Feb 2025 20:09:13 -0500 Subject: [PATCH 1/2] Force AttributedStmtClass to not be scope parents --- clang

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-07 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu updated https://github.com/llvm/llvm-project/pull/125370 >From 380ae2020f71cc5006db2e29b0a69f61297f585c Mon Sep 17 00:00:00 2001 From: Yutong Zhu Date: Sat, 1 Feb 2025 20:09:13 -0500 Subject: [PATCH] Force AttributedStmtClass to not be scope parents --- clang/doc

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/125370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/125370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/125370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
YutongZhuu wrote: > Could you add a test case - check in clang/test to see if other tests for the > diagnostic text in the original bug, and add a test case for that nearby > (maybe the same file the diagnostic is already tested in)? Do you mean I should check if there exists a test for the or

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/125370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
@@ -658,7 +649,13 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, Next = SC->getSubStmt(); else if (LabelStmt *LS = dyn_cast(SubStmt)) Next = LS->getSubStmt(); - else + else if (AttributedStmt *AS = dyn_cast(SubStmt)) { +if (GetM

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/125370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-01 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu created https://github.com/llvm/llvm-project/pull/125370 This PR addresses https://github.com/llvm/llvm-project/issues/84072. >From 01497e746ae23ea5033b1c6cd6f9f9718d6dc3d6 Mon Sep 17 00:00:00 2001 From: Yutong Zhu Date: Sat, 1 Feb 2025 20:09:13 -0500 Subject: [PA