Bug 32193

Summary: [check-webkit-style] False positive for DEFINE_OPCODE(op_jtrue) {
Product: WebKit Reporter: Adam Barth <abarth>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, levin, mjs, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch abarth: review+, levin: commit-queue-

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