/usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/stdarg.h:40:9: error: unknown type name '__builtin_va_list'; did you mean '__builtin_va_list'?
typedef __builtin_va_list __gnuc_va_list;
^
note: '__builtin_va_list' declared here
当我尝试使用 RecursiveASTVisitor 访问 AST 时,我遇到了上述问题。最后,程序中止并显示以下消息。
type: Typedef of __gnuc_va_list size CItutorial5: /home/lotay/libs/clang/llvm/include/llvm/Support/Casting.h:239: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = clang::ConstantArrayType, Y = const clang::Type]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
Aborted (core dumped)
真的感谢帮助
我有以下配置的语言选项。
langOpts.GNUMode = 1 ;
langOpts.CXXExceptions = 1 ;
langOpts.RTTI = 1 ;
langOpts.Bool = 1 ;
langOpts.CPlusPlus = 1 ;
langOpts.WChar = 1 ;