Fist step towards fixing cling/test/Lookup/template.C for C++17.
This commit is contained in:
parent
c283f26a8a
commit
07f42c7a51
@ -782,6 +782,21 @@ namespace cling {
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
} else if (P.getCurToken().is(clang::tok::annot_typename)) {
|
||||
// P.getTypeAnnotation() takes a non-const Token& until clang r306291.
|
||||
//auto ParsedTy = P.getTypeAnnotation(P.getCurToken());
|
||||
auto ParsedTy
|
||||
= ParsedType::getFromOpaquePtr(P.getCurToken().getAnnotationValue());
|
||||
if (ParsedTy) {
|
||||
QualType QT = ParsedTy.get();
|
||||
if (const auto *DTST
|
||||
= dyn_cast<DeducedTemplateSpecializationType>(QT.getTypePtr())) {
|
||||
if (auto TD = DTST->getTemplateName().getAsTemplateDecl()) {
|
||||
if (auto CTD = dyn_cast<ClassTemplateDecl>(TD))
|
||||
return CTD;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (P.getCurToken().is(clang::tok::identifier)) {
|
||||
// We have a single indentifier, let's look for it in the
|
||||
// the global scope.
|
||||
|
Loading…
x
Reference in New Issue
Block a user