mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 01:46:41 +00:00

Fixes a crash in modules where the template class decl becomes the most recent decl in the redeclaration chain and forcing the template instantiator try to instantiate the friend declaration, rather than the template definition. In practice, A::list<int> produces a TemplateSpecializationType A::__1::list<int, allocator<type-parameter-0-0> >' failing to replace to subsitute the default argument to allocator<int>. Kudos Richard Smith (D28399). llvm-svn: 291753
16 lines
386 B
C++
16 lines
386 B
C++
// RUN: rm -rf %t
|
|
// RUN: %clang_cc1 -std=c++11 -I%S/Inputs/PR31469 -verify %s
|
|
// RUN: %clang_cc1 -std=c++11 -I%S/Inputs/PR31469 -fmodules -fmodules-local-submodule-visibility \
|
|
// RUN: -fimplicit-module-maps -fmodules-cache-path=%t -verify %s
|
|
|
|
#include "textual.h"
|
|
#include "empty.h"
|
|
|
|
namespace A {
|
|
template <class _Tp> void f();
|
|
}
|
|
|
|
A::list<int> use;
|
|
|
|
// expected-no-diagnostics
|