diff options
author | dim <dim@FreeBSD.org> | 2012-08-19 10:33:04 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-19 10:33:04 +0000 |
commit | cc73504950eb7b5dff2dded9bedd67bc36d64641 (patch) | |
tree | 5b9c2fa9d79942fbdce3d618e37e27c18263af9a /test/Analysis/inline.cpp | |
parent | 554bcb69c2d785a011a30e7db87a36a87fe7db10 (diff) | |
download | FreeBSD-src-cc73504950eb7b5dff2dded9bedd67bc36d64641.zip FreeBSD-src-cc73504950eb7b5dff2dded9bedd67bc36d64641.tar.gz |
Vendor import of clang trunk r162107:
http://llvm.org/svn/llvm-project/cfe/trunk@162107
Diffstat (limited to 'test/Analysis/inline.cpp')
-rw-r--r-- | test/Analysis/inline.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Analysis/inline.cpp b/test/Analysis/inline.cpp index 4eaed9f..6b9a885 100644 --- a/test/Analysis/inline.cpp +++ b/test/Analysis/inline.cpp @@ -166,3 +166,30 @@ namespace PR13569_virtual { x.interface(); } } + +namespace Invalidation { + struct X { + void touch(int &x) const { + x = 0; + } + + void touch2(int &x) const; + + virtual void touchV(int &x) const { + x = 0; + } + + virtual void touchV2(int &x) const; + + int test() const { + // We were accidentally not invalidating under -analyzer-ipa=inlining + // at one point for virtual methods with visible definitions. + int a, b, c, d; + touch(a); + touch2(b); + touchV(c); + touchV2(d); + return a + b + c + d; // no-warning + } + }; +} |