cstring-syntax-cxx.cpp revision bb2a6864f111e13f7905725963649c60c60bf18b
1// RUN: %clang_cc1 -analyze -analyzer-checker=unix.cstring.BadSizeArg -analyzer-store=region -verify %s
2
3// Ensure we don't crash on C++ declarations with special names.
4struct X {
5  X(int i): i(i) {}
6  int i;
7};
8
9X operator+(X a, X b) {
10  return X(a.i + b.i);
11}
12
13void test(X a, X b) {
14  X c = a + b;
15}
16
17