mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
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:
parent
a8c60d65fc
commit
c3ed1a7995
Notes:
sideshowbarker
2024-07-17 23:02:37 +09:00
Author: https://github.com/mattco98
Commit: c3ed1a7995
Pull-request: https://github.com/SerenityOS/serenity/pull/24027
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/nico
5 changed files with 484 additions and 0 deletions
24
Meta/Lagom/ClangPlugins/LambdaCapturePluginAction.h
Normal file
24
Meta/Lagom/ClangPlugins/LambdaCapturePluginAction.h
Normal 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;
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue