[llvm-bugs] [Bug 42856] New: consumed checker does not check param_typestate/return_typestate on constructor arguments

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 31 18:39:52 PDT 2019


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

            Bug ID: 42856
           Summary: consumed checker does not check
                    param_typestate/return_typestate on constructor
                    arguments
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: comexk at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

In clang/lib/Analysis/Consumed.cpp, when the analysis sees a function, method,
or operator call, it calls handleCall, which (among other things) checks for
param_typestate and return_typestate attributes on formal parameters from the
corresponding function declaration, and updates the state of the actual
parameters accordingly.  But ConsumedStmtVisitor::VisitCXXConstructExpr does
not call handleCall, so any param_typestate and return_typestate attributes on
constructor parameters will be ignored.  The only handling of parameters in
that case are the special cases for move and copy constructors.

This should be fixed to respect those attributes on constructors parameters.

-- 
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/20190801/619f931d/attachment.html>


More information about the llvm-bugs mailing list