1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -analyze -analyzer-checker=unix.cstring.BadSizeArg -analyzer-store=region -verify %s 2*f4a2713aSLionel Sambuc // expected-no-diagnostics 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc // Ensure we don't crash on C++ declarations with special names. 5*f4a2713aSLionel Sambuc struct X { XX6*f4a2713aSLionel Sambuc X(int i): i(i) {} 7*f4a2713aSLionel Sambuc int i; 8*f4a2713aSLionel Sambuc }; 9*f4a2713aSLionel Sambuc operator +(X a,X b)10*f4a2713aSLionel SambucX operator+(X a, X b) { 11*f4a2713aSLionel Sambuc return X(a.i + b.i); 12*f4a2713aSLionel Sambuc } 13*f4a2713aSLionel Sambuc test(X a,X b)14*f4a2713aSLionel Sambucvoid test(X a, X b) { 15*f4a2713aSLionel Sambuc X c = a + b; 16*f4a2713aSLionel Sambuc } 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc // Ensure we don't crash on custom-defined strncat. 19*f4a2713aSLionel Sambuc char strncat (); main()20*f4a2713aSLionel Sambucint main () { 21*f4a2713aSLionel Sambuc return strncat (); 22*f4a2713aSLionel Sambuc }