summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-17 20:26:51 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-17 20:26:51 +0000
commitf9088c93be9e51c84d2c1914bf8fb56f9a939271 (patch)
treeb23da9cba9f82885fffa94c76a2845207a787c4d /clang/tools/libclang
parentf3a9c464b4ff59e691ac631542096b90e9c547a9 (diff)
downloadbcm5719-llvm-f9088c93be9e51c84d2c1914bf8fb56f9a939271.tar.gz
bcm5719-llvm-f9088c93be9e51c84d2c1914bf8fb56f9a939271.zip
When traversing an InitListExpr, there may not be a syntactic form;
check for NULL and visit the InitListExpr we have if there is no syntactic form. llvm-svn: 114203
Diffstat (limited to 'clang/tools/libclang')
-rw-r--r--clang/tools/libclang/CIndex.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 2de32b0715c..19f99ae2658 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -1663,7 +1663,10 @@ bool CursorVisitor::VisitVAArgExpr(VAArgExpr *E) {
bool CursorVisitor::VisitInitListExpr(InitListExpr *E) {
// We care about the syntactic form of the initializer list, only.
- return VisitExpr(E->getSyntacticForm());
+ if (InitListExpr *Syntactic = E->getSyntacticForm())
+ return VisitExpr(Syntactic);
+
+ return VisitExpr(E);
}
bool CursorVisitor::VisitDesignatedInitExpr(DesignatedInitExpr *E) {
OpenPOWER on IntegriCloud