[PATCH] D92039: [-Wcalled-once-parameter] Introduce 'called_once' attribute

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 18 07:48:22 PST 2020


vsavchenko added inline comments.


================
Comment at: clang/test/SemaObjC/attr-called-once.m:7
+void test2(double x CALLED_ONCE); // expected-error{{'called_once' attribute only applies to function-like parameters}}
+
+void test3(void (*foo)() CALLED_ONCE);   // no-error
----------------
aaron.ballman wrote:
> Can you also add tests that the attribute accepts no arguments and only appertains to parameters?
Sure!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92039/new/

https://reviews.llvm.org/D92039



More information about the cfe-commits mailing list