summaryrefslogtreecommitdiffstats
path: root/lib/AST/ODRHash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/ODRHash.cpp')
-rw-r--r--lib/AST/ODRHash.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/AST/ODRHash.cpp b/lib/AST/ODRHash.cpp
index b19135384c..121724a731 100644
--- a/lib/AST/ODRHash.cpp
+++ b/lib/AST/ODRHash.cpp
@@ -378,8 +378,12 @@ void ODRHash::AddCXXRecordDecl(const CXXRecordDecl *Record) {
assert(Record && Record->hasDefinition() &&
"Expected non-null record to be a definition.");
- if (isa<ClassTemplateSpecializationDecl>(Record)) {
- return;
+ const DeclContext *DC = Record;
+ while (DC) {
+ if (isa<ClassTemplateSpecializationDecl>(DC)) {
+ return;
+ }
+ DC = DC->getParent();
}
AddDecl(Record);