Michael137 wrote:

> BTW, if this patch breaks that feature w/o some test catching it, we should 
> add a test for these allowed keywords.

This patch doesn't break said feature. It only breaks if you explicitly pass 
`expression --language C`, and expect it to work. If it's a C frame, then 
`expression class = 123` will still work.

This is what your example now would look like:
```
(lldb) f
frame #0: 0x0000000100000490 a.out`main at main.c:5:1
   1    int main() {
   2      int class = 100;
   3      __builtin_printf("class is: %d.\n", class);
   4      __builtin_debugtrap();
-> 5    }
(lldb) expr class
(int) $1 = 100
(lldb) expr -l c -- class
error: invalid language 'c' for expression. List of supported languages:
  c++
  objective-c++
  c++03
  c++11
  c++14
  c++17
  c++20
  objc++
(lldb) expr -l c++ -- class
                      ˄
                      ╰─ error: declaration of anonymous class must be a 
definition
                      ╰─ warning: declaration does not declare anything
```

https://github.com/llvm/llvm-project/pull/156648
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to