================ @@ -10778,6 +10778,101 @@ def warn_imp_cast_drops_unaligned : Warning< "implicit cast from type %0 to type %1 drops __unaligned qualifier">, InGroup<DiagGroup<"unaligned-qualifier-implicit-cast">>; +def warn_func_effect_allocates : Warning< + "'%0' function '%1' must not allocate or deallocate memory">, + InGroup<FunctionEffects>; + +def note_func_effect_allocates : Note< + "'%1' cannot be inferred '%0' because it allocates/deallocates memory">; ---------------- dougsonos wrote:
I decided I preferred inconsistency in DiagnosticSemaKinds.td than in the code that emits the diags: ``` S.Diag(Diag.Loc, diag::warn_func_effect_allocates) << effectName << TopFuncName; ... S.Diag(Diag2.Loc, diag::note_func_effect_allocates) << effectName << CalleeName; ``` But maybe that's just a bit precious. As I was trying to word the diagnostics, there were times when they didn't always come out in consistent orders and I had bugs in passing the parameters in the right order. https://github.com/llvm/llvm-project/pull/84983 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits