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
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
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
@@ -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())
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
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
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
__
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
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/
@@ -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
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
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
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
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
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
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
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
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
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
@@ -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
@@ -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
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
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
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
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
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;
|
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
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
@@ -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
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
@@ -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
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
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
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
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
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
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
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
@@ -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
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
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
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
42 matches
Mail list logo