# HG changeset patch # User Eric Rahm # Date 1517442304 28800 # Node ID 11f8f004395cf383fdcead9f5faac52634541b2a # Parent 0894630b826962ad287686b79576893631ab159b Bug 1434689 - Part 3: Annotate nsTSubstringTuple as MOZ_TEMPORARY_CLASS. r=froydnj The documentation indicates nsTStringTuple is intended for internal use only and is designed to be only be used as a temporary. This makes that fact explicit by annotating the class for static analysis. diff --git a/xpcom/string/nsTSubstringTuple.h b/xpcom/string/nsTSubstringTuple.h --- a/xpcom/string/nsTSubstringTuple.h +++ b/xpcom/string/nsTSubstringTuple.h @@ -3,29 +3,30 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // IWYU pragma: private, include "nsString.h" #ifndef nsTSubstringTuple_h #define nsTSubstringTuple_h +#include "mozilla/Attributes.h" #include "nsTStringRepr.h" /** * nsTSubstringTuple * * Represents a tuple of string fragments. Built as a recursive binary tree. * It is used to implement the concatenation of two or more string objects. * * NOTE: This class is a private implementation detail and should never be * referenced outside the string code. */ template -class nsTSubstringTuple +class MOZ_TEMPORARY_CLASS nsTSubstringTuple { public: typedef T char_type; typedef nsCharTraits char_traits; typedef nsTSubstringTuple self_type; typedef mozilla::detail::nsTStringRepr base_string_type;