Skip to content

Commit a6807ee

Browse files
committed
[clang][ssaf][NFC] Add comment on implementation of EntityName being opaque
1 parent 140e84f commit a6807ee

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

clang/include/clang/Analysis/Scalable/Model/EntityName.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
#include <string>
1616

1717
namespace clang::ssaf {
18-
1918
/// Uniquely identifies an entity in a program.
2019
///
21-
/// EntityName provides a globally unique identifier for program entities that remains
22-
/// stable across compilation boundaries. This enables whole-program analysis to track
23-
/// and relate entities across separately compiled translation units.
20+
/// EntityName provides a globally unique identifier for program entities that
21+
/// remains stable across compilation boundaries. This enables whole-program
22+
/// analysis to track and relate entities across separately compiled translation
23+
/// units.
24+
///
25+
/// Client code should not make assumptions about the implementation details,
26+
/// such as USRs.
2427
class EntityName {
2528
std::string USR;
2629
llvm::SmallString<16> Suffix;
@@ -29,6 +32,9 @@ class EntityName {
2932
auto asTuple() const { return std::tie(USR, Suffix, Namespace); }
3033

3134
public:
35+
/// Client code should not use this constructor directly.
36+
/// Use getEntityName and other functions in ASTEntityMapping.h to get
37+
/// entity names.
3238
EntityName(llvm::StringRef USR, llvm::StringRef Suffix,
3339
NestedBuildNamespace Namespace);
3440

0 commit comments

Comments
 (0)