[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-27 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/116719 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Nov 2024 15:41:48 -0800 Subject: [PATCH 1/9] [Clang] Improve Sema diagnostic performance for __builtin

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-27 Thread Bill Wendling via lldb-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/116719 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-27 Thread Bill Wendling via lldb-commits
bwendling wrote: Fine. https://github.com/llvm/llvm-project/pull/116719 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-26 Thread Bill Wendling via lldb-commits
@@ -14690,6 +14690,13 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) { } } + // The result of __builtin_counted_by_ref cannot be assigned to a variable. + // It allows leaking and modification of bounds safety information. + if (IsBuiltinCountedByRef(VD->getInit())

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-25 Thread Bill Wendling via lldb-commits
bwendling wrote: Ah, okay. Thanks. https://github.com/llvm/llvm-project/pull/116719 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-25 Thread Bill Wendling via lldb-commits
bwendling wrote: Yeah, but I'd like to get this off my plate. :-) https://github.com/llvm/llvm-project/pull/116719 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-25 Thread Bill Wendling via lldb-commits
bwendling wrote: I image @AaronBallman is on vacation this week. @Sirraide would you be willing to LGTM this so that I can move it along? It's certainly better than what we have and I can address any concerns Aaron has afterwards. https://github.com/llvm/llvm-project/pull/116719 __

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-21 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/116719 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Nov 2024 15:41:48 -0800 Subject: [PATCH 1/8] [Clang] Improve Sema diagnostic performance for __builtin

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-21 Thread Bill Wendling via lldb-commits
bwendling wrote: > I think this might honestly be fine the way it is now Yeah. It's going kind of the opposite way from what you suggested with the placeholder, just instead of allowing for different uses at various places in Sema we disallow without using the placeholder. https://github.com/

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-21 Thread Bill Wendling via lldb-commits
@@ -14690,6 +14690,14 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) { } } + // The result of __builtin_counted_by_ref cannot be assigned to a variable. + // It allows leaking and modification of bounds safety information. + if (const auto *CE = dyn_cast_if_present

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-20 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/116719 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Nov 2024 15:41:48 -0800 Subject: [PATCH 1/5] [Clang] Improve Sema diagnostic performance for __builtin

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-20 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/116719 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Nov 2024 15:41:48 -0800 Subject: [PATCH 1/7] [Clang] Improve Sema diagnostic performance for __builtin

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-20 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/116719 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Nov 2024 15:41:48 -0800 Subject: [PATCH 1/6] [Clang] Improve Sema diagnostic performance for __builtin

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-20 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/116719 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Nov 2024 15:41:48 -0800 Subject: [PATCH 1/4] [Clang] Improve Sema diagnostic performance for __builtin

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-20 Thread Bill Wendling via lldb-commits
bwendling wrote: > > Could you point to a place in the code where it creates a placeholder? > > I mean, e.g. `CheckPointerToMemberOperands()` can return `BoundMemberTy` as > the type of a `.*` expression, and `CreateBuiltinMatrixSubscriptExpr()` > creates a `MatrixSubscriptExpr` with type `Inc

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-20 Thread Bill Wendling via lldb-commits
bwendling wrote: > The main thing I’m concerned about here is that I feel like there ought to be > a better way of doing this than checking for and disallowing it in every > place where we can have a subexpression in C. Yeah, but we don't have such a method, partially due to the languages Clan

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-20 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/116719 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Nov 2024 15:41:48 -0800 Subject: [PATCH 1/2] [Clang] Improve Sema diagnostic performance for __builtin

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/116719 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Nov 2024 15:41:48 -0800 Subject: [PATCH 1/3] [Clang] Improve Sema diagnostic performance for __builtin

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread Bill Wendling via lldb-commits
bwendling wrote: I removed the Placeholder code. It's a much smaller patch and has the better timing profile. PTAL. https://github.com/llvm/llvm-project/pull/116719 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread Bill Wendling via lldb-commits
@@ -14690,6 +14690,17 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) { } } + // The result of __builtin_counted_by_ref cannot be assigned to a variable. + // It allows leaking and modification of bounds safety information. + if (const auto *CE = dyn_cast_if_present

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread Bill Wendling via lldb-commits
@@ -755,6 +755,7 @@ static ExprResult BuiltinDumpStruct(Sema &S, CallExpr *TheCall) { case BuiltinType::PseudoObject: case BuiltinType::UnknownAny: case BuiltinType::BuiltinFn: +case BuiltinType::BuiltinCountedByRef: bwendling wrote: Then shou

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread Bill Wendling via lldb-commits
bwendling wrote: > Hmm, I don’t think this is the right way of going about it—copy-pasting the > check across 6 or so different places seems like it’s missing the point of > using a placeholder in the first place. Could you point to a place in the code where it creates a placeholder? I'm unab

[Lldb-commits] [clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-18 Thread Bill Wendling via lldb-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/116719 Implement the sema checks with a placeholder. We then check for that placeholder in all of the places we care to emit a diagnostic. Fixes: #115520 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 0

[Lldb-commits] [clang] [lldb] [NFC][Clang] Improve const correctness for IdentifierInfo (PR #79365)

2024-04-10 Thread Bill Wendling via lldb-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/79365 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [clang] [NFC][Clang] Improve const correctness for IdentifierInfo (PR #79365)

2024-01-24 Thread Bill Wendling via lldb-commits
bwendling wrote: > I'd like to wait a few weeks before we land it, I'm afraid these changes > (which do contain some small white spaces-only changes too) might disrupt the > release process as lot of cherry-picking between main and the llvm18 branch > are happening and we should minimize the o

[Lldb-commits] [libc] [llvm] [mlir] [clang] [lldb] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-07 Thread Bill Wendling via lldb-commits
bwendling wrote: Actually, that fix was making all of the other builds fail: ``` /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/include/llvm/Analysis/MemoryBuiltins.h:279:47: error: specialization of ‘llvm::SizeOffsetType’ after instantiation 279 | template friend class SizeOffsetType; |

[Lldb-commits] [clang] [lldb] [mlir] [llvm] [libc] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-07 Thread Bill Wendling via lldb-commits
bwendling wrote: > Hi @bwendling, your change to MemoryBuiltins.h is hitting an error in the > version of Visual Studio 2019 that we use internally to build: > > ``` > C:\j\w\779ddbee\p\llvm\include\llvm/Analysis/MemoryBuiltins.h(217): error > C2990: 'llvm::SizeOffsetType': non-class template

[Lldb-commits] [lldb] [llvm] [libc] [mlir] [clang] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-05 Thread Bill Wendling via lldb-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/76882 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [libc] [mlir] [clang] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-05 Thread Bill Wendling via lldb-commits
@@ -187,80 +187,132 @@ Value *lowerObjectSizeCall( const TargetLibraryInfo *TLI, AAResults *AA, bool MustSucceed, SmallVectorImpl *InsertedInstructions = nullptr); -using SizeOffsetType = std::pair; +/// SizeOffsetType - A base template class for the object size visito

[Lldb-commits] [lldb] [llvm] [libc] [mlir] [clang] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-05 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/76882 >From ca7a96a40952fe94b916dacc52f07aa90bbdb1e7 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 3 Jan 2024 13:22:37 -0800 Subject: [PATCH 1/9] [builtin_object_size] Use classes instead of std::pair (NFC

[Lldb-commits] [lldb] [llvm] [mlir] [libc] [clang] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-04 Thread Bill Wendling via lldb-commits
@@ -187,80 +187,124 @@ Value *lowerObjectSizeCall( const TargetLibraryInfo *TLI, AAResults *AA, bool MustSucceed, SmallVectorImpl *InsertedInstructions = nullptr); -using SizeOffsetType = std::pair; +/// SizeOffsetType - A base template class for the object size visito

[Lldb-commits] [lldb] [llvm] [mlir] [libc] [clang] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-04 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/76882 >From ca7a96a40952fe94b916dacc52f07aa90bbdb1e7 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 3 Jan 2024 13:22:37 -0800 Subject: [PATCH 1/7] [builtin_object_size] Use classes instead of std::pair (NFC

[Lldb-commits] [lldb] [libc] [clang] [llvm] [mlir] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-04 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/76882 >From ca7a96a40952fe94b916dacc52f07aa90bbdb1e7 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 3 Jan 2024 13:22:37 -0800 Subject: [PATCH 1/6] [builtin_object_size] Use classes instead of std::pair (NFC

[Lldb-commits] [lldb] [clang] [llvm] [mlir] [libc] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-04 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/76882 >From ca7a96a40952fe94b916dacc52f07aa90bbdb1e7 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 3 Jan 2024 13:22:37 -0800 Subject: [PATCH 1/5] [builtin_object_size] Use classes instead of std::pair (NFC

[Lldb-commits] [mlir] [libc] [llvm] [clang] [lldb] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-03 Thread Bill Wendling via lldb-commits
bwendling wrote: @jdoerfert I reworked the structs to use inheritance instead of template specialization. It should work better now and not duplicate so much. https://github.com/llvm/llvm-project/pull/76882 ___ lldb-commits mailing list lldb-commits@l

[Lldb-commits] [llvm] [libc] [mlir] [clang] [lldb] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-03 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/76882 >From ca7a96a40952fe94b916dacc52f07aa90bbdb1e7 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 3 Jan 2024 13:22:37 -0800 Subject: [PATCH 1/4] [builtin_object_size] Use classes instead of std::pair (NFC

[Lldb-commits] [libc] [clang] [lldb] [llvm] [mlir] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-03 Thread Bill Wendling via lldb-commits
bwendling wrote: > I am unsure I understand why we do the base template rather than inheritance. > Where is the base template used? If we do inheritance we could avoid > duplicating of members and provide default impls that work with many things, > e.g., all operator== are the same. I made th

[Lldb-commits] [libc] [clang] [lldb] [llvm] [mlir] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-03 Thread Bill Wendling via lldb-commits
https://github.com/bwendling edited https://github.com/llvm/llvm-project/pull/76882 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [libc] [clang] [lldb] [llvm] [mlir] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-03 Thread Bill Wendling via lldb-commits
@@ -187,80 +187,147 @@ Value *lowerObjectSizeCall( const TargetLibraryInfo *TLI, AAResults *AA, bool MustSucceed, SmallVectorImpl *InsertedInstructions = nullptr); -using SizeOffsetType = std::pair; +/// SizeOffsetType - A base template class for the object size visito

[Lldb-commits] [llvm] [libc] [lldb] [mlir] [clang] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-03 Thread Bill Wendling via lldb-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/76882 >From ca7a96a40952fe94b916dacc52f07aa90bbdb1e7 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 3 Jan 2024 13:22:37 -0800 Subject: [PATCH 1/3] [builtin_object_size] Use classes instead of std::pair (NFC

[Lldb-commits] [lldb] r347418 - Update call to EvaluateAsInt() to the new syntax.

2018-11-21 Thread Bill Wendling via lldb-commits
Author: void Date: Wed Nov 21 12:44:38 2018 New Revision: 347418 URL: http://llvm.org/viewvc/llvm-project?rev=347418&view=rev Log: Update call to EvaluateAsInt() to the new syntax. Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp U

[Lldb-commits] [lldb] r347365 - Update call to EvaluateAsInt() to the new syntax.

2018-11-20 Thread Bill Wendling via lldb-commits
Author: void Date: Tue Nov 20 15:24:18 2018 New Revision: 347365 URL: http://llvm.org/viewvc/llvm-project?rev=347365&view=rev Log: Update call to EvaluateAsInt() to the new syntax. Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp U