[clang] [clang] Do not serialize function definitions without a body (PR #121550)

Alejandro Álvarez Ayllón via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 6 00:03:09 PST 2025


alejandro-alvarez-sonarsource wrote:

> Out of curiosity (not a blocking issue), why do you want this feature for C++20 modules?

Sanitizers, linters and indexers have to deal with code using non supported C++ language features or extensions. This is also true for C++20 modules. While conceivably one may implement module support without going through the intermediate PCM, to keep the semantics close to what the compiler does, the most straightforward is to do what the compiler does and go throught the same codepath as when actually compiling 😃 
And also, they would be able to not having to reparse everything and leverage one of the benefits of C++20 modules.


https://github.com/llvm/llvm-project/pull/121550


More information about the cfe-commits mailing list