Adding extra note to enable_if note


I was trying to setup clang to report back which trait failed in enable_if. I would like an extra note for each trait that failed. However, the enable_if diagnostic happens during overload resolution failure, which clang only reports one diagnostic back. Even though it is multiple notes, it could be thought of as one diagnostic. Is there a way to nest multiple note diagnostics into one diagnostics?

Otherwise, it seems I would have to encode them into the diagnostic, and then emit them during overload resolution failure. I am not sure the best approach, and I don’t fully understand how the diagnostic system work. Perhaps there is a better way.