Lines Matching refs:Literal
1607 StringLiteralParser Literal(StringToks, PP); in ActOnStringLiteral() local
1608 if (Literal.hadError) in ActOnStringLiteral()
1617 if (Literal.isWide()) { in ActOnStringLiteral()
1620 } else if (Literal.isUTF8()) { in ActOnStringLiteral()
1622 } else if (Literal.isUTF16()) { in ActOnStringLiteral()
1625 } else if (Literal.isUTF32()) { in ActOnStringLiteral()
1628 } else if (Literal.isPascal()) { in ActOnStringLiteral()
1641 llvm::APInt(32, Literal.GetNumStringChars()+1), in ActOnStringLiteral()
1650 StringLiteral *Lit = StringLiteral::Create(Context, Literal.GetString(), in ActOnStringLiteral()
1651 Kind, Literal.Pascal, StrTy, in ActOnStringLiteral()
1654 if (Literal.getUDSuffix().empty()) in ActOnStringLiteral()
1658 IdentifierInfo *UDSuffix = &Context.Idents.get(Literal.getUDSuffix()); in ActOnStringLiteral()
1660 getUDSuffixLoc(*this, StringTokLocs[Literal.getUDSuffixToken()], in ActOnStringLiteral()
1661 Literal.getUDSuffixOffset()); in ActOnStringLiteral()
1686 llvm::APInt Len(Context.getIntWidth(SizeType), Literal.GetNumStringChars()); in ActOnStringLiteral()
3129 CharLiteralParser Literal(ThisTok.begin(), ThisTok.end(), Tok.getLocation(), in ActOnCharacterConstant() local
3131 if (Literal.hadError()) in ActOnCharacterConstant()
3135 if (Literal.isWide()) in ActOnCharacterConstant()
3137 else if (Literal.isUTF16()) in ActOnCharacterConstant()
3139 else if (Literal.isUTF32()) in ActOnCharacterConstant()
3141 else if (!getLangOpts().CPlusPlus || Literal.isMultiChar()) in ActOnCharacterConstant()
3147 if (Literal.isWide()) in ActOnCharacterConstant()
3149 else if (Literal.isUTF16()) in ActOnCharacterConstant()
3151 else if (Literal.isUTF32()) in ActOnCharacterConstant()
3153 else if (Literal.isUTF8()) in ActOnCharacterConstant()
3156 Expr *Lit = new (Context) CharacterLiteral(Literal.getValue(), Kind, Ty, in ActOnCharacterConstant()
3159 if (Literal.getUDSuffix().empty()) in ActOnCharacterConstant()
3163 IdentifierInfo *UDSuffix = &Context.Idents.get(Literal.getUDSuffix()); in ActOnCharacterConstant()
3165 getUDSuffixLoc(*this, Tok.getLocation(), Literal.getUDSuffixOffset()); in ActOnCharacterConstant()
3183 static Expr *BuildFloatingLiteral(Sema &S, NumericLiteralParser &Literal, in BuildFloatingLiteral() argument
3190 APFloat::opStatus result = Literal.GetFloatValue(Val); in BuildFloatingLiteral()
3264 NumericLiteralParser Literal(TokSpelling, Tok.getLocation(), PP); in ActOnNumericConstant() local
3265 if (Literal.hadError) in ActOnNumericConstant()
3268 if (Literal.hasUDSuffix()) { in ActOnNumericConstant()
3270 IdentifierInfo *UDSuffix = &Context.Idents.get(Literal.getUDSuffix()); in ActOnNumericConstant()
3272 getUDSuffixLoc(*this, Tok.getLocation(), Literal.getUDSuffixOffset()); in ActOnNumericConstant()
3279 if (Literal.isFloatingLiteral()) { in ActOnNumericConstant()
3309 if (Literal.isFloatingLiteral()) { in ActOnNumericConstant()
3310 Lit = BuildFloatingLiteral(*this, Literal, CookedTy, Tok.getLocation()); in ActOnNumericConstant()
3313 if (Literal.GetIntegerValue(ResultVal)) in ActOnNumericConstant()
3326 unsigned Length = Literal.getUDSuffixOffset(); in ActOnNumericConstant()
3345 for (unsigned I = 0, N = Literal.getUDSuffixOffset(); I != N; ++I) { in ActOnNumericConstant()
3361 if (Literal.isFloatingLiteral()) { in ActOnNumericConstant()
3363 if (Literal.isHalf){ in ActOnNumericConstant()
3370 } else if (Literal.isFloat) in ActOnNumericConstant()
3372 else if (Literal.isLong) in ActOnNumericConstant()
3374 else if (Literal.isFloat128) in ActOnNumericConstant()
3379 Res = BuildFloatingLiteral(*this, Literal, Ty, Tok.getLocation()); in ActOnNumericConstant()
3391 } else if (!Literal.isIntegerLiteral()) { in ActOnNumericConstant()
3397 if (!getLangOpts().C99 && Literal.isLongLong) { in ActOnNumericConstant()
3410 if (Literal.GetIntegerValue(ResultVal)) { in ActOnNumericConstant()
3423 bool AllowUnsigned = Literal.isUnsigned || Literal.getRadix() != 10; in ActOnNumericConstant()
3429 if (Literal.MicrosoftInteger) { in ActOnNumericConstant()
3430 if (Literal.MicrosoftInteger == 8 && !Literal.isUnsigned) { in ActOnNumericConstant()
3434 Width = Literal.MicrosoftInteger; in ActOnNumericConstant()
3436 /*Signed=*/!Literal.isUnsigned); in ActOnNumericConstant()
3440 if (Ty.isNull() && !Literal.isLong && !Literal.isLongLong) { in ActOnNumericConstant()
3447 if (!Literal.isUnsigned && ResultVal[IntSize-1] == 0) in ActOnNumericConstant()
3456 if (Ty.isNull() && !Literal.isLongLong) { in ActOnNumericConstant()
3462 if (!Literal.isUnsigned && ResultVal[LongSize-1] == 0) in ActOnNumericConstant()
3473 ? Literal.isLong in ActOnNumericConstant()
3495 if (!Literal.isUnsigned && (ResultVal[LongLongSize-1] == 0 || in ActOnNumericConstant()
3496 (getLangOpts().MicrosoftExt && Literal.isLongLong))) in ActOnNumericConstant()
3519 if (Literal.isImaginary) in ActOnNumericConstant()
6048 ExprResult Literal = DefaultLvalueConversion(exprs[0]); in BuildVectorLiteral() local
6049 if (Literal.isInvalid()) in BuildVectorLiteral()
6051 Literal = ImpCastExprToType(Literal.get(), ElemTy, in BuildVectorLiteral()
6052 PrepareScalarCast(Literal, ElemTy)); in BuildVectorLiteral()
6053 return BuildCStyleCastExpr(LParenLoc, TInfo, RParenLoc, Literal.get()); in BuildVectorLiteral()
6070 ExprResult Literal = DefaultLvalueConversion(exprs[0]); in BuildVectorLiteral() local
6071 if (Literal.isInvalid()) in BuildVectorLiteral()
6073 Literal = ImpCastExprToType(Literal.get(), ElemTy, in BuildVectorLiteral()
6074 PrepareScalarCast(Literal, ElemTy)); in BuildVectorLiteral()
6075 return BuildCStyleCastExpr(LParenLoc, TInfo, RParenLoc, Literal.get()); in BuildVectorLiteral()
8941 Expr *Literal; in diagnoseObjCLiteralComparison() local
8944 Literal = LHS.get(); in diagnoseObjCLiteralComparison()
8947 Literal = RHS.get(); in diagnoseObjCLiteralComparison()
8960 Sema::ObjCLiteralKind LiteralKind = S.CheckLiteralKind(Literal); in diagnoseObjCLiteralComparison()
8968 << Literal->getSourceRange(); in diagnoseObjCLiteralComparison()
8971 << LiteralKind << Literal->getSourceRange(); in diagnoseObjCLiteralComparison()