@@ -10949,6 +10949,55 @@ def warn_imp_cast_drops_unaligned : Warning<
1094910949 InGroup<DiagGroup<"unaligned-qualifier-implicit-cast">>;
1095010950
1095110951// Function effects
10952+ def warn_func_effect_allocates : Warning<
10953+ "'%0' function must not allocate or deallocate memory">,
10954+ InGroup<FunctionEffects>;
10955+ def note_func_effect_allocates : Note<
10956+ "function cannot be inferred '%0' because it allocates/deallocates memory">;
10957+ def warn_func_effect_throws_or_catches : Warning<
10958+ "'%0' function must not throw or catch exceptions">,
10959+ InGroup<FunctionEffects>;
10960+ def note_func_effect_throws_or_catches : Note<
10961+ "function cannot be inferred '%0' because it throws or catches exceptions">;
10962+ def warn_func_effect_has_static_local : Warning<
10963+ "'%0' function must not have static locals">,
10964+ InGroup<FunctionEffects>;
10965+ def note_func_effect_has_static_local : Note<
10966+ "function cannot be inferred '%0' because it has a static local">;
10967+ def warn_func_effect_uses_thread_local : Warning<
10968+ "'%0' function must not use thread-local variables">,
10969+ InGroup<FunctionEffects>;
10970+ def note_func_effect_uses_thread_local : Note<
10971+ "function cannot be inferred '%0' because it uses a thread-local variable">;
10972+ def warn_func_effect_calls_objc : Warning<
10973+ "'%0' function must not access an ObjC method or property">,
10974+ InGroup<FunctionEffects>;
10975+ def note_func_effect_calls_objc : Note<
10976+ "function cannot be inferred '%0' because it accesses an ObjC method or property">;
10977+ def warn_func_effect_calls_func_without_effect : Warning<
10978+ "'%0' function must not call non-'%0' function '%1'">,
10979+ InGroup<FunctionEffects>;
10980+ def warn_func_effect_calls_expr_without_effect : Warning<
10981+ "'%0' function must not call non-'%0' expression">,
10982+ InGroup<FunctionEffects>;
10983+ def note_func_effect_calls_func_without_effect : Note<
10984+ "function cannot be inferred '%0' because it calls non-'%0' function '%1'">;
10985+ def note_func_effect_call_extern : Note<
10986+ "function cannot be inferred '%0' because it has no definition in this translation unit">;
10987+ def note_func_effect_call_disallows_inference : Note<
10988+ "function does not permit inference of '%0'">;
10989+ def note_func_effect_call_virtual : Note<
10990+ "virtual method cannot be inferred '%0'">;
10991+ def note_func_effect_call_func_ptr : Note<
10992+ "function pointer cannot be inferred '%0'">;
10993+ def warn_perf_constraint_implies_noexcept : Warning<
10994+ "'%0' function should be declared noexcept">,
10995+ InGroup<PerfConstraintImpliesNoexcept>;
10996+
10997+ // FIXME: It would be nice if we could provide fuller template expansion notes.
10998+ def note_func_effect_from_template : Note<
10999+ "in template expansion here">;
11000+
1095211001// spoofing nonblocking/nonallocating
1095311002def warn_invalid_add_func_effects : Warning<
1095411003 "attribute '%0' should not be added via type conversion">,
0 commit comments