Bug 32193 - [check-webkit-style] False positive for DEFINE_OPCODE(op_jtrue) {
Summary: [check-webkit-style] False positive for DEFINE_OPCODE(op_jtrue) {
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-06 08:47 PST by Adam Barth
Modified: 2009-12-08 15:55 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.10 KB, patch)
2009-12-08 14:50 PST, David Levin
no flags Details | Formatted Diff | Diff
Patch (2.32 KB, patch)
2009-12-08 15:14 PST, David Levin
abarth: review+
levin: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2009-12-06 08:47:48 PST
DEFINE_OPCODE(op_jtrue) {

generates the warning

JavaScriptCore/interpreter/Interpreter.cpp:2650:  Place brace on its own line
for function definitions.  [whitespace/braces] [4]

However, this is a false positive <https://bugs.webkit.org/show_bug.cgi?id=32190#c8> because this is some sort of macro.  Maybe we should notice the ALL CAPS "function" name and skip the brace check?
Comment 1 David Levin 2009-12-08 14:50:32 PST
Created attachment 44488 [details]
Patch
Comment 2 WebKit Review Bot 2009-12-08 14:52:20 PST
style-queue ran check-webkit-style on attachment 44488 [details] without any errors.
Comment 3 David Levin 2009-12-08 15:14:20 PST
Created attachment 44492 [details]
Patch
Comment 4 WebKit Review Bot 2009-12-08 15:19:00 PST
style-queue ran check-webkit-style on attachment 44492 [details] without any errors.
Comment 5 Adam Barth 2009-12-08 15:21:58 PST
Comment on attachment 44492 [details]
Patch

Very clever.  Hopefully not too clever.  :)

I might add 0-9 in the character class in case we have numbers in the macro names MSG_ROUTED3, etc.
Comment 6 David Levin 2009-12-08 15:29:56 PST
Comment on attachment 44492 [details]
Patch

I'll do the change suggested by Adam and land this.
Comment 7 David Levin 2009-12-08 15:55:57 PST
Commited (with the suggested change) as http://trac.webkit.org/changeset/51876