Temporarily Revert "[analyzer] Treat fields of unions as having symbolic offsets."
authorEric Christopher <echristo@gmail.com>
Wed, 10 Oct 2012 22:49:05 +0000 (22:49 +0000)
committerEric Christopher <echristo@gmail.com>
Wed, 10 Oct 2012 22:49:05 +0000 (22:49 +0000)
commita529f8c9c285cf1ad6614bf5cd0171bf3b12cd57
tree5b208412a2f624adac3b1247fa80394cdb6f62a2
parentffd3bf4124394f4f38657732fead136c2905b202
Temporarily Revert "[analyzer] Treat fields of unions as having symbolic offsets."

Author: Jordan Rose <jordan_rose@apple.com>
Date:   Wed Oct 10 21:31:21 2012 +0000

    [analyzer] Treat fields of unions as having symbolic offsets.

    This allows only one field to be active at a time in RegionStore.
    This isn't quite the correct behavior for unions, but it at least
    would handle the case of "value goes in, value comes out" from the
    same field.

    RegionStore currently has a number of places where any access to a union
    results in UnknownVal being returned. However, it is clearly missing
    some cases, or the original issue wouldn't have occurred. It is probably
    now safe to remove those changes, but that's a potentially destabilizing
    change that should wait for more thorough testing.

    Fixes PR14054.

    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165660 91177308-0d34-0410-b5e6-96231b3b80d8

This reverts commit cf9030e480f77ab349672f00ad302e216c26c92c.

llvm-svn: 165671
clang/lib/StaticAnalyzer/Core/MemRegion.cpp
clang/test/Analysis/unions.cpp [deleted file]