[PATCH] D118690: [analyzer] Prevent misuses of -analyze-function

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 2 13:46:31 PST 2022


NoQ added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:523
+                    "-analyze-function=foobar\n";
+  }
+}
----------------
NoQ wrote:
> NoQ wrote:
> > 🥺
> You can use this for a test, should be in an .m file:
> ```lang=objc
> @interface MyClass
> -(int) messageWithFoo: (int)foo bar: (int)bar;
> @end
> 
> @implementation MyClass
> -(int) messageWithFoo: (int)foo bar: (int)bar {
>   return foo + bar;
> }
> @end
> ```
> (reacts to `-analyze-function="-[MyClass messageWithFoo:bar:]"`)
Oh wait, this is already committed. I guess I can do that myself.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118690



More information about the cfe-commits mailing list