forked from OSchip/llvm-project
Teach the cursor visitor to walk into typeof types (both kinds). This
is hard to test now; tests will come when we can walk stataements and expressions properly. llvm-svn: 94099
This commit is contained in:
parent
43f2eecffa
commit
6479fc4554
clang/tools/CIndex
|
@ -200,6 +200,11 @@ public:
|
|||
bool VisitRValueReferenceTypeLoc(RValueReferenceTypeLoc TL);
|
||||
bool VisitFunctionTypeLoc(FunctionTypeLoc TL);
|
||||
bool VisitArrayTypeLoc(ArrayTypeLoc TL);
|
||||
// FIXME: Implement for TemplateSpecializationTypeLoc
|
||||
// FIXME: Implement visitors here when the unimplemented TypeLocs get
|
||||
// implemented
|
||||
bool VisitTypeOfExprTypeLoc(TypeOfExprTypeLoc TL);
|
||||
bool VisitTypeOfTypeLoc(TypeOfTypeLoc TL);
|
||||
};
|
||||
|
||||
} // end anonymous namespace
|
||||
|
@ -532,6 +537,17 @@ bool CursorVisitor::VisitArrayTypeLoc(ArrayTypeLoc TL) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool CursorVisitor::VisitTypeOfExprTypeLoc(TypeOfExprTypeLoc TL) {
|
||||
return Visit(MakeCXCursor(TL.getUnderlyingExpr(), StmtParent, TU));
|
||||
}
|
||||
|
||||
bool CursorVisitor::VisitTypeOfTypeLoc(TypeOfTypeLoc TL) {
|
||||
if (TypeSourceInfo *TSInfo = TL.getUnderlyingTInfo())
|
||||
return Visit(TSInfo->getTypeLoc());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
CXString CIndexer::createCXString(const char *String, bool DupString){
|
||||
CXString Str;
|
||||
if (DupString) {
|
||||
|
|
Loading…
Reference in New Issue