Enhance `await` usage warnings with null coalescing operator
Open
Area-Compilers
Concept-Diagnostic Clarity
Feature - Warning Waves
Feature Request
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
**Brief description:**
When using the null coalescing operator on an async delegate there is no warning that `await` is missing. Example:

First, we can see that `initialize()` triggers a warning, but not `initialize?.Invoke()`.
Besides, another warning could be displayed if someone simply adds `await` while using the operator as the result could be `null`.
**Languages applicable:**
I am not sure.
**Code example that the analyzer should report:**
1. `initialize?.Invoke()` -> missing await
2. `await initialize?.Invoke()` -> don't use await with coalescing operator
Contributor guide
Assessment
This issue has not been assessed yet.