clang
20.0.0git
lib
StaticAnalyzer
Core
CheckerContext.cpp
Go to the documentation of this file.
1
//== CheckerContext.cpp - Context info for path-sensitive checkers-----------=//
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 CheckerContext that provides contextual info for
10
// path-sensitive checkers.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#include "
clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
"
15
#include "
clang/Basic/Builtins.h
"
16
#include "
clang/Lex/Lexer.h
"
17
#include "llvm/ADT/StringExtras.h"
18
19
using namespace
clang
;
20
using namespace
ento;
21
22
const
FunctionDecl
*
CheckerContext::getCalleeDecl
(
const
CallExpr
*CE)
const
{
23
const
FunctionDecl
*
D
= CE->
getDirectCallee
();
24
if
(
D
)
25
return
D
;
26
27
const
Expr
*Callee = CE->
getCallee
();
28
SVal
L = Pred->