Now that C++17 is enabled in LLVM, a lot of the TODOs and patterns to emulate C++17 features can be eliminated.
The steps I have taken were essentially:
git grep C++17 git grep c++17 git grep "initializer_list<int>"
and address given comments and patterns.
Most of the changes boiled down to just using fold expressions rather than initializer_list.
While doing this I also discovered that Clang by default restricts the depth of fold expressions to 256 elements. I specifically hit this with TestDialect in addOperations. I opted to not replace it with fold expressions because of that but instead adding a comment documenting the issue.
If any other functions may be called with more than 256 elements in the future we might have to revert other parts as well.
I don't think this is a common occurence besides the TestDialect however. If need be, this could potentially be fixed via mlir-tblgen in the future.
I removed this comment because I felt it was not really applicable/an improvement. One place one could use std::disjunction below would be to replace llvm::is_one_of, which felt uneccessary to me, or as a replacement for the || of the two terms, which I felt like is not really an improvement either.