Closed Bug 1307702 Opened 9 years ago Closed 9 years ago

Reject usage of MOZ_REQUIRED_BASE_METHOD on non-virtual base methods.

Categories

(Developer Infrastructure :: Source Code Analysis, defect, P3)

defect

Tracking

(firefox52 fixed)

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This patch is a companion of this: https://bugzilla.mozilla.org/show_bug.cgi?id=1230311 It prevents the usage of MOZ_REQUIRED_BASE_METHOD annotation on non-virtual functions.
Summary: Reject ussage of MOZ_REQUIRED_BASE_METHOD on non-virtual base methods. → Reject usage of MOZ_REQUIRED_BASE_METHOD on non-virtual base methods.
Comment on attachment 8797939 [details] Bug 1307702 - clang-plugin - static analysis to reject ussage of MOZ_REQUIRED_BASE_METHOD on non-virtual base methods. https://reviewboard.mozilla.org/r/83520/#review82218 Looks good! Can we land this after we land the OverrideBaseCallChecker? I feel like it would be confusing to have this code in the tree without that code present. ::: build/clang-plugin/clang-plugin.cpp:888 (Diff revision 1) > + const CXXMethodDecl *Decl = Node.getCanonicalDecl(); > + return Decl > + && MozChecker::hasCustomAnnotation(Decl, "moz_required_base_method"); > +} > + > +AST_MATCHER(CXXMethodDecl, isNotVirtual) { Can we call this "NonVirtual"?
Attachment #8797939 - Flags: review?(michael) → review+
Pushed by bpostelnicu@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/3429ce702ffd clang-plugin - static analysis to reject ussage of MOZ_REQUIRED_BASE_METHOD on non-virtual base methods. r=mystor
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: