[TCling] Do not add decls for control statements if already annotated
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
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.
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.
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 ?
Maybe we can do a death test in the test folder of core/metacling.
rebased & test added
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
Can it be that this fix fixes also https://github.com/root-project/root/issues/15537 ? That's what I see, I think...
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.
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...