[cfe-commits] r59220 - in /cfe/trunk: lib/Analysis/GRExprEngine.cpp test/Analysis/misc-ps.m

Ted Kremenek kremenek at apple.com
Wed Nov 12 21:05:34 PST 2008


Author: kremenek
Date: Wed Nov 12 23:05:34 2008
New Revision: 59220

URL: http://llvm.org/viewvc/llvm-project?rev=59220&view=rev
Log:
GRExprEngine::VisitInitListExpr:
- Don't crash on vector types.
- Handle typedefs.

Modified:
    cfe/trunk/lib/Analysis/GRExprEngine.cpp
    cfe/trunk/test/Analysis/misc-ps.m

Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=59220&r1=59219&r2=59220&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Wed Nov 12 23:05:34 2008
@@ -1777,7 +1777,7 @@
                                      NodeSet& Dst) {
 
   const GRState* state = GetState(Pred);
-  QualType T = E->getType();
+  QualType T = getContext().getCanonicalType(E->getType());
   unsigned NumInitElements = E->getNumInits();  
 
   if (T->isArrayType() || T->isStructureType()) {
@@ -1847,7 +1847,7 @@
     return;
   }
 
-  if (T->isUnionType()) {
+  if (T->isUnionType() || T->isVectorType()) {
     // FIXME: to be implemented.
     MakeNode(Dst, E, Pred, state);
     return;

Modified: cfe/trunk/test/Analysis/misc-ps.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps.m?rev=59220&r1=59219&r2=59220&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/misc-ps.m (original)
+++ cfe/trunk/test/Analysis/misc-ps.m Wed Nov 12 23:05:34 2008
@@ -56,3 +56,11 @@
       ).__i))) & 0xff00) >> 8) == 1)
         ret = 1;
 }
+
+// InitListExpr processing
+
+typedef float __m128 __attribute__((__vector_size__(16), __may_alias__));
+__m128 return128() {
+  return __extension__(__m128) { 0.0f, 0.0f, 0.0f, 0.0f };
+}
+





More information about the cfe-commits mailing list