From: Ted Kremenek Date: Wed, 30 Apr 2008 21:45:55 +0000 (+0000) Subject: Add workaround for __builtin_offsetof in the static analyzer. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a084bb667db31158278248f249cd302281c7da59;p=clang Add workaround for __builtin_offsetof in the static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50500 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index 7506c80f5e..7bfcaab112 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -1481,6 +1481,12 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, NodeTy* Pred, return; } + + case UnaryOperator::OffsetOf: + // FIXME: Just report "Unknown" known for OffsetOf. + Dst.Add(Pred); + return; + case UnaryOperator::Plus: assert (!asLVal); // FALL-THROUGH. case UnaryOperator::Extension: {