[AST] Fix potential nullptr dereference in Expr::HasSideEffects
authorJan Korous <jkorous@apple.com>
Wed, 8 Jul 2020 22:16:21 +0000 (15:16 -0700)
committerJan Korous <jkorous@apple.com>
Mon, 13 Jul 2020 18:08:51 +0000 (11:08 -0700)
commitfdb69539bcd250f6e4f49197c9b8149a7542e3ff
treec0738766831e4908349107dd799c976cf43b7cc2
parent87f8a4f9a2314044bf007e0d4564a40386751842
[AST] Fix potential nullptr dereference in Expr::HasSideEffects

Array returned by LambdaExpr::capture_inits() can contain nullptrs.

Differential Revision: https://reviews.llvm.org/D83438
clang/include/clang/AST/ExprCXX.h
clang/lib/AST/Expr.cpp
clang/unittests/AST/CMakeLists.txt
clang/unittests/AST/HasSideEffectsTest.cpp [new file with mode: 0644]