コード例 #1
0
ファイル: CXCursor.cpp プロジェクト: nicolaisi/root
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);
}
コード例 #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);
}