]> granicus.if.org Git - clang/commit
[analyzer] Check that a member expr is valid even when the result is an lvalue.
authorJordan Rose <jordan_rose@apple.com>
Sat, 22 Sep 2012 01:24:33 +0000 (01:24 +0000)
committerJordan Rose <jordan_rose@apple.com>
Sat, 22 Sep 2012 01:24:33 +0000 (01:24 +0000)
commitdd1d7d88f1fe6d7d7e79acaec3f83bc10d9f7b97
tree361d11291b72644e05fcbd9d2c04958809d0d060
parent5d99a252c63a7745bcd71231ca5240d2a65e4f1d
[analyzer] Check that a member expr is valid even when the result is an lvalue.

We want to catch cases like this early, so that we can produce better
diagnostics and path notes:

  Point *p = 0;
  int *px = &p->x; // should warn here
  *px = 1;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164441 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngine.cpp
test/Analysis/fields.c
test/Analysis/nullptr.cpp