clang
20.0.0git
lib
StaticAnalyzer
Core
CheckerHelpers.cpp
Go to the documentation of this file.
1
//===---- CheckerHelpers.cpp - Helper functions for checkers ----*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file defines several static functions for use in checkers.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "
clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
"
14
#include "
clang/AST/Decl.h
"
15
#include "
clang/AST/Expr.h
"
16
#include "
clang/Lex/Preprocessor.h
"
17
#include "
clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
"
18
#include <optional>
19
20
namespace
clang
{
21
22
namespace
ento {
23
24
// Recursively find any substatements containing macros
25
bool
containsMacro
(
const
Stmt
*S) {