================
@@ -157,6 +159,12 @@ BraceInsertionHints getBraceInsertionsHints(const Stmt
*const S,
EndLoc = EndLocHint;
ClosingInsertion = "} ";
} else {
+ const SourceLocation StmtEndLoc = S->getEndLoc();
+ if (StmtEndLoc.isMacroID() && SM.isMacroBodyExpansion(StmtEndLoc) &&
+ !Lexer::isAtEndOfMacroExpansion(StmtEndLoc, SM, LangOpts)) {
----------------
localspook wrote:
Is the intent to provide fix-its for cases like this?
```cpp
#define ONE_FULL_STATEMENT(x) do_something(x);
if (b)
ONE_FULL_STATEMENT // <--- fix-it here?
```
If yes, can we add a test for that?
https://github.com/llvm/llvm-project/pull/198788
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits