Issue |
90027
|
Summary |
Add a fixit for inserting the matching closing brace
|
Labels |
new issue
|
Assignees |
|
Reporter |
andre-hartmann
|
This request was posted as [clangd #2022](https://github.com/clangd/clangd/issues/2022) first, after being reported as [QTCREATORBUG-30732](https://bugreports.qt.io/browse/QTCREATORBUG-30732)
Consider the following C code:
```
#include <string.h>
static char GlobalVariable[64];
int main()
{
strcpy(GlabalVariable, "Hello World");
strcpy(GlobalVariable, "Hello World";
return 0;
}
```
For the first errornous line we get a fixit (light bulb) to rename the variable and the following tooltip:
```
main.c:7:12: Use of undeclared identifier 'GlabalVariable'; did you mean 'GlobalVariable'? (fix available)
main.c:3:13: 'GlobalVariable' declared here
```
but for the second there is only a Clangd error that says a closing brace is missing at column 41:
```
main.c:8:41: Expected ')'
main.c:8:11: to match this '('
```
It would be cool to have fixits for the second kind of errors too.
This is how it looks in Qt Creator:

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs