forked from OSchip/llvm-project
Revert r347627 "[MS] Push fewer DeclContexts for delayed template parsing"
It broke the Windows self-host: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/1799/steps/stage%202%20build/logs/stdio I can build lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/MachinePostDominators.cpp.obj to repro. llvm-svn: 347630
This commit is contained in:
parent
08d92e4a10
commit
0ef5843dcc
|
@ -1398,12 +1398,7 @@ void Parser::ParseLateTemplatedFuncDef(LateParsedTemplate &LPT) {
|
|||
unsigned NumParamLists =
|
||||
Actions.ActOnReenterTemplateScope(getCurScope(), cast<Decl>(*II));
|
||||
CurTemplateDepthTracker.addDepth(NumParamLists);
|
||||
// If we find a class in a class, we need to push the context of the
|
||||
// outermost class to match up with how we would parse a regular C++ class
|
||||
// inline method.
|
||||
if (*II != FunD &&
|
||||
!(isa<CXXRecordDecl>(*II) && isa<CXXRecordDecl>(Actions.CurContext) &&
|
||||
Actions.CurContext == (*II)->getLexicalParent())) {
|
||||
if (*II != FunD) {
|
||||
TemplateParamScopeStack.push_back(new ParseScope(this, Scope::DeclScope));
|
||||
Actions.PushDeclContext(Actions.getCurScope(), *II);
|
||||
}
|
||||
|
|
|
@ -181,20 +181,3 @@ static void h() {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
struct PR38460 {
|
||||
template <typename>
|
||||
struct T {
|
||||
static void foo() {
|
||||
struct U {
|
||||
void dummy() {
|
||||
use_delayed_identifier();
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
void use_delayed_identifier();
|
||||
void trigger_PR38460() {
|
||||
PR38460::T<int>::foo();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue