File indexing completed on 2024-04-28 05:38:28

0001 /*
0002     SPDX-FileCopyrightText: 2015 Sergio Martins <smartins@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef CLANG_LAZY_AUTO_UNEXPECTED_QSTRING_BUILDER_H
0008 #define CLANG_LAZY_AUTO_UNEXPECTED_QSTRING_BUILDER_H
0009 
0010 #include "checkbase.h"
0011 
0012 #include <string>
0013 
0014 class ClazyContext;
0015 
0016 namespace clang
0017 {
0018 class Stmt;
0019 class Decl;
0020 }
0021 
0022 /**
0023  * Finds places where auto is deduced to be QStringBuilder instead of QString, which introduces crashes.
0024  *
0025  * See README-auto-unexpected-qstring-builder for more information
0026  */
0027 class AutoUnexpectedQStringBuilder : public CheckBase
0028 {
0029 public:
0030     explicit AutoUnexpectedQStringBuilder(const std::string &name, ClazyContext *context);
0031     void VisitDecl(clang::Decl *decl) override;
0032     void VisitStmt(clang::Stmt *stmt) override;
0033 };
0034 
0035 #endif