[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:37:05 PST 2022
    
    
  
NoQ added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:523
+                    "-analyze-function=foobar\n";
+  }
+}
----------------
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:]"`)
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