[llvm-bugs] [Bug 39075] New: Unnecessary notes from cplusplus.VirtualCall

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 25 07:33:39 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=39075

            Bug ID: 39075
           Summary: Unnecessary notes from cplusplus.VirtualCall
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: kalle.huttunen at ge.com
                CC: llvm-bugs at lists.llvm.org

The checker for virtual calls made in constructors produces unnecessary notes
about where the constructor was called from:

library.hpp:2:11: warning: Call to virtual function during construction
[clang-analyzer-optin.cplusplus.VirtualCall]
    foo() { f(); }
          ^
main.cpp:3:18: note: Calling default constructor for 'foo'
  int main() { foo f; }

The call to a virtual function is present in the constructor regardless of
where the constructor is used (or if it's not used at all). This note is
causing issues when running the checker in clang-tidy (see
https://bugs.llvm.org/show_bug.cgi?id=38484).

-- 
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/20180925/03cd403a/attachment.html>


More information about the llvm-bugs mailing list