summaryrefslogtreecommitdiffstats
path: root/clang/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
commitb6b1abb0f5b421bd9f25c7081d29ff3329f4177e (patch)
tree103b48461509402dfc334783e96ca488f9bcefe9 /clang/lib
parentc1048153fed1ab139fddf60ed72bd4406045ac8c (diff)
downloadbcm5719-llvm-b6b1abb0f5b421bd9f25c7081d29ff3329f4177e.tar.gz
bcm5719-llvm-b6b1abb0f5b421bd9f25c7081d29ff3329f4177e.zip
Change a NOTE to a FIXME based on feedback from clattner.
llvm-svn: 56775
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index c6115a8c385..269db214b70 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud