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

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Oct 23 19:46:26 PDT 2015


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

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk
         Resolution|---                         |WONTFIX

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
(In reply to comment #0)
> It would have been nicer to recover by inserting a '}' before 'namespace
> Bar'.

That would require extreme lookahead or reverting a lot of parser state, both
of which are not feasible. Nothing is obviously wrong here until we reach the
ill-formed call to ::Bar::thud, and that error is indistinguishable from the
nested name specifier on the call being wrong, which is what we say.

I don't think this is feasible for us to improve, unless you have some specific
suggestion for how we would detect the problem.

-- 
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/20151024/5144f96a/attachment-0001.html>


More information about the llvm-bugs mailing list