6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
- #ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKER_VARIANTLIKETYPEMODELING_H
10
- #define LLVM_CLANG_LIB_STATICANALYZER_CHECKER_VARIANTLIKETYPEMODELING_H
9
+ #ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_TAGGEDUNIONMODELING_H
10
+ #define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_TAGGEDUNIONMODELING_H
11
11
12
12
#include " clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
13
13
#include " clang/StaticAnalyzer/Core/BugReporter/BugType.h"
19
19
#include " llvm/ADT/FoldingSet.h"
20
20
#include < numeric>
21
21
22
- namespace clang {
23
- namespace ento {
24
- namespace tagged_union_modeling {
22
+ namespace clang ::ento::tagged_union_modeling {
25
23
26
24
// The implementation of all these functions can be found in the file
27
25
// StdVariantChecker.cpp under the same directory as this file.
26
+
27
+ // Returns the CallEvent representing the caller of the function
28
+ // It is needed because the CallEvent class does not contain enough information
29
+ // to tell who called it. Checker context is needed.
28
30
CallEventRef<> getCaller (const CallEvent &Call, CheckerContext &C);
29
31
bool isCopyConstructorCall (const CallEvent &Call);
30
32
bool isCopyAssignmentCall (const CallEvent &Call);
@@ -97,8 +99,6 @@ void handleConstructorAndAssignment(const CallEvent &Call, CheckerContext &C,
97
99
C.addTransition (State);
98
100
}
99
101
100
- } // namespace tagged_union_modeling
101
- } // namespace ento
102
- } // namespace clang
102
+ } // namespace clang::ento::tagged_union_modeling
103
103
104
- #endif // LLVM_CLANG_LIB_STATICANALYZER_CHECKER_VARIANTLIKETYPEMODELING_H
104
+ #endif // LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_TAGGEDUNIONMODELING_H
0 commit comments