[cfe-commits] r79190 - /cfe/trunk/lib/AST/Expr.cpp

Chris Lattner sabre at nondot.org
Sun Aug 16 09:45:19 PDT 2009


Author: lattner
Date: Sun Aug 16 11:45:18 2009
New Revision: 79190

URL: http://llvm.org/viewvc/llvm-project?rev=79190&view=rev
Log:
This is an attempt to improve loc info for 'unused result' expression
warnings, but it fails because we don't have the location of the .
and I don't understand ObjCKVCRefExpr.  I'll revisit this later.

Modified:
    cfe/trunk/lib/AST/Expr.cpp

Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=79190&r1=79189&r2=79190&view=diff

==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Sun Aug 16 11:45:18 2009
@@ -541,6 +541,18 @@
   }
   case ObjCMessageExprClass:
     return false;
+      
+  case ObjCKVCRefExprClass: {   // Dot syntax for message send.
+#if 0
+    const ObjCKVCRefExpr *KVCRef = cast<ObjCKVCRefExpr>(this);
+    // FIXME: We really want the location of the '.' here.
+    Loc = KVCRef->getLocation();
+    R1 = SourceRange(KVCRef->getLocation(), KVCRef->getLocation());
+    if (KVCRef->getBase())
+      R2 = KVCRef->getBase()->getSourceRange();
+#endif
+    return true;
+  }
   case StmtExprClass: {
     // Statement exprs don't logically have side effects themselves, but are
     // sometimes used in macros in ways that give them a type that is unused.





More information about the cfe-commits mailing list