Debian Codegraph @

src/checks/manuallevel/assert-with-side-effects.h

raw
1 /*
2 SPDX-FileCopyrightText: 2015 Klarälvdalens Datakonsult AB a KDAB Group company [email protected]
3 SPDX-FileContributor: Sérgio Martins <[email protected]>
4
5 SPDX-FileCopyrightText: 2015 Sergio Martins <[email protected]>
6
7 SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9
10 #ifndef ASSERT_WITH_SIDE_EFFECTS_H
11 #define ASSERT_WITH_SIDE_EFFECTS_H
12
13 #include "checkbase.h"
14
15 class AssertWithSideEffects : public CheckBase
16 {
17 public:
18 using CheckBase::CheckBase;
19 void VisitStmt(clang::Stmt *) override;
20
21 private:
22 enum Aggressiveness {
23 NormalAggressiveness = 0,
24 AlsoCheckFunctionCallsAggressiveness = 1 // too many false positives
25 };
26 Aggressiveness m_aggressiveness = NormalAggressiveness;
27 };
28
29 #endif