Closed Bug 773014 Opened 12 years ago Closed 10 years ago

Add static analysis assertion that Static{Auto,Ref}Ptr is used only in global scope

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla37

People

(Reporter: justin.lebar+bug, Assigned: ehsan.akhgari)

References

Details

Attachments

(2 files, 3 obsolete files)

See bug 772987 -- Static{Auto,Ref}Ptr should be used only in global scope (where its mRawPtr is automatically initialized to 0). Ehsan suggests enforcing this via static analysis.
Assignee: nobody → ehsan
Attachment #8536096 - Flags: review?(jmuizelaar)
Attachment #8536097 - Flags: review?(jmuizelaar)
Attachment #8536096 - Attachment is obsolete: true
Attachment #8536096 - Flags: review?(jmuizelaar)
Attachment #8536098 - Flags: review?(jmuizelaar)
Comment on attachment 8536098 [details] [diff] [review] Part 1: Add an analysis for marking classes as global-only Review of attachment 8536098 [details] [diff] [review]: ----------------------------------------------------------------- ::: build/clang-plugin/clang-plugin.cpp @@ +38,5 @@ > return astMatcher.newASTConsumer(); > } > > private: > + class LocalGlobalClassChecker : public MatchFinder::MatchCallback { LocalGlobal is a poor name. ScopeClassChecker would be better or even maybe just ScopeChecker.
Attachment #8536098 - Flags: review?(jmuizelaar) → review+
Note to self: jrmuizel voted for MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS.
Attachment #8536098 - Attachment is obsolete: true
Attachment #8536097 - Attachment is obsolete: true
Attachment #8536097 - Flags: review?(jmuizelaar)
Attachment #8539748 - Flags: review?(jmuizelaar)
Blocks: 1114267
Attachment #8539747 - Flags: review?(jmuizelaar) → review+
Attachment #8539748 - Flags: review?(jmuizelaar) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
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

Created:
Updated:
Size: