Код: Выделить всё
`clang -Xclang -ast-dump -ferror-limit=0 sample.cpp`
Код: Выделить всё
#include "BAD"
#include "VERYBAD"
template
struct my_struct
{
struct inner {
T a;
};
};
extern int test;
template
struct my_struct::inner
{
};
extern int test2;
Код: Выделить всё
|-VarDecl 0x2034635a608 col:12 test 'int' extern
-VarDecl 0x2034635a870 col:12 test2 'int' extern
Какова логика такого поведения парсера? Почему 2 ошибки критичны, а одна нет? И есть ли способ их как-то игнорировать?
P.S. У меня нет ни "ПЛОХИХ", ни "ОЧЕНЬ ПЛОХИХ" файлов
Та же проблема в libclang
Подробнее здесь: https://stackoverflow.com/questions/793 ... ded-in-ast
Мобильная версия