Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaConcept.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction(
// parameters that the surrounding function hasn't been instantiated yet. Note
// this may happen while we're comparing two templates' constraint
// equivalence.
LocalInstantiationScope ScopeForParameters(S);
LocalInstantiationScope ScopeForParameters(S, /*CombineWithOuterScope=*/true);
if (auto *FD = DeclInfo.getDecl()->getAsFunction())
for (auto *PVD : FD->parameters()) {
if (!PVD->isParameterPack()) {
Expand Down
16 changes: 16 additions & 0 deletions clang/test/SemaTemplate/concepts-out-of-line-def.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,3 +622,19 @@ void A<T>::method(Ts&... ts)
} {}

}

namespace GH114685 {

template <typename T> struct ptr {
template <typename U>
friend ptr<U> make_item(auto &&args)
requires(sizeof(args) > 1);
};

template <typename U>
ptr<U> make_item(auto &&args)
requires(sizeof(args) > 1) {}

ptr<char> p;

} // namespace GH114685
Loading