[clang] [compiler-rt] [llvm] [TySan] User-friendly (C style) pointer type names for error reports (PR #166381)

2025-11-20 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 updated https://github.com/llvm/llvm-project/pull/166381 >From 4481075fce712a3f55493264c11fba6cd4015a4b Mon Sep 17 00:00:00 2001 From: BStott Date: Tue, 4 Nov 2025 15:04:29 + Subject: [PATCH 1/5] [TySan] User-friendly (C style) pointer type names for error report

[clang] [compiler-rt] [llvm] [TySan] User-friendly (C style) pointer type names for error reports (PR #166381)

2025-11-20 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 updated https://github.com/llvm/llvm-project/pull/166381 >From 4481075fce712a3f55493264c11fba6cd4015a4b Mon Sep 17 00:00:00 2001 From: BStott Date: Tue, 4 Nov 2025 15:04:29 + Subject: [PATCH 1/4] [TySan] User-friendly (C style) pointer type names for error report

[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)

2025-11-19 Thread Benjamin Stott via cfe-commits
BStott6 wrote: @efriedma-quic Should be ready to merge https://github.com/llvm/llvm-project/pull/166798 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)

2025-11-19 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 updated https://github.com/llvm/llvm-project/pull/166798 >From eab7dd02ab238c0029c2f0fc9a7f8f3ce1ab055c Mon Sep 17 00:00:00 2001 From: BStott Date: Thu, 6 Nov 2025 16:25:54 + Subject: [PATCH 1/8] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar t

[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)

2025-11-19 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 updated https://github.com/llvm/llvm-project/pull/166798 >From eab7dd02ab238c0029c2f0fc9a7f8f3ce1ab055c Mon Sep 17 00:00:00 2001 From: BStott Date: Thu, 6 Nov 2025 16:25:54 + Subject: [PATCH 1/7] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar t

[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)

2025-11-19 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 updated https://github.com/llvm/llvm-project/pull/166798 >From eab7dd02ab238c0029c2f0fc9a7f8f3ce1ab055c Mon Sep 17 00:00:00 2001 From: BStott Date: Thu, 6 Nov 2025 16:25:54 + Subject: [PATCH 1/7] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar t

[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)

2025-11-14 Thread Benjamin Stott via cfe-commits
@@ -0,0 +1,10 @@ +// Reduced from https://github.com/llvm/llvm-project/issues/166512 +// RUN: %clang_cc1 %s -emit-obj -std=c23 -fsanitize=bool -o %t BStott6 wrote: If we're not testing for the assertion failure, this test might not be needed as the code generati

[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)

2025-11-12 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 updated https://github.com/llvm/llvm-project/pull/166798 >From eab7dd02ab238c0029c2f0fc9a7f8f3ce1ab055c Mon Sep 17 00:00:00 2001 From: BStott Date: Thu, 6 Nov 2025 16:25:54 + Subject: [PATCH 1/6] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar t

[clang] [compiler-rt] [Clang][CodeGen] Add disable_sanitizer_instrumentation attribute to multiversion resolvers (PR #167516)

2025-11-12 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 updated https://github.com/llvm/llvm-project/pull/167516 >From d7f4973b3066649d47605f3d235d9f25f9d7e7ed Mon Sep 17 00:00:00 2001 From: BStott Date: Tue, 11 Nov 2025 14:51:02 + Subject: [PATCH 1/4] [Clang] Add disable_sanitizer_instrumentation attribute to multive

[clang] [compiler-rt] [Clang][CodeGen] Add disable_sanitizer_instrumentation attribute to multiversion resolvers (PR #167516)

2025-11-11 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 created https://github.com/llvm/llvm-project/pull/167516 - Fixes https://github.com/llvm/llvm-project/issues/163369 - Segmentation fault occurred because resolver was calling TSan instrumentation functions (__tsan_func_entry, __tsan_func_exit) but as the resolver is r

[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)

2025-11-10 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 updated https://github.com/llvm/llvm-project/pull/166798 >From eab7dd02ab238c0029c2f0fc9a7f8f3ce1ab055c Mon Sep 17 00:00:00 2001 From: BStott Date: Thu, 6 Nov 2025 16:25:54 + Subject: [PATCH 1/3] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar t

[clang] [Clang] Warn when `std::atomic_thread_fence` is used with `fsanitize=thread` (PR #166542)

2025-11-07 Thread Benjamin Stott via cfe-commits
BStott6 wrote: I wasn't sure how I should write the test for the name mangling for the ignore list lookup since it is platform dependent. Should I make two tests that use REQUIRES and include mangled symbols for that platform? I have verified locally that it works, just not sure how best to fo

[clang] [Clang] Warn when `std::atomic_thread_fence` is used with `fsanitize=thread` (PR #166542)

2025-11-07 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 updated https://github.com/llvm/llvm-project/pull/166542 >From 8b4ff4f264b471e77da96b8161829a9208a316bb Mon Sep 17 00:00:00 2001 From: BStott Date: Wed, 5 Nov 2025 12:08:56 + Subject: [PATCH 1/4] [Clang] Warn when `std::atomic_thread_fence` is used with `fsanitiz

[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)

2025-11-07 Thread Benjamin Stott via cfe-commits
@@ -1283,7 +1283,7 @@ EmitCompoundAssignLValue(const CompoundAssignOperator *E, else OpInfo.LHS = EmitComplexToComplexCast(LHSVal, LHSTy, OpInfo.Ty, Loc); } else { -llvm::Value *LHSVal = CGF.EmitLoadOfScalar(LHS, Loc); +llvm::Value *LHSVal = CGF.EmitLoadOfLV

[clang] [Clang] Warn when `std::atomic_thread_fence` is used with `fsanitize=thread` (PR #166542)

2025-11-07 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 edited https://github.com/llvm/llvm-project/pull/166542 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Warn when `std::atomic_thread_fence` is used with `fsanitize=thread` (PR #166542)

2025-11-07 Thread Benjamin Stott via cfe-commits
@@ -0,0 +1,44 @@ +// No warnings in regular compile +// RUN: %clang_cc1 -verify=no-tsan %s + +// Emits warning with `-fsanitize=thread` +// RUN: %clang_cc1 -verify=with-tsan -fsanitize=thread %s + +// No warnings if `-Wno-tsan` is passed +// RUN: %clang_cc1 -verify=no-tsan -fsanit

[clang] [Clang] Warn when `std::atomic_thread_fence` is used with `fsanitize=thread` (PR #166542)

2025-11-07 Thread Benjamin Stott via cfe-commits
@@ -9822,6 +9824,50 @@ void Sema::CheckMaxUnsignedZero(const CallExpr *Call, << FixItHint::CreateRemoval(RemovalRange); } +//===--- CHECK: Warn on use of `std::atomic_thread_fence` with TSan. --===// +void Sema::CheckUseOfAtomicThreadFenceWithTSan(const CallExpr *

[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)

2025-11-07 Thread Benjamin Stott via cfe-commits
@@ -1283,7 +1283,7 @@ EmitCompoundAssignLValue(const CompoundAssignOperator *E, else OpInfo.LHS = EmitComplexToComplexCast(LHSVal, LHSTy, OpInfo.Ty, Loc); } else { -llvm::Value *LHSVal = CGF.EmitLoadOfScalar(LHS, Loc); +llvm::Value *LHSVal = CGF.EmitLoadOfLV

[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)

2025-11-06 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 created https://github.com/llvm/llvm-project/pull/166798 - Fixes https://github.com/llvm/llvm-project/issues/166512 - `ComplexExprEmitter::EmitCompoundAssignLValue` is calling `EmitLoadOfScalar(LValue, SourceLocation)` to load the LHS value in the case that it's non-

[clang] [compiler-rt] [llvm] [TySan] User-friendly (C style) pointer type names for error reports (PR #166381)

2025-11-06 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 updated https://github.com/llvm/llvm-project/pull/166381 >From 4481075fce712a3f55493264c11fba6cd4015a4b Mon Sep 17 00:00:00 2001 From: BStott Date: Tue, 4 Nov 2025 15:04:29 + Subject: [PATCH 1/3] [TySan] User-friendly (C style) pointer type names for error report

[clang] [Clang] Warn when `std::atomic_thread_fence` is used with `fsanitize=thread` (PR #166542)

2025-11-06 Thread Benjamin Stott via cfe-commits
BStott6 wrote: Thanks for the feedback, I have implemented your suggestions In upgrading the test I found I had made a mistake in how I was handling the calling function being in the ignorelist and also had forgot to handle the no-sanitize attributes, I have implemented this and made sure the t

[clang] [Clang] Warn when `std::atomic_thread_fence` is used with `fsanitize=thread` (PR #166542)

2025-11-06 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 updated https://github.com/llvm/llvm-project/pull/166542 >From 8b4ff4f264b471e77da96b8161829a9208a316bb Mon Sep 17 00:00:00 2001 From: BStott Date: Wed, 5 Nov 2025 12:08:56 + Subject: [PATCH 1/2] [Clang] Warn when `std::atomic_thread_fence` is used with `fsanitiz

[clang] [Clang] Warn when `std::atomic_thread_fence` is used with `fsanitize=thread` (PR #166542)

2025-11-05 Thread Benjamin Stott via cfe-commits
https://github.com/BStott6 edited https://github.com/llvm/llvm-project/pull/166542 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Warn when `std::atomic_thread_fence` is used with `fsanitize=thread` (PR #166542)

2025-11-05 Thread Benjamin Stott via cfe-commits
@@ -1769,3 +1769,5 @@ def ExplicitSpecializationStorageClass : DiagGroup<"explicit-specialization-stor // A warning for options that enable a feature that is not yet complete def ExperimentalOption : DiagGroup<"experimental-option">; + +def TSan : DiagGroup<"tsan">; -