Details
- Reviewers
dblaikie • Quuxplusone gandhi21299
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/test/SemaCXX/warn-range-loop-analysis.cpp | ||
---|---|---|
35 | I recommend adding ID1(ID1 const&) = default; here. My understanding is that C++20 has deprecated auto-generating a defaulted copy constructor for a class with a user-defined copy-assignment operator. See -Wdeprecated-copy. | |
477 | Isn't the point of https://bugs.llvm.org/show_bug.cgi?id=48011 that there should be no warning for for (ID1 x : C) {}? There is already no warning for the const& case tested here. |
update testcase take advise of reviewers.
fix conflict testcase fail, less warnning only for hasNonTrivialCopyConstructor .
I tried to implement a fix by using the hasCopyAssignmentWithConstParam() method (instead of hasNonTrivialCopyConstructor()), the test trivially-copyable.cc fails due to a missing warning.
What ever happened to this patch? @fanfuqiang, are you still around to rebase this? Do you need someone to commit it for you?
(Not that I'm saying I think it's perfect as is — I haven't looked and don't know the code that well — but just wondering what kept this from being landed a year ago.)
The bug it fixes is now https://github.com/llvm/llvm-project/issues/47355
I recommend adding ID1(ID1 const&) = default; here. My understanding is that C++20 has deprecated auto-generating a defaulted copy constructor for a class with a user-defined copy-assignment operator. See -Wdeprecated-copy.