projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36a5099
)
libclang: use CXCursor getters to simplify code
author
Dmitri Gribenko
<gribozavr@gmail.com>
Sat, 9 Feb 2013 14:12:09 +0000
(14:12 +0000)
committer
Dmitri Gribenko
<gribozavr@gmail.com>
Sat, 9 Feb 2013 14:12:09 +0000
(14:12 +0000)
llvm-svn: 174809
clang/tools/libclang/CXType.cpp
patch
|
blob
|
history
diff --git
a/clang/tools/libclang/CXType.cpp
b/clang/tools/libclang/CXType.cpp
index
7da1875
..
3634e32
100644
(file)
--- a/
clang/tools/libclang/CXType.cpp
+++ b/
clang/tools/libclang/CXType.cpp
@@
-638,9
+638,8
@@
CXString clang_getDeclObjCTypeEncoding(CXCursor C) {
if (!clang_isDeclaration(C.kind))
return cxstring::createEmpty();
- const Decl *D = static_cast<const Decl*>(C.data[0]);
- ASTUnit *AU = cxcursor::getCursorASTUnit(C);
- ASTContext &Ctx = AU->getASTContext();
+ const Decl *D = cxcursor::getCursorDecl(C);
+ ASTContext &Ctx = cxcursor::getCursorContext(C);
std::string encoding;
if (const ObjCMethodDecl *OMD = dyn_cast<ObjCMethodDecl>(D)) {