The top-level hash is used to determine if we need to update the global code-completion results.
ImportDecls did not affect the hash so a newly introduced ImportDecl would not trigger an update of the global results.
rdar://
14202797
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184782
91177308-0d34-0410-b5e6-
96231b3b80d8
Hash = llvm::HashString(NameStr, Hash);
}
return;
- }
+ }
+
+ if (ImportDecl *ImportD = dyn_cast<ImportDecl>(D)) {
+ if (Module *Mod = ImportD->getImportedModule()) {
+ std::string ModName = Mod->getFullModuleName();
+ Hash = llvm::HashString(ModName, Hash);
+ }
+ return;
+ }
}
class TopLevelDeclTrackerConsumer : public ASTConsumer {