xref: /llvm-project/lldb/test/API/commands/expression/dollar-in-variable/main.c (revision 048d11de43be087fd2fa0c5e35f20486f6094c29)
199451b44SJordan Rupprecht // Make sure we correctly handle $ in variable names.
299451b44SJordan Rupprecht 
main()399451b44SJordan Rupprecht int main() {
499451b44SJordan Rupprecht   // Some variables that might conflict with our variables below.
599451b44SJordan Rupprecht   int __lldb_expr_result = 2;
699451b44SJordan Rupprecht   int $$foo = 1;
799451b44SJordan Rupprecht   int R0 = 2;
899451b44SJordan Rupprecht 
999451b44SJordan Rupprecht   // Some variables with dollar signs that should work (and shadow
1099451b44SJordan Rupprecht   // any built-in LLDB variables).
1199451b44SJordan Rupprecht   int $__lldb_expr_result = 11;
1299451b44SJordan Rupprecht   int $foo = 12;
1399451b44SJordan Rupprecht   int $R0 = 13;
1499451b44SJordan Rupprecht   int $0 = 14;
1599451b44SJordan Rupprecht 
16*048d11deSRaphael Isemann   return 0; // break here
1799451b44SJordan Rupprecht }
18