People can and do use libclang for AST info in the same manner that you're talking about: https://github.com/Sarcasm/irony-mode
Re:Emacs maintainer steps down
by chetanahuja on Wednesday October 14, 2015 @11:23AM
(#10387116)
Almost didn't click on that link because it looked like a joke link (Sarcasm and irony!!). Glad I did and found something new :-)
I wonder what would be the problem with someone using libclang to generate the same AST information in a much more convenient fashion. Will it break the GPL in some way?