While parsing LateParsedTemplates, Clang assumes that the Global DeclID matches with the Local DeclID of a Decl. This is not the case when we have multiple dependent modules , each having their own LateParsedTemplate section. In such a case, a Local/Global DeclID confusion occurs which leads to improper casting of FunctionDecl's.
This commit creates a Vector to map the LateParsedTemplate section of each Module with their module file and therefore resolving the Global/Local DeclID confusion.
We don't need a map here; we never need to look up the vector from the module file.