[clang] [clang] Diagnose when spelled 'abi_tag' on namespace doesn't match applied one. (PR #221039)

Dmitry Polukhin via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 19 01:46:25 PDT 2026


dmpolukhin wrote:

abi_tags were implanted for compatibility with GCC so it is the canonical implementation in this particular case. Diagnostic from this PR will be emitted for libstdc++'s own idiom: c++config.h tags __cxx11 once, and _GLIBCXX_BEGIN_NAMESPACE_CXX11 is a bare `namespace __cxx11 {` - and I don't think it should be flagged. I do see value diagnostic you implementsed in this PR but only for the cases when abi_tag added after there were used so new tags will be ignored (I haven't implemented this part), see #224826. It is indeed much bigger and changes ABI with command line option for backward compatibility.

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


More information about the cfe-commits mailing list