diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-08-08 16:53:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-08-08 16:53:22 +0000 |
commit | ffe56ea4c355b82c6fdbed4befc7fe3b956e35a2 (patch) | |
tree | 5cf1c5e9dcf25a5774d7a5c693d056f63e855ffa /lib/AST/ODRHash.cpp | |
parent | 104a02fb6c96111ce06b53e282adfb2b4a59eeb6 (diff) |
Notes
Diffstat (limited to 'lib/AST/ODRHash.cpp')
-rw-r--r-- | lib/AST/ODRHash.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/AST/ODRHash.cpp b/lib/AST/ODRHash.cpp index b19135384cfd6..121724a731526 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); |