Coverage Report

Created: 2020-09-15 12:33

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValVisitor.h
Line
Count
Source (jump to first uncovered line)
1
//===--- SValVisitor.h - Visitor for SVal subclasses ------------*- 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 the SValVisitor, SymExprVisitor, and MemRegionVisitor
10
//  interfaces, and also FullSValVisitor, which visits all three hierarchies.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SVALVISITOR_H
15
#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SVALVISITOR_H
16
17
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
18
#include "clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h"
19
#include "clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h"
20
21
namespace clang {
22
23
namespace ento {
24
25
/// SValVisitor - this class implements a simple visitor for SVal
26
/// subclasses.
27
template <typename ImplClass, typename RetTy = void> class SValVisitor {
28
public:
29
30
#define DISPATCH(NAME, CLASS) \
31
425k
  return static_cast<ImplClass *>(this)->Visit ## NAME(V.castAs<CLASS>())
32
33
166k
  RetTy Visit(SVal V) {
34
    // Dispatch to VisitFooVal for each FooVal.
35
    // Take namespaces (loc:: and nonloc::) into account.
36
166k
    switch (V.getBaseKind()) {
37
1
#define BASIC_SVAL(Id, Parent) case SVal::Id ## Kind: 
DISPATCH0
(Id, Id);
38
0
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.def"
39
47
    case SVal::LocKind:
40
47
      switch (V.getSubKind()) {
41
0
#define LOC_SVAL(Id, Parent) \
42
47
      case loc::Id ## Kind: 
DISPATCH45
(Loc ## Id, loc :: Id);
43
0
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.def"
44
47
      }
45
47
      
llvm_unreachable0
("Unknown Loc sub-kind!");
46
166k
    case SVal::NonLocKind:
47
166k
      switch (V.getSubKind()) {
48
0
#define NONLOC_SVAL(Id, Parent) \
49
166k
      case nonloc::Id ## Kind: 
DISPATCH85.0k
(NonLoc ## Id, nonloc :: Id);
50
0
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.def"
51
166k
      }
52
0
      llvm_unreachable("Unknown NonLoc sub-kind!");
53
166k
    }
54
166k
    
llvm_unreachable0
("Unknown SVal kind!");
55
166k
  }
clang::ento::SValVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::Visit(clang::ento::SVal)
Line
Count
Source
33
62
  RetTy Visit(SVal V) {
34
    // Dispatch to VisitFooVal for each FooVal.
35
    // Take namespaces (loc:: and nonloc::) into account.
36
62
    switch (V.getBaseKind()) {
37
0
#define BASIC_SVAL(Id, Parent) case SVal::Id ## Kind: DISPATCH(Id, Id);
38
0
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.def"
39
41
    case SVal::LocKind:
40
41
      switch (V.getSubKind()) {
41
0
#define LOC_SVAL(Id, Parent) \
42
0
      case loc::Id ## Kind: DISPATCH(Loc ## Id, loc :: Id);
43
0
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.def"
44
41
      }
45
41
      
llvm_unreachable0
("Unknown Loc sub-kind!");
46
20
    case SVal::NonLocKind:
47
20
      switch (V.getSubKind()) {
48
0
#define NONLOC_SVAL(Id, Parent) \
49
0
      case nonloc::Id ## Kind: DISPATCH(NonLoc ## Id, nonloc :: Id);
50
0
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.def"
51
20
      }
52
0
      llvm_unreachable("Unknown NonLoc sub-kind!");
53
62
    }
54
0
    llvm_unreachable("Unknown SVal kind!");
55
  }
SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::Visit(clang::ento::SVal)
Line
Count
Source
33
166k
  RetTy Visit(SVal V) {
34
    // Dispatch to VisitFooVal for each FooVal.
35
    // Take namespaces (loc:: and nonloc::) into account.
36
166k
    switch (V.getBaseKind()) {
37
0
#define BASIC_SVAL(Id, Parent) case SVal::Id ## Kind: DISPATCH(Id, Id);
38
0
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.def"
39
6
    case SVal::LocKind:
40
6
      switch (V.getSubKind()) {
41
0
#define LOC_SVAL(Id, Parent) \
42
0
      case loc::Id ## Kind: DISPATCH(Loc ## Id, loc :: Id);
43
0
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.def"
44
6
      }
45
6
      
llvm_unreachable0
("Unknown Loc sub-kind!");
46
166k
    case SVal::NonLocKind:
47
166k
      switch (V.getSubKind()) {
48
0
#define NONLOC_SVAL(Id, Parent) \
49
0
      case nonloc::Id ## Kind: DISPATCH(NonLoc ## Id, nonloc :: Id);
50
0
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.def"
51
166k
      }
52
0
      llvm_unreachable("Unknown NonLoc sub-kind!");
53
166k
    }
54
0
    llvm_unreachable("Unknown SVal kind!");
55
  }
56
57
#define BASIC_SVAL(Id, Parent) \
58
255k
  RetTy Visit ## Id(Id V) { DISPATCH(Parent, Id); }
Unexecuted instantiation: clang::ento::SValVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitLoc(clang::ento::Loc)
Unexecuted instantiation: clang::ento::SValVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitDefinedSVal(clang::ento::DefinedSVal)
Unexecuted instantiation: clang::ento::SValVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitDefinedOrUnknownSVal(clang::ento::DefinedOrUnknownSVal)
Unexecuted instantiation: clang::ento::SValVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitNonLoc(clang::ento::NonLoc)
Unexecuted instantiation: SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitUndefinedVal(clang::ento::UndefinedVal)
Unexecuted instantiation: SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitUnknownVal(clang::ento::UnknownVal)
SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitDefinedOrUnknownSVal(clang::ento::DefinedOrUnknownSVal)
Line
Count
Source
58
85.0k
  RetTy Visit ## Id(Id V) { DISPATCH(Parent, Id); }
SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitLoc(clang::ento::Loc)
Line
Count
Source
58
6
  RetTy Visit ## Id(Id V) { DISPATCH(Parent, Id); }
SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitDefinedSVal(clang::ento::DefinedSVal)
Line
Count
Source
58
85.0k
  RetTy Visit ## Id(Id V) { DISPATCH(Parent, Id); }
SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitNonLoc(clang::ento::NonLoc)
Line
Count
Source
58
85.0k
  RetTy Visit ## Id(Id V) { DISPATCH(Parent, Id); }
59
#define ABSTRACT_SVAL(Id, Parent) \
60
  BASIC_SVAL(Id, Parent)
61
#define LOC_SVAL(Id, Parent) \
62
6
  RetTy VisitLoc ## Id(loc::Id V) { DISPATCH(Parent, Parent); }
Unexecuted instantiation: clang::ento::SValVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitLocGotoLabel(clang::ento::loc::GotoLabel)
SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitLocConcreteInt(clang::ento::loc::ConcreteInt)
Line
Count
Source
62
4
  RetTy VisitLoc ## Id(loc::Id V) { DISPATCH(Parent, Parent); }
SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitLocGotoLabel(clang::ento::loc::GotoLabel)
Line
Count
Source
62
2
  RetTy VisitLoc ## Id(loc::Id V) { DISPATCH(Parent, Parent); }
Unexecuted instantiation: SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitLocMemRegionVal(clang::ento::loc::MemRegionVal)
63
#define NONLOC_SVAL(Id, Parent) \
64
85.0k
  RetTy VisitNonLoc ## Id(nonloc::Id V) { DISPATCH(Parent, Parent); }
Unexecuted instantiation: clang::ento::SValVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitNonLocCompoundVal(clang::ento::nonloc::CompoundVal)
Unexecuted instantiation: clang::ento::SValVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitNonLocLocAsInteger(clang::ento::nonloc::LocAsInteger)
Unexecuted instantiation: clang::ento::SValVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitNonLocPointerToMember(clang::ento::nonloc::PointerToMember)
Unexecuted instantiation: SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitNonLocCompoundVal(clang::ento::nonloc::CompoundVal)
SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitNonLocConcreteInt(clang::ento::nonloc::ConcreteInt)
Line
Count
Source
64
84.9k
  RetTy VisitNonLoc ## Id(nonloc::Id V) { DISPATCH(Parent, Parent); }
Unexecuted instantiation: SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitNonLocLazyCompoundVal(clang::ento::nonloc::LazyCompoundVal)
SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitNonLocLocAsInteger(clang::ento::nonloc::LocAsInteger)
Line
Count
Source
64
15
  RetTy VisitNonLoc ## Id(nonloc::Id V) { DISPATCH(Parent, Parent); }
Unexecuted instantiation: SimpleSValBuilder.cpp:clang::ento::SValVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitNonLocPointerToMember(clang::ento::nonloc::PointerToMember)
65
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.def"
66
67
  // Base case, ignore it. :)
68
  RetTy VisitSVal(SVal V) { return RetTy(); }
69
70
#undef DISPATCH
71
};
72
73
/// SymExprVisitor - this class implements a simple visitor for SymExpr
74
/// subclasses.
75
template <typename ImplClass, typename RetTy = void> class SymExprVisitor {
76
public:
77
78
#define DISPATCH(CLASS) \
79
1.70M
    return static_cast<ImplClass *>(this)->Visit ## CLASS(cast<CLASS>(S))
80
81
677k
  RetTy Visit(SymbolRef S) {
82
    // Dispatch to VisitSymbolFoo for each SymbolFoo.
83
677k
    switch (S->getKind()) {
84
0
#define SYMBOL(Id, Parent) \
85
677k
    case SymExpr::Id ## Kind: 
DISPATCH673k
(Id);
86
0
#include "clang/StaticAnalyzer/Core/PathSensitive/Symbols.def"
87
677k
    }
88
677k
    
llvm_unreachable0
("Unknown SymExpr kind!");
89
677k
  }
clang::ento::SymExprVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::Visit(clang::ento::SymExpr const*)
Line
Count
Source
81
33
  RetTy Visit(SymbolRef S) {
82
    // Dispatch to VisitSymbolFoo for each SymbolFoo.
83
33
    switch (S->getKind()) {
84
0
#define SYMBOL(Id, Parent) \
85
0
    case SymExpr::Id ## Kind: DISPATCH(Id);
86
0
#include "clang/StaticAnalyzer/Core/PathSensitive/Symbols.def"
87
33
    }
88
0
    llvm_unreachable("Unknown SymExpr kind!");
89
  }
ExprInspectionChecker.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolExpressor, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::Visit(clang::ento::SymExpr const*)
Line
Count
Source
81
1.99k
  RetTy Visit(SymbolRef S) {
82
    // Dispatch to VisitSymbolFoo for each SymbolFoo.
83
1.99k
    switch (S->getKind()) {
84
0
#define SYMBOL(Id, Parent) \
85
0
    case SymExpr::Id ## Kind: DISPATCH(Id);
86
0
#include "clang/StaticAnalyzer/Core/PathSensitive/Symbols.def"
87
1.99k
    }
88
0
    llvm_unreachable("Unknown SymExpr kind!");
89
  }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::EqualityInfo::EqualityExtractor, llvm::Optional<(anonymous namespace)::EqualityInfo> >::Visit(clang::ento::SymExpr const*)
Line
Count
Source
81
360k
  RetTy Visit(SymbolRef S) {
82
    // Dispatch to VisitSymbolFoo for each SymbolFoo.
83
360k
    switch (S->getKind()) {
84
0
#define SYMBOL(Id, Parent) \
85
0
    case SymExpr::Id ## Kind: DISPATCH(Id);
86
0
#include "clang/StaticAnalyzer/Core/PathSensitive/Symbols.def"
87
360k
    }
88
0
    llvm_unreachable("Unknown SymExpr kind!");
89
  }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolicRangeInferrer, clang::ento::RangeSet>::Visit(clang::ento::SymExpr const*)
Line
Count
Source
81
147k
  RetTy Visit(SymbolRef S) {
82
    // Dispatch to VisitSymbolFoo for each SymbolFoo.
83
147k
    switch (S->getKind()) {
84
0
#define SYMBOL(Id, Parent) \
85
0
    case SymExpr::Id ## Kind: DISPATCH(Id);
86
0
#include "clang/StaticAnalyzer/Core/PathSensitive/Symbols.def"
87
147k
    }
88
0
    llvm_unreachable("Unknown SymExpr kind!");
89
  }
SimpleSValBuilder.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::Visit(clang::ento::SymExpr const*)
Line
Count
Source
81
167k
  RetTy Visit(SymbolRef S) {
82
    // Dispatch to VisitSymbolFoo for each SymbolFoo.
83
167k
    switch (S->getKind()) {
84
0
#define SYMBOL(Id, Parent) \
85
0
    case SymExpr::Id ## Kind: DISPATCH(Id);
86
0
#include "clang/StaticAnalyzer/Core/PathSensitive/Symbols.def"
87
167k
    }
88
0
    llvm_unreachable("Unknown SymExpr kind!");
89
  }
90
91
  // If the implementation chooses not to implement a certain visit method, fall
92
  // back on visiting the superclass.
93
1.03M
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
Unexecuted instantiation: clang::ento::SymExprVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitIntSymExpr(clang::ento::BinarySymExprImpl<llvm::APSInt const&, clang::ento::SymExpr const*, (clang::ento::SymExpr::Kind)0> const*)
Unexecuted instantiation: clang::ento::SymExprVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitBinarySymExpr(clang::ento::BinarySymExpr const*)
Unexecuted instantiation: clang::ento::SymExprVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitSymbolCast(clang::ento::SymbolCast const*)
Unexecuted instantiation: ExprInspectionChecker.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolExpressor, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::VisitIntSymExpr(clang::ento::BinarySymExprImpl<llvm::APSInt const&, clang::ento::SymExpr const*, (clang::ento::SymExpr::Kind)0> const*)
Unexecuted instantiation: ExprInspectionChecker.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolExpressor, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::VisitBinarySymExpr(clang::ento::BinarySymExpr const*)
ExprInspectionChecker.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolExpressor, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::VisitSymbolConjured(clang::ento::SymbolConjured const*)
Line
Count
Source
93
1.39k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
ExprInspectionChecker.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolExpressor, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::VisitSymbolData(clang::ento::SymbolData const*)
Line
Count
Source
93
1.39k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
Unexecuted instantiation: ExprInspectionChecker.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolExpressor, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::VisitSymbolDerived(clang::ento::SymbolDerived const*)
Unexecuted instantiation: ExprInspectionChecker.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolExpressor, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::VisitSymbolExtent(clang::ento::SymbolExtent const*)
Unexecuted instantiation: ExprInspectionChecker.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolExpressor, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::VisitSymbolMetadata(clang::ento::SymbolMetadata const*)
ExprInspectionChecker.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolExpressor, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::VisitSymbolRegionValue(clang::ento::SymbolRegionValue const*)
Line
Count
Source
93
4
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::EqualityInfo::EqualityExtractor, llvm::Optional<(anonymous namespace)::EqualityInfo> >::VisitIntSymExpr(clang::ento::BinarySymExprImpl<llvm::APSInt const&, clang::ento::SymExpr const*, (clang::ento::SymExpr::Kind)0> const*)
Line
Count
Source
93
195
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::EqualityInfo::EqualityExtractor, llvm::Optional<(anonymous namespace)::EqualityInfo> >::VisitBinarySymExpr(clang::ento::BinarySymExpr const*)
Line
Count
Source
93
75.2k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::EqualityInfo::EqualityExtractor, llvm::Optional<(anonymous namespace)::EqualityInfo> >::VisitSymIntExpr(clang::ento::BinarySymExprImpl<clang::ento::SymExpr const*, llvm::APSInt const&, (clang::ento::SymExpr::Kind)1> const*)
Line
Count
Source
93
75.0k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::EqualityInfo::EqualityExtractor, llvm::Optional<(anonymous namespace)::EqualityInfo> >::VisitSymbolCast(clang::ento::SymbolCast const*)
Line
Count
Source
93
41
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::EqualityInfo::EqualityExtractor, llvm::Optional<(anonymous namespace)::EqualityInfo> >::VisitSymbolConjured(clang::ento::SymbolConjured const*)
Line
Count
Source
93
74.7k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::EqualityInfo::EqualityExtractor, llvm::Optional<(anonymous namespace)::EqualityInfo> >::VisitSymbolData(clang::ento::SymbolData const*)
Line
Count
Source
93
274k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::EqualityInfo::EqualityExtractor, llvm::Optional<(anonymous namespace)::EqualityInfo> >::VisitSymbolDerived(clang::ento::SymbolDerived const*)
Line
Count
Source
93
56.0k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::EqualityInfo::EqualityExtractor, llvm::Optional<(anonymous namespace)::EqualityInfo> >::VisitSymbolExtent(clang::ento::SymbolExtent const*)
Line
Count
Source
93
1.68k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::EqualityInfo::EqualityExtractor, llvm::Optional<(anonymous namespace)::EqualityInfo> >::VisitSymbolMetadata(clang::ento::SymbolMetadata const*)
Line
Count
Source
93
1.82k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::EqualityInfo::EqualityExtractor, llvm::Optional<(anonymous namespace)::EqualityInfo> >::VisitSymbolRegionValue(clang::ento::SymbolRegionValue const*)
Line
Count
Source
93
139k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolicRangeInferrer, clang::ento::RangeSet>::VisitSymbolCast(clang::ento::SymbolCast const*)
Line
Count
Source
93
41
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolicRangeInferrer, clang::ento::RangeSet>::VisitSymbolConjured(clang::ento::SymbolConjured const*)
Line
Count
Source
93
28.1k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolicRangeInferrer, clang::ento::RangeSet>::VisitSymbolData(clang::ento::SymbolData const*)
Line
Count
Source
93
103k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolicRangeInferrer, clang::ento::RangeSet>::VisitSymbolDerived(clang::ento::SymbolDerived const*)
Line
Count
Source
93
10.6k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolicRangeInferrer, clang::ento::RangeSet>::VisitSymbolExtent(clang::ento::SymbolExtent const*)
Line
Count
Source
93
1.49k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolicRangeInferrer, clang::ento::RangeSet>::VisitSymbolMetadata(clang::ento::SymbolMetadata const*)
Line
Count
Source
93
629
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
RangeConstraintManager.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SymbolicRangeInferrer, clang::ento::RangeSet>::VisitSymbolRegionValue(clang::ento::SymbolRegionValue const*)
Line
Count
Source
93
62.6k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
SimpleSValBuilder.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitIntSymExpr(clang::ento::BinarySymExprImpl<llvm::APSInt const&, clang::ento::SymExpr const*, (clang::ento::SymExpr::Kind)0> const*)
Line
Count
Source
93
284
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
SimpleSValBuilder.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitBinarySymExpr(clang::ento::BinarySymExpr const*)
Line
Count
Source
93
284
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
SimpleSValBuilder.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitSymbolCast(clang::ento::SymbolCast const*)
Line
Count
Source
93
46
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
SimpleSValBuilder.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitSymbolConjured(clang::ento::SymbolConjured const*)
Line
Count
Source
93
84.9k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
SimpleSValBuilder.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitSymbolDerived(clang::ento::SymbolDerived const*)
Line
Count
Source
93
6.42k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
SimpleSValBuilder.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitSymbolExtent(clang::ento::SymbolExtent const*)
Line
Count
Source
93
2.64k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
SimpleSValBuilder.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitSymbolMetadata(clang::ento::SymbolMetadata const*)
Line
Count
Source
93
1.77k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
SimpleSValBuilder.cpp:clang::ento::SymExprVisitor<(anonymous namespace)::SimpleSValBuilder::simplifySVal(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SVal)::Simplifier, clang::ento::SVal>::VisitSymbolRegionValue(clang::ento::SymbolRegionValue const*)
Line
Count
Source
93
25.0k
#define SYMBOL(Id, Parent) RetTy Visit ## Id(const Id *S) { DISPATCH(Parent); }
94
#define ABSTRACT_SYMBOL(Id, Parent) SYMBOL(Id, Parent)
95
#include "clang/StaticAnalyzer/Core/PathSensitive/Symbols.def"
96
97
  // Base case, ignore it. :)
98
349k
  RetTy VisitSymExpr(SymbolRef S) { return RetTy(); }
99
100
#undef DISPATCH
101
};
102
103
/// MemRegionVisitor - this class implements a simple visitor for MemRegion
104
/// subclasses.
105
template <typename ImplClass, typename RetTy = void> class MemRegionVisitor {
106
public:
107
108
#define DISPATCH(CLASS) \
109
59
  return static_cast<ImplClass *>(this)->Visit ## CLASS(cast<CLASS>(R))
110
111
59
  RetTy Visit(const MemRegion *R) {
112
    // Dispatch to VisitFooRegion for each FooRegion.
113
59
    switch (R->getKind()) {
114
59
#define REGION(Id, Parent) case MemRegion::Id ## Kind: DISPATCH(Id);
115
0
#include "clang/StaticAnalyzer/Core/PathSensitive/Regions.def"
116
59
    }
117
59
    
llvm_unreachable0
("Unknown MemRegion kind!");
118
59
  }
119
120
  // If the implementation chooses not to implement a certain visit method, fall
121
  // back on visiting the superclass.
122
#define REGION(Id, Parent) \
123
0
  RetTy Visit ## Id(const Id *R) { DISPATCH(Parent); }
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitCodeSpaceRegion(clang::ento::CodeSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitMemSpaceRegion(clang::ento::MemSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitGlobalImmutableSpaceRegion(clang::ento::GlobalImmutableSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitNonStaticGlobalSpaceRegion(clang::ento::NonStaticGlobalSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitGlobalsSpaceRegion(clang::ento::GlobalsSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitGlobalInternalSpaceRegion(clang::ento::GlobalInternalSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitGlobalSystemSpaceRegion(clang::ento::GlobalSystemSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitStaticGlobalSpaceRegion(clang::ento::StaticGlobalSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitHeapSpaceRegion(clang::ento::HeapSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitStackArgumentsSpaceRegion(clang::ento::StackArgumentsSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitStackSpaceRegion(clang::ento::StackSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitStackLocalsSpaceRegion(clang::ento::StackLocalsSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitUnknownSpaceRegion(clang::ento::UnknownSpaceRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitBlockDataRegion(clang::ento::BlockDataRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitTypedRegion(clang::ento::TypedRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitSubRegion(clang::ento::SubRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitBlockCodeRegion(clang::ento::BlockCodeRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitCodeTextRegion(clang::ento::CodeTextRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitFunctionCodeRegion(clang::ento::FunctionCodeRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitCXXDerivedObjectRegion(clang::ento::CXXDerivedObjectRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitTypedValueRegion(clang::ento::TypedValueRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitCXXThisRegion(clang::ento::CXXThisRegion const*)
Unexecuted instantiation: clang::ento::MemRegionVisitor<clang::ento::SValExplainer, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::VisitObjCStringRegion(clang::ento::ObjCStringRegion const*)
124
#define ABSTRACT_REGION(Id, Parent) \
125
  REGION(Id, Parent)
126
#include "clang/StaticAnalyzer/Core/PathSensitive/Regions.def"
127
128
  // Base case, ignore it. :)
129
  RetTy VisitMemRegion(const MemRegion *R) { return RetTy(); }
130
131
#undef DISPATCH
132
};
133
134
/// FullSValVisitor - a convenient mixed visitor for all three:
135
/// SVal, SymExpr and MemRegion subclasses.
136
template <typename ImplClass, typename RetTy = void>
137
class FullSValVisitor : public SValVisitor<ImplClass, RetTy>,
138
                        public SymExprVisitor<ImplClass, RetTy>,
139
                        public MemRegionVisitor<ImplClass, RetTy> {
140
public:
141
  using SValVisitor<ImplClass, RetTy>::Visit;
142
  using SymExprVisitor<ImplClass, RetTy>::Visit;
143
  using MemRegionVisitor<ImplClass, RetTy>::Visit;
144
};
145
146
} // end namespace ento
147
148
} // end namespace clang
149
150
#endif