User Activity

  • Posted a comment on discussion Development on cppcheck

    Awesome, thanks!

  • Posted a comment on discussion Development on cppcheck

    Sample code snippet // A type alias definition in some include. using UniqueBuffer = std::tuple<std::unique_ptr<uint8_t[]>, size_t>; // class member. std::queue<UniqueBuffer> _queue; // somewhere in a class member function... auto& headerbuf = _queue.emplace(); std::get<0>(headerbuf) = std::unique_ptr<uint8_t[]>(new uint8_t[headersize]); std::get<1>(headerbuf) = headersize; cppcheck highlights last two lines with error Using reference to dangling temporary.CppCheck(danglingTempReference). Note that...

  • Posted a comment on discussion General Discussion on cppcheck

    I'm running cppcheck via an extension to VSCode (I have 3 or 4 C++ related extensions, and not sure part of which cppcheck is run), and noticed a false positive selfAssignment being flagged for cases where such assignment is required by compiler/spec. Consider the following code: auto [partA, partB] = getSomeTupleOfSomething(); // returns std::tuple<A,B>. auto someLambda = [partB = partB]() { doSomething(partB)}; cppcheck flags selfAssignment on the lambda definition capture list because it sees...

View All

Personal Data

Username:
lonchik
Joined:
2021-03-31 19:10:29

Projects

  • No projects to display.

Personal Tools