| 1 |
/* |
| 2 |
SPDX-FileCopyrightText: 2016 Sergio Martins <[email protected]> |
| 3 |
|
| 4 |
SPDX-License-Identifier: LGPL-2.0-or-later |
| 5 |
*/ |
| 6 |
|
| 7 |
#ifndef CLAZY_CONTAINER_INSIDE_LOOP_H |
| 8 |
#define CLAZY_CONTAINER_INSIDE_LOOP_H |
| 9 |
|
| 10 |
#include "checkbase.h" |
| 11 |
|
| 12 |
/** |
| 13 |
* Finds places defining containers inside loops. Defining them outside and using resize(0) will |
| 14 |
* save allocations. |
| 15 |
* |
| 16 |
* See README-container-inside-loop for more information |
| 17 |
*/ |
| 18 |
class ContainerInsideLoop : public CheckBase |
| 19 |
{ |
| 20 |
public: |
| 21 |
using CheckBase::CheckBase; |
| 22 |
void VisitStmt(clang::Stmt *stmt) override; |
| 23 |
}; |
| 24 |
|
| 25 |
#endif |