Skip to content

Commit 10af910

Browse files
committed
[𝘀𝗽𝗿] initial version
Created using spr 1.3.4
1 parent 751ae26 commit 10af910

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

clang/tools/libclang/CXString.cpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,7 @@ CXString createRef(StringRef String) {
8787
if (String.empty())
8888
return createEmpty();
8989

90-
// If the string is not nul-terminated, we have to make a copy.
91-
92-
// FIXME: This is doing a one past end read, and should be removed! For memory
93-
// we don't manage, the API string can become unterminated at any time outside
94-
// our control.
95-
96-
if (String.data()[String.size()] != 0)
97-
return createDup(String);
98-
99-
CXString Result;
100-
Result.data = String.data();
101-
Result.private_flags = (unsigned) CXS_Unmanaged;
102-
return Result;
90+
return createDup(String);
10391
}
10492

10593
CXString createDup(StringRef String) {

0 commit comments

Comments
 (0)