[LLVMbugs] [Bug 15680] New: Clang does not find identifiers imported into namespaces by "using namespace"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 4 18:05:36 PDT 2013


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

            Bug ID: 15680
           Summary: Clang does not find identifiers imported into
                    namespaces by "using namespace"
           Product: clang
           Version: trunk
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: M8R-9yw8a5 at mailinator.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

1. Source code (x.cpp):

namespace A { void f() { } }
namespace B { using namespace A; void g(); }
void B::g() { f(); }

2. Command line:

clang++ -c x.cpp

3. Output:

error: use of undeclared identifier 'f'; did you mean 'f'?

4. Notes:

This FEATURE(TM) was introduced somewhere in the revision range
(177716..178453] (at r177716, Clang compiles the code).

This is either a bug or a standard-conformant behavior change, but in the
latter case, diagnostics messages should be more explanatory: the compiler
should direct the user to 'A::f()'.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130405/f25903c9/attachment.html>


More information about the llvm-bugs mailing list