Closed
Bug 1239539
Opened 7 years ago
Closed 6 years ago
Enable clang's -Wclass-varargs warnings
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(firefox46 fixed)
RESOLVED
FIXED
mozilla46
Tracking | Status | |
---|---|---|
firefox46 | --- | fixed |
People
(Reporter: cpeterson, Assigned: cpeterson)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
6.96 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
-Wclass-varargs catches objects passed by value to variadic functions. -Wclass-varargs was enabled for C++ in js/src in bug 1235185. This clang commit message is the closet thing to documentation about -Wclass-varargs: https://github.com/llvm-mirror/clang/commit/93fe566800e0a636442b4b61247c57b08de952c5 Here is a green Try build with -Wclass-varargs enabled: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b1033040c96d
Attachment #8707708 -
Flags: review?(mh+mozilla)
Assignee | ||
Comment 1•7 years ago
|
||
The most common variadic function in mozilla-central is MOZ_LOG(), which is technically a macro calling mozilla::detail::log_print(). Follow-up work could include annotating log_print() as a MOZ_FORMAT_PRINTF() function (like printf_stderr) so -Wformat warnings can type check MOZ_LOG()'s format string parameters.
Updated•7 years ago
|
Attachment #8707708 -
Flags: review?(mh+mozilla) → review+
Comment 3•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fe0896c1584a
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Updated•4 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•