-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
Qt Creator 7.0.0
-
d0203a39f (master)
When changing one function with one default parameter into two functions with zero and with one parameter, clangd only finds second one.
Consider we have Other.h:
#pragma once
struct Other
{
static void foo(int i = 1);
};
and main.cpp:
#include "Other.h" int main() { Other::foo(); Other::foo(1); return 0; }
Clangd finds both references in main.cpp for foo(), that's correct.
Now, if we close main.cpp in creator and edit Other.h to:
#pragma once
struct Other
{
static void foo() {}
static void foo(int i) {}
};
We expect to find one reference in main.cpp for each function.
Actual result: clangd finds 2 references for foo(int) in main.cpp and none for foo().
Additional info: if we keep main.cpp open, it is updated and works correctly.

| For Gerrit Dashboard: QTCREATORBUG-27387 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 515546,7 | ClangCodeModel: Add menu action to re-index files | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |