This is an archive of the discontinued LLVM Phabricator instance.

[libclang] Fix the type of 'int (Foo);'
ClosedPublic

Authored by strager on Apr 16 2018, 6:42 PM.

Details

Summary

libclang exposes the type of 'int (Foo);' (a global variable of type int
called Foo) as CXType_Unexposed. This is because Clang represents Foo's
type as ParenType{BuiltinType{Int}}, and libclang does not handle
ParenType.

Make libclang return CXType_Int as the type of 'int (Foo);' by
unwrapping ParenType transparently.

Diff Detail

Repository
rL LLVM

Event Timeline

strager created this revision.Apr 16 2018, 6:42 PM

Ping! I'd like a code review for this bug fix.

MaskRay accepted this revision.Apr 26 2018, 9:46 PM
This revision is now accepted and ready to land.Apr 26 2018, 9:46 PM
This revision was automatically updated to reflect the committed changes.