Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(468)

Issue 4635075: added a method to check the number of args (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 6 months ago by supertri
Modified:
13 years, 3 months ago
Reviewers:
chandlerc
Visibility:
Public.

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -78 lines) Patch
M lib/Sema/SemaDeclAttr.cpp View 28 chunks +52 lines, -78 lines 7 comments Download

Messages

Total messages: 1
chandlerc
13 years, 5 months ago (2011-06-30 07:50:59 UTC) #1
http://codereview.appspot.com/4635075/diff/1/lib/Sema/SemaDeclAttr.cpp
File lib/Sema/SemaDeclAttr.cpp (right):

http://codereview.appspot.com/4635075/diff/1/lib/Sema/SemaDeclAttr.cpp#newcod...
lib/Sema/SemaDeclAttr.cpp:197: static inline bool wrongNumArgs(const
AttributeList &Attr,
no need for 'inline' here.

http://codereview.appspot.com/4635075/diff/1/lib/Sema/SemaDeclAttr.cpp#newcod...
lib/Sema/SemaDeclAttr.cpp:198: Sema &S, int num) {
indent seems wildly off. You can probably just fold this into a single line.

Also, as convention, static helper functions which accept a Sema reference do so
as their first argument.

http://codereview.appspot.com/4635075/diff/1/lib/Sema/SemaDeclAttr.cpp#newcod...
lib/Sema/SemaDeclAttr.cpp:199: if (Attr.getNumArgs() != num){
always keep a space before the {.

http://codereview.appspot.com/4635075/diff/1/lib/Sema/SemaDeclAttr.cpp#newcod...
lib/Sema/SemaDeclAttr.cpp:201: return true;
Returning true for an error is really confusing. lets return false here, true
below, and rename the function to 'checkNumArgs'.

http://codereview.appspot.com/4635075/diff/1/lib/Sema/SemaDeclAttr.cpp#newcod...
lib/Sema/SemaDeclAttr.cpp:811: assert(!Attr.isInvalid());
Send this in a separate patch?

http://codereview.appspot.com/4635075/diff/1/lib/Sema/SemaDeclAttr.cpp#newcod...
lib/Sema/SemaDeclAttr.cpp:1244: 
Why the blank line?

http://codereview.appspot.com/4635075/diff/1/lib/Sema/SemaDeclAttr.cpp#newcod...
lib/Sema/SemaDeclAttr.cpp:1249: 
Again, why touch this in this patch?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b