[clang] [C++20] [Modules] Introduce -fskip-odr-check-in-gmf (PR #79959)

via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 12 10:49:00 PDT 2024


yujincheng08 wrote:

I accidentially found this PR also fixes an issue I encountered.

Before: https://godbolt.org/z/E6cehd3oh

Afeter: https://godbolt.org/z/MMfq84rcK

and the false error was
```
In module 'bar' imported from /app/foo.cc:3:
h.hpp:6:34: error: 'S::s' from module 'bar.<global>' is not present in definition of 'S<c...>' provided earlier
    6 |     inline static constexpr char s[]{c...};
      |                                  ^
h.hpp:6:34: note: declaration of 's' does not match
    6 |     inline static constexpr char s[]{c...};
      |                                  ^
1 error generated.
```

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


More information about the cfe-commits mailing list