Skip to content

Commit 02253d2

Browse files
committed
Document lifetimes of returned C strings
1 parent 80095ac commit 02253d2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

clang/include/clang-c/Dependencies.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,12 +552,18 @@ CINDEX_LINKAGE CXCStringArray
552552

553553
/**
554554
* @returns the CASID of the include-tree for this module, if any.
555+
*
556+
* The string is only valid to use while the \c CXDepGraphModule object is
557+
* valid.
555558
*/
556559
CINDEX_LINKAGE const char *
557560
clang_experimental_DepGraphModule_getIncludeTreeID(CXDepGraphModule);
558561

559562
/**
560563
* \returns the \c ActionCache key for this module, if any.
564+
*
565+
* The string is only valid to use while the \c CXDepGraphModule object is
566+
* valid.
561567
*/
562568
CINDEX_LINKAGE
563569
const char *clang_experimental_DepGraphModule_getCacheKey(CXDepGraphModule);
@@ -602,6 +608,9 @@ CINDEX_LINKAGE CXCStringArray
602608

603609
/**
604610
* \returns the \c ActionCache key for this translation unit, if any.
611+
*
612+
* The string is only valid to use while the \c CXDepGraphTUCommand object is
613+
* valid.
605614
*/
606615
CINDEX_LINKAGE const char *
607616
clang_experimental_DepGraphTUCommand_getCacheKey(CXDepGraphTUCommand);
@@ -627,6 +636,8 @@ CXCStringArray clang_experimental_DepGraph_getTUModuleDeps(CXDepGraph);
627636

628637
/**
629638
* @returns the CASID of the include-tree for this TU, if any.
639+
*
640+
* The string is only valid to use while the \c CXDepGraph object is valid.
630641
*/
631642
CINDEX_LINKAGE
632643
const char *clang_experimental_DepGraph_getTUIncludeTreeID(CXDepGraph);

0 commit comments

Comments
 (0)