| Issue |
63462
|
| Summary |
_expression_ end location not working in macros
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
abrachet
|
```
#define MACRO(var) {var}
char ok(int a) {
return {a}; // static_cast<char>( )
}
char macro(int a) {
return MACRO(a); // static_cast<char>(
// note the lack of end `)`
}
```
This fixit is issued here https://github.com/llvm/llvm-project/blob/7175d6a5966af4370ae15fa0b56db1c6c0a7aebe/clang/lib/Sema/SemaInit.cpp#L10366
and uses `FixItHint::CreateInsertion(S.getLocForEndOfToken(PostInit->getEndLoc()), ")");` to emit the insertion for the end paren. It is just missing in the fixit hint.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs