Beispiel #1
0
 public bool FindReferencesTo(Cursor c, File f, FindReferencesDelegate callback)
 {
     Library.CXCursorAndRangeVisitor visitor = new Library.CXCursorAndRangeVisitor();
     visitor.context = IntPtr.Zero;
     visitor.visit = delegate(IntPtr ctx, Library.Cursor cur, Library.SourceRange range)
     {
         if(callback(_itemStore.CreateCursor(cur), _itemStore.CreateSourceRange(range)) == true)
             return Library.CXVisitorResult.CXVisit_Continue;
         return Library.CXVisitorResult.CXVisit_Break;
     };
     return Library.clang_findReferencesInFile(c.Handle, f.Handle, visitor) != Library.CXResult.CXResult_Invalid;
 }
Beispiel #2
0
 public HeaderInfo(File file, IEnumerable<SourceLocation> stack)
 {
     File = file;
     InclusionStack = stack;
 }