mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1374024 - add static-analysis annotation for class functions that return dangling pointers. r=mystor
MozReview-Commit-ID: 44Ltj5FZAZD
This commit is contained in:
parent
cdc988e24a
commit
3bd6c5f20a
@ -109,9 +109,9 @@ public:
|
||||
*/
|
||||
|
||||
#if defined(CharT_is_PRUnichar) && defined(MOZ_USE_CHAR16_WRAPPER)
|
||||
char16ptr_t get() const
|
||||
MOZ_NO_DANGLING_ON_TEMPORARIES char16ptr_t get() const
|
||||
#else
|
||||
const char_type* get() const
|
||||
MOZ_NO_DANGLING_ON_TEMPORARIES const char_type* get() const
|
||||
#endif
|
||||
{
|
||||
return mData;
|
||||
@ -724,9 +724,9 @@ public:
|
||||
|
||||
// return nullptr if we are voided
|
||||
#if defined(CharT_is_PRUnichar) && defined(MOZ_USE_CHAR16_WRAPPER)
|
||||
char16ptr_t get() const
|
||||
MOZ_NO_DANGLING_ON_TEMPORARIES char16ptr_t get() const
|
||||
#else
|
||||
const char_type* get() const
|
||||
MOZ_NO_DANGLING_ON_TEMPORARIES const char_type* get() const
|
||||
#endif
|
||||
{
|
||||
return (mDataFlags & DataFlags::VOIDED) ? nullptr : mData;
|
||||
|
Loading…
Reference in New Issue
Block a user