diff options
| author | Victor Chernyakin <chernyakin.victor.j@outlook.com> | 2025-10-27 20:04:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-27 20:04:00 -0700 |
| commit | 7de1a17cc64bfcd1f0de055682d562dfb6476fb2 (patch) | |
| tree | 9d6a50ea80c518426a6d902c71f87fd11606040a /llvm/test/DebugInfo/Generic/enum.ll | |
| parent | d63983b2c47befd34121de19320a778b97e5c520 (diff) | |
| download | llvm-7de1a17cc64bfcd1f0de055682d562dfb6476fb2.zip llvm-7de1a17cc64bfcd1f0de055682d562dfb6476fb2.tar.gz llvm-7de1a17cc64bfcd1f0de055682d562dfb6476fb2.tar.bz2 | |
[clang-tidy] Fix `modernize-use-scoped-lock` crash on malformed code (#165127)
This code:
```cpp
void f() {
std::lock_guard<std::mutex> dont_crash {some_nonexistant_variable};
}
```
Generates an AST like this:
```txt
TranslationUnitDecl
`-FunctionDecl <line:3:1, line:5:1> line:3:6 f 'void ()'
`-CompoundStmt <col:10, line:5:1>
`-DeclStmt <line:4:3, col:69>
`-VarDecl <col:3, col:31> col:31 dont_crash 'std::lock_guard<std::mutex>' destroyed
```
Where the `VarDecl` has no initializer. The check doesn't expect this
and crashes.
Diffstat (limited to 'llvm/test/DebugInfo/Generic/enum.ll')
0 files changed, 0 insertions, 0 deletions
