[clang] [-Wunsafe-buffer-usage] Fix bug in unsafe casts to incomplete types (PR #116433)

2024-11-18 Thread Dana Jansens via cfe-commits
https://github.com/danakj approved this pull request. https://github.com/llvm/llvm-project/pull/116433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fix bug in unsafe casts to incomplete types (PR #116433)

2024-11-18 Thread Dana Jansens via cfe-commits
@@ -2270,19 +2270,28 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { MsgParam = 5; } else if (const auto *ECE = dyn_cast(Operation)) { QualType destType = ECE->getType(); +bool destTypeComplete = true; + if (!isa(de

[clang] Don't redundantly specify the default template argument to `BumpPtrAllocatorImpl` (PR #114857)

2024-11-04 Thread Dana Jansens via cfe-commits
https://github.com/danakj approved this pull request. https://github.com/llvm/llvm-project/pull/114857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-30 Thread Dana Jansens via cfe-commits
@@ -3912,3 +3896,56 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-29 Thread Dana Jansens via cfe-commits
danakj wrote: The suggested fixes were applied, thanks for them. It was a bit of work to page all this back in after a while. https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-29 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 9c0a0ca3f0bcf4910592dca2b7b9d7d9b83f6cee Mon Sep 17 00:00:00 2001 From: danakj Date: Mon, 13 May 2024 12:11:41 -0400 Subject: [PATCH 1/5] Generate -Wunsafe-buffer-usage warnings in ctor and field initialize

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-29 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-29 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 9c0a0ca3f0bcf4910592dca2b7b9d7d9b83f6cee Mon Sep 17 00:00:00 2001 From: danakj Date: Mon, 13 May 2024 12:11:41 -0400 Subject: [PATCH 1/5] Generate -Wunsafe-buffer-usage warnings in ctor and field initialize

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-29 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 9c0a0ca3f0bcf4910592dca2b7b9d7d9b83f6cee Mon Sep 17 00:00:00 2001 From: danakj Date: Mon, 13 May 2024 12:11:41 -0400 Subject: [PATCH 1/4] Generate -Wunsafe-buffer-usage warnings in ctor and field initialize

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-22 Thread Dana Jansens via cfe-commits
danakj wrote: Sorry I just haven't gotten back to making the fixes yet. If someone else wants to apply them and land it I won't be upset, otherwise I will get to this eventually.. https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailin

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-07-02 Thread Dana Jansens via cfe-commits
danakj wrote: `#include` and `#define` at a minimum should break the connection. Comments above a `#define` can be attributed to the macro defined there, which is something that Subdoc does (example result: https://suslib.cc/macro.sus_check.html) https://github.com/llvm/llvm-project/pull/8836

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-11 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 273f93fa4aecc0017b5c7172bc296ced1bc6d5f5 Mon Sep 17 00:00:00 2001 From: danakj Date: Mon, 13 May 2024 12:11:41 -0400 Subject: [PATCH 1/4] Generate -Wunsafe-buffer-usage warnings in ctor and field initialize

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-11 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 273f93fa4aecc0017b5c7172bc296ced1bc6d5f5 Mon Sep 17 00:00:00 2001 From: danakj Date: Mon, 13 May 2024 12:11:41 -0400 Subject: [PATCH 1/4] Generate -Wunsafe-buffer-usage warnings in ctor and field initialize

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-10 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-10 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-10 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-10 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 273f93fa4aecc0017b5c7172bc296ced1bc6d5f5 Mon Sep 17 00:00:00 2001 From: danakj Date: Mon, 13 May 2024 12:11:41 -0400 Subject: [PATCH 1/3] Generate -Wunsafe-buffer-usage warnings in ctor and field initialize

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-10 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-10 Thread Dana Jansens via cfe-commits
https://github.com/danakj edited https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-10 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-10 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-07 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-06 Thread Dana Jansens via cfe-commits
danakj wrote: bump for review? https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 273f93fa4aecc0017b5c7172bc296ced1bc6d5f5 Mon Sep 17 00:00:00 2001 From: danakj Date: Mon, 13 May 2024 12:11:41 -0400 Subject: [PATCH 1/2] Generate -Wunsafe-buffer-usage warnings in ctor and field initialize

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 273f93fa4aecc0017b5c7172bc296ced1bc6d5f5 Mon Sep 17 00:00:00 2001 From: danakj Date: Mon, 13 May 2024 12:11:41 -0400 Subject: [PATCH 1/2] Generate -Wunsafe-buffer-usage warnings in ctor and field initialize

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
danakj wrote: I have rebased (which dropped the previous PR's commits) and applied the requested changes in a second commit. I also fixed the test failures in that second commit. https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 273f93fa4aecc0017b5c7172bc296ced1bc6d5f5 Mon Sep 17 00:00:00 2001 From: danakj Date: Mon, 13 May 2024 12:11:41 -0400 Subject: [PATCH 1/2] Generate -Wunsafe-buffer-usage warnings in ctor and field initialize

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
https://github.com/danakj edited https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
https://github.com/danakj edited https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
https://github.com/danakj edited https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-31 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] [Clang] [NFC] Clarify assume diagnostic (PR #93077)

2024-05-27 Thread Dana Jansens via cfe-commits
danakj wrote: Thanks, this is very good https://github.com/llvm/llvm-project/pull/93077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-16 Thread Dana Jansens via cfe-commits
https://github.com/danakj closed https://github.com/llvm/llvm-project/pull/91777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-05-15 Thread Dana Jansens via cfe-commits
danakj wrote: Thanks for the explanation :) https://github.com/llvm/llvm-project/pull/92031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-15 Thread Dana Jansens via cfe-commits
@@ -1315,9 +1374,9 @@ class DerefSimplePtrArithFixableGadget : public FixableGadget { virtual std::optional getFixits(const FixitStrategy &s) const final; - - // TODO remove this method from FixableGadget interface danakj wrote: Also it's slightly diffe

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-15 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91777 >From 8b318dadac6d0ec53b5d26461edfe19a391845ec Mon Sep 17 00:00:00 2001 From: danakj Date: Fri, 10 May 2024 13:31:17 -0400 Subject: [PATCH 1/4] Respect the [[clang::unsafe_buffer_usage]] attribute for constructor

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-15 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91777 >From 8b318dadac6d0ec53b5d26461edfe19a391845ec Mon Sep 17 00:00:00 2001 From: danakj Date: Fri, 10 May 2024 13:31:17 -0400 Subject: [PATCH 1/4] Respect the [[clang::unsafe_buffer_usage]] attribute for constructor

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-15 Thread Dana Jansens via cfe-commits
@@ -2856,7 +2916,7 @@ getFixIts(FixableGadgetSets &FixablesForAllVars, const FixitStrategy &S, } #ifndef NDEBUG Handler.addDebugNoteForVar( - VD, F->getBaseStmt()->getBeginLoc(), + VD, F->getSourceLoc(), danakj wrote: I will leav

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-15 Thread Dana Jansens via cfe-commits
@@ -1315,9 +1374,9 @@ class DerefSimplePtrArithFixableGadget : public FixableGadget { virtual std::optional getFixits(const FixitStrategy &s) const final; - - // TODO remove this method from FixableGadget interface danakj wrote: This one used to return

[clang] [WIP][Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-05-15 Thread Dana Jansens via cfe-commits
danakj wrote: I am curious so I will ask: why did this take an approach of serializing the output of the pragmas (the maps) instead of serializing the pragmas themselves as AST nodes, so that the maps would be constructed in the same way as from parsing the text directly? that's how other prag

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-14 Thread Dana Jansens via cfe-commits
@@ -921,10 +937,55 @@ class UnsafeBufferUsageAttrGadget : public WarningGadget { } static Matcher matcher() { -return stmt(callExpr(callee(functionDecl(hasAttr(attr::UnsafeBufferUsage -.bind(OpTag)); +auto HasUnsafeFnDecl = +callee(

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-14 Thread Dana Jansens via cfe-commits
@@ -2856,7 +2916,7 @@ getFixIts(FixableGadgetSets &FixablesForAllVars, const FixitStrategy &S, } #ifndef NDEBUG Handler.addDebugNoteForVar( - VD, F->getBaseStmt()->getBeginLoc(), + VD, F->getSourceLoc(), danakj wrote: Yeah, this

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-14 Thread Dana Jansens via cfe-commits
@@ -2295,6 +2292,23 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { } } + void handleUnsafeOperationInContainer(const Stmt *Operation, +bool IsRelatedToDecl, +ASTCont

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-14 Thread Dana Jansens via cfe-commits
danakj wrote: > > https://github.com/llvm/llvm-project/blob/2ff43ce87e66d9324370e35ea6743ef57400c76e/clang/lib/Analysis/UnsafeBufferUsage.cpp#L1373-L1374 > > > > These assert that exactly one gadget matched. I think it's kinda worthwhile > > keeping the warnings independent too, so I don't see

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-14 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91777 >From 8b318dadac6d0ec53b5d26461edfe19a391845ec Mon Sep 17 00:00:00 2001 From: danakj Date: Fri, 10 May 2024 13:31:17 -0400 Subject: [PATCH 1/3] Respect the [[clang::unsafe_buffer_usage]] attribute for constructor

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-14 Thread Dana Jansens via cfe-commits
danakj wrote: These lit test failures are indeed from this PR's last commit, I will dig into why and correct what's wrong. https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-14 Thread Dana Jansens via cfe-commits
danakj wrote: > Hi! Thank you for digging into this! Sorry for the delay. > > > The new UnsafeBufferUsageCtorAttrGadget gadget explicitly avoids matching > > against the std::span(ptr, size) constructor because that is handled by > > SpanTwoParamConstructorGadget and we never want two gadgets

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-13 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 8b318dadac6d0ec53b5d26461edfe19a391845ec Mon Sep 17 00:00:00 2001 From: danakj Date: Fri, 10 May 2024 13:31:17 -0400 Subject: [PATCH 1/3] Respect the [[clang::unsafe_buffer_usage]] attribute for constructor

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-13 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 8b318dadac6d0ec53b5d26461edfe19a391845ec Mon Sep 17 00:00:00 2001 From: danakj Date: Fri, 10 May 2024 13:31:17 -0400 Subject: [PATCH 1/3] Respect the [[clang::unsafe_buffer_usage]] attribute for constructor

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-13 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 8b318dadac6d0ec53b5d26461edfe19a391845ec Mon Sep 17 00:00:00 2001 From: danakj Date: Fri, 10 May 2024 13:31:17 -0400 Subject: [PATCH 1/3] Respect the [[clang::unsafe_buffer_usage]] attribute for constructor

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-13 Thread Dana Jansens via cfe-commits
https://github.com/danakj edited https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-13 Thread Dana Jansens via cfe-commits
https://github.com/danakj edited https://github.com/llvm/llvm-project/pull/91777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-05-13 Thread Dana Jansens via cfe-commits
https://github.com/danakj created https://github.com/llvm/llvm-project/pull/91991 This is built on top of https://github.com/llvm/llvm-project/pull/91777, and includes the commits there for now. >From 8b318dadac6d0ec53b5d26461edfe19a391845ec Mon Sep 17 00:00:00 2001 From: danakj Date: Fri, 10

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-10 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91777 >From 8b318dadac6d0ec53b5d26461edfe19a391845ec Mon Sep 17 00:00:00 2001 From: danakj Date: Fri, 10 May 2024 13:31:17 -0400 Subject: [PATCH 1/2] Respect the [[clang::unsafe_buffer_usage]] attribute for constructor

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-10 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91777 >From 8b318dadac6d0ec53b5d26461edfe19a391845ec Mon Sep 17 00:00:00 2001 From: danakj Date: Fri, 10 May 2024 13:31:17 -0400 Subject: [PATCH] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors T

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-10 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91777 >From 1c835f4cc77823360762b8e53e2bbfe027c977cf Mon Sep 17 00:00:00 2001 From: danakj Date: Fri, 10 May 2024 13:31:17 -0400 Subject: [PATCH] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors T

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-10 Thread Dana Jansens via cfe-commits
danakj wrote: cc: @haoNoQ https://github.com/llvm/llvm-project/pull/91777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for constructors (PR #91777)

2024-05-10 Thread Dana Jansens via cfe-commits
https://github.com/danakj created https://github.com/llvm/llvm-project/pull/91777 The -Wunsafe-buffer-usage warning should fire on any call to a function annotated with [[clang::unsafe_buffer_usage]], however it omitted calls to constructors, since the expression is a CXXConstructExpr which do

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-03-22 Thread Dana Jansens via cfe-commits
danakj wrote: The subspace library also provides mechanisms [for querying](https://suslib.cc/sus-mem-TriviallyRelocatable.html) and marking types trivially relocatable, and relies on the compiler's `__is_trivially_relocatable` as a signal as well. It then optimizes containers and operations i

[clang] [clang] Prioritze decl comments from macro expansion site (PR #65481)

2023-12-21 Thread Dana Jansens via cfe-commits
danakj wrote: oh hey, just stumbled on this, thanks for improving it! https://github.com/llvm/llvm-project/pull/65481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make -frewrite-includes put an endif at the end of the included text (PR #67613)

2023-10-01 Thread Dana Jansens via cfe-commits
danakj wrote: I was just lamenting the lack of this feature this week. Thank you, I can’t wait to use it. https://github.com/llvm/llvm-project/pull/67613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l