[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > tests will fail locally but pass everywhere else (for example, people > > working on slightly out-of-norm configurations will sometimes have > > persistent local failures that are unrelated to changes in the patch). > > It never happened to me, in a way that can't be

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > If you see failures locally, it's best to understand where they coming > > from: even if it passes on bots it just means we have a hole in our test > > coverage. > > Sure, but it wasn't the first time I've seen local test failures that doesn't > reproduce anywhere

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I've seen those exact test failures locally, but since precommit CI was fine, I landed this PR and kept a close eye on the bots. Me and Aaron are also wondering now how did it pass CI, and what's wrong with changes here. I'm sorry @zmodem that we got you involved. > It catches

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: It catches (https://buildkite.com/llvm-project/github-pull-requests/builds/12931#018ba4b7-1e05-425f-a30d-46ac33f582b6), you just didn't wait for a results (or ignored them) and forced a merge. https://github.com/llvm/llvm-project/pull/71322

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/71322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/71322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Vlad Serebrennikov (Endilll) Changes This patch converts `CXXNewExpr::InitializationStyle` into a scoped enum at namespace scope. It also affirms the status quo by adding a new enumerator to represent implicit initializer. --- Full

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll ready_for_review https://github.com/llvm/llvm-project/pull/71322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread Aaron Ballman via cfe-commits
@@ -2034,18 +2035,19 @@ ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, // - If the new-initializer is omitted, the object is default- // initialized (8.5); if no initialization is performed, // the object has indeterminate

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-05 Thread Timm Baeder via cfe-commits
@@ -2388,15 +2389,20 @@ class CXXNewExpr final /// Whether this new-expression has any initializer at all. bool hasInitializer() const { -return CXXNewExprBits.StoredInitializationStyle > 0; +switch (getInitializationStyle()) { +case