https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/118013
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
> Can you also add a lit test for:
>
> ```c++
> std::vector getVector();
> std::set s;
> s.insert(getVector().begin(), getVector().end()); // FIXME: taking iterator
> of a temporary container without immediate dereference is almost always wrong.
> ```
I think this is a different
@@ -37,67 +37,56 @@ struct vector {
struct [[gsl::Pointer()]] View {};
std::vector views;
// CHECK: ClassTemplateSpecializationDecl {{.*}} struct vector definition
implicit_instantiation
-// CHECK: TemplateArgument type 'View'
-// CHECK-NOT: LifetimeCaptureByAttr
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/118013
>From feb9445efffa69c158407bda6f5981a033197567 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 28 Nov 2024 14:27:23 +0100
Subject: [PATCH 1/3] [clang] NFC, simplify the attr-lifetime-capture-by.test
---
cl
@@ -37,67 +37,56 @@ struct vector {
struct [[gsl::Pointer()]] View {};
std::vector views;
// CHECK: ClassTemplateSpecializationDecl {{.*}} struct vector definition
implicit_instantiation
-// CHECK: TemplateArgument type 'View'
-// CHECK-NOT: LifetimeCaptureByAttr
https://github.com/usx95 approved this pull request.
Can you also add a lit test for:
```cpp
std::vector getVector();
std::set s;
s.insert(getVector().begin(), getVector().end()); // FIXME: taking iterator of
a temporary container without immediate dereference is almost always wrong.
```
https:
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/118013
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Haojian Wu (hokein)
Changes
We incorrectly annotate the iterator parameter for `insert` method (`void
insert(const_iterator, const value_type& value)`), because iterator is also
a gsl-pointer type.
This patch fixes it.
---
Full diff: ht
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/118013
We incorrectly annotate the iterator parameter for `insert` method (`void
insert(const_iterator, const value_type& value)`), because iterator is also a
gsl-pointer type.
This patch fixes it.
>From feb9445efffa