Lines Matching defs:AutoAssigned

84   const auto AutoAssigned = ExpensiveTypeReference();
85 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned' is copy-constructed from a const reference; consider making it a const reference [performance-unnecessary-copy-initialization]
86 // CHECK-FIXES: const auto& AutoAssigned = ExpensiveTypeReference();
87 AutoAssigned.constMethod();
106 const auto AutoAssigned = ExpensiveToCopyType::instance();
107 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned' is copy-constructed from a const reference; consider making it a const reference [performance-unnecessary-copy-initialization]
108 // CHECK-FIXES: const auto& AutoAssigned = ExpensiveToCopyType::instance();
109 AutoAssigned.constMethod();
128 const auto AutoAssigned = Obj.reference();
129 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned'
130 // CHECK-FIXES: const auto& AutoAssigned = Obj.reference();
131 AutoAssigned.constMethod();
150 const auto AutoAssigned = Obj.reference();
151 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned'
152 // CHECK-FIXES: const auto& AutoAssigned = Obj.reference();
153 AutoAssigned.constMethod();
172 const auto AutoAssigned = Obj->reference();
173 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned'
174 // CHECK-FIXES: const auto& AutoAssigned = Obj->reference();
175 AutoAssigned.constMethod();
194 const auto AutoAssigned = C[42];
195 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned'
196 // CHECK-FIXES: const auto& AutoAssigned = C[42];
197 AutoAssigned.constMethod();
216 const auto AutoAssigned = C[42];
217 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned'
218 // CHECK-FIXES: const auto& AutoAssigned = C[42];
219 AutoAssigned.constMethod();
238 const auto AutoAssigned = C[42];
239 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned'
240 // CHECK-FIXES: const auto& AutoAssigned = C[42];
241 AutoAssigned.constMethod();
260 const auto AutoAssigned = C[42];
261 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned'
262 // CHECK-FIXES: const auto& AutoAssigned = C[42];
263 AutoAssigned.constMethod();
282 const auto AutoAssigned = (*C)[42];
283 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned'
284 // CHECK-FIXES: const auto& AutoAssigned = (*C)[42];
285 AutoAssigned.constMethod();
330 const auto AutoAssigned = TrivialTypeReference();
341 auto AutoAssigned = ExpensiveTypeReference();
342 // CHECK-MESSAGES: [[@LINE-1]]:8: warning: the variable 'AutoAssigned' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference [performance-unnecessary-copy-initialization]
343 // CHECK-FIXES: const auto& AutoAssigned = ExpensiveTypeReference();
344 AutoAssigned.constMethod();
406 const auto AutoAssigned = Obj.reference();
407 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned'
408 // CHECK-FIXES: const auto& AutoAssigned = Obj.reference();
409 AutoAssigned.constMethod();
413 const auto AutoAssigned = Obj.reference();
421 const auto AutoAssigned = Obj.reference();
422 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned'
423 // CHECK-FIXES: const auto& AutoAssigned = Obj.reference();
424 AutoAssigned.constMethod();
429 const auto AutoAssigned = Obj.reference();
433 const auto AutoAssigned = Obj->reference();
434 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned'
435 // CHECK-FIXES: const auto& AutoAssigned = Obj->reference();
437 AutoAssigned.constMethod();
441 const auto AutoAssigned = Obj->reference();
450 const auto AutoAssigned = LocalVar.reference();
451 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned'
452 // CHECK-FIXES: const auto& AutoAssigned = LocalVar.reference();
453 AutoAssigned.constMethod();
458 const auto AutoAssigned = Obj.reference();
459 Obj = AutoAssigned;
757 const auto AutoAssigned = ExpensiveTypeReference(); int i = 0; // Foo bar.
758 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned' is copy-constructed from a const reference but is never used; consider removing the statement [performance-unnecessary-copy-initialization]
759 // CHECK-FIXES-NOT: const auto AutoAssigned = ExpensiveTypeReference();