C++ Insights with Clang 19 and more

I'm happy to announce that C++ Insights is now driven by LLVM/Clang 19! This time, updating to the new Clang version was more or less straightforward.

The beauty of Clang 19 is that it supports more C++23 and C++26 features. One I was specifically looking forward to will be featured in this month's C++ Insights YouTube episode. Stay tuned, and subscribe to the channel to avoid missing anything!

There was one interesting change. After a template keyword, the compiler now expects a template argument list. Here is such a scenario, taken from ISsue254.cpp from C++ Insights tests:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
struct demonstrator {
  template<typename return_type = double>
  return_type templated_function()
  {
    return return_type{};
  }
};

int demonstrate()
{
  demonstrator D;
  D.template templated_function();  A Invalid without <> since Clang 19
  return 42;
}

Before Clang 19 A was valid, but with Clang 19, you must write <> to make this code compile.

I'd like to mention another fix that I made just a couple of days ago, which was based on the issue #679 Does not handle final_suspend properly in coroutine transformation. In my then implementation, C++ Insights, when using the Show coroutine transformation, did not transform the part of return_void correctly. Especially not if you used the implicit return. But that's now fixed, so enjoy C++ Insights!

You can see some of the changes I made last year in my talk C++ Insights: Peek behind the curtains of your C++ compiler at CppNorth.

Support the project

You can support the project by becoming a GitHub Sponsor or, of course, with code contributions.

Andreas