[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-13 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: Thanks for the approval, could you land this for me? https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM. My only significant observation is that `BugReporterVisitors.cpp` must be cleaned up eventually, as it is currently a heap of ad-hoc special cases. However, it would be unreasonable to wait for that difficult cleanup with this

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-13 Thread Balazs Benics via cfe-commits
steakhal wrote: This one looks good to me. I wanna hear your opinion @NagyDonat https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/91119 >From 78a2afab67eef9a8a05ced89df0aadb56a2ec2b8 Mon Sep 17 00:00:00 2001 From: Rajveer Date: Sun, 5 May 2024 18:05:00 +0530 Subject: [PATCH 1/2] [clang][analyzer] Check for label location bindings in

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-10 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: I am not sure what causes the build failure here. https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-07 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/91119 >From 78a2afab67eef9a8a05ced89df0aadb56a2ec2b8 Mon Sep 17 00:00:00 2001 From: Rajveer Date: Sun, 5 May 2024 18:05:00 +0530 Subject: [PATCH] [clang][analyzer] Check for label location bindings in

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-07 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/91119 >From 5c7712d1841664a9424b98abdd22d7967d00913f Mon Sep 17 00:00:00 2001 From: Rajveer Date: Sun, 5 May 2024 18:05:00 +0530 Subject: [PATCH] [clang][analyzer] Check for label location bindings in

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-07 Thread Balazs Benics via cfe-commits
steakhal wrote: > Should we introduce a new Kind in `DerefKind` (in reference to > `DereferenceChecker::reportBug`) ? Yes. Something like this should work: ```c++ BugType BT_Label{this, "Dereference of the address of a label", categories::LogicError}; ```

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-06 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: Should we introduce a new Kind in `DerefKind`? https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. The `llvm::errs()` are for only debugging stuff. The print to the stderr. However, to form a bug report you need to use the `reportBug` here, and you also need to define a new `BugType` for representing this bug kind. Once

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: @steakhal https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/91119 >From dcc23f7751ba2ceb281a9b027907dbf849ba65c6 Mon Sep 17 00:00:00 2001 From: Rajveer Date: Sun, 5 May 2024 18:05:00 +0530 Subject: [PATCH] [clang][analyzer] Check for label location bindings in

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-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 72eaa0ed9934bfaa2449091bbc6e45648d1396d6 c1d62262d2545e4999f08f2ba28a12c71789926f --

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/91119 >From c1d62262d2545e4999f08f2ba28a12c71789926f Mon Sep 17 00:00:00 2001 From: Rajveer Date: Sun, 5 May 2024 18:05:00 +0530 Subject: [PATCH] [clang][analyzer] Check for label location bindings in

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rajveer Singh Bharadwaj (Rajveer100) Changes Resolves #89264 Values should not be stored in addresses of labels, this throws a fatal error when this happens. --- Full diff: https://github.com/llvm/llvm-project/pull/91119.diff 2 Files

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-05 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 created https://github.com/llvm/llvm-project/pull/91119 Resolves #89264 Values should not be stored in addresses of labels, this throws a fatal error when this happens. >From 36b1ee31d8d740cdbee6a1787d7ef81d6abeb8ad Mon Sep 17 00:00:00 2001 From: Rajveer Date: