Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(347)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 4932050: Patch for delayed attribute parsing.

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 4 months ago by delesley
Modified:
14 years, 4 months ago
Visibility:
Public.

Patch Set 1 #

Total comments: 16
Created: 14 years, 4 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+272 lines, -37 lines) Patch
M include/clang/Parse/Parser.h View 6 chunks +40 lines, -6 lines 3 comments Download
M include/clang/Sema/Sema.h View 1 chunk +4 lines, -0 lines 0 comments Download
M lib/Parse/ParseDecl.cpp View 4 chunks +155 lines, -27 lines 12 comments Download
M lib/Parse/ParseDeclCXX.cpp View 6 chunks +19 lines, -3 lines 1 comment Download
M lib/Sema/AnalysisBasedWarnings.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M lib/Sema/SemaDecl.cpp View 1 chunk +8 lines, -0 lines 0 comments Download
M test/SemaCXX/warn-thread-safety-analysis.cpp View 1 chunk +22 lines, -0 lines 0 comments Download
M test/SemaCXX/warn-thread-safety-parsing.cpp View 3 chunks +22 lines, -1 line 0 comments Download
Total messages: 3
|
supertri
I think the patch is looking really good! We can see if Jeffrey or Chandler ...
14 years, 4 months ago (2011年08月24日 01:28:00 UTC) #1
I think the patch is looking really good! We can see if Jeffrey or Chandler have
any cosmetic edits tomorrow, and then send it out for review upstream.
http://codereview.appspot.com/4932050/diff/1/include/clang/Parse/Parser.h
File include/clang/Parse/Parser.h (right):
http://codereview.appspot.com/4932050/diff/1/include/clang/Parse/Parser.h#new...
include/clang/Parse/Parser.h:680: /// FIXME: Perhaps we should change the name
of LateParsedDeclaration to
We should be sure to ask Doug about this FIXME when he is reviewing the patch.
http://codereview.appspot.com/4932050/diff/1/include/clang/Parse/Parser.h#new...
include/clang/Parse/Parser.h:690: SourceLocation Loc) : Self(P),
Indentation is weird here.
http://codereview.appspot.com/4932050/diff/1/include/clang/Parse/Parser.h#new...
include/clang/Parse/Parser.h:700: typedef
llvm::SmallVector<LateParsedAttribute*, 4> LateParsedAttrList;
I think size 1 would be a better base case.
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp
File lib/Parse/ParseDecl.cpp (right):
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode96
lib/Parse/ParseDecl.cpp:96: LateParsedAttrList *LAS) {
LAS?
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode679
lib/Parse/ParseDecl.cpp:679: // FIXME: Test cases to make sure this does the
right thing in this context
Can we add a test case involving templates?
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode701
lib/Parse/ParseDecl.cpp:701: /// FIXME: Need to add to the decl correctly
I think this FIXME has been fixed. :)
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode721
lib/Parse/ParseDecl.cpp:721: // taken directly from existing attribute argument
processing code
I now know (and try to remember) that comments should be complete sentences,
even ending with a period.
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode742
lib/Parse/ParseDecl.cpp:742: endLoc = Tok.getLocation(); //FIXME: is this
correct endLoc?
Any thoughts on the FIXME? I think I wrote this. Could leave it in as question
for Doug or remove if you think it does the right thing.
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode750
lib/Parse/ParseDecl.cpp:750: if (LA.D)
Does it sometimes happen that !LA.D? Wouldn't that be very bad?
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode809
lib/Parse/ParseDecl.cpp:809: // FIXME: Figure out how to pass along Attrs
appropriately
I think this FIXME has been dealt with...
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode840
lib/Parse/ParseDecl.cpp:840: SkipUntil(tok::r_paren);
I think this should be MatchRHSPunctuation everywhere. Maybe we should commit a
patch refactoring this loop into a method before committing the delayed parsing
patch. :)
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDeclCXX.cpp
File lib/Parse/ParseDeclCXX.cpp (right):
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDeclCXX.cpp#newco...
lib/Parse/ParseDeclCXX.cpp:2168: // declarations and the lexed inline method
definitions.
Add "along with any delayed attributes" to comment?
Sign in to reply to this message.
delesley
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp File lib/Parse/ParseDecl.cpp (right): http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode96 lib/Parse/ParseDecl.cpp:96: LateParsedAttrList *LAS) { On 2011年08月24日 01:28:00, supertri wrote: > ...
14 years, 4 months ago (2011年08月24日 22:06:24 UTC) #2
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp
File lib/Parse/ParseDecl.cpp (right):
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode96
lib/Parse/ParseDecl.cpp:96: LateParsedAttrList *LAS) {
On 2011年08月24日 01:28:00, supertri wrote:
> LAS?
One late attribute = LA. Two late attributes = LAS. :-)
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode679
lib/Parse/ParseDecl.cpp:679: // FIXME: Test cases to make sure this does the
right thing in this context
On 2011年08月24日 01:28:00, supertri wrote:
> Can we add a test case involving templates?
We probably should.
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode750
lib/Parse/ParseDecl.cpp:750: if (LA.D)
On 2011年08月24日 01:28:00, supertri wrote:
> Does it sometimes happen that !LA.D? Wouldn't that be very bad?
It indicates that the attribute was not attached to the Decl correctly. If that
happens, we have two choices: complain with an assert, indicating an internal
compiler error, or ignore the attribute and fail gracefully. Which do you
prefer?
Sign in to reply to this message.
chandlerc
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp File lib/Parse/ParseDecl.cpp (right): http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode96 lib/Parse/ParseDecl.cpp:96: LateParsedAttrList *LAS) { On 2011年08月24日 22:06:24, delesley wrote: > ...
14 years, 4 months ago (2011年08月24日 22:10:08 UTC) #3
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp
File lib/Parse/ParseDecl.cpp (right):
http://codereview.appspot.com/4932050/diff/1/lib/Parse/ParseDecl.cpp#newcode96
lib/Parse/ParseDecl.cpp:96: LateParsedAttrList *LAS) {
On 2011年08月24日 22:06:24, delesley wrote:
> On 2011年08月24日 01:28:00, supertri wrote:
> > LAS?
> 
> One late attribute = LA. Two late attributes = LAS. :-)
LateAttrs would be much more readable... At the ver yleast it should be LAs, but
thats far to confusing for my taste.
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /