aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/CXCursor.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-25 01:33:02 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-25 01:33:02 +0000
commitba0513de93d2fab6db5ab30b6927209fcc883078 (patch)
tree75067afaf5c45f10ab9a9647d6a372ddd925e4a1 /tools/libclang/CXCursor.cpp
parentf11e923433b62efb0fbaeb2573e8457f1c4a1b1e (diff)
Implement support for dependent Microsoft __if_exists/__if_not_exists
statements. As noted in the documentation for the AST node, the semantics of __if_exists/__if_not_exists are somewhat different from the way Visual C++ implements them, because our parsed-template representation can't accommodate VC++ semantics without serious contortions. Hopefully this implementation is "good enough". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142901 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/CXCursor.cpp')
-rw-r--r--tools/libclang/CXCursor.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/libclang/CXCursor.cpp b/tools/libclang/CXCursor.cpp
index 586d9beba3..ae3aeea06c 100644
--- a/tools/libclang/CXCursor.cpp
+++ b/tools/libclang/CXCursor.cpp
@@ -430,7 +430,7 @@ CXCursor cxcursor::MakeCXCursor(Stmt *S, Decl *Parent, CXTranslationUnit TU,
K = CXCursor_CallExpr;
break;
- case Stmt::ObjCMessageExprClass:
+ case Stmt::ObjCMessageExprClass: {
K = CXCursor_ObjCMessageExpr;
int SelectorIdIndex = -1;
// Check if cursor points to a selector id.
@@ -446,6 +446,11 @@ CXCursor cxcursor::MakeCXCursor(Stmt *S, Decl *Parent, CXTranslationUnit TU,
CXCursor C = { K, 0, { Parent, S, TU } };
return getSelectorIdentifierCursor(SelectorIdIndex, C);
}
+
+ case Stmt::MSDependentExistsStmtClass:
+ K = CXCursor_UnexposedStmt;
+ break;
+ }
CXCursor C = { K, 0, { Parent, S, TU } };
return C;