[cfe-commits] A regression on parsing of partial specializations?

Enea Zaffanella zaffanella at cs.unipr.it
Wed Jan 5 14:05:16 PST 2011


After upgrading clang to r122900, the following program (from gcc
testsuite) is no longer parsed by clang:

struct B { int i; };

template <class _T, class _M, _M _T::* _V> struct A;

template <class _T, int _T::* _V>
struct A<_T, int, _V> {};

int main() {
  A<B, int, & B::i> a;
}


llvm/Debug+Asserts/bin/clang -cc1 -fsyntax-only bug.cc
clang: SemaTemplate.cpp:3549: clang::ExprResult
clang::Sema::BuildExpressionFromDeclTemplateArgument(const
clang::TemplateArgument&, clang::QualType, clang::SourceLocation):
Assertion `!RefExpr.isInvalid() && Context.hasSameType(((Expr*)
RefExpr.get())->getType(), ParamType.getUnqualifiedType())' failed.


The same test was parsed correctly with r122395.

Regards,
Enea.



More information about the cfe-commits mailing list