Closed ryftchen closed 12 months ago
- it seems that a call to the member function in a destructor causes the following (or the destructor is defined as a protected member):
This is fixed with (clang 17): https://github.com/llvm/llvm-project/commit/5a9abe846617efea4a128134db0915a044d7dd73
Can you comment the following line: https://github.com/KDAB/codebrowser/blob/f17b52321d7fb31d2289da9ff209656bcb33bf37/generator/main.cpp#L168 and see if it a) fixes the issue and b) impacts the output?
I am not sure if we need incremental extensions, not sure why it is there at all in the first place. The behaviour has changed so perhaps its time to remove it.
As for your other issue, I was not able to reproduce it.
- it seems that a call to the member function in a destructor causes the following (or the destructor is defined as a protected member):
This is fixed with (clang 17): llvm/llvm-project@5a9abe8
Can you comment the following line:
and see if it a) fixes the issue and b) impacts the output? I am not sure if we need incremental extensions, not sure why it is there at all in the first place. The behaviour has changed so perhaps its time to remove it.
As for your other issue, I was not able to reproduce it.
@Waqar144 Thanks for your support.
For issue 1: Errors do not appear when commenting target code with llvm/clang-17. I'm not sure if there are any other potential impacts, but anyway, it seems to be working. Will this code be removed finally, or is it involved in some other function?
For issue 2: I find that the errors do not reproduce after using llvm/clang-17.
BTW, it seems to generate new compile warnings in version 17, maybe we can fix this together with issue 1.
[ 76%] Building CXX object generator/CMakeFiles/codebrowser_generator.dir/inlayhintannotator.cpp.o
/workspaces/codebrowser/generator/inlayhintannotator.cpp:273:52: warning: 'startswith_insensitive' is deprecated: Use starts_with_insensitive instead [-Wdeprecated-declarations]
273 | if (f->getNumParams() == 1 && getSimpleName(f).startswith_insensitive("set"))
| ^~~~~~~~~~~~~~~~~~~~~~
| starts_with_insensitive
/usr/lib/llvm-17/include/llvm/ADT/StringRef.h:267:19: note: 'startswith_insensitive' has been explicitly marked deprecated here
267 | [[nodiscard]] LLVM_DEPRECATED(
| ^
/usr/lib/llvm-17/include/llvm/Support/Compiler.h:155:50: note: expanded from macro 'LLVM_DEPRECATED'
155 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
1 warning generated.
[ 84%] Linking CXX executable codebrowser_generator
Will this code be removed finally, or is it involved in some other function?
I think its best to disable it for now as the meaning of the function has changed and we don't know what other side effects this can introduce.
BTW, it seems to generate new compile warnings in version 17, maybe we can fix this together with issue 1.
Yes, they need to be fixed soon.
Fixed in master.
Warnings not fixed yet.
Firstly, thanks for the help in fixing the anonymous struct/union problem (https://github.com/KDAB/codebrowser/issues/116). However, after compiling with the latest commit, the following problem remains. It also worked fine before llvm/clang-16:
1. if the enum or type alias is defined in private and used as the return type for other member functions, the following prompt appears:
2. it seems that a call to the member function in a destructor causes the following (or the destructor is defined as a protected member):