Fix a failing assertion when emitting a note diagnostic
authorAaron Ballman <aaron@aaronballman.com>
Thu, 20 Jul 2023 15:04:04 +0000 (11:04 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 20 Jul 2023 16:49:39 +0000 (12:49 -0400)
commit4a100690461022625dc5d2a21e2e028a926149d9
treeb50651c5d3481c536f27eafa0a571d42a89e0957
parent608fc6d2934b6d0b5aa3719ab3b2aad9cbaba31b
Fix a failing assertion when emitting a note diagnostic

When noting the previous declaration for a builtin, the diagnostic
expects two arguments, but none were being passed. We now pass
arguments for the note (and the arguments are unused for several of the
possible notes we emit, but that is something the diagnostic engine is
fine with).

Fixes https://github.com/llvm/llvm-project/issues/63967
clang/lib/Sema/SemaDecl.cpp
clang/test/SemaCXX/builtins.cpp