Skip to content

Commit

Permalink
[NFC] Add tests from my fix for GH62362.
Browse files Browse the repository at this point in the history
This ended up being fixed separately by @rsmith in 1e43349 in a
better/correct way. This patch adds the tests from the original, as
though they are reasonably covered in his patch, explicit versions seem
to have value here.

Additionally, this adds a release note for 1e43349.
  • Loading branch information
Erich Keane committed Apr 27, 2023
1 parent fa0014a commit f539b6f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ Bug Fixes in This Version
(`#62122 <https://github.com/llvm/llvm-project/issues/62122>`_)
- Fix crash when handling undefined template partial specialization
(`#61356 <https://github.com/llvm/llvm-project/issues/61356>`_)
- Fix a crash caused by incorrectly evaluating constraints on an inheriting
constructor declaration.
(`#62361 <https://github.com/llvm/llvm-project/issues/62361>`_)
(`#62362 <https://github.com/llvm/llvm-project/issues/62362>`_)

Bug Fixes to Compiler Builtins
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
22 changes: 22 additions & 0 deletions clang/test/SemaTemplate/concepts-inherited-ctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,25 @@ namespace no_early_substitution {
C();
}
}

namespace GH62362 {
template<typename T>
concept C = true;
template <typename T> struct Test {
Test()
requires(C<T>);
};
struct Bar : public Test<int> {
using Test<int>::Test;
};
template <>
struct Test<void> : public Test<int> {
using Test<int>::Test;
};

void foo() {
Bar();
Test<void>();
}
}
}

0 comments on commit f539b6f

Please sign in to comment.