Details
- Reviewers
rsmith
Diff Detail
Event Timeline
lib/Sema/SemaTemplate.cpp | ||
---|---|---|
6228–6229 | It would probably be more concise to do: for (ClassTemplateSpecializationDecl &S : ClassTemplate.specializations()) |
In case const auto * deduced type has different meaning (pointer to constant), so it doesn’t compile.
some notes have been applied;
some tests have been added.
feel free to suggest some new test cases.
../llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
3395 ↗ | (On Diff #14872) | Please use partial_spec or partial_specialization rather than part_specialization, like other diagnostics do. |
../llvm/tools/clang/lib/Sema/SemaTemplate.cpp | ||
6225 ↗ | (On Diff #14872) | We don't need these checks for a redeclaration: if (isPartialSpecialization && !PrevDecl) { |
6227 ↗ | (On Diff #14872) | Use cast, not static_cast, here. (It'll assert if the type doesn't match.) |
6232 ↗ | (On Diff #14872) | Hmm, what happens if we get an error outside of the immediate context during this deduction? Are we allowed to reject the program for that reason? For instance: template<typename T> struct X { typedef typename T::type type; }; template<typename T, typename U> struct A {}; A<int, int> Aint; template<typename T> struct A<T, typename X<T>::type> {}; Do we provide a sufficiently useful template instantiation backtrace in this case? |
const auto *