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

MacOS上写注释时出现map构造提示 #40

Open
YangZ2020 opened this issue Sep 21, 2024 · 1 comment
Open

MacOS上写注释时出现map构造提示 #40

YangZ2020 opened this issue Sep 21, 2024 · 1 comment

Comments

@YangZ2020
Copy link

环境:
Apple Macbook pro M1
macOS 15.0 (24A335)
Nvim 0.10.0(配置已同步到发布最新)

编辑如下单cpp文件:

using fltype = float;
#include <map>
#include <string>
int main() {
    
    fltype soundspd = 100;
    fltype timePerSample = 100;
    fltype pulseRepeRate = 100;
    fltype rfDemodFreq = 100;
    fltype adcRate = 100;

  std::map<std::string, fltype> paraMap({{"soundSpeed", soundspd},
                                         {"timePerSample", timePerSample},
                                         {"pulseRepeRate", pulseRepeRate},
                                         {"rfDemodFreq", rfDemodFreq},
                                         {"adcRate", adcRate}});
// 在这里输入注释就会显示map的提示;
  return 0;
}

编写注释时出现map构造的提示:
image

@archibate
Copy link
Owner

archibate commented Sep 21, 2024

最小复现(3种均可复现):

#include <string>
int main() {
    std::string c({{}});
    // cursor here:
}
#include <string>
int main() {
    std::string c{{{}}};
    // cursor here:
}
#include <string>
int main() {
    std::string c{{(0)}};
    // cursor here:
}

似乎只要有三层括号就能复现,应该是bug,建议给clangd开issue。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants