Skip to content

Commit

Permalink
Merge pull request #883 from mull-project/fix-getenv-factory
Browse files Browse the repository at this point in the history
cxx-frontend: fix the AST factory of getenv()
  • Loading branch information
stanislaw committed Jun 13, 2021
2 parents 98a41fe + c3d651b commit f032f73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/mull-cxx-frontend/src/ClangASTMutator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ clang::CallExpr *ClangASTMutator::createGetenvCallExpr(std::string identifier) {
identifier,
clang::StringLiteral::StringKind::Ascii,
false,
factory.getConstantArrayType(context.CharTy, identifier.size()),
factory.getStringLiteralArrayType(context.CharTy, identifier.size()),
clang::SourceLocation());

clang::ImplicitCastExpr *implicitCastExpr2 =
clang::ImplicitCastExpr::Create(context,
context.getPointerType(context.CharTy),
context.getPointerType(context.getConstType(context.CharTy)),
clang::CastKind::CK_ArrayToPointerDecay,
stringLiteral,
nullptr,
Expand Down

0 comments on commit f032f73

Please sign in to comment.