[libclang] Fix infinite loop when doing visitation of an OpaqueValueExpr.

llvm-svn: 145751
This commit is contained in:
Argyrios Kyrtzidis 2011-12-03 03:49:47 +00:00
parent 0fd8fae0a6
commit 0042b6f925
2 changed files with 4 additions and 1 deletions

View File

@ -89,3 +89,7 @@ void test() {
// RUN: c-index-test -cursor-at=%s:38:12 -cursor-at=%s:39:5 %s | FileCheck -check-prefix=CHECK-CXXCATCH %s
// CHECK-CXXCATCH: TypeRef=struct X:3:8
// CHECK-CXXCATCH-NEXT: TypeRef=struct X:3:8
// RUN: c-index-test -test-load-source-usrs local %s | FileCheck -check-prefix=CHECK-USR %s
// CHECK-USR: get-cursor.cpp c:get-cursor.cpp@472@F@test#@e Extent=[38:12 - 38:15]
// CHECK-USR: get-cursor.cpp c:get-cursor.cpp@483@F@test#@x Extent=[39:5 - 39:8]

View File

@ -2084,7 +2084,6 @@ void EnqueueVisitor::VisitOpaqueValueExpr(OpaqueValueExpr *E) {
// visit that. This is useful for (e.g.) pseudo-object expressions.
if (Expr *SourceExpr = E->getSourceExpr())
return Visit(SourceExpr);
AddStmt(E);
}
void EnqueueVisitor::VisitPseudoObjectExpr(PseudoObjectExpr *E) {
// Treat the expression like its syntactic form.