Esempio n. 1
0
SourceRange cxcursor::getCursorPreprocessingDirective(CXCursor C) {
    assert(C.kind == CXCursor_PreprocessingDirective);
    SourceRange Range(SourceLocation::getFromPtrEncoding(C.data[0]),
                      SourceLocation::getFromPtrEncoding(C.data[1]));
    ASTUnit *TU = getCursorASTUnit(C);
    return TU->mapRangeFromPreamble(Range);
}
Esempio n. 2
0
SourceRange cxcursor::getCursorPreprocessingDirective(CXCursor C) {
  assert(C.kind == CXCursor_PreprocessingDirective);
  SourceRange Range = SourceRange(SourceLocation::getFromRawEncoding(
                                      reinterpret_cast<uintptr_t> (C.data[0])),
                     SourceLocation::getFromRawEncoding(
                                      reinterpret_cast<uintptr_t> (C.data[1])));
  ASTUnit *TU = getCursorASTUnit(C);
  return TU->mapRangeFromPreamble(Range);
}