| Issue |
114570
|
| Summary |
Clang-tidy should detect undefined behaviour on container access
|
| Labels |
|
| Assignees |
|
| Reporter |
Tasty213
|
Hi,
Spent the day tracking down a segfault that turned out to be because we where calling front on a std::deque and then de-referencing it to call a value on that returned element, but because we hadn't checked the size of the deque first we hit a segfault if it was empty as that's undefined behaviour. Just wondering if there's a clang-tidy check for calling these methods on collections (std::list's front method is also undefined on an empty list)?
Thanks in advance!
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs