Skip to content
SPECIFICTION
Get listed

Clang Static Analyzer vs Infer

Clang Static Analyzer

clang-analyzer.llvm.org

Infer

fbinfer.com

Side by side

FigureClang Static AnalyzerInfer
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
Web—Yes
WindowsYes—
macOSYesYes
LinuxYesYes
Self-hosted—Yes
Plans published11
Spec score · Static Analysis Tools8.2 (#11)8.6 (#7)
Spec score · C and C++ Static Analysis Tools8.2 (#8)8.5 (#5)
LicenseCurrent LLVM releases are distributed under the Apache-2.0 with LLVM-exception license.The Infer repository states that Infer is MIT-licensed, while noting that enabling Java support may require GPL-licensed components.
PurposeClang Static Analyzer finds bugs in C, C++ and Objective-C programs.Infer is a static analysis tool that produces a list of potential bugs from Java or C/C++/Objective-C code.

Plans

Clang Static Analyzer

  • Clang Static AnalyzerFree

Clang Static Analyzer pricing →

Infer

  • Infer (free)Free

Infer pricing →

In their own words

Clang Static Analyzer

Clang Static Analyzer finds selected bugs in C, C++, and Objective-C programs. It uses symbolic execution to examine paths through code across function calls, and is part of the open-source Clang project. The analyzer is also implemented as a reusable C++ library for other tools and applications. Official releases include scan-build, a command-line tool for analyzing a codebase. On macOS, users can invoke it from Xcode; it can also run alongside clang-tidy when clang-analyzer checks are enabled. Clang-based IDEs may integrate the analyzer directly, and the documentation covers scan-build and CodeChecker. It runs on Linux, macOS, and Windows, and is self-hosted. The tool only detects bugs it has been designed to find, and analysis can take much longer than compilation. Some algorithms have exponential worst-case time, and results may include false positives. The listed free plan costs nothing.

Visit clang-analyzer.llvm.org

Infer

Infer is a static analysis tool that examines compiled Java, C, C++, Objective-C, and Erlang code and reports potential bugs before release. Its checks include null pointer problems, resource or memory leaks, coding conventions, unavailable APIs, and concurrency issues such as data races. Some analyses can follow an issue across multiple functions or methods and files. Pulse provides memory-safety analysis, while RacerD checks thread safety. Cost analysis estimates asymptotic function complexity for Java and C-family languages; Hack support is experimental, and Python, Rust, and Swift are not supported by that analysis. Infer captures compilation commands, analyzes the captured files, and writes reports that can be reviewed with `infer explore`; files that are not compiled are not analyzed. Integrations are documented for build tools including Buck, CMake, Gradle, Make, Maven, Xcodebuild, and xctool. It can be installed from binary releases, built from source, or run in Docker. The free plan costs nothing. Infer runs on Linux and macOS, with web and self-hosted options; Windows is not supported.

Visit fbinfer.com