[cfe-commits] r56775 - /cfe/trunk/lib/Sema/SemaExpr.cpp

Steve Naroff snaroff at apple.com
Sun Sep 28 14:07:54 PDT 2008


Author: snaroff
Date: Sun Sep 28 16:07:52 2008
New Revision: 56775

URL: http://llvm.org/viewvc/llvm-project?rev=56775&view=rev
Log:
Change a NOTE to a FIXME based on feedback from clattner.

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=56775&r1=56774&r2=56775&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sun Sep 28 16:07:52 2008
@@ -312,8 +312,17 @@
 /// DeclDefinedWithinScope - Return true if the specified decl is defined at or
 /// within the 'Within' scope.  The current Scope is CurScope.
 ///
-/// NOTE: This method is extremely inefficient (linear scan), this should not be
-/// used in common cases.
+/// FIXME: This method is extremely inefficient (linear scan), this should not
+/// be used in common cases. Replace with the more modern DeclContext. We need
+/// to make sure both assignments below produce an error.
+///
+/// int main(int argc) {
+///   int xx;
+///   ^(int X) {
+///     xx = 4; // error (variable is not assignable)
+///     argc = 3; // no error.
+///   };
+/// }
 ///
 static bool DeclDefinedWithinScope(ScopedDecl *D, Scope *Within,
                                    Scope *CurScope) {





More information about the cfe-commits mailing list