ladybird/Meta/Lagom/ClangPlugins/LambdaCapturePluginAction.h
Matthew Olsson c3ed1a7995 Lagom: Add ClangPlugins
This is a more general and robust replacement of the LibJSGCVerifier.
We want to add more generic static analysis, and this new plugin will
be built in a way that integrates into the rest of the system.
2024-05-13 16:50:54 -06:00

24 lines
583 B
C++

/*
* Copyright (c) 2024, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <clang/Tooling/Tooling.h>
class LambdaCapturePluginAction : public clang::PluginASTAction {
public:
virtual bool ParseArgs(clang::CompilerInstance const&, std::vector<std::string> const&) override
{
return true;
}
virtual std::unique_ptr<clang::ASTConsumer> CreateASTConsumer(clang::CompilerInstance&, llvm::StringRef) override;
ActionType getActionType() override
{
return AddAfterMainAction;
}
};