зеркало из https://github.com/microsoft/clang-1.git
Stub out some declaration kinds that cannot ever be instantiated
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67686 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
9135c72fd1
Коммит
4f722be458
|
@ -39,6 +39,8 @@ namespace {
|
||||||
// FIXME: Once we get closer to completion, replace these
|
// FIXME: Once we get closer to completion, replace these
|
||||||
// manually-written declarations with automatically-generated ones
|
// manually-written declarations with automatically-generated ones
|
||||||
// from clang/AST/DeclNodes.def.
|
// from clang/AST/DeclNodes.def.
|
||||||
|
Decl *VisitTranslationUnitDecl(TranslationUnitDecl *D);
|
||||||
|
Decl *VisitNamespaceDecl(NamespaceDecl *D);
|
||||||
Decl *VisitTypedefDecl(TypedefDecl *D);
|
Decl *VisitTypedefDecl(TypedefDecl *D);
|
||||||
Decl *VisitFieldDecl(FieldDecl *D);
|
Decl *VisitFieldDecl(FieldDecl *D);
|
||||||
Decl *VisitStaticAssertDecl(StaticAssertDecl *D);
|
Decl *VisitStaticAssertDecl(StaticAssertDecl *D);
|
||||||
|
@ -63,6 +65,18 @@ namespace {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Decl *
|
||||||
|
TemplateDeclInstantiator::VisitTranslationUnitDecl(TranslationUnitDecl *D) {
|
||||||
|
assert(false && "Translation units cannot be instantiated");
|
||||||
|
return D;
|
||||||
|
}
|
||||||
|
|
||||||
|
Decl *
|
||||||
|
TemplateDeclInstantiator::VisitNamespaceDecl(NamespaceDecl *D) {
|
||||||
|
assert(false && "Namespaces cannot be instantiated");
|
||||||
|
return D;
|
||||||
|
}
|
||||||
|
|
||||||
Decl *TemplateDeclInstantiator::VisitTypedefDecl(TypedefDecl *D) {
|
Decl *TemplateDeclInstantiator::VisitTypedefDecl(TypedefDecl *D) {
|
||||||
bool Invalid = false;
|
bool Invalid = false;
|
||||||
QualType T = D->getUnderlyingType();
|
QualType T = D->getUnderlyingType();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче