[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-04-05 Thread marius doerner via cfe-commits
https://github.com/mariusdr edited https://github.com/llvm/llvm-project/pull/133574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-31 Thread marius doerner via cfe-commits
@@ -1646,7 +1646,6 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // Set up the return result. Tok.setIdentifierInfo(nullptr); - Tok.clearFlag(Token::NeedsCleaning); mariusdr wrote: True, my bad. If the flag is removed we can get asserts on __DAT

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-31 Thread marius doerner via cfe-commits
https://github.com/mariusdr edited https://github.com/llvm/llvm-project/pull/133574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-31 Thread marius doerner via cfe-commits
https://github.com/mariusdr edited https://github.com/llvm/llvm-project/pull/133574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-31 Thread marius doerner via cfe-commits
https://github.com/mariusdr updated https://github.com/llvm/llvm-project/pull/133574 >From dd54aa59eabe9c3b7b110f46d82ff5c4d0b88c57 Mon Sep 17 00:00:00 2001 From: marius doerner Date: Sat, 29 Mar 2025 09:21:20 +0100 Subject: [PATCH 1/2] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMa

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-31 Thread Aaron Ballman via cfe-commits
@@ -1646,7 +1646,6 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // Set up the return result. Tok.setIdentifierInfo(nullptr); - Tok.clearFlag(Token::NeedsCleaning); AaronBallman wrote: There are early returns between where we used to clear the n

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-29 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-29 Thread marius doerner via cfe-commits
https://github.com/mariusdr updated https://github.com/llvm/llvm-project/pull/133574 >From dd54aa59eabe9c3b7b110f46d82ff5c4d0b88c57 Mon Sep 17 00:00:00 2001 From: marius doerner Date: Sat, 29 Mar 2025 09:21:20 +0100 Subject: [PATCH] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro`

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: marius doerner (mariusdr) Changes After builtin macro expansion in `Preprocessor::ExpandBuiltinMacro` the result token may have the `Token::NeedsCleaning` flag set which causes an assertion failure later on when the lexer retrieves the sp

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-29 Thread marius doerner via cfe-commits
https://github.com/mariusdr created https://github.com/llvm/llvm-project/pull/133574 After builtin macro expansion in `Preprocessor::ExpandBuiltinMacro` the result token may have the `Token::NeedsCleaning` flag set which causes an assertion failure later on when the lexer retrieves the spellin