================ @@ -0,0 +1,93 @@ +//===- unittests/StaticAnalyzer/CheckLifetimeEndTest.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "CheckerRegistration.h" +#include "Reusables.h" +#include "clang/Frontend/CompilerInstance.h" +#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h" +#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h" +#include "clang/StaticAnalyzer/Core/Checker.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h" +#include "clang/StaticAnalyzer/Frontend/CheckerRegistry.h" +#include "llvm/Config/llvm-config.h" +#include "gtest/gtest.h" + +namespace clang { +namespace ento { +namespace { + +class LifetimeEndReporter : public Checker<check::LifetimeEnd> { + using Self = LifetimeEndReporter; + const BugType LifetimeEndNode{this, "LifetimeEndReporter"}; + + bool report(CheckerContext &C, StringRef Description) const { ---------------- steakhal wrote:
One usually pass twines as const refs to avoid coping the binary trees inside it. https://github.com/llvm/llvm-project/pull/201123 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
