diff options
| author | Faisal Vali <faisalv@yahoo.com> | 2018-01-01 15:42:13 +0000 |
|---|---|---|
| committer | Faisal Vali <faisalv@yahoo.com> | 2018-01-01 15:42:13 +0000 |
| commit | 038df490334d63f6533fa1fdf0b310f59e2d730b (patch) | |
| tree | 7566cd5f09b5b4047759cbac8a8d912035873d67 /clang/lib/Parse/ParseExpr.cpp | |
| parent | 208ac6547c4f98c75e76a79f13a8d4f9d1076ab2 (diff) | |
| download | bcm5719-llvm-038df490334d63f6533fa1fdf0b310f59e2d730b.tar.gz bcm5719-llvm-038df490334d63f6533fa1fdf0b310f59e2d730b.zip | |
[NFC] Modernize enums TypeSpecifierWidth, TypeSpecifierSign & TypeSpecifierType into scoped enums with underlying types.
- Since these enums are used as bit-fields - for the bit-fields to be interpreted as unsigned, the underlying type must be specified as unsigned.
Previous failed attempt - wherein I did not specify an underlying type - was the sum of:
https://reviews.llvm.org/rC321614
https://reviews.llvm.org/rC321615
llvm-svn: 321622
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
| -rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index 1b8865edb79..057b4e6cd5b 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -997,9 +997,10 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression, DS.SetRangeEnd(ILoc); const char *PrevSpec = nullptr; unsigned DiagID; - DS.SetTypeSpecType(TST_typename, ILoc, PrevSpec, DiagID, Typ, + DS.SetTypeSpecType(TypeSpecifierType::TST_typename, ILoc, PrevSpec, + DiagID, Typ, Actions.getASTContext().getPrintingPolicy()); - + Declarator DeclaratorInfo(DS, DeclaratorContext::TypeNameContext); TypeResult Ty = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo); @@ -1205,8 +1206,8 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression, const char *PrevSpec = nullptr; unsigned DiagID; - DS.SetTypeSpecType(TST_typename, Tok.getAnnotationEndLoc(), - PrevSpec, DiagID, Type, + DS.SetTypeSpecType(TypeSpecifierType::TST_typename, + Tok.getAnnotationEndLoc(), PrevSpec, DiagID, Type, Actions.getASTContext().getPrintingPolicy()); Declarator DeclaratorInfo(DS, DeclaratorContext::TypeNameContext); |

