1010
1111#include < clang/AST/ASTContext.h>
1212#include < clang/AST/Decl.h>
13+ #include < clang/Basic/LangOptions.h>
1314#include < clang/Basic/SourceLocation.h>
1415#include < clang/Basic/TargetInfo.h>
1516#include < clang/Sema/Lookup.h>
@@ -33,11 +34,13 @@ enum CExprPrecedence : unsigned {
3334namespace {
3435
3536static unsigned GetOperatorPrecedence (clang::UnaryOperatorKind opc) {
36- return static_cast <unsigned >(CExprPrecedence::UnaryOp) + static_cast <unsigned >(opc);
37+ return static_cast <unsigned >(CExprPrecedence::UnaryOp) +
38+ static_cast <unsigned >(opc);
3739}
3840
3941static unsigned GetOperatorPrecedence (clang::BinaryOperatorKind opc) {
40- return static_cast <unsigned >(CExprPrecedence::BinaryOp) + static_cast <unsigned >(opc);
42+ return static_cast <unsigned >(CExprPrecedence::BinaryOp) +
43+ static_cast <unsigned >(opc);
4144}
4245
4346static unsigned GetOperatorPrecedence (clang::Expr *op) {
@@ -186,7 +189,7 @@ clang::CharacterLiteral *ASTBuilder::CreateCharLit(unsigned val) {
186189clang::StringLiteral *ASTBuilder::CreateStrLit (std::string val) {
187190 auto type{ctx.getStringLiteralArrayType (ctx.CharTy , val.size ())};
188191 return clang::StringLiteral::Create (
189- ctx, val, clang::StringLiteral::StringKind::Ascii ,
192+ ctx, val, clang::StringLiteral::StringKind::Ordinary ,
190193 /* Pascal=*/ false , type, clang::SourceLocation ());
191194}
192195
@@ -459,7 +462,8 @@ clang::CompoundStmt *ASTBuilder::CreateCompoundStmt(
459462 // sema.ActOnFinishOfCompoundStmt();
460463 // CHECK(sr.isUsable());
461464 // return sr.getAs<clang::CompoundStmt>();
462- return clang::CompoundStmt::Create (ctx, stmts, clang::SourceLocation (),
465+ return clang::CompoundStmt::Create (ctx, stmts, clang::FPOptionsOverride{},
466+ clang::SourceLocation (),
463467 clang::SourceLocation ());
464468}
465469
0 commit comments