llvm-project/llvm/test/Analysis/Lint
Mikael Holmen 6efe507e42 [Lint] Avoid failed assertion by fetching the proper pointer type
Summary:
When checking if a constant expression is a noop cast we fetched the
IntPtrType by doing DL->getIntPtrType(V->getType())). However, there can
be cases where V doesn't return a pointer, and then getIntPtrType()
triggers an assertion.

Now we pass DataLayout to isNoopCast so the method itself can determine
what the IntPtrType is.

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: wdng, llvm-commits

Differential Revision: https://reviews.llvm.org/D37894

llvm-svn: 314763
2017-10-03 06:03:49 +00:00
..
address-spaces.ll
check-zero-divide.ll
cppeh-catch-intrinsics-clean.ll
lit.local.cfg
noop-cast-expr-no-pointer.ll [Lint] Avoid failed assertion by fetching the proper pointer type 2017-10-03 06:03:49 +00:00