Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help] How to get error info from libtooling? #51

Open
dougpuob opened this issue Apr 18, 2020 · 0 comments
Open

[Help] How to get error info from libtooling? #51

dougpuob opened this issue Apr 18, 2020 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@dougpuob
Copy link
Owner

clang file.c -x c++ -Xclang -ast-dump -fsyntax-only

#define MAX_VALUE (10)  
int iVal1 =             
int iVal2 = MAX_VALUE;  

image

file.c:3:1: error: expected expression
int iVal2 = MAX_VALUE;
^
TranslationUnitDecl 0x21bb4965f08 <<invalid sloc>> <invalid sloc>
|-TypedefDecl 0x21bb49667a0 <<invalid sloc>> <invalid sloc> implicit __int128_t '__int128'
| `-BuiltinType 0x21bb49664a0 '__int128'
|-TypedefDecl 0x21bb4966810 <<invalid sloc>> <invalid sloc> implicit __uint128_t 'unsigned __int128'
| `-BuiltinType 0x21bb49664c0 'unsigned __int128'
|-TypedefDecl 0x21bb4966b18 <<invalid sloc>> <invalid sloc> implicit __NSConstantString 'struct __NSConstantString_tag'
| `-RecordType 0x21bb49668f0 'struct __NSConstantString_tag'
|   `-Record 0x21bb4966868 '__NSConstantString_tag'
|-TypedefDecl 0x21bb4966b88 <<invalid sloc>> <invalid sloc> implicit size_t 'unsigned long long'
| `-BuiltinType 0x21bb49660e0 'unsigned long long'
|-TypedefDecl 0x21bb4966c20 <<invalid sloc>> <invalid sloc> implicit __builtin_ms_va_list 'char *'
| `-PointerType 0x21bb4966be0 'char *'
|   `-BuiltinType 0x21bb4965fa0 'char'
|-TypedefDecl 0x21bb4966c90 <<invalid sloc>> <invalid sloc> implicit __builtin_va_list 'char *'
| `-PointerType 0x21bb4966be0 'char *'
|   `-BuiltinType 0x21bb4965fa0 'char'
`-VarDecl 0x21bb4966d00 <file.c:2:1, col:5> col:5 iVal1 'int'
1 error generated.
PS D:\>           
@dougpuob dougpuob added the help wanted Extra attention is needed label Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant