aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
diff options
context:
space:
mode:
authorBjörn Pettersson <bjorn.a.pettersson@ericsson.com>2024-12-18 23:36:45 +0100
committerGitHub <noreply@github.com>2024-12-18 23:36:45 +0100
commit26f5d1ee9c37e2a6d50898a5bf2d3b9171060ba0 (patch)
tree29eb1b8e3fce16be218fb15daed5dbcd925af65c /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
parent8272b6bd6146aab973ff7018ad642b99fde00904 (diff)
downloadllvm-26f5d1ee9c37e2a6d50898a5bf2d3b9171060ba0.zip
llvm-26f5d1ee9c37e2a6d50898a5bf2d3b9171060ba0.tar.gz
llvm-26f5d1ee9c37e2a6d50898a5bf2d3b9171060ba0.tar.bz2
[APINotes] Avoid assertion failure with expensive checks (#120487)
Found assertion failures when using EXPENSIVE_CHECKS and running lit tests for APINotes: Assertion `left.first != right.first && "two entries for the same version"' failed. It seems like std::is_sorted is verifying that the comparison function is reflective (comp(a,a)=false) when using expensive checks. So we would get callbacks to the lambda used for comparison, even for vectors with a single element in APINotesReader::VersionedInfo<T>::VersionedInfo, with "left" and "right" being the same object. Therefore the assert checking that we never found equal values would fail. Fix makes sure that we skip the check for equal values when "left" and "right" is the same object.
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions