зеркало из https://github.com/microsoft/clang-1.git
Check for NULL child expressions before visiting them, as the first
thing the visit does is dyn_cast<>, which leads to a nasty segfault. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125993 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
5c722c7020
Коммит
0656e5b9aa
|
@ -72,7 +72,8 @@ public:
|
|||
/// expression, assuming they are all potentially evaluated.
|
||||
void VisitStmt(Stmt *S) {
|
||||
for (Stmt::child_range C = S->children(); C; ++C)
|
||||
this->Visit(*C);
|
||||
if (*C)
|
||||
this->Visit(*C);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче