aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 621145f1af..319d4d5756 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -507,9 +507,10 @@ OverloadedOperatorKind FunctionDecl::getOverloadedOperator() const {
//===----------------------------------------------------------------------===//
bool TagDecl::isDependentType() const {
- if (isa<TemplateDecl>(this))
- return true;
-
+ if (const CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(this))
+ if (Record->getDescribedClassTemplate())
+ return true;
+
if (const TagDecl *TD = dyn_cast_or_null<TagDecl>(getDeclContext()))
return TD->isDependentType();