diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-05-27 16:57:42 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-05-27 16:57:42 +0000 |
commit | a7f1c008d37927a2ffc55a95830b42762db24843 (patch) | |
tree | a56a2ac4b8a0eff287a86b82287aa32c4233553f | |
parent | 81148e9c24687564b3dd13bcb5e5e9f5100c0c95 (diff) |
Remove clang_isFromMainFile(). It doesn't work correctly with CXDiagnostics, and we shouldn't
have an API around that cannot be implemented correctly yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104849 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang-c/Index.h | 6 | ||||
-rw-r--r-- | tools/libclang/CIndex.cpp | 10 | ||||
-rw-r--r-- | tools/libclang/libclang.darwin.exports | 1 | ||||
-rw-r--r-- | tools/libclang/libclang.exports | 1 |
4 files changed, 0 insertions, 18 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 86926bd683..ef779d622a 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -343,12 +343,6 @@ CINDEX_LINKAGE CXSourceLocation clang_getRangeStart(CXSourceRange range); CINDEX_LINKAGE CXSourceLocation clang_getRangeEnd(CXSourceRange range); /** - * \brief Determine if the source location occurs within the main file - * of the translation unit (as opposed to an included header). - */ -CINDEX_LINKAGE unsigned clang_isFromMainFile(CXSourceLocation loc); - -/** * @} */ diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index a077589c8f..21396ad1c5 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -1479,16 +1479,6 @@ CXSourceLocation clang_getRangeEnd(CXSourceRange range) { return Result; } -unsigned clang_isFromMainFile(CXSourceLocation loc) { - SourceLocation Loc = SourceLocation::getFromRawEncoding(loc.int_data); - if (!loc.ptr_data[0] || Loc.isInvalid()) - return 0; - - const SourceManager &SM = - *static_cast<const SourceManager*>(loc.ptr_data[0]); - return SM.isFromMainFile(Loc) ? 1 : 0; -} - } // end: extern "C" //===----------------------------------------------------------------------===// diff --git a/tools/libclang/libclang.darwin.exports b/tools/libclang/libclang.darwin.exports index a9f4f0777c..3ef3b74854 100644 --- a/tools/libclang/libclang.darwin.exports +++ b/tools/libclang/libclang.darwin.exports @@ -78,7 +78,6 @@ _clang_getTypeKindSpelling _clang_isCursorDefinition _clang_isDeclaration _clang_isExpression -_clang_isFromMainFile _clang_isInvalid _clang_isPreprocessing _clang_isReference diff --git a/tools/libclang/libclang.exports b/tools/libclang/libclang.exports index b09e6ac56c..7df674037b 100644 --- a/tools/libclang/libclang.exports +++ b/tools/libclang/libclang.exports @@ -78,7 +78,6 @@ clang_getTypeKindSpelling clang_isCursorDefinition clang_isDeclaration clang_isExpression -clang_isFromMainFile clang_isInvalid clang_isPreprocessing clang_isReference |