[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / deadstores-driverkit.cpp
blob9c423fc6ff2189e0eb6cf52ee9164ccaa3a3397d
1 /* iig(DriverKit-60) generated from SomethingSomething.iig */
3 // The comment above is the whole point of the test.
4 // That's how the suppression works.
5 // It needs to be on the top.
6 // Run-lines can wait.
8 // RUN: %clang_analyze_cc1 -std=c++17 -w -triple x86_64-apple-driverkit19.0 \
9 // RUN: -analyzer-checker=deadcode -verify %s
11 // expected-no-diagnostics
13 #include "os_object_base.h"
15 class OSSomething {
16 kern_return_t Invoke(const IORPC);
17 void foo(OSDispatchMethod supermethod) {
18 kern_return_t ret;
19 IORPC rpc;
20 // Test the DriverKit specific suppression in the dead stores checker.
21 if (supermethod) ret = supermethod((OSObject *)this, rpc); // no-warning
22 else ret = ((OSObject *)this)->Invoke(rpc); // no-warning