Regressions

We've found a few regressions between r125832 and TOT like the following:

Taken in account that clang is rather near to release deadline I wonder
if it's preferable I post the regressions here or to bugzilla.

Let me known what is better.

$ cat t.cc
template<template <typename T, typename = T > class U> struct A
{
  template<int> U<int> foo();
};

template <typename T, typename = T>
struct s {
};

void f() {
  A<s> x;
  x.foo<2>();
}
$ clang++ t.cc
clang: SemaTemplateInstantiate.cpp:1209:
clang::QualType<unnamed>::TemplateInstantiator::TransformTemplateTypeParmType(clang::TypeLocBuilder&,
clang::TemplateTypeParmTypeLoc): Assertion `Arg.getKind() ==
TemplateArgument::Type && "Template argument kind mismatch"' failed.
0 clang 0x0000000002103e25
1 clang 0x0000000002103c18
2 libpthread.so.0 0x00007f91b53368f0
3 libc.so.6 0x00007f91b4625a75 gsignal + 53
4 libc.so.6 0x00007f91b46295c0 abort + 384
5 libc.so.6 0x00007f91b461e941 __assert_fail + 241
6 clang 0x00000000014a9ccf
7 clang 0x00000000014aef48
8 clang 0x00000000014ae8a3
9 clang 0x00000000014c8f65
10 clang 0x00000000014ca789
11 clang 0x00000000014c3b14
12 clang 0x00000000014b5e32
13 clang 0x00000000014aefea
14 clang 0x00000000014ae403
15 clang 0x00000000014a986d
16 clang 0x00000000014aecc0
17 clang 0x00000000014aa75b
clang::Sema::SubstFunctionDeclType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 329
18 clang 0x00000000014d6f32
clang::TemplateDeclInstantiator::SubstFunctionType(clang::FunctionDecl*,
llvm::SmallVectorImpl<clang::ParmVarDecl*>&) + 188
19 clang 0x00000000014d4344
clang::TemplateDeclInstantiator::VisitCXXMethodDecl(clang::CXXMethodDecl*,
clang::TemplateParameterList*) + 624
20 clang 0x00000000014d2b27
clang::TemplateDeclInstantiator::VisitFunctionTemplateDecl(clang::FunctionTemplateDecl*)
+ 197
21 clang 0x00000000014cd0a5
clang::DeclVisitor<clang::TemplateDeclInstantiator,
clang::Decl*>::Visit(clang::Decl*) + 551
22 clang 0x00000000014ab8ad
clang::Sema::InstantiateClass(clang::SourceLocation,
clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 1307
23 clang 0x00000000014ac307
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*,
clang::TemplateSpecializationKind, bool) + 1915
24 clang 0x0000000001505575
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::PartialDiagnostic const&, std::pair<clang::SourceLocation,
clang::PartialDiagnostic>) + 317
25 clang 0x0000000001505a35
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
unsigned int) + 167
26 clang 0x00000000012f9503
clang::Sema::ActOnUninitializedDecl(clang::Decl*, bool) + 1385
27 clang 0x0000000001251d7d
clang::Parser::ParseDeclarationAfterDeclarator(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 2345
28 clang 0x00000000012511c3
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned
int, bool, clang::SourceLocation*) + 753
29 clang 0x0000000001250eb1
clang::Parser::ParseSimpleDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&,
bool) + 483
30 clang 0x0000000001250c96
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 624
31 clang 0x000000000123e6b1
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 581
32 clang 0x000000000123fc24
clang::Parser::ParseCompoundStatementBody(bool) + 970
33 clang 0x0000000001243594
clang::Parser::ParseFunctionStatementBody(clang::Decl*) + 220
34 clang 0x000000000124ad0e
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo
const&) + 1036
35 clang 0x00000000012510d6
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned
int, bool, clang::SourceLocation*) + 516
36 clang 0x000000000124a866
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 1022
37 clang 0x000000000124a8e3
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 113
38 clang 0x000000000124a263
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 2189
39 clang 0x0000000001249946
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
+ 210
40 clang 0x0000000001232051 clang::ParseAST(clang::Sema&,
bool) + 328
41 clang 0x0000000000f898a5
clang::ASTFrontendAction::ExecuteAction() + 263
42 clang 0x00000000010d6253
clang::CodeGenAction::ExecuteAction() + 947
43 clang 0x0000000000f894f6 clang::FrontendAction::Execute() + 320
44 clang 0x0000000000f71cc1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 751
45 clang 0x0000000000f1b3ea
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 912
46 clang 0x0000000000f0d5c7 cc1_main(char const**, char
const**, char const*, void*) + 982
47 clang 0x0000000000f16940 main + 499
48 libc.so.6 0x00007f91b4610c4d __libc_start_main + 253
49 clang 0x0000000000f0cc69
Stack dump:
0. Program arguments: /space/home/abagnara/llvm/Debug+Asserts/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all
-disable-free -main-file-name t.cc -mrelocation-model static
-mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -target-linker-version 2.20.1
-momit-leaf-frame-pointer -resource-dir
/space/home/abagnara/llvm/Debug+Asserts/bin/../lib/clang/2.9
-ferror-limit 19 -fmessage-length 80 -fcxx-exceptions -fexceptions
-fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/cc-JKtml3.o -x c++ t.cc
1. t.cc:11:9: current parser token ';'
2. t.cc:10:10: parsing function body 'f'
3. t.cc:10:10: in compound statement ('{}')
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 1 (use -v to
see invocation)

Bugzilla, always.

  - Doug

Done now:

http://llvm.org/bugs/show_bug.cgi?id=9400
http://llvm.org/bugs/show_bug.cgi?id=9401

Thanks!