[cfe-commits] r104849 - in /cfe/trunk: include/clang-c/Index.h tools/libclang/CIndex.cpp tools/libclang/libclang.darwin.exports tools/libclang/libclang.exports
Ted Kremenek
kremenek at apple.com
Thu May 27 09:57:42 PDT 2010
Author: kremenek
Date: Thu May 27 11:57:42 2010
New Revision: 104849
URL: http://llvm.org/viewvc/llvm-project?rev=104849&view=rev
Log:
Remove clang_isFromMainFile(). It doesn't work correctly with CXDiagnostics, and we shouldn't
have an API around that cannot be implemented correctly yet.
Modified:
cfe/trunk/include/clang-c/Index.h
cfe/trunk/tools/libclang/CIndex.cpp
cfe/trunk/tools/libclang/libclang.darwin.exports
cfe/trunk/tools/libclang/libclang.exports
Modified: cfe/trunk/include/clang-c/Index.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=104849&r1=104848&r2=104849&view=diff
==============================================================================
--- cfe/trunk/include/clang-c/Index.h (original)
+++ cfe/trunk/include/clang-c/Index.h Thu May 27 11:57:42 2010
@@ -343,12 +343,6 @@
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);
-
-/**
* @}
*/
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=104849&r1=104848&r2=104849&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Thu May 27 11:57:42 2010
@@ -1479,16 +1479,6 @@
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"
//===----------------------------------------------------------------------===//
Modified: cfe/trunk/tools/libclang/libclang.darwin.exports
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/libclang.darwin.exports?rev=104849&r1=104848&r2=104849&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/libclang.darwin.exports (original)
+++ cfe/trunk/tools/libclang/libclang.darwin.exports Thu May 27 11:57:42 2010
@@ -78,7 +78,6 @@
_clang_isCursorDefinition
_clang_isDeclaration
_clang_isExpression
-_clang_isFromMainFile
_clang_isInvalid
_clang_isPreprocessing
_clang_isReference
Modified: cfe/trunk/tools/libclang/libclang.exports
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/libclang.exports?rev=104849&r1=104848&r2=104849&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/libclang.exports (original)
+++ cfe/trunk/tools/libclang/libclang.exports Thu May 27 11:57:42 2010
@@ -78,7 +78,6 @@
clang_isCursorDefinition
clang_isDeclaration
clang_isExpression
-clang_isFromMainFile
clang_isInvalid
clang_isPreprocessing
clang_isReference
More information about the cfe-commits
mailing list