[llvm-bugs] [Bug 25303] New: Unclosed namespace causes cryptic errors

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Oct 23 15:57:27 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=25303

            Bug ID: 25303
           Summary: Unclosed namespace causes cryptic errors
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: amccarth at google.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

consider:
namespace Foo {

namespace Bar {  void thud(); }
void qux() {
  ::Bar::thud();
}

clang generates the following diagnostics:
error: no member named 'Bar' in the global namespace; did you mean simply
'Bar'?
::Bar::thud();
^~~~~
Bar
note: 'Bar' declared here
namespace Bar { void thud(); }
^
error: expected '}'
}
^
note: to match this '{'
namespace Foo {
^
2 errors generated.

It would have been nicer to recover by inserting a '}' before 'namespace Bar'.

-- 
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/20151023/c9dc81bd/attachment.html>


More information about the llvm-bugs mailing list