Skip to main content

clang-tidy for Unreal Engine

Catch C++ bugs before you run them.

Dozens of built-in checks for Unreal Engine

clang-tidy for Unreal Engine detects logical errors, performance issues and Unreal Engine specific bugs in your game code, including:

  • Missing Super::BeginDestroy() in derived BeginDestroy() implementations.
  • Forgetting to call DOREPLIFETIME() on a replicated property in your GetLifetimeReplicatedProps() function.
  • Function parameters which could be const references to avoid unnecessary memory copies.
  • Incorrectly using TArray<> APIs with references from for-range loops.
  • Storing shared references to online subsystem interfaces and objects beyond their expected lifetime.
  • Missing UPROPERTY() on UObject pointer fields within a UCLASS(), which would cause the garbage collector to not track a reference.
  • ... and more!

Works in every IDE

Whether you're building in Visual Studio, Rider, from the command line or on a build server, clang-tidy checks your code and emits warnings and errors as appropriate.

clang-tidy for Unreal Engine hooks into UnrealBuildTool, so there's no additional configuration. It just works, regardless of how you compile your code.

Plus, it also supports both Unreal Engine 4.27 and Unreal Engine 5.0 Early Access, so you can use it with the latest Unreal Engine features!

Write your own checks

With clang-tidy for Unreal Engine, you can write your own checks to detect bugs in your own game code.

Using the full power of Clang AST matchers, you can write your checks to target any C++ code you want. You can check for missing calls, incorrect usages of Unreal Engine APIs and anything else you can think of!

Refer to the documentation on how to write your own C++ checks.

check {
name = "my-custom-check",
description = [[Detects when you access the HelloWorld field on AMyActor.]],
matcher = [[
memberExpr(
hasObjectExpression( expr(
hasType( qualType(
pointsTo( cxxRecordDecl( hasName("AMyActor") ) )
) )
) ),
member(
valueDecl( hasName("HelloWorld") )
)
).bind("bad_access")
]],
message = [[do not access the HelloWorld field on AMyActor. call GetHelloWorld() instead.]],
callsite = "bad_access"
}

For Individuals

For one person:

$20 USD per month, or
$200 USD per year (save 20%)

For Teams

Per person:

$60 USD per month, or
$600 USD per year (save 20%)

Affordable for teams of any size

clang-tidy for Unreal Engine is priced at $20 USD per month for individuals and $60 USD per month per person for teams. There's also a 20% discount if you subscribe annually.

You are automatically upgraded to Teams when you purchase more than 1 seat in your subscription.

If you would like pricing tailored to your team, or if you're a large organisation looking for a trial period, please email [email protected] to get in touch with us.