LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 14644 - clang confuses scope operator for global namespace giving extra qualification on member
Summary: clang confuses scope operator for global namespace giving extra qualification...
Status: REOPENED
Alias: None
Product: clang
Classification: Unclassified
Component: C++ (show other bugs)
Version: trunk
Hardware: Macintosh MacOS X
: P normal
Assignee: Ryan Yee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-18 23:40 PST by Francisco Lopes
Modified: 2016-02-07 10:11 PST (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francisco Lopes 2012-12-18 23:40:14 PST
Blocks building Qt5:

class QCocoaWindow {};

class ::QCocoaWindow;

int main()
{
}

diagnostics:
error: extra qualification on member 'QCocoaWindow'

compiles and runs fine on gcc.

clang -v
clang version 3.3 (trunk 170492)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
Comment 1 Francisco Lopes 2012-12-18 23:47:52 PST
apple gcc didn't warn nothing... It's seems to be wrong, and also the code sample.
Comment 2 Fernando Pelliccioni 2013-03-08 19:06:37 PST
Why invalid?
Comment 3 Francisco Lopes 2013-03-09 08:04:04 PST
At the time, I've realized the Qt5 codebase was buggy causing such situation, the problem was solved on Qt5 and as I was not sure about whether this was a true language error or not, I've marked it as invalid.
Comment 4 Fernando Pelliccioni 2013-03-09 17:49:42 PST
According to the C++ Standard ( N3485 )
    3.4.4 Elaborated type specifiers [basic.lookup.elab]
    Example in paragraph 3

...I think it is right that the compiler emits an error, but I think the error description is incorrect.

What do you think?
Does the bug should be re-opened?

Regards,
Comment 5 Francisco Lopes 2013-03-09 18:30:48 PST
I think you're right about it.
Comment 6 Ryan Yee 2016-02-07 10:11:32 PST
Created a review here: http://reviews.llvm.org/D16965