HomePhabricator

Fixed HasDeclarationMatcher to properly convert all types into decls where…

Description

Fixed HasDeclarationMatcher to properly convert all types into decls where possible. Added objcObjectPointerType(), objcInterfaceDecl(), templateTypeParmType(), injectedClassNameType(), and unresolvedUsingTypenameDecl(). Updated documentation for pointerType() to call out that it does not match ObjCObjectPointerType types. Changed pointsTo() to handle ObjCObjectPointerType as well as PointerType.

While this may seem like a lot of unrelated changes, they all relate back to fixing HasDeclarationMatcher.

This now allows us to write a matcher like:

varDecl(hasType(namedDecl(hasName("Foo"))))

that matches code using typedefs, objc interfaces, template type parameters, injected class names, or unresolved using typenames.

Details

Committed
aaronballmanSep 11 2015, 4:51 AM
Parents
rL247403: [lldb-mi] No need to call Format with no varargs.
Branches
Unknown
Tags
Unknown