// Find places where a std::unique_ptr is release()'ed and returned as a raw // pointer. Some occurrences of that might better be rewritten to return the // unique_ptr is returned directly. (But other occurrences might be fine the // way they are, hence place this plugin into store/).
#include <memory> #include"plugin.hxx"
namespace {
class ReturnUnique: public loplugin::FilteringPlugin<ReturnUnique>
{ public: explicit ReturnUnique(InstantiationData const & data): FilteringPlugin(data) {}
void run() override { if (compiler.getLangOpts().CPlusPlus) {
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.