Mercurial > hg > CbC > CbC_llvm
changeset 230:9e61cd3a874d
MCDPP worked
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 19 Jul 2021 19:48:01 +0900 |
parents | cf4f212398d7 |
children | 5f20bc1ed4ff |
files | clang/lib/Parse/ParseCbC.cpp clang/lib/Parse/ParseDecl.cpp clang/lib/Parse/ParseExpr.cpp |
diffstat | 3 files changed, 21 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/clang/lib/Parse/ParseCbC.cpp Mon Jul 19 09:08:46 2021 +0900 +++ b/clang/lib/Parse/ParseCbC.cpp Mon Jul 19 19:48:01 2021 +0900 @@ -1166,6 +1166,9 @@ } } +// +// you may get Actions.getASTContext(). +// std::string get_string(const Expr *expr, const ASTContext &Context) { PrintingPolicy print_policy(Context.getLangOpts()); print_policy.FullyQualifiedName = 1;
--- a/clang/lib/Parse/ParseDecl.cpp Mon Jul 19 09:08:46 2021 +0900 +++ b/clang/lib/Parse/ParseDecl.cpp Mon Jul 19 19:48:01 2021 +0900 @@ -4958,6 +4958,9 @@ case tok::kw__Complex: case tok::kw__Imaginary: case tok::kw_void: +#ifndef noCbC + case tok::kw___code: +#endif case tok::kw_char: case tok::kw_wchar_t: case tok::kw_char8_t: @@ -5039,6 +5042,9 @@ case tok::kw__Complex: case tok::kw__Imaginary: case tok::kw_void: +#ifndef noCbC + case tok::kw___code: +#endif case tok::kw_char: case tok::kw_wchar_t: case tok::kw_char8_t: @@ -5206,6 +5212,9 @@ case tok::kw__Complex: case tok::kw__Imaginary: case tok::kw_void: +#ifndef noCbC + case tok::kw___code: +#endif case tok::kw_char: case tok::kw_wchar_t: case tok::kw_char8_t: @@ -7347,6 +7356,9 @@ case tok::kw_signed: case tok::kw_unsigned: case tok::kw_void: +#ifndef noCbC + case tok::kw___code: +#endif case tok::kw_char: case tok::kw_int: case tok::kw_float: @@ -7383,6 +7395,9 @@ case tok::kw_signed: case tok::kw_unsigned: case tok::kw_void: +#ifndef noCbC + case tok::kw___code: +#endif case tok::kw_char: case tok::kw_int: case tok::kw_float:
--- a/clang/lib/Parse/ParseExpr.cpp Mon Jul 19 09:08:46 2021 +0900 +++ b/clang/lib/Parse/ParseExpr.cpp Mon Jul 19 19:48:01 2021 +0900 @@ -935,6 +935,9 @@ // break out of the switch; at the end we call ParsePostfixExpressionSuffix // to handle the postfix expression suffixes. Cases that cannot be followed // by postfix exprs should set AllowSuffix to false. + if (SavedKind == tok::kw_void) { + NotCastExpr = false; + } switch (SavedKind) { case tok::l_paren: { // If this expression is limited to being a unary-expression, the paren can @@ -1528,9 +1531,6 @@ case tok::kw__Float16: case tok::kw___float128: case tok::kw_void: -#ifndef noCbC - case tok::kw___code: -#endif case tok::kw_typename: case tok::kw_typeof: case tok::kw___vector: