Nox-Lumen MfgNox-Lumen Mfg

C / C++ static analysis

C/C++ L1 review pairs two skills aligned with MISRA / AUTOSAR / CERT expectations.

SkillAxisOne-liner
clang-tidyRules + modernizationbugprone / performance / modernize / cert / security checks
cppcheckBugsLeaks / null deref / OOB / UB (no compile needed)

clang-tidy

Role: LLVM-backed static analysis with very broad check catalog.

Check familyCoverage
bugprone-*Classic bug shapes
performance-*Copies, inefficient containers
modernize-*C++11/14/17/20 upgrades
cert-*CERT secure coding
cppcoreguidelines-*C++ Core Guidelines
clang-analyzer-*Path-sensitive analyzer
misra-* (third-party plugins)MISRA C:2012

Prereq: compile_commands.json (CMake can emit easily).

Need references / call graphs?

clang-tidy / cppcheck focus on violations. For cross-file references, call chains, inheritance, enable code index · heavy tier so the compiler database drives accurate references / call graphs.

Triggers: “modernize C++”, “run clang-tidy”, “MISRA sweep”

cppcheck

Role: C/C++ bug finder without compilation (source-only).

SignalExample
Leaksmalloc without free, exception-path leaks
Null derefif (!p) return; *p = 1; misuse
OOBint a[5]; a[5] = 1;
UBOverflow, uninitialized reads
Resource leaksFDs, sockets, mutexes
API misuseoverlapping memcpy, bad printf formats

Why use it

  • No compiler environment (no compile_commands.json)
  • Great for third-party or legacy trees
  • Complements clang-tidy (finer rules vs easier setup)

Triggers: “memory leak scan”, “run cppcheck”, “buffer overflow check”

Run both

cppcheck     → fast bug sweep (low setup cost)
clang-tidy   → deep rules + modernization (needs compile_commands.json)

Overlap exists—enable both; merge to CodeEvidence for code-review L2.

Automotive usage

  1. standards-converter turns MISRA trim lists into .clang-tidy
  2. clang-tidy + cppcheck for L1
  3. code-review L2 against ISO 26262 requirements
  4. Post results via gerrit-integration

On this page