teemperor requested changes to this revision.
teemperor added a comment.
This revision now requires changes to proceed.
Herald added a subscriber: JDevlieghere.

Could you add a test for that? The usual test fixit in Clang is `.`/`->` mixup, 
e.g.

  (lldb) expr struct Foo { int i; }; Foo *f; f.i ; 
unknown_identifier_for_fatal_error
  (int) $0 = 0
    Fix-it applied, fixed expression was: 
      struct Foo { int i; }; Foo *f; f->i ; unknown_identifier_for_fatal_error
  ...

I think this patch also needs to update `UserExpression::Evaluate` which, IIRC, 
is clearing the fixed expression when it fails to parse.

The direction of the patch is IMHO fine. One thing that would be nice is to see 
if we could maybe preserve the Fix-It diagnostics from the original expression. 
If we just return whatever the fixed expression fails with then it's not clear 
why the compiler actually generated a Fix-It. But that's more of a nice-to-have 
I think.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109908/new/

https://reviews.llvm.org/D109908

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to