From a084bb667db31158278248f249cd302281c7da59 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 30 Apr 2008 21:45:55 +0000 Subject: [PATCH] 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 --- lib/Analysis/GRExprEngine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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: { -- 2.40.0