Skip to content

Commit 894ea8f

Browse files
author
Gabor Spaits
committed
[NFC] Namespace, comment
1 parent 1948d22 commit 894ea8f

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

clang/lib/StaticAnalyzer/Checkers/StdVariantChecker.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ namespace clang {
3333
namespace ento {
3434
namespace tagged_union_modeling {
3535

36-
// Returns the CallEvent representing the caller of the function
37-
// It is needed because the CallEvent class does not contain enough information
38-
// to tell who called it. Checker context is needed.
3936
CallEventRef<> getCaller(const CallEvent &Call, const ProgramStateRef &State) {
4037
const auto *CallLocationContext = Call.getLocationContext();
4138
if (!CallLocationContext || CallLocationContext->inTopFrame())

clang/lib/StaticAnalyzer/Checkers/TaggedUnionModeling.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

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
1111

1212
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
1313
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
@@ -19,12 +19,14 @@
1919
#include "llvm/ADT/FoldingSet.h"
2020
#include <numeric>
2121

22-
namespace clang {
23-
namespace ento {
24-
namespace tagged_union_modeling {
22+
namespace clang::ento::tagged_union_modeling {
2523

2624
// The implementation of all these functions can be found in the file
2725
// 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.
2830
CallEventRef<> getCaller(const CallEvent &Call, CheckerContext &C);
2931
bool isCopyConstructorCall(const CallEvent &Call);
3032
bool isCopyAssignmentCall(const CallEvent &Call);
@@ -97,8 +99,6 @@ void handleConstructorAndAssignment(const CallEvent &Call, CheckerContext &C,
9799
C.addTransition(State);
98100
}
99101

100-
} // namespace tagged_union_modeling
101-
} // namespace ento
102-
} // namespace clang
102+
} // namespace clang::ento::tagged_union_modeling
103103

104-
#endif // LLVM_CLANG_LIB_STATICANALYZER_CHECKER_VARIANTLIKETYPEMODELING_H
104+
#endif // LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_TAGGEDUNIONMODELING_H

0 commit comments

Comments
 (0)