cppit / jucipp

A lightweight & cross-platform IDE supporting the most recent C++ standards. This project has moved to https://gitlab.com/cppit/jucipp.
https://gitlab.com/cppit/jucipp
MIT License
882 stars 98 forks source link

`noexcept` not preserved when implementing method #380

Closed sv1990 closed 6 years ago

sv1990 commented 6 years ago

When I hit Implement Method on a method that was declared noexcept the proposed function signature misses the noexcept keyword which is needed for the code to compile. I don't know if this is a bug in juci or in libclang. I have juci from github installed on Manjaro Linux.

eidheim commented 6 years ago

Libclang has a isConst function, but no isNoexcept still I think. Let me know if this has changed!

sv1990 commented 6 years ago

It looks like there is an isNoexcept https://clang.llvm.org/doxygen/AnalysisBasedWarnings_8cpp.html#ac6a18f6b7a2e8b4be0620395cd5ed398

eidheim commented 6 years ago

Actually, you have clang_getCursorExceptionSpecificationType. I'll see if I can add this to Implement Method soon.

eidheim commented 6 years ago

Note that you need llvm/libclang version 5.0 or higher for this support.

sv1990 commented 6 years ago

Nice. Thanks!