Issue |
133319
|
Summary |
[clang-tidy] Check request: readability-use-map-at
|
Labels |
clang-tidy
|
Assignees |
|
Reporter |
denzor200
|
Needs a check that will find an usage of `std::map::find` without result's checking and will suggest to use `std::map::at` instead.
```
const std::map<std::string, std::string> values = get_values();
// process(values["first"]); // BAD - even didn't compiled
process(values.find("first")->second); // BAD - unreadable and unsafe
process(values.at("second")); // OK
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs