[cfe-commits] r160375 - /cfe/trunk/lib/StaticAnalyzer/Core/Calls.cpp

Jordan Rose jordan_rose at apple.com
Tue Jul 17 10:27:11 PDT 2012


Author: jrose
Date: Tue Jul 17 12:27:10 2012
New Revision: 160375

URL: http://llvm.org/viewvc/llvm-project?rev=160375&view=rev
Log:
[analyzer] Remove stale result type lvalue code.

This code has been moved around multiple times, but seems to have been
obsolete ever since we started handled references like pointers.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/Calls.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/Calls.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/Calls.cpp?rev=160375&r1=160374&r2=160375&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/Calls.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/Calls.cpp Tue Jul 17 12:27:10 2012
@@ -38,16 +38,8 @@
 QualType CallEvent::getResultType() const {
   QualType ResultTy = getDeclaredResultType();
 
-  if (const Expr *E = getOriginExpr()) {
-    if (ResultTy.isNull())
-      ResultTy = E->getType();
-
-    // FIXME: This is copied from CallOrObjCMessage, but it seems suspicious.
-    if (E->isGLValue()) {
-      ASTContext &Ctx = State->getStateManager().getContext();
-      ResultTy = Ctx.getPointerType(ResultTy);
-    }
-  }
+  if (ResultTy.isNull())
+    ResultTy = getOriginExpr()->getType();
 
   return ResultTy;
 }





More information about the cfe-commits mailing list