Clang-tidy only supports AST-based matchers, you get type resolution but you still can only match simple patterns that only need local reasoning.
Infer does whole-program analysis, so it can for example detect whether it is safe to move an object instead of copying it, because nothing touches it afterwards.
https://clang.llvm.org/extra/clang-tidy/checks/performance/f...
https://clang.llvm.org/extra/clang-tidy/checks/performance/u...
https://clang.llvm.org/extra/clang-tidy/checks/performance/u...