[clang] Thread Safety Analysis: Handle address-of followed by dereference (PR #127397)

2025-02-16 Thread Marco Elver via cfe-commits
https://github.com/melver created https://github.com/llvm/llvm-project/pull/127397 Correctly analyze expressions where the address of a guarded variable is taken and immediately dereferenced, such as (*(type-specifier *)&x). Previously, such patterns would result in false negatives. >From a70

[clang] Thread Safety Analysis: Support warning on passing/returning pointers to guarded variables (PR #127396)

2025-02-16 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 79d8a34bc5c0a261b9e9f77c1d4480ef135481ac 647045883d8d3ed20d3ddf744664643d84cac8da --e

[clang] Thread Safety Analysis: Support warning on passing/returning pointers to guarded variables (PR #127396)

2025-02-16 Thread Marco Elver via cfe-commits
https://github.com/melver updated https://github.com/llvm/llvm-project/pull/127396 >From 13e86fc43071af4c926d3c2d4662423f5c5b4fe8 Mon Sep 17 00:00:00 2001 From: Marco Elver Date: Sun, 16 Feb 2025 12:42:06 +0100 Subject: [PATCH] Thread Safety Analysis: Support warning on passing/returning point

[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/127049 >From c916dadbaf6021eda606d76784115698a9800571 Mon Sep 17 00:00:00 2001 From: flovent Date: Thu, 13 Feb 2025 20:17:20 +0800 Subject: [PATCH 1/6] [clang][analyzer] fix false positive of BlockInCriticalSectionCh

[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/127049 >From c916dadbaf6021eda606d76784115698a9800571 Mon Sep 17 00:00:00 2001 From: flovent Date: Thu, 13 Feb 2025 20:17:20 +0800 Subject: [PATCH 1/8] [clang][analyzer] fix false positive of BlockInCriticalSectionCh

[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/127049 >From c916dadbaf6021eda606d76784115698a9800571 Mon Sep 17 00:00:00 2001 From: flovent Date: Thu, 13 Feb 2025 20:17:20 +0800 Subject: [PATCH 01/10] [clang][analyzer] fix false positive of BlockInCriticalSection

[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. I pushed a couple cleanups. I hope you don't mind. Now it looks excellent. Thank you for your contribution! https://github.com/llvm/llvm-project/pull/127049 ___ cfe-commits mailing list cfe-commit

[clang] [clang][analyzer] Teach the BlockInCriticalSectionChecker about O_NONBLOCK streams (PR #127049)

2025-02-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/127049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support warning on passing/returning pointers to guarded variables (PR #127396)

2025-02-16 Thread Marco Elver via cfe-commits
https://github.com/melver created https://github.com/llvm/llvm-project/pull/127396 Introduce `-Wthread-safety-pointer` (under `-Wthread-safety-beta`) to warn when passing or returning pointers to guarded variables or guarded data. This is is analogous to `-Wthread-safety-reference`, which perf

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-02-16 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,472 @@ +#!/usr/bin/env python3 + +"""generate_unsupported_in_drivermode.py + +This script generates Lit regression test files that validate that options are only exposed to intended driver modes. + +The options and driver modes are parsed from Options.td, whose path sh

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-02-16 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,472 @@ +#!/usr/bin/env python3 + +"""generate_unsupported_in_drivermode.py + +This script generates Lit regression test files that validate that options are only exposed to intended driver modes. + +The options and driver modes are parsed from Options.td, whose path sh

[clang] [flang] [lld] [llvm] [Flang] LLVM_ENABLE_RUNTIMES=flang-rt (PR #110217)

2025-02-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-win` running on `avx512-intel64-win` while building `flang-rt,flang,llvm,runtimes` at step 6 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/81/builds/4789

[clang-tools-extra] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (PR #127394)

2025-02-16 Thread via cfe-commits
@@ -110,6 +110,10 @@ Changes in existing checks ` check by providing additional examples and fixing some macro related false positives. +- Improved :doc:`cppcoreguidelines-pro-bounds-pointer-arithmetic EugeneZelenko wrote: Please keep alphabetical order (

[clang] [flang] [lld] [llvm] [Flang] LLVM_ENABLE_RUNTIMES=flang-rt (PR #110217)

2025-02-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-windows` running on `linaro-armv8-windows-msvc-05` while building `flang-rt,flang,llvm,runtimes` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/141/builds/6341 Here is

[clang] 9f6b7b4 - [analyzer] StackAddrEscapeChecker: also check return for child stack frames (#126986)

2025-02-16 Thread via cfe-commits
Author: Michael Flanders Date: 2025-02-16T16:58:43+01:00 New Revision: 9f6b7b4e5f792bc5167a3bcfab400160cc1803ed URL: https://github.com/llvm/llvm-project/commit/9f6b7b4e5f792bc5167a3bcfab400160cc1803ed DIFF: https://github.com/llvm/llvm-project/commit/9f6b7b4e5f792bc5167a3bcfab400160cc1803ed.di

[clang] [analyzer] StackAddrEscapeChecker: also check return for child stack frames (PR #126986)

2025-02-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM, thanks for your patience! https://github.com/llvm/llvm-project/pull/126986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] StackAddrEscapeChecker: also check return for child stack frames (PR #126986)

2025-02-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/126986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

2025-02-16 Thread Balazs Benics via cfe-commits
steakhal wrote: Ping. I wonder if there is anything missing for this to be merged. @NagyDonat https://github.com/llvm/llvm-project/pull/123003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang][analyzer] Teach the BlockInCriticalSectionChecker about O_NONBLOCK streams (PR #127049)

2025-02-16 Thread Balazs Benics via cfe-commits
steakhal wrote: Can I merge this? @flovent @Xazax-hun https://github.com/llvm/llvm-project/pull/127049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-16 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/126302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-16 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/126302 >From 6b89c65eb61a7c2565b96caedd11eb2efff61021 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 7 Feb 2025 12:14:20 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] f75126e - [FreeBSD] Support -stdlib=libstdc++

2025-02-16 Thread via cfe-commits
Author: Alexander Richardson Date: 2025-02-16T12:32:51-08:00 New Revision: f75126eeabba13ce2aab53c2e4296fca12b9da0d URL: https://github.com/llvm/llvm-project/commit/f75126eeabba13ce2aab53c2e4296fca12b9da0d DIFF: https://github.com/llvm/llvm-project/commit/f75126eeabba13ce2aab53c2e4296fca12b9da0

[clang] [analyzer] Delay the checker constructions after parsing (PR #127409)

2025-02-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/127409 If we were to delay checker constructions after we have a filled ASTContext, then we could get rid of a bunch of "lazy initializers" in checkers. Turns out in the register functions of the checkers we could tr

[clang] [analyzer] Delay the checker constructions after parsing (PR #127409)

2025-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes If we were to delay checker constructions after we have a filled ASTContext, then we could get rid of a bunch of "lazy initializers" in checkers. Turns out in the register functions of th

[clang] [analyzer] Delay the checker constructions after parsing (PR #127409)

2025-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balazs Benics (steakhal) Changes If we were to delay checker constructions after we have a filled ASTContext, then we could get rid of a bunch of "lazy initializers" in checkers. Turns out in the register functions of the checkers we coul

[clang] [Serialization] Remove getMacroID (PR #127413)

2025-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Kazu Hirata (kazutakahirata) Changes The last use was removed in: commit ee977933f7df9cef13cc06ac7fa3e4a22b72e41f Author: Richard Smith Date: Fri May 1 21:22:17 2015 + --- Full diff: https

[clang] [Serialization] Remove getMacroID (PR #127413)

2025-02-16 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/127413 The last use was removed in: commit ee977933f7df9cef13cc06ac7fa3e4a22b72e41f Author: Richard Smith Date: Fri May 1 21:22:17 2015 + >From be8be105f8677ed0984b1fbe64149e7bb40d7601 Mon Sep 17

[clang] [Serialization] Remove getMacroID (PR #127413)

2025-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes The last use was removed in: commit ee977933f7df9cef13cc06ac7fa3e4a22b72e41f Author: Richard Smith Date: Fri May 1 21:22:17 2015 + --- Full diff: https://githu

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-16 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/120920 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-16 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/120920 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-16 Thread Alexander Richardson via cfe-commits
@@ -1,9 +1,13 @@ // RUN: %clangxx %s -### -o %t.o --target=amd64-unknown-freebsd -stdlib=platform 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s // RUN: %clangxx %s -### -o %t.o --target=amd64-unknown-freebsd10.0 -stdlib=platform 2>&1 \ -// RUN: | FileCheck --

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-16 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson closed https://github.com/llvm/llvm-project/pull/126302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-16 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/126302 >From 6b89c65eb61a7c2565b96caedd11eb2efff61021 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 7 Feb 2025 12:14:20 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-16 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/120920 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-16 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/120920 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] 01b7e65 - [FreeBSD] Fix comparison in f75126eeabba13ce2aab53c2e4296fca12b9da0d

2025-02-16 Thread Alex Richardson via cfe-commits
Author: Alex Richardson Date: 2025-02-16T13:45:50-08:00 New Revision: 01b7e65c9197d64531133c5890f076de6c1ae793 URL: https://github.com/llvm/llvm-project/commit/01b7e65c9197d64531133c5890f076de6c1ae793 DIFF: https://github.com/llvm/llvm-project/commit/01b7e65c9197d64531133c5890f076de6c1ae793.dif

<    1   2   3