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:/
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
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
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
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
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.
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
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
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
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
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
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/
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
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
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
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
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
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
18 matches
Mail list logo