diff options
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Checker/GRExprEngine.cpp | 5 | ||||
| -rw-r--r-- | clang/test/Analysis/misc-ps-region-store.m | 10 | 
2 files changed, 15 insertions, 0 deletions
| diff --git a/clang/lib/Checker/GRExprEngine.cpp b/clang/lib/Checker/GRExprEngine.cpp index ae4c5fe3c12..1afe0917f1c 100644 --- a/clang/lib/Checker/GRExprEngine.cpp +++ b/clang/lib/Checker/GRExprEngine.cpp @@ -897,6 +897,11 @@ void GRExprEngine::VisitLValue(Expr* Ex, ExplodedNode* Pred,        return;      } +    case Stmt::ObjCIsaExprClass: +      // FIXME: Do something more intelligent with 'x->isa = ...'. +      //  For now, just ignore the assignment. +      return; +      case Stmt::ObjCPropertyRefExprClass:      case Stmt::ObjCImplicitSetterGetterRefExprClass:        // FIXME: Property assignments are lvalues, but not really "locations". diff --git a/clang/test/Analysis/misc-ps-region-store.m b/clang/test/Analysis/misc-ps-region-store.m index 898a33efe12..b95d82f7633 100644 --- a/clang/test/Analysis/misc-ps-region-store.m +++ b/clang/test/Analysis/misc-ps-region-store.m @@ -910,3 +910,13 @@ int rdar_7770737_pos(void)    struct rdar_7770737_s f = { .p = (intptr_t)&x };    return x; // expected-warning{{Undefined or garbage value returned to caller}}  } + +//===----------------------------------------------------------------------===// +// Test handling of the implicit 'isa' field.  For now we don't do anything +// interesting. +//===----------------------------------------------------------------------===// + +void pr6302(id x, Class y) { +  // This previously crashed the analyzer (reported in PR 6302) +  x->isa  = y; +} | 

