aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-09-28 21:07:52 +0000
committerSteve Naroff <snaroff@apple.com>2008-09-28 21:07:52 +0000
commitaa5caa17ed34df5e1147d7b2ff447441c906f3da (patch)
tree83e0d983a2945d02562b2c2245720f6e2c66492a /lib
parentc9b2d8c809fca3ae87231d173d566a5ef7d4532a (diff)
Change a NOTE to a FIXME based on feedback from clattner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56775 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaExpr.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index c6115a8c38..269db214b7 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -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) {