clang-tools 22.0.0git
InconsistentIfElseBracesCheck.cpp File Reference
#include "InconsistentIfElseBracesCheck.h"
#include "../utils/BracesAroundStatement.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Stmt.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/Lexer.h"

Go to the source code of this file.

Namespaces

namespace  clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
namespace  clang::tidy
namespace  clang::tidy::readability

Functions

static bool clang::tidy::readability::shouldHaveBraces (const IfStmt *If)
 Check that at least one branch of the If statement is a CompoundStmt.