User Details
- User Since
- Aug 28 2018, 2:16 AM (265 w, 6 d)
Aug 31 2023
closed by ac2d2652db8de9ea2b750dd2bf1232941039dffe
Addressed comments.
Rebased over AST changes.
Aug 25 2023
Jul 21 2023
Jul 18 2023
Apr 13 2023
Addressed comments.
Rebase
More refactorings.
Mar 22 2023
starting a line with an opening paren is pretty weird!)
I do not think this is weird. On the contrary, this is more readable to me and separates the requires clause from the parameters list. For example this one looks so much better:
// trunk. template <typename T> void func() { auto x = []<typename U> requires Foo<T> && Foo<T>(T t, U u) requires BarBar<U> && BarBar<U> || BarBar<U> { return u + t; }; }
// patch. template <typename T> void func() { auto x = []<typename U> requires Foo<T> && Foo<T> (T t, U u) requires BarBar<U> && BarBar<U> || BarBar<U> { return u + t; }; }
Mar 6 2023
This does not seem to be a pressing issue as there are no other reported module/cpp20 related crashes which were fixed by this.
Also since it has no tests, it should be fine to postpone it to the next release.
Mar 2 2023
Addressed comments.
Feb 21 2023
Feb 2 2023
Addressed comments.
Feb 1 2023
assert(getDefinition()) fails about 3.6k tests.
assert(!isa<CXXRecordDecl>(this) || getDefinition()); fails a handful 23 tests in ObjC:
Failed Tests (23): Clang :: Analysis/CFContainers.mm Clang :: Analysis/blocks.m Clang :: Analysis/dtor-array.cpp Clang :: Analysis/edges-new.mm Clang :: Analysis/incorrect-checker-names.mm Clang :: Analysis/malloc.mm Clang :: Analysis/mig.mm Clang :: Analysis/retain-release.m Clang :: Analysis/retain-release.mm Clang :: Analysis/stack-capture-leak-arc.mm Clang :: Analysis/stack-capture-leak-no-arc.mm Clang :: Analysis/taint-tester.cpp Clang :: CodeGenObjCXX/encode.mm Clang-Unit :: AST/./ASTTests/0/100 Clang-Unit :: AST/./ASTTests/1/100 Clang-Unit :: AST/./ASTTests/14/100 Clang-Unit :: AST/./ASTTests/16/100 Clang-Unit :: AST/./ASTTests/76/100 Clang-Unit :: AST/./ASTTests/77/100 Clang-Unit :: AST/./ASTTests/78/100 Clang-Unit :: AST/./ASTTests/79/100 Clang-Unit :: AST/./ASTTests/98/100 Clang-Unit :: AST/./ASTTests/99/100
bin/clang $SRC/llvm-project/clang/test/CodeGenObjCXX/encode.mm
Stacktrace: https://pastebin.pl/view/c6f505a7
Moved to RecordDecl::field_begin. Assertion is no more valid in RecordDecl.
Jan 31 2023
Use definition based field access only for CXXRecordDecl.
Avoid dynamic dispatch.
Moved the use of definition where fields are accessed.
This now resolves several other C++20/Module related crashes as well.
Jan 30 2023
Add message in the assertion.
Jan 24 2023
Use getDefinition
Jan 23 2023
Jan 16 2023
Jan 15 2023
Jan 13 2023
I have deleted the test in https://github.com/llvm/llvm-project/commit/a3b632ab8772237ae23638f702bdceda028b2016.
It is safe to delete as this is a brittle test trying to generate an invalid requirement using very deep template instantiation. I would find a better way to test this in another forward patch.
Jan 11 2023
Jan 10 2023
Remove new lines.
Addressed comments.
Jan 5 2023
Use ParsingDeclRAIIObject instead of ContextRAII.
Jan 4 2023
Return a valid RequriesExpr instead of a ExprError in case of depenedent diagnositcs.
We would also need to store the diagnositcs in the RequiresExpr for better diagnosis.
Added more tests. Still investigating libcxx failure and tests.
Moving the changes to https://reviews.llvm.org/D140547
Adding access check related changes from https://reviews.llvm.org/D140876
Jan 3 2023
More tests.
Dec 30 2022
Improved comment and added comment.
Perform access-dependent checks after transforming requires clause.
This is more generic and less invasive than the previous version which changed RebuildMemberExpr and also produced duplicate diagnostics.
Dec 22 2022
Dec 21 2022
Dec 19 2022
Removed use of SubstitutionDiagnostic from NestedRequirement.
Nov 29 2022
Remove unintended whitespaces and new lines.
Removed extraneous colons from diagnostic.
Addressed comments.
Added tests.
Fixed regressions in diagnositcs.
Second attempt along the lines of the last comment: https://reviews.llvm.org/D138914
PTAL.
Nov 13 2022
Addressed commented. Added Release notes.
Removed infrastructure changes and deferred them to a future patch.
Nov 11 2022
Moving closer to show diagnostic of entity for which SFNIAE occurred.
Nov 10 2022
Nov 9 2022
Oct 28 2022
Coincidentally 2 of the bugs were just fixed in b9a77b56d8. I do not completely agree with the approach there though. We should be fixing the root cause instead of circumventing the assert in InsertNode by insert-if-not-present. This is why we have 44304 and 50891 still persistent.
My suggestion would be to properly handle cycles in CheckConstraintSatisfaction. This problem goes beyond cycles introduced by conversion. See #53213, #44304 and #45736 https://godbolt.org/z/hzM6f3qnW. Most of the bugs are due to an assertion failure while inserting entry into SatisfactionCache.
Oct 27 2022
Not sure if this has come up already but this would still crash on
template <typename T> concept C = requires(T a) { foo(a); }; struct D1 { template <C TO> D1(TO); }; struct D2 { friend void foo(D1); };
Addressed comments. Added release notes.