[llvm-bugs] [Bug 25731] New: Compilation error in namespace alias (7.3.2) due to r253283
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Dec 3 14:35:00 PST 2015
https://llvm.org/bugs/show_bug.cgi?id=25731
Bug ID: 25731
Summary: Compilation error in namespace alias (7.3.2) due to
r253283
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: sgundapa at codeaurora.org
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 15394
--> https://llvm.org/bugs/attachment.cgi?id=15394&action=edit
Test case
As per standard
7.3.2 Namespace alias
In a declarative region, a namespace-alias-definition can be used to redefine a
namespace-alias declared in
that declarative region to refer only to the namespace to which it already
refers. [ Example: the following
declarations are well-formed:
namespace Company_with_very_long_name { / ... / }
namespace CWVLN = Company_with_very_long_name;
namespace CWVLN = Company_with_very_long_name; // OK: duplicate
namespace CWVLN = CWVLN;
—end example ]
The offending commit is r253283
I have attached a simple test.cpp to reproduce the error
$ clang++ -c test.cpp
/tmp/test.cpp:10:11: error: reference to 'alias' is ambiguous
int i = alias::var;
^
/tmp/test.cpp:9:13: note: candidate found by name lookup is 'alias'
namespace alias = sgundapa;
^
/tmp/test.cpp:8:13: note: candidate found by name lookup is 'alias'
namespace alias = sgundapa;
^
1 error generated.
--
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/20151203/49895e90/attachment.html>
More information about the llvm-bugs
mailing list