"Rename Declaration" does not work with preprocessor definitions like header guards. Reproducible: Always
Actually this works for me. Can you try again? Code: #define FOO #ifndef FOO #endif I then renamed the first occurence of 'FOO' to 'FOO1' => both uses got renamed.
It depends on the order of #define and #ifndef. 1. I confirms it works in your scenario: #define FOO #ifndef FOO 2. When I first do #ifndef FOO and try to right-click on "#define FOO" to rename and perform the renaming, KDevelop renames only the identifier in the "#define FOO" line. 3. When I write the same code (#ifndef FOO, then #define FOO) and right-click on the #ifndef FOO line, there is not "Rename [...]" item in the context menu at all.