[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-09 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350703: Use DeclSpec for quals in DeclaratorChunk::FunctionTypeInfo. (authored by stulova, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55948/new/ https:/

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-07 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks! LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55948/new/ https://reviews.llvm.org/D55948 ___ cfe-commits mailing list

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 180464. Anastasia added a comment. Added `hasMethodTypeQualifiers` method. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55948/new/ https://reviews.llvm.org/D55948 Files: include/clang/Sema/DeclSpec.h lib/Parse/ParseDecl.cpp lib/Parse/Parse

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:8175 DeclaratorChunk::FunctionTypeInfo &FTI = D.getFunctionTypeInfo(); - if (FTI.TypeQuals != 0) { -if (FTI.TypeQuals & Qualifiers::Const) - Diag(D.getIdentifierLoc(), diag::err_invalid_qualified_co

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:8175 DeclaratorChunk::FunctionTypeInfo &FTI = D.getFunctionTypeInfo(); - if (FTI.TypeQuals != 0) { -if (FTI.TypeQuals & Qualifiers::Const) - Diag(D.getIdentifierLoc(), diag::err_invalid_qualified_c

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 180226. Anastasia marked an inline comment as done. Anastasia added a comment. - Added `forEachQualifiers` to `DeclSpec`. - Removed dead code. - Moved lambdas definition inline into the function parameters. CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:8175 DeclaratorChunk::FunctionTypeInfo &FTI = D.getFunctionTypeInfo(); - if (FTI.TypeQuals != 0) { -if (FTI.TypeQuals & Qualifiers::Const) - Diag(D.getIdentifierLoc(), diag::err_invalid_qualified_co

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:8175 DeclaratorChunk::FunctionTypeInfo &FTI = D.getFunctionTypeInfo(); - if (FTI.TypeQuals != 0) { -if (FTI.TypeQuals & Qualifiers::Const) - Diag(D.getId

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/DeclSpec.cpp:220 + + I.Fun.QualAttrFactory = nullptr; + Anastasia wrote: > rjmccall wrote: > > Spacing? > I am keeping the old formatting from the lines 195-204. But obviously it > doesn't match with

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: lib/Sema/DeclSpec.cpp:220 + + I.Fun.QualAttrFactory = nullptr; + rjmccall wrote: > Spacing? I am keeping the old formatting from the lines 195-204. But obviously it

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2368 } }; + DeclSpecCheck(DeclSpec::TQ_const, "const", DS.getConstSpecLoc()); Anastasia wrote: > rjmccall wrote: > > Please remove this dead semicolon since you're touchin

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 179877. Anastasia marked an inline comment as done. Anastasia added a comment. Addressed review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55948/new/ https://reviews.llvm.org/D55948 Files: include/clang/Sema/DeclSpec.h lib/Parse/

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2368 } }; + DeclSpecCheck(DeclSpec::TQ_const, "const", DS.getConstSpecLoc()); rjmccall wrote: > Please remove this dead semico

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2018-12-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Sema/DeclSpec.h:1365 +AttributeFactory AttrFactory; +MethodQualifiers = new DeclSpec(AttrFactory); + } This `DeclSpec` ends up with a dangling reference to the `AttributeFactory`; I t

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2018-12-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 3 inline comments as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDecl.cpp:6129 + // create DeclSpec here to be populated later. + DS = new DeclSpec(AttrFactory); + rjmccall wrote: > Is it possible to just build int

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2018-12-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 179469. Anastasia added a comment. - Changed to store DeclSpec only when quals are present. - Renamed to MethodQualifiers. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55948/new/ https://reviews.llvm.org/D55948 Files: include/clang/Sema/DeclSp

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2018-12-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Sema/DeclSpec.h:1304 +/// DeclSpec for the function with the qualifier related info. +DeclSpec *TypeDeclSpec; + Can we give this a better name? I know we use "type qualifiers" for this concept i

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2018-12-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: jfb. Rather than duplicating data fields, use DeclSpec directly to store qualifiers for the functions/methods. This change is discussed in the following comment: https://reviews.llvm.org/D55850#inli