[clang] [CodeGen] Fix cleanup attribute for C89 for-loop init variables (PR #156643)

2025-09-08 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi updated https://github.com/llvm/llvm-project/pull/156643 >From 471273e66583dbec3f145c7f5723a4d5b524d15b Mon Sep 17 00:00:00 2001 From: Jongmyeong Choi Date: Wed, 3 Sep 2025 18:41:46 +0900 Subject: [PATCH 1/4] [CodeGen] Fix cleanup attribute for C89 for-loop in

[clang] [CodeGen] Fix cleanup attribute for C89 for-loop init variables (PR #156643)

2025-09-03 Thread Jongmyeong Choi via cfe-commits
jongmyeong-choi wrote: I've implemented the change using a deferred cleanup approach. Initially, I considered pushing cleanups to the EHStack while manipulating PrologueCleanupDepth, but I felt this approach was too hacky. If there's a better approach for this fix, please let me know. https://g

[clang] [CodeGen] Fix cleanup attribute for C89 for-loop init variables (PR #156643)

2025-09-03 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi created https://github.com/llvm/llvm-project/pull/156643 In C89, for-init variables have function scope, so cleanup should occur at function exit, not loop exit. This implements deferred cleanup registration for C89 mode while preserving C99+ behavior. Fixes

[clang] [clang] Fix assertion failure with explicit(bool) in pre-C++11 modes (PR #152985)

2025-08-11 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi created https://github.com/llvm/llvm-project/pull/152985 Allow CCEKind::ExplicitBool in BuildConvertedConstantExpression for pre-C++11 contexts, similar to the existing TempArgStrict exception. This enables explicit(bool) to work as a C++20 extension in earli

[clang] [Clang][Parser] Fix assertion failure with explicit(bool) in pre-C++20 modes (PR #152896)

2025-08-11 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi closed https://github.com/llvm/llvm-project/pull/152896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Fix assertion failure with explicit(bool) in pre-C++20 modes (PR #152896)

2025-08-10 Thread Jongmyeong Choi via cfe-commits
jongmyeong-choi wrote: #152729 will be fixed with it. https://github.com/llvm/llvm-project/pull/152896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Fix assertion failure with explicit(bool) in pre-C++20 modes (PR #152896)

2025-08-09 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi created https://github.com/llvm/llvm-project/pull/152896 ## Summary Fixes assertion failure when using `explicit(bool)` syntax in C++98 and C++11 modes. The crash occurred in `BuildConvertedConstantExpression` when parsing `explicit(true)` or `explicit

[clang] [clang][NFC] add comments for canBeJoined function (PR #150766)

2025-07-26 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi created https://github.com/llvm/llvm-project/pull/150766 - Convert simple comment to detailed Doxygen-style documentation - Add comprehensive examples of token concatenation cases - Include examples of safe adjacency cases - Clarify the function's purpose and r

[clang] [Clang] suggest headers on undeclared errors (PR #140247)

2025-05-25 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi closed https://github.com/llvm/llvm-project/pull/140247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] suggest headers on undeclared errors (PR #140247)

2025-05-25 Thread Jongmyeong Choi via cfe-commits
jongmyeong-choi wrote: I see it now. It's a good topic. I think we need to make more structural decisions and do a lot of pre-work to do this item. For now, let's close this change and discuss it in #139855. https://github.com/llvm/llvm-project/pull/140247 _

[clang] [Clang] suggest headers on undeclared errors (PR #140247)

2025-05-23 Thread Jongmyeong Choi via cfe-commits
jongmyeong-choi wrote: Thanks for all your reviews. I learned a lot from your comments. I'll try to rewrite it from scratch, but honestly, it'll take me a while to figure out the TableGen structure. If anyone wants to make a change to this topic, please feel free to jump in. https://github.co

[clang] [Clang] suggest headers on undeclared errors (PR #140247)

2025-05-16 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi edited https://github.com/llvm/llvm-project/pull/140247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] suggest headers on undeclared errors (#120388) (PR #140247)

2025-05-16 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi created https://github.com/llvm/llvm-project/pull/140247 When a “use of undeclared identifier” error happens for a function listed in StdSymbolMap, emit a note telling the user which header to include. Because nested-name-specifier errors occur before the func