[LLVMbugs] [Bug 7133] New: clang doesn't enter intermediate scopes for out-of-line definitions of namespace members

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 13 16:00:59 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7133

           Summary: clang doesn't enter intermediate scopes for
                    out-of-line definitions of namespace members
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rjmccall at apple.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


namespace A {
  class Foo;
}

namespace A {
  namespace B {
    bool foo(Foo &);
  }
}

bool A::B::foo(Foo &) {
  return false;
}

daysthatwere:clang rjmccall$ clang++ /tmp/red.cpp
/tmp/red.cpp:11:12: error: redefinition of 'foo' as different kind of symbol
bool A::B::foo(Foo &) {
           ^
/tmp/red.cpp:7:10: note: previous definition is here
    bool foo(Foo &);
         ^
/tmp/red.cpp:11:16: error: use of undeclared identifier 'Foo'
bool A::B::foo(Foo &) {
               ^
/tmp/red.cpp:11:22: error: invalid token after top level declarator
bool A::B::foo(Foo &) {
                     ^
                     ;
3 errors generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list