[clang-tidy] Small refactor for ExceptionAnalyzer
authorAMS21 <AMS21.github@gmail.com>
Tue, 4 Apr 2023 06:39:15 +0000 (06:39 +0000)
committerPiotr Zegar <me@piotrzegar.pl>
Tue, 4 Apr 2023 07:20:26 +0000 (07:20 +0000)
commite588ef8a7a531380836e17242c2c2276559df0b9
tree45f230e0755e256b76b06b74169fd5b71f43a81a
parent25956d55d02489964428ab5f55e609ff16c6632d
[clang-tidy] Small refactor for ExceptionAnalyzer

- Use llvm::DenseMap<> with pre-allocation instead of std::map<> for FunctionCache
- Avoid double lookup for FunctionCache
- Use try_emplace instead of insert
- Simplify definition of State enum

Reviewed By: PiotrZSL

Differential Revision: https://reviews.llvm.org/D147376
clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h