summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/misc-ps-cxx0x.cpp
blob: 598fea2bb7e2aa3ef21cfd5ebd2823f03226b642 (plain)
1
2
3
4
5
6
7
8
9
10
11
// RUN: %clang --analyze -std=c++0x %s -Xclang -verify -o /dev/null

void test_static_assert() {
  static_assert(sizeof(void *) == sizeof(void*), "test_static_assert");
}

void test_analyzer_working() {
  int *p = 0;
  *p = 0xDEADBEEF; // expected-warning {{null}}
}

OpenPOWER on IntegriCloud