• Home
  • Raw
  • Download

Lines Matching full:pointer

19   std::unique_ptr<A> P; // expected-note {{Default constructed smart pointer 'P' is null}}  in derefAfterDefaultCtr()
20 P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefAfterDefaultCtr()
21 // expected-note@-1{{Dereference of null smart pointer 'P'}} in derefAfterDefaultCtr()
25 A *NullInnerPtr = nullptr; // expected-note {{'NullInnerPtr' initialized to a null pointer value}} in derefAfterCtrWithNull()
26 …std::unique_ptr<A> P(NullInnerPtr); // expected-note {{Smart pointer 'P' is constructed using a nu… in derefAfterCtrWithNull()
27 *P; // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefAfterCtrWithNull()
28 // expected-note@-1{{Dereference of null smart pointer 'P'}} in derefAfterCtrWithNull()
32 A *NullInnerPtr = nullptr; // expected-note {{'NullInnerPtr' initialized to a null pointer value}} in derefAfterCtrWithNullVariable()
33 …std::unique_ptr<A> P(NullInnerPtr); // expected-note {{Smart pointer 'P' is constructed using a nu… in derefAfterCtrWithNullVariable()
34 P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefAfterCtrWithNullVariable()
35 // expected-note@-1{{Dereference of null smart pointer 'P'}} in derefAfterCtrWithNullVariable()
39 std::unique_ptr<A> P(new A()); // expected-note {{Smart pointer 'P' is constructed}} in derefAfterRelease()
41 P.release(); // expected-note {{Smart pointer 'P' is released and set to null}} in derefAfterRelease()
42 P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefAfterRelease()
43 // expected-note@-1{{Dereference of null smart pointer 'P'}} in derefAfterRelease()
47 std::unique_ptr<A> P(new A()); // expected-note {{Smart pointer 'P' is constructed}} in derefAfterReset()
48 P.reset(); // expected-note {{Smart pointer 'P' reset using a null value}} in derefAfterReset()
49 P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefAfterReset()
50 // expected-note@-1{{Dereference of null smart pointer 'P'}} in derefAfterReset()
54 A *NullInnerPtr = nullptr; // expected-note {{'NullInnerPtr' initialized to a null pointer value}} in derefAfterResetWithNull()
55 std::unique_ptr<A> P(new A()); // expected-note {{Smart pointer 'P' is constructed}} in derefAfterResetWithNull()
56 P.reset(NullInnerPtr); // expected-note {{Smart pointer 'P' reset using a null value}} in derefAfterResetWithNull()
57 P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefAfterResetWithNull()
58 // expected-note@-1{{Dereference of null smart pointer 'P'}} in derefAfterResetWithNull()
61 // FIXME: Fix this test when support is added for tracking raw pointer
62 // and mark the smart pointer as interesting based on that and add tags.
64 std::unique_ptr<A> P; // FIXME: add note "Default constructed smart pointer 'P' is null" in derefOnReleasedNullRawPtr()
65 A *AP = P.release(); // expected-note {{'AP' initialized to a null pointer value}} in derefOnReleasedNullRawPtr()
66 AP->foo(); // expected-warning {{Called C++ object pointer is null [core.CallAndMessage]}} in derefOnReleasedNullRawPtr()
67 // expected-note@-1{{Called C++ object pointer is null}} in derefOnReleasedNullRawPtr()
71 std::unique_ptr<A> P(new A()); // expected-note {{Smart pointer 'P' is constructed}} in derefOnSwappedNullPtr()
72 std::unique_ptr<A> PNull; // expected-note {{Default constructed smart pointer 'PNull' is null}} in derefOnSwappedNullPtr()
73 P.swap(PNull); // expected-note {{Swapped null smart pointer 'PNull' with smart pointer 'P'}} in derefOnSwappedNullPtr()
75 …(*P).foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]… in derefOnSwappedNullPtr()
76 // expected-note@-1{{Dereference of null smart pointer 'P'}} in derefOnSwappedNullPtr()
81 std::unique_ptr<A> P; // expected-note {{Default constructed smart pointer 'P' is null}} in derefOnStdSwappedNullPtr()
82 std::unique_ptr<A> PNull; // expected-note {{Default constructed smart pointer 'PNull' is null}} in derefOnStdSwappedNullPtr()
83 …uts/system-header-simulator-cxx.h:979 {{Swapped null smart pointer 'PNull' with smart pointer 'P'}} in derefOnStdSwappedNullPtr()
86 P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefOnStdSwappedNullPtr()
87 // expected-note@-1{{Dereference of null smart pointer 'P'}} in derefOnStdSwappedNullPtr()
90 struct StructWithSmartPtr { // expected-note {{Default constructed smart pointer 'S.P' is null}}
97 …S.P->foo(); // expected-warning {{Dereference of null smart pointer 'S.P' [alpha.cplusplus.SmartPt… in derefAfterDefaultCtrInsideStruct()
98 // expected-note@-1{{Dereference of null smart pointer 'S.P'}} in derefAfterDefaultCtrInsideStruct()
102 std::unique_ptr<A> P; // expected-note {{Default constructed smart pointer 'P' is null}} in noNoteTagsForNonInterestingRegion()
108 P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in noNoteTagsForNonInterestingRegion()
109 // expected-note@-1{{Dereference of null smart pointer 'P'}} in noNoteTagsForNonInterestingRegion()
113 std::unique_ptr<A> P; // FIXME: add note "Default constructed smart pointer 'P' is null" in derefOnRawPtrFromGetOnNullPtr()
114 P.get()->foo(); // expected-warning {{Called C++ object pointer is null [core.CallAndMessage]}} in derefOnRawPtrFromGetOnNullPtr()
115 // expected-note@-1 {{Called C++ object pointer is null}} in derefOnRawPtrFromGetOnNullPtr()
128 std::unique_ptr<A> PToMove(new A()); // expected-note {{Smart pointer 'PToMove' is constructed}} in derefOnMovedFromValidPtr()
131 …P = std::move(PToMove); // expected-note {{Smart pointer 'PToMove' is null after being moved to 'P… in derefOnMovedFromValidPtr()
132 …PToMove->foo(); // expected-warning {{Dereference of null smart pointer 'PToMove' [alpha.cplusplus… in derefOnMovedFromValidPtr()
133 // expected-note@-1 {{Dereference of null smart pointer 'PToMove'}} in derefOnMovedFromValidPtr()
144 std::unique_ptr<A> P(new A()); // expected-note {{Smart pointer 'P' is constructed}} in derefOnNullPtrGotMovedFromValidPtr()
146 …std::unique_ptr<A> PToMove; // expected-note {{Default constructed smart pointer 'PToMove' is null… in derefOnNullPtrGotMovedFromValidPtr()
147 P = std::move(PToMove); // expected-note {{A null pointer value is moved to 'P'}} in derefOnNullPtrGotMovedFromValidPtr()
148 P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefOnNullPtrGotMovedFromValidPtr()
149 // expected-note@-1 {{Dereference of null smart pointer 'P'}} in derefOnNullPtrGotMovedFromValidPtr()
154 …P = std::move(PToMove); // expected-note {{Smart pointer 'PToMove' is null after; previous value m… in derefOnMovedUnknownPtr()
155 …PToMove->foo(); // expected-warning {{Dereference of null smart pointer 'PToMove' [alpha.cplusplus… in derefOnMovedUnknownPtr()
156 // expected-note@-1 {{Dereference of null smart pointer 'PToMove'}} in derefOnMovedUnknownPtr()
160 std::unique_ptr<A> P; // expected-note {{Default constructed smart pointer 'P' is null}} in derefOnAssignedNullPtrToNullSmartPtr()
161 P = nullptr; // expected-note {{Smart pointer 'P' is assigned to null}} in derefOnAssignedNullPtrToNullSmartPtr()
162 P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefOnAssignedNullPtrToNullSmartPtr()
163 // expected-note@-1 {{Dereference of null smart pointer 'P'}} in derefOnAssignedNullPtrToNullSmartPtr()
167 std::unique_ptr<A> P(new A()); // expected-note {{Smart pointer 'P' is constructed}} in derefOnAssignedZeroToNullSmartPtr()
169 P = 0; // expected-note {{Smart pointer 'P' is assigned to null}} in derefOnAssignedZeroToNullSmartPtr()
170 P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefOnAssignedZeroToNullSmartPtr()
171 // expected-note@-1 {{Dereference of null smart pointer 'P'}} in derefOnAssignedZeroToNullSmartPtr()
175 …std::unique_ptr<A> PToMove; // expected-note {{Default constructed smart pointer 'PToMove' is null… in derefMoveConstructedWithNullPtr()
176 …std::unique_ptr<A> P(std::move(PToMove)); // expected-note {{A null pointer value is moved to 'P'}} in derefMoveConstructedWithNullPtr()
177 P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefMoveConstructedWithNullPtr()
178 // expected-note@-1{{Dereference of null smart pointer 'P'}} in derefMoveConstructedWithNullPtr()
182 std::unique_ptr<A> PToMove(new A()); // expected-note {{Smart pointer 'PToMove' is constructed}} in derefValidPtrMovedToConstruct()
184 …std::unique_ptr<A> P(std::move(PToMove)); // expected-note {{Smart pointer 'PToMove' is null after… in derefValidPtrMovedToConstruct()
185 …PToMove->foo(); // expected-warning {{Dereference of null smart pointer 'PToMove' [alpha.cplusplus… in derefValidPtrMovedToConstruct()
186 // expected-note@-1{{Dereference of null smart pointer 'PToMove'}} in derefValidPtrMovedToConstruct()
190 …std::unique_ptr<A> PToMove; // expected-note {{Default constructed smart pointer 'PToMove' is null… in derefNullPtrMovedToConstruct()
192 …std::unique_ptr<A> P(std::move(PToMove)); // expected-note {{Smart pointer 'PToMove' is null after… in derefNullPtrMovedToConstruct()
193 …PToMove->foo(); // expected-warning {{Dereference of null smart pointer 'PToMove' [alpha.cplusplus… in derefNullPtrMovedToConstruct()
194 // expected-note@-1{{Dereference of null smart pointer 'PToMove'}} in derefNullPtrMovedToConstruct()
198 …std::unique_ptr<A> P(std::move(PToMove)); // expected-note {{Smart pointer 'PToMove' is null after… in derefUnknownPtrMovedToConstruct()
199 …PToMove->foo(); // expected-warning {{Dereference of null smart pointer 'PToMove' [alpha.cplusplus… in derefUnknownPtrMovedToConstruct()
200 // expected-note@-1{{Dereference of null smart pointer 'PToMove'}} in derefUnknownPtrMovedToConstruct()
204 std::unique_ptr<A> P; // expected-note {{Default constructed smart pointer 'P' is null}} in derefConditionOnNullPtrFalseBranch()
208 … P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefConditionOnNullPtrFalseBranch()
209 // expected-note@-1{{Dereference of null smart pointer 'P'}} in derefConditionOnNullPtrFalseBranch()
214 std::unique_ptr<A> P; // expected-note {{Default constructed smart pointer 'P' is null}} in derefConditionOnNullPtrTrueBranch()
216 … P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefConditionOnNullPtrTrueBranch()
217 // expected-note@-1{{Dereference of null smart pointer 'P'}} in derefConditionOnNullPtrTrueBranch()
223 std::unique_ptr<A> PNull; // expected-note {{Default constructed smart pointer 'PNull' is null}} in derefConditionOnValidPtrTrueBranch()
225 …PNull->foo(); // expected-warning {{Dereference of null smart pointer 'PNull' [alpha.cplusplus.Sma… in derefConditionOnValidPtrTrueBranch()
226 // expected-note@-1{{Dereference of null smart pointer 'PNull'}} in derefConditionOnValidPtrTrueBranch()
234 std::unique_ptr<A> PNull; // expected-note {{Default constructed smart pointer 'PNull' is null}} in derefConditionOnValidPtrFalseBranch()
238 …PNull->foo(); // expected-warning {{Dereference of null smart pointer 'PNull' [alpha.cplusplus.Sma… in derefConditionOnValidPtrFalseBranch()
239 // expected-note@-1{{Dereference of null smart pointer 'PNull'}} in derefConditionOnValidPtrFalseBranch()
251 std::unique_ptr<A> PNull; // expected-note {{Default constructed smart pointer 'PNull' is null}} in derefConditionOnUnKnownPtrAssumeNull()
253 // expected-note@-1{{Assuming smart pointer 'P' is null}} in derefConditionOnUnKnownPtrAssumeNull()
254 …PNull->foo(); // expected-warning {{Dereference of null smart pointer 'PNull' [alpha.cplusplus.Sma… in derefConditionOnUnKnownPtrAssumeNull()
255 // expected-note@-1{{Dereference of null smart pointer 'PNull'}} in derefConditionOnUnKnownPtrAssumeNull()
260 std::unique_ptr<A> PNull; // expected-note {{Default constructed smart pointer 'PNull' is null}} in derefConditionOnUnKnownPtrAssumeNonNull()
262 // expected-note@-1{{Assuming smart pointer 'P' is non-null}} in derefConditionOnUnKnownPtrAssumeNonNull()
263 …PNull->foo(); // expected-warning {{Dereference of null smart pointer 'PNull' [alpha.cplusplus.Sma… in derefConditionOnUnKnownPtrAssumeNonNull()
264 // expected-note@-1{{Dereference of null smart pointer 'PNull'}} in derefConditionOnUnKnownPtrAssumeNonNull()
312 … P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} in derefAfterBranchingOnUnknownInnerPtr()
313 // expected-note@-1{{Dereference of null smart pointer 'P'}} in derefAfterBranchingOnUnknownInnerPtr()