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: unassignedclangb...@nondot.org
          Reporter: com...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to