<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Analyzer: "Potential memory leak" warning from std::unique_ptr move-only assignment operator"
   href="https://bugs.llvm.org/show_bug.cgi?id=32234">32234</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Analyzer: "Potential memory leak" warning from std::unique_ptr move-only assignment operator
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Static Analyzer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>kremenek@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>marshallk@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>LLVM version: clang version 5.0.0 (trunk 296321)
Platform: Linux; target: Linux
Code:
<a href="https://cs.chromium.org/chromium/src/dbus/values_util.cc?rcl=094b5e38f83ceebb408911139f194dd3705e54be&l=199">https://cs.chromium.org/chromium/src/dbus/values_util.cc?rcl=094b5e38f83ceebb408911139f194dd3705e54be&l=199</a>

[1375/20604] CXX obj/dbus/dbus/values_util.o
In file included from ../../dbus/values_util.cc:5:
In file included from ../../dbus/values_util.h:10:
In file included from
../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/memory:85:
../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/unique_ptr.h:190:4:
warning: Potential memory leak
          return *this;
          ^
../../dbus/values_util.cc:94:3: note: Control jumps to 'case STRUCT:'  at line
197
  switch (reader->GetDataType()) {
  ^
../../dbus/values_util.cc:199:11: note: Assuming the condition is true
      if (reader->PopStruct(&sub_reader)) {
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../dbus/values_util.cc:199:7: note: Taking true branch
      if (reader->PopStruct(&sub_reader)) {
      ^
../../dbus/values_util.cc:200:53: note: Memory is allocated
        std::unique_ptr<base::ListValue> list_value(new base::ListValue);
                                                    ^~~~~~~~~~~~~~~~~~~
../../dbus/values_util.cc:201:9: note: Taking true branch
        if (PopListElements(&sub_reader, list_value.get()))
        ^
../../dbus/values_util.cc:202:11: note: Calling 'unique_ptr::operator='
          result = std::move(list_value);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/unique_ptr.h:190:4:
note: Potential memory leak
          return *this;
          ^
1 warning generated.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>