[LLVMbugs] [Bug 15464] New: -Wunused-member-function should probably not fire in this code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 6 20:09:19 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=15464

            Bug ID: 15464
           Summary: -Wunused-member-function should probably not fire in
                    this code
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

We warn at

typedef struct {
  int foo() { return 0; }
} *A;

but such code can be put in a header file (the inline function is not emitted)
and foo can still be used from a .cpp file that includes the header:

typedef struct {
  int foo() { return 0; }
} *A;

extern "C" void f(A x) {
  x->foo();
}

-- 
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/20130307/0c717bbb/attachment.html>


More information about the llvm-bugs mailing list