@@ -10928,6 +10928,55 @@ def warn_imp_cast_drops_unaligned : Warning<
1092810928 InGroup<DiagGroup<"unaligned-qualifier-implicit-cast">>;
1092910929
1093010930// Function effects
10931+ def warn_func_effect_allocates : Warning<
10932+ "'%0' function must not allocate or deallocate memory">,
10933+ InGroup<FunctionEffects>;
10934+ def note_func_effect_allocates : Note<
10935+ "function cannot be inferred '%0' because it allocates/deallocates memory">;
10936+ def warn_func_effect_throws_or_catches : Warning<
10937+ "'%0' function must not throw or catch exceptions">,
10938+ InGroup<FunctionEffects>;
10939+ def note_func_effect_throws_or_catches : Note<
10940+ "function cannot be inferred '%0' because it throws or catches exceptions">;
10941+ def warn_func_effect_has_static_local : Warning<
10942+ "'%0' function must not have static locals">,
10943+ InGroup<FunctionEffects>;
10944+ def note_func_effect_has_static_local : Note<
10945+ "function cannot be inferred '%0' because it has a static local">;
10946+ def warn_func_effect_uses_thread_local : Warning<
10947+ "'%0' function must not use thread-local variables">,
10948+ InGroup<FunctionEffects>;
10949+ def note_func_effect_uses_thread_local : Note<
10950+ "function cannot be inferred '%0' because it uses a thread-local variable">;
10951+ def warn_func_effect_calls_objc : Warning<
10952+ "'%0' function must not access an ObjC method or property">,
10953+ InGroup<FunctionEffects>;
10954+ def note_func_effect_calls_objc : Note<
10955+ "function cannot be inferred '%0' because it accesses an ObjC method or property">;
10956+ def warn_func_effect_calls_func_without_effect : Warning<
10957+ "'%0' function must not call non-'%0' function '%1'">,
10958+ InGroup<FunctionEffects>;
10959+ def warn_func_effect_calls_expr_without_effect : Warning<
10960+ "'%0' function must not call non-'%0' expression">,
10961+ InGroup<FunctionEffects>;
10962+ def note_func_effect_calls_func_without_effect : Note<
10963+ "function cannot be inferred '%0' because it calls non-'%0' function '%1'">;
10964+ def note_func_effect_call_extern : Note<
10965+ "function cannot be inferred '%0' because it has no definition in this translation unit">;
10966+ def note_func_effect_call_disallows_inference : Note<
10967+ "function does not permit inference of '%0'">;
10968+ def note_func_effect_call_virtual : Note<
10969+ "virtual method cannot be inferred '%0'">;
10970+ def note_func_effect_call_func_ptr : Note<
10971+ "function pointer cannot be inferred '%0'">;
10972+ def warn_perf_constraint_implies_noexcept : Warning<
10973+ "'%0' function should be declared noexcept">,
10974+ InGroup<PerfConstraintImpliesNoexcept>;
10975+
10976+ // FIXME: It would be nice if we could provide fuller template expansion notes.
10977+ def note_func_effect_from_template : Note<
10978+ "in template expansion here">;
10979+
1093110980// spoofing nonblocking/nonallocating
1093210981def warn_invalid_add_func_effects : Warning<
1093310982 "attribute '%0' should not be added via type conversion">,
0 commit comments