root icon indicating copy to clipboard operation
root copied to clipboard

[TCling] Do not add decls for control statements if already annotated

Open devajithvs opened this issue 1 year ago • 9 comments

This Pull request:

Changes or fixes:

Checklist:

  • [ ] tested changes locally
  • [ ] updated the docs (if necessary)

This PR fixes https://github.com/root-project/root/issues/8367

devajithvs avatar Apr 28 '24 12:04 devajithvs

Test Results

    14 files      14 suites   3d 16h 32m 44s :stopwatch:  2 697 tests  2 696 :white_check_mark: 0 :zzz: 1 :x: 35 511 runs  35 510 :white_check_mark: 0 :zzz: 1 :x:

For more details on these failures, see this check.

Results for commit 0d357e3f.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Apr 28 '24 13:04 github-actions[bot]

Not a proper solution.

What we ideally want to do is check if a VarDecl with the same identifier is already added for the current ControlScope.

devajithvs avatar Apr 29 '24 08:04 devajithvs

I also think a test would be good. @vgvassilev in which subdirectory would you put the simple macro which was crashing in https://github.com/root-project/roottest/tree/master/cling ?

dpiparo avatar Apr 29 '24 20:04 dpiparo

Maybe we can do a death test in the test folder of core/metacling.

vgvassilev avatar Apr 30 '24 05:04 vgvassilev

rebased & test added

dpiparo avatar Sep 25 '24 08:09 dpiparo

I changed the test. Before we were also testing the "line" number according to the interpreter, which can be platform dependent. Now we are independent from that

dpiparo avatar Sep 25 '24 19:09 dpiparo

Can it be that this fix fixes also https://github.com/root-project/root/issues/15537 ? That's what I see, I think...

dpiparo avatar Sep 26 '24 05:09 dpiparo

As a note, once we remove auto auto support in: https://github.com/root-project/root/pull/16410, this will no longer be needed and will need to be reverted.

devajithvs avatar Sep 26 '24 06:09 devajithvs

Can it be that this fix fixes also #15537 ? That's what I see, I think...

Still fails for me. It seems important to put badcast into a macro...

hahnjo avatar Sep 26 '24 11:09 hahnjo