diff options
| author | Yutong Zhu <115899167+YutongZhuu@users.noreply.github.com> | 2025-02-11 08:53:19 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-11 08:53:19 -0500 |
| commit | 8d902f2cb0bc8825bcde911897e99aadbd5d28e9 (patch) | |
| tree | f82ebb2d6b9026f5b77b0c09fa757b823bf8b11c /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
| parent | 82bd148a3f25439d7f52a32422dc1bcd2da03803 (diff) | |
[clang] Force AttributedStmtClass to not be scope parents (#125370)
Example from the issue:
```c++
void Func(int x) {
switch (x) {
[[likely]] case 0:
case 1:
int i = 3;
case 2:
break;
}
}
```
Clang checks if ``case 2`` can be reachable by checking its scope. The
variable declaration should create a scope containing ``case 2``, but
due to the structure of the AST, ``case 2`` gets the scope of the
``likely`` statement, but not ``int i = 3;``. Therefore, I changed this
code to force attribute statement not to be scope parents.
Fixes #84072
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions
