[LLVMbugs] [Bug 13110] warn when 'const' is applied to a non-dependent typedef-name for a reference type

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Feb 18 16:14:20 PST 2014


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

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #15 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Warning added in r201620:

$ echo 'typedef int& IntRef;
void foo(const IntRef m);
void bar(int& const m);' | ./build/bin/clang -x c++ -
<stdin>:2:10: warning: 'const' qualifier on reference type 'IntRef' (aka 'int
&') has no effect [-Wignored-qualifiers]
void foo(const IntRef m);
<stdin>:3:15: error: 'const' qualifier may not be applied to a reference
void bar(int& const m);

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/20140219/e9716ee9/attachment.html>

More information about the llvm-bugs mailing list