[clang] [Clang][AST] Add source range for deleted and defaulted functions (PR #205408)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 24 08:25:52 PDT 2026


================
@@ -1308,12 +1308,14 @@ Decl *Parser::ParseFunctionDefinition(ParsingDeclarator &D,
           << 1 /* deleted */;
       BodyKind = Sema::FnBodyKind::Delete;
       DeletedMessage = ParseCXXDeletedFunctionMessage();
+      D.SetRangeEnd(PP.getLocForEndOfToken(KWLoc).getLocWithOffset(-1));
----------------
cor3ntin wrote:

Why do we need `.getLocWithOffset(-1)`

https://github.com/llvm/llvm-project/pull/205408


More information about the cfe-commits mailing list