lebedev.ri added inline comments.

================
Comment at: clang-doc/BitcodeWriter.cpp:382
+  emitRecord(R.USR, REFERENCE_USR);
+  emitRecord(R.Name, REFERENCE_NAME);
+  emitRecord((unsigned)R.RefType, REFERENCE_TYPE);
----------------
>>! In D46281#1083806, @lebedev.ri wrote:
> Global question: you are using `NamedDecl::getNameAsString()`, and passing it 
> as `StringRef`.
> You have looked at this with ASAN, and it's ok?
> 
> Also, have you considered using the `NamedDecl::getName()`, which already 
> returns `StringRef`.?

Hm, looking at those two functions, not sure `NamedDecl::getName()` will work 
here.
Alternatively, have you considered just making this `Name` field store 
`DeclarationName`,
and call `getNameAsString()` only here?


https://reviews.llvm.org/D46281



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to