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.
This commit is contained in:
Matthew Olsson 2024-04-15 18:45:38 -07:00 committed by Andrew Kaster
commit c3ed1a7995
Notes: sideshowbarker 2024-07-17 23:02:37 +09:00
5 changed files with 484 additions and 0 deletions

View file

@ -0,0 +1,24 @@
/*
* 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;
}
};