| Anna Zaks | bb2a686 | 2012-02-20 21:10:37 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -analyze -analyzer-checker=unix.cstring.BadSizeArg -analyzer-store=region -verify %s |
| Anna Zaks | 84aac9a | 2012-02-01 19:16:20 +0000 | [diff] [blame] | 2 | |
| 3 | // Ensure we don't crash on C++ declarations with special names. | ||||
| 4 | struct X { | ||||
| 5 | X(int i): i(i) {} | ||||
| 6 | int i; | ||||
| 7 | }; | ||||
| 8 | |||||
| 9 | X operator+(X a, X b) { | ||||
| 10 | return X(a.i + b.i); | ||||
| 11 | } | ||||
| 12 | |||||
| 13 | void test(X a, X b) { | ||||
| 14 | X c = a + b; | ||||
| 15 | } | ||||
| 16 | |||||