forked from OSchip/llvm-project
Fix: Bug 10798 - [analyzer] Crash when analyzing ICU. (A slight improvement on the previous commit.)
llvm-svn: 138762
This commit is contained in:
parent
2bfaa32990
commit
814adf7752
|
@ -203,7 +203,7 @@ static SymbolRef getSymbolForRegion(CheckerContext &C,
|
|||
// region, if that is the case, get the underlining region.
|
||||
if (const ElementRegion *ER = dyn_cast<ElementRegion>(R)) {
|
||||
R = ER->getAsArrayOffset().getRegion();
|
||||
if (!isa<SymbolicRegion>(R))
|
||||
if (!R || !isa<SymbolicRegion>(R))
|
||||
return 0;
|
||||
} else
|
||||
return 0;
|
||||
|
|
|
@ -310,3 +310,14 @@ __inline__ static
|
|||
const char *__WBASLLevelString(int level) {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
static int *bug10798(int *p, int columns, int prevRow) {
|
||||
int *row = 0;
|
||||
row = p + prevRow * columns;
|
||||
prevRow += 2;
|
||||
do {
|
||||
++prevRow;
|
||||
row+=columns;
|
||||
} while(10 >= row[1]);
|
||||
return row;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue