[PATCH] D75542: [Sema] Prevent UB for uninitialized `IsSurrogate`

2020-03-13 Thread Brian Gesiak via Phabricator via cfe-commits
modocache abandoned this revision. modocache added a comment. Awesome, thanks! > Alternatively, I considered modifying the `clang::OverloadCandidate` > constructor to initialize `IsSurrogate` with a false value. I feel doing so > would be safer, but I stuck with what appears to be the conventio

[PATCH] D75542: [Sema] Prevent UB for uninitialized `IsSurrogate`

2020-03-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Sorry for the delay in review, but I believe this was already fixed in the meantime: https://github.com/llvm/llvm-project/commit/a5704f92b835d1810d83a223f70dfe6c92a34c03 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D75542: [Sema] Prevent UB for uninitialized `IsSurrogate`

2020-03-12 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. Friendly ping! `OverloadCandidate` has uninitialized members and so can cause UB if used incorrectly in another part of the compiler, so I feel this is a fairly straightforward patch: prevent UB by initializing all members. But I'd like some review to confirm. @rsmith

[PATCH] D75542: [Sema] Prevent UB for uninitialized `IsSurrogate`

2020-03-03 Thread Brian Gesiak via Phabricator via cfe-commits
modocache marked an inline comment as done. modocache added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:7371 return; } @rsmith I'd definitely appreciate any pointers here -- if initializing `IsSurrogate` with a value as I do in this pa

[PATCH] D75542: [Sema] Prevent UB for uninitialized `IsSurrogate`

2020-03-03 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added reviewers: rsmith, RKSimon, aaron.ballman, wenlei. Herald added a project: clang. A closed-source C++ codebase I help maintain began hitting a Clang ICE with a stack trace that referenced `clang::OverloadCandidate::getNumParams`: https://gist.github