diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-11-01 23:16:05 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-11-01 23:16:05 +0000 |
commit | 4b8eca88b0b48f4777ff4591470797f17fb9b036 (patch) | |
tree | 375d59e50652ee2bc89296ff35cc9f11bda9ebc3 /clang/test/Analysis/operator-calls.cpp | |
parent | f7e176a3ec98b6ba1ec45880ebd70a17c1f77290 (diff) | |
download | bcm5719-llvm-4b8eca88b0b48f4777ff4591470797f17fb9b036.tar.gz bcm5719-llvm-4b8eca88b0b48f4777ff4591470797f17fb9b036.zip |
Teach the CStringChecker and PthreadLockChecker about non-identifier
declaration names, from Jim Goodnow II!
llvm-svn: 117970
Diffstat (limited to 'clang/test/Analysis/operator-calls.cpp')
-rw-r--r-- | clang/test/Analysis/operator-calls.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Analysis/operator-calls.cpp b/clang/test/Analysis/operator-calls.cpp new file mode 100644 index 00000000000..1b8b629f359 --- /dev/null +++ b/clang/test/Analysis/operator-calls.cpp @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-experimental-checks -verify %s +struct X0 { }; +bool operator==(const X0&, const X0&); + +// PR7287 +struct test { int a[2]; }; + +void t2() { + test p = {{1,2}}; + test q; + q = p; +} + +bool PR7287(X0 a, X0 b) { + return a == b; +} |