Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cling] Do not wrap overloaded operator function declarations #11265

Conversation

jiangyilism
Copy link
Contributor

Changes or fixes:

Let a_t be a c++ class, and we have done using std::ostream;.
In standalone cling cmd prompt, all of the below function definitions fail to be parsed and compiled(incrementally).

::a_t& ::a_t::operator()(int k) {return *this; }
const a_t& a_t::operator[](int k) const {return *this; }
a_t::a_t() = default;
a_t::~a_t() = delete;
::a_t& ::a_t::operator()(int k) {return *this; }
std::ostream& operator>>(std::ostream& os, const a_t& a) {return (os << a.str << '\n');}
ostream& operator>>(std::ostream& os, const a_t& a) {return (os << a.str << '\n');}
const std::ostream& operator "" _tt(unsigned long long t) {return std::cout << "tt is " << t << '\n'; }
::a_t& operator>=(a_t &lhs, int t) {return lhs; }
a_t& operator<=(::a_t &lhs, int t) {return lhs; }
const a_t& operator<(a_t &lhs, int t) {return lhs; }
const ::a_t& operator>(a_t &lhs, int t) {return lhs; }

They get "error: function definition is not allowed here" due to cling::utils::getWrapPoint() wrongly determines to wrap function definition inside wrapper function __cling_Un1Qu3... . The root cause is that MinimalPPLexer::IsClassOrFunction() does not parse them as function definitions. This pullrequest enables MinimalPPLexer::IsClassOrFunction() to parse these kinds of func def but there are probably more edge cases of standard c++ func def not being recognized by MinimalPPLexer::IsClassOrFunction().

Checklist:

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

This PR fixes "error: function definition is not allowed here" ( root-project/cling#184 ).

@phsft-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@jalopezg-git
Copy link
Contributor

@phsft-bot build

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on windows10/cxx14.
See console output.

@jalopezg-git
Copy link
Contributor

@jiangyilism Thanks for the pull request; I'll review soon. I had an issue open for this since Dec 2021 (#9449)

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-ubuntu18.04/nortcxxmod.
Running on sft-ubuntu-1804-3.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2022-12-22T18:32:30.793Z] /mnt/build/workspace/root-pullrequests-build/build/include/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:32:30.793Z] /mnt/build/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:32:30.793Z] /mnt/build/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:32:36.225Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:32:37.149Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:32:37.404Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:32:37.404Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:32:39.256Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:32:40.617Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:32:42.500Z] /mnt/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]

And 60 more

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-performance-centos8-multicore/cxx17.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Errors:

  • [2022-12-22T19:00:01.557Z] 1219/2420 Test [IMT] Add TThreadedObject::GetAtSlotRaw #934: tutorial-roostats-IntervalExamples ................................................................***Failed Error regular expression found in output. Regex=[: error:] 0.86 sec
  • [2022-12-22T19:00:01.818Z] 1222/2420 Test [cxxmodules] Mark libc/STL as system #931: tutorial-roostats-FourBinInstructional ............................................................***Failed Error regular expression found in output. Regex=[: error:] 1.11 sec
  • [2022-12-22T19:00:02.090Z] 1223/2420 Test [cxxmodules] Unify *32 dictionaries into one #936: tutorial-roostats-OneSidedFrequentistUpperLimitWithBands ..........................................***Failed Error regular expression found in output. Regex=[: error:] 0.85 sec
  • [2022-12-22T19:00:02.090Z] 1224/2420 Test Added TMCThreadLocalStatic type (according to Geant4 tls.hh) #939: tutorial-roostats-StandardFeldmanCousinsDemo ......................................................***Failed Error regular expression found in output. Regex=[: error:] 0.71 sec
  • [2022-12-22T19:00:03.137Z] 1232/2420 Test [cmake] Stop searching headers in the default paths #948: tutorial-roostats-TwoSidedFrequentistUpperLimitWithBands ..........................................***Failed Error regular expression found in output. Regex=[: error:] 1.00 sec
  • [2022-12-22T19:00:03.981Z] 1243/2420 Test Fix Imt configure in the classic build #950: tutorial-roostats-rs101_limitexample ..............................................................***Failed Error regular expression found in output. Regex=[: error:] 1.59 sec
  • [2022-12-22T19:00:04.491Z] 1245/2420 Test Added new TVirtualMC functions TrackPosition|Momentum(Float_t& ...): #954: tutorial-roostats-rs401c_FeldmanCousins ...........................................................***Failed Error regular expression found in output. Regex=[: error:] 1.14 sec

Warnings:

  • [2022-12-22T18:55:01.486Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:55:02.813Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:55:03.069Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:55:03.069Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RNTupleDS.hxx:96:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:55:03.069Z] /data/sftnight/workspace/root-pullrequests-build/build/include/ROOT/RNTupleDS.hxx:98:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:55:14.359Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:55:16.631Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:55:16.900Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:118:81: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:55:16.900Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RNTupleDS.hxx:97:86: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:55:16.900Z] /data/sftnight/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RNTupleDS.hxx:99:47: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]

And 130 more

Failing tests:

And 7 more

@phsft-bot
Copy link
Collaborator

Build failed on mac12/noimt.
Running on macphsft18.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2022-12-22T18:52:34.160Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:52:34.160Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:52:34.160Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:52:34.160Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:52:34.160Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:52:34.160Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:52:34.161Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:52:34.161Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:52:34.161Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:52:34.161Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]

And 53 more

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-ubuntu2004/python3.
Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2022-12-22T18:50:34.850Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:50:34.850Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:50:34.850Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T18:50:34.850Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:50:34.850Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:50:34.850Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:50:34.850Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:50:34.850Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RCsvDS.hxx:114:114: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:50:34.850Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSqliteDS.hxx:118:81: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
  • [2022-12-22T18:50:34.850Z] /home/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:215:7: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]

And 54 more

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on mac11/cxx14.
Running on macphsft23.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

Warnings:

  • [2022-12-22T19:19:00.380Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T19:19:00.381Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RCsvDS.hxx:112:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T19:19:00.381Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RSqliteDS.hxx:117:1: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T19:19:39.994Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T19:19:43.315Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T19:19:44.735Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T19:19:45.685Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T19:19:47.077Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T19:19:48.018Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
  • [2022-12-22T19:19:50.620Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RDataSource.hxx:213:11: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]

And 54 more

Failing tests:

And 7 more

@jalopezg-git
Copy link
Contributor

@phsft-bot build

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@jalopezg-git jalopezg-git changed the title Enhance support of cling cmd prompt func defining [cling] Do not wrap overloaded operator function declarations Jan 11, 2023
@phsft-bot
Copy link
Collaborator

Build failed on mac11/cxx14.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@Axel-Naumann Axel-Naumann requested review from vgvassilev and removed request for Axel-Naumann January 12, 2023 06:58
Copy link
Member

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. Does this pass cling's testsuite?

FWIW, we have landed a patch in clang in that area - https://reviews.llvm.org/D127284 which should be backportable but might need more work to properly adopt in cling.

Copy link
Contributor

@jalopezg-git jalopezg-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for the contribution, @jiangyilism! 👍 I have attached a few suggestions.

Also, does the patch pass the cling test suite? Additionally, we would need to add a few tests cases for this (namely those in the pull request description) -- those should be placed in the interpreter/cling/test/ directory.

Are you up for it? 🙂

interpreter/cling/lib/Utils/SourceNormalization.cpp Outdated Show resolved Hide resolved
interpreter/cling/lib/Utils/SourceNormalization.cpp Outdated Show resolved Hide resolved
interpreter/cling/lib/Utils/SourceNormalization.cpp Outdated Show resolved Hide resolved
interpreter/cling/lib/Utils/SourceNormalization.cpp Outdated Show resolved Hide resolved
interpreter/cling/lib/Utils/SourceNormalization.cpp Outdated Show resolved Hide resolved
interpreter/cling/lib/Utils/SourceNormalization.cpp Outdated Show resolved Hide resolved
interpreter/cling/lib/Utils/SourceNormalization.cpp Outdated Show resolved Hide resolved
@jiangyilism
Copy link
Contributor Author

jalopezg-git

Thanks for the review. I will address the issues and add test cases in interpreter/cling/test/ .

@jalopezg-git
Copy link
Contributor

@jiangyilism, any progress in this regard?

@mylyu
Copy link

mylyu commented Jun 4, 2023

Any progress? I am college teacher and I can't teach student to overload cout<<Object in cling due to this issue!

@mylyu
Copy link

mylyu commented Jun 5, 2023 via email

@jiangyilism jiangyilism force-pushed the enhance_support_of_cling_cmd_prompt_func_defining branch from b34a511 to aa539b6 Compare June 7, 2023 09:40
@jiangyilism jiangyilism force-pushed the enhance_support_of_cling_cmd_prompt_func_defining branch from aa539b6 to 5c9ef9f Compare June 7, 2023 13:03
@jiangyilism
Copy link
Contributor Author

jiangyilism commented Jun 7, 2023

SdtElectronics/cline#10 and root-project/cling#490 redirect the discussion of parsing noexcept to here. However I suggest to address it in another dedicate issue and pull request for it (or re-open the above issues). Currently cling seems to not parse noexcept at all. At least not at lexer/token level since string-searching kw_noexcept got nothing in root/interpreter/cling/ directory.

@jalopezg-git
Copy link
Contributor

SdtElectronics/cline#10 and root-project/cling#490 redirect the discussion of parsing noexcept to here. However I suggest to address it in another dedicate issue and pull request for it (or re-open the above issues). Currently cling seems to not parse noexcept at all. At least not at lexer/token level since string-searching kw_noexcept got nothing in root/interpreter/cling/ directory.

Many thanks @jiangyilism. Please, re-request a code review when you think it is ready 🙂!

@github-actions
Copy link

github-actions bot commented Jun 8, 2023

Test Results

       10 files         10 suites   1d 23h 44m 22s ⏱️
  2 472 tests   2 472 ✔️ 0 💤 0
23 065 runs  23 065 ✔️ 0 💤 0

Results for commit ba17dc4.

♻️ This comment has been updated with latest results.

@jiangyilism
Copy link
Contributor Author

SdtElectronics/cline#10 and root-project/cling#490 redirect the discussion of parsing noexcept to here. However I suggest to address it in another dedicate issue and pull request for it (or re-open the above issues). Currently cling seems to not parse noexcept at all. At least not at lexer/token level since string-searching kw_noexcept got nothing in root/interpreter/cling/ directory.

Many thanks @jiangyilism. Please, re-request a code review when you think it is ready 🙂!

It is ready for review. However I have no clue about the failure test report above. clang-format failed to checkout code before running. The windows test fail seems to be file permission error irrelevant to this pull request. The Fedora test fail is unreproducible on my ubuntu either.

@jalopezg-git
Copy link
Contributor

@phsft-bot build

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac11/noimt, mac12arm/cxx20, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-ubuntu2204/nortcxxmod.
Running on root-ubuntu-2204-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2023-06-15T10:30:11.698Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/src/Delaunay2D.cxx:323:40: error: ‘numeric_limits’ is not a member of ‘std’
  • [2023-06-15T10:30:11.698Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/src/Delaunay2D.cxx:323:55: error: expected primary-expression before ‘double’

Copy link
Contributor

@jalopezg-git jalopezg-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work, @jiangyilism, (and many thanks for the contribution, much appreciated 🙂)!
I have attached a few comments to be discussed before merging. Does it pass also the other tests in the cling test suite?

@vgvassilev What do you think? Do you have any further comments? I think this is mostly okay to go.

interpreter/cling/lib/Utils/SourceNormalization.cpp Outdated Show resolved Hide resolved
interpreter/cling/test/Prompt/decls.C Outdated Show resolved Hide resolved
interpreter/cling/test/Prompt/decls.C Outdated Show resolved Hide resolved
interpreter/cling/test/Prompt/decls.C Outdated Show resolved Hide resolved
…d prompt

e.g.  class_a::class_a() = default;
      class_a::~class_a();

They have no function definition body so caller of IsClassOrFunction()

should not try to parse their function bodies.
e.g. ::class_a class_b::mem_func_b() { return 'w'; }

skip :: right before class_a while calculating wrap point
Fixes root-project#9449

so it is possible to define operator overload in cling cmd prompt.

btw, Make SkipPointerRefs() to not assume next token being a

tok::raw_identifier since it can be a global-scoped identifier,

e.g. int* ::class_a::func_b(short c) { return nullptr; }
@jiangyilism jiangyilism force-pushed the enhance_support_of_cling_cmd_prompt_func_defining branch from 5c9ef9f to ba17dc4 Compare June 16, 2023 15:04
@jalopezg-git
Copy link
Contributor

@phsft-bot build

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac11/noimt, mac12arm/cxx20, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-ubuntu2004/python3.
Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@jalopezg-git jalopezg-git self-requested a review July 5, 2023 10:48
Copy link
Contributor

@jalopezg-git jalopezg-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle, LGTM, although the logic in MinimalPPLexer::IsClassOrFunction() is getting convoluted / hard to maintain.

The cling test suite passes, but let's also wait for the ROOT CI results 🙂.

@vgvassilev any concerns about merging this patch?

@phsft-bot
Copy link
Collaborator

Build failed on mac11/noimt.
Running on macphsft23.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@jalopezg-git
Copy link
Contributor

@phsft-bot build

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac11/noimt, mac12arm/cxx20, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-ubuntu2204/nortcxxmod.
Running on root-ubuntu-2204-3.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

@phsft-bot
Copy link
Collaborator

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

@jalopezg-git jalopezg-git merged commit 6136be0 into root-project:master Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cling] error: function definition is not allowed here when trying to overload operator<=
6 participants