[analyzer] do not crash on cases where an array subscript is an rvalue
Array subscript is almost always an lvalue, except for a few cases where it is not, such as a subscript into an Objective-C property, or a return from the function. This commit prevents crashing in such cases. Fixes rdar://34829842 Differential Revision: https://reviews.llvm.org/D40584 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319834 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h 3 additions, 3 deletionsinclude/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
- lib/StaticAnalyzer/Core/ExprEngine.cpp 24 additions, 11 deletionslib/StaticAnalyzer/Core/ExprEngine.cpp
- test/Analysis/vector.m 33 additions, 0 deletionstest/Analysis/vector.m
Loading
Please register or sign in to comment