I work on the evaluation of expressions on Windows now, and currently I am trying to restore the AST info from PDB symbols.
This patch adds an implementation of retrieving of declarations and declaration contexts based on PDB symbols.
PDB has different type symbols for const-qualified types, and this implementation ensures that only one declaration was created for both const and non-const types, but creates different compiler types for them.
The implementation also processes the case when there are two symbols corresponding to a variable. It's possible e.g. for class static variables, they has one global symbol and one symbol belonging to a class.
PDB has no info about namespaces, so this implementation parses the full symbol name and tries to figure out if the symbol belongs to namespace or not, and then creates nested namespaces if necessary.
The patch is big enough, but I can't come up with testing. Have you any ideas about that?