[LLVMbugs] [Bug 21116] New: [RFE] Diagnostic for when .cpp file does not implement all methods

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 1 11:04:28 PDT 2014


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

            Bug ID: 21116
           Summary: [RFE] Diagnostic for when .cpp file does not implement
                    all methods
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: daniel at zuster.org
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

It is a common convention for all out of line methods of a C++ class to be
implemented in a single C++ file.

It would be nice if clang had a warning to enforce this, instead of only having
this mistake be detected at link time (or never, if no one calls the method).
Essentially I want the diagnostic on any unimplemented out-of-line methods when
clang sees that I implemented at least one out-of-line method of a class in the
main file.

--
$ cat t.cpp
class A {
  void a();
  void b();  // expected-warning{{unimplemented method}}
};

void A::a() {}
$ clang -cc1 -verify t.cpp
error: 'warning' diagnostics expected but not seen: 
  File t.cpp Line 3: unimplemented method
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/20141001/7dcfc75a/attachment.html>


More information about the llvm-bugs mailing list