Skip to content

Commit b487d59

Browse files
committed
Add comment for Any::TypeId<clang::dataflow::NoopLattice>
1 parent 662a96b commit b487d59

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

clang/include/clang/Analysis/FlowSensitive/NoopLattice.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ inline std::ostream &operator<<(std::ostream &OS, const NoopLattice &) {
4040
} // namespace clang
4141

4242
namespace llvm {
43+
// This needs to be exported for ClangAnalysisFlowSensitiveTests so any_cast
44+
// uses the correct address of Any::TypeId from the clang shared library instead
45+
// of creating one in the test executable. when building with
46+
// CLANG_LINK_CLANG_DYLIB
4347
extern template struct CLANG_TEMPLATE_ABI
4448
Any::TypeId<clang::dataflow::NoopLattice>;
4549
};

clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class NoopLattice;
4545
} // namespace clang
4646

4747
namespace llvm {
48+
// This needs to be exported for ClangAnalysisFlowSensitiveTests so any_cast
49+
// uses the correct address of Any::TypeId from the clang shared library instead
50+
// of creating one in the test executable. when building with
51+
// CLANG_LINK_CLANG_DYLIB
4852
template struct CLANG_EXPORT_TEMPLATE Any::TypeId<clang::dataflow::NoopLattice>;
4953
}
5054

0 commit comments

Comments
 (0)