[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-05-22 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/test/SemaCXX/invalid-if-constexpr.cpp:7 +} +void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of undeclared identifier '__adl_swap'; did you mean '__sync_swap'?}} \ + //

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-05-22 Thread Zixuan Wu via Phabricator via cfe-commits
zixuan-wu added inline comments. Comment at: clang/test/SemaCXX/invalid-if-constexpr.cpp:7 +} +void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of undeclared identifier '__adl_swap'; did you mean '__sync_swap'?}} \ + //

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-17 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9d9046f06d55: [clang] Do not crash after suggesting typo correction to constexpr if condition (authored by Fznamznon). Changed prior to commit: https://reviews.llvm.org/D148206?vs=513497=514174#toc

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148206/new/ https://reviews.llvm.org/D148206 ___ cfe-commits mailing list

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-17 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. @aaron.ballman , are you ok with the change? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148206/new/ https://reviews.llvm.org/D148206 ___ cfe-commits mailing list

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-14 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 513497. Fznamznon added a comment. Rebase, fix format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148206/new/ https://reviews.llvm.org/D148206 Files: clang/docs/ReleaseNotes.rst

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-13 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148206/new/ https://reviews.llvm.org/D148206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-13 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 513290. Fznamznon added a comment. Use std::optional Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148206/new/ https://reviews.llvm.org/D148206 Files: clang/docs/ReleaseNotes.rst

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-13 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/include/clang/Sema/Sema.h:12855 +!Condition.get()->isValueDependent() && +Condition.get()->isIntegerConstantExpr(S.Context)), KnownValue(HasKnownValue &&

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-13 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 513276. Fznamznon added a comment. Rebase, evaluate the expression only only time Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148206/new/ https://reviews.llvm.org/D148206 Files:

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/Sema.h:12855 +!Condition.get()->isValueDependent() && +Condition.get()->isIntegerConstantExpr(S.Context)), KnownValue(HasKnownValue &&

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-13 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In some cases non-null non-constant yet valid expression may reach point where `ConditionResult` is created. For