]> granicus.if.org Git - clang/commitdiff
Change a NOTE to a FIXME based on feedback from clattner.
authorSteve Naroff <snaroff@apple.com>
Sun, 28 Sep 2008 21:07:52 +0000 (21:07 +0000)
committerSteve Naroff <snaroff@apple.com>
Sun, 28 Sep 2008 21:07:52 +0000 (21:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56775 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index c6115a8c385cf6dacca226c11ea9a15a4d244b8c..269db214b70a2568e774f836eea0f80515af171d 100644 (file)
@@ -312,8 +312,17 @@ Sema::ActOnStringLiteral(const Token *StringToks, unsigned NumStringToks) {
 /// 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) {