[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 21 06:34:43 PST 2025
================
@@ -1057,12 +1057,24 @@ def ext_ms_abstract_keyword : ExtWarn<
"'abstract' keyword is a Microsoft extension">,
InGroup<MicrosoftAbstract>;
+def ext_relocatable_keyword : ExtWarn<
+ "'%select{trivially_relocatable|replaceable}0_if_eligible' "
+ "keyword is a C++2c extension">,
+ InGroup<CXX26>;
+def warn_relocatable_keyword : Warning<
+ "'%select{trivially_relocatable|replaceable}0_if_eligible' "
+ "keyword is incompatible with standards before C++2c">,
+ DefaultIgnore, InGroup<CXXPre26Compat>;
+
def err_access_specifier_interface : Error<
"interface types cannot specify '%select{private|protected}0' access">;
def err_duplicate_class_virt_specifier : Error<
"class already marked '%0'">;
+def err_duplicate_class_relocation_specifier : Error<
+ "class already marked %select{'trivially_relocatable_if_eligible'|'replaceable_if_eligible'}0">;
----------------
Sirraide wrote:
```suggestion
"class already marked '%select{trivially_relocatable|replaceable}0_if_eligible'">;
```
nit (might as well do this the same way as above)
https://github.com/llvm/llvm-project/pull/127636
More information about the cfe-commits
mailing list