diff options
Diffstat (limited to 'test/Analysis/inlining/containers.cpp')
-rw-r--r-- | test/Analysis/inlining/containers.cpp | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/test/Analysis/inlining/containers.cpp b/test/Analysis/inlining/containers.cpp index 73b2957..c757da6 100644 --- a/test/Analysis/inlining/containers.cpp +++ b/test/Analysis/inlining/containers.cpp @@ -103,7 +103,10 @@ public: ~MySet() { delete[] storage; } bool isEmpty() { - clang_analyzer_checkInlined(true); // expected-warning {{TRUE}} + clang_analyzer_checkInlined(true); + #if INLINE + // expected-warning@-2 {{TRUE}} + #endif return size == 0; } @@ -114,23 +117,35 @@ public: }; iterator begin() { - clang_analyzer_checkInlined(true); // expected-warning {{TRUE}} + clang_analyzer_checkInlined(true); + #if INLINE + // expected-warning@-2 {{TRUE}} + #endif return iterator(storage); } iterator end() { - clang_analyzer_checkInlined(true); // expected-warning {{TRUE}} + clang_analyzer_checkInlined(true); + #if INLINE + // expected-warning@-2 {{TRUE}} + #endif return iterator(storage+size); } typedef int *raw_iterator; raw_iterator raw_begin() { - clang_analyzer_checkInlined(true); // expected-warning {{TRUE}} + clang_analyzer_checkInlined(true); + #if INLINE + // expected-warning@-2 {{TRUE}} + #endif return storage; } raw_iterator raw_end() { - clang_analyzer_checkInlined(true); // expected-warning {{TRUE}} + clang_analyzer_checkInlined(true); + #if INLINE + // expected-warning@-2 {{TRUE}} + #endif return storage + size; } }; @@ -145,7 +160,10 @@ public: } void useIterator(iterator i) { - clang_analyzer_checkInlined(true); // expected-warning {{TRUE}} + clang_analyzer_checkInlined(true); + #if INLINE + // expected-warning@-2 {{TRUE}} + #endif } }; @@ -174,7 +192,10 @@ public: typedef IterImpl wrapped_iterator; wrapped_iterator begin() { - clang_analyzer_checkInlined(true); // expected-warning {{TRUE}} + clang_analyzer_checkInlined(true); + #if INLINE + // expected-warning@-2 {{TRUE}} + #endif return IterImpl(impl.begin()); } }; @@ -193,7 +214,10 @@ public: typedef MySet::iterator iterator; iterator start() { - clang_analyzer_checkInlined(true); // expected-warning {{TRUE}} + clang_analyzer_checkInlined(true); +#if INLINE + // expected-warning@-2 {{TRUE}} +#endif return impl.begin(); } }; @@ -212,7 +236,10 @@ public: using iterator = MySet::iterator; iterator start() { - clang_analyzer_checkInlined(true); // expected-warning {{TRUE}} + clang_analyzer_checkInlined(true); + #if INLINE + // expected-warning@-2 {{TRUE}} + #endif return impl.begin(); } }; @@ -233,7 +260,10 @@ public: }; iterator start() { - clang_analyzer_checkInlined(true); // expected-warning {{TRUE}} + clang_analyzer_checkInlined(true); + #if INLINE + // expected-warning@-2 {{TRUE}} + #endif return iterator{impl.begin().impl}; } }; |