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 7506c80..7bfcaab 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -1481,6 +1481,12 @@
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: {