[LLVMbugs] [Bug 9462] New: Missing warning for const conversion operator

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 11 08:54:40 PST 2011


           Summary: Missing warning for const conversion operator
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


class foo  {
  operator int * const ();
  int * const bar();

clang produces a nice warning for the second case:

test.cc:4:9: warning: 'const' type qualifier on return type has no effect
  int * const bar();

but no warning for the conversion operator. We probably need a slightly
different wording, but it would be nice to have a similar warning for it.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list