[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / placement-new-user-defined.cpp
blobb3fe47057f8a1090c6cde5341cafbdb517865d86
1 // RUN: %clang_analyze_cc1 -std=c++11 %s \
2 // RUN: -analyzer-checker=core \
3 // RUN: -analyzer-checker=cplusplus.NewDelete \
4 // RUN: -analyzer-checker=cplusplus.PlacementNew \
5 // RUN: -analyzer-output=text -verify \
6 // RUN: -triple x86_64-unknown-linux-gnu
8 // expected-no-diagnostics
10 #include "Inputs/system-header-simulator-cxx.h"
12 struct X {
13 static void *operator new(std::size_t sz, void *b) {
14 return ::operator new(sz, b);
16 long l;
18 void f() {
19 short buf;
20 X *p1 = new (&buf) X;
21 (void)p1;