зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1374024 - add static-analysis annotation for class functions that return dangling pointers. r=mystor
MozReview-Commit-ID: 44Ltj5FZAZD
This commit is contained in:
Родитель
cdc988e24a
Коммит
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче