Код: Выделить всё
clang::SourceLocation _b = d->getLocStart(), _e = d->getLocEnd();
char *b = sourceManager->getCharacterData(_b),
e = sourceManager->getCharacterData(_E);
llvm:errs()
Подробнее здесь: [url]https://stackoverflow.com/questions/11083066/getting-the-source-behind-clangs-ast[/url]
Мобильная версия