/* 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/. */
void KnownLiveChecker::registerMatchers(MatchFinder *AstMatcher) { // Note that this cannot catch mutations after pass-by-reference, and thus no // error for cycle collection macros.
auto KnownLiveLHS = hasLHS(memberExpr(hasKnownLiveAnnotation()).bind("lhs")); auto ForGeneralFunctions = forFunction(
functionDecl(unless(anyOf(cxxConstructorDecl(), cxxDestructorDecl())))
.bind("func"));
auto Matcher =
allOf(isAssignmentOperator(), KnownLiveLHS, ForGeneralFunctions);
void KnownLiveChecker::check(const MatchFinder::MatchResult &Result) { constchar *Error = "MOZ_KNOWN_LIVE members can only be modified by " "constructors and destructors";
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.