Libclang doesn't provide macros from precompiled header files

I've generated a TU which uses a precompiled header file. The PCH header file
from which the PCH file was generated contained some macros which are used
in my source file. The problem is that when I'm visiting the TUs children,
I'm never able to get the macros included in the .pch file.
precompiledheader.h:
#define MYMACRO int variable
sourcefile.h:
MYMACRO;
int main() {...}
// cursors for 'variable' are visited, but I never get cursors for MYMACRO.

Is there a known workaround for this issue?

Thank you very much!

It seems that libclang 2.9 didn't support deserialization of preprocessing
records, like this comment states in CIndex.cpp
CIndex.cpp: CursorVisitor::VisitChildren
// FIXME: Once we have the ability to deserialize a preprocessing record, do
so.

Is there a way to fix this in libclang 2.9?

Thank you!

We very rarely go back and fix things in old releases; instead, we encourage people to upgrade. This especially applies to libclang clients since libclang releases are supposed to be backwards-compatible. If you're stuck on 2.9, I'm afraid you're out of luck.

Jordan

Thank you for your reply, Jordan.
So, given that I'm not currently in a position to upgrade libclang, there's
no possible workaround that I can do by enabling some parsing settings, or
even fixing this issue myself in libclang 2.9?

Thank you!

Thank you for your reply, Jordan.
So, given that I'm not currently in a position to upgrade libclang, there's
no possible workaround that I can do by enabling some parsing settings, or
even fixing this issue myself in libclang 2.9?

This is not trivial, it's probably easier to upgrade.