|
@@ -15,6 +15,7 @@
|
|
#define LLVM_CLANG_AST_EXPR_H
|
|
#define LLVM_CLANG_AST_EXPR_H
|
|
|
|
|
|
#include "clang/AST/APValue.h"
|
|
#include "clang/AST/APValue.h"
|
|
|
|
+#include "clang/AST/Decl.h"
|
|
#include "clang/AST/Stmt.h"
|
|
#include "clang/AST/Stmt.h"
|
|
#include "clang/AST/Type.h"
|
|
#include "clang/AST/Type.h"
|
|
#include "clang/AST/DeclAccessPair.h"
|
|
#include "clang/AST/DeclAccessPair.h"
|
|
@@ -1163,16 +1164,8 @@ class IntegerLiteral : public Expr, public APIntStorage {
|
|
public:
|
|
public:
|
|
// type should be IntTy, LongTy, LongLongTy, UnsignedIntTy, UnsignedLongTy,
|
|
// type should be IntTy, LongTy, LongLongTy, UnsignedIntTy, UnsignedLongTy,
|
|
// or UnsignedLongLongTy
|
|
// or UnsignedLongLongTy
|
|
- IntegerLiteral(ASTContext &C, const llvm::APInt &V,
|
|
|
|
- QualType type, SourceLocation l)
|
|
|
|
- : Expr(IntegerLiteralClass, type, VK_RValue, OK_Ordinary, false, false,
|
|
|
|
- false, false),
|
|
|
|
- Loc(l) {
|
|
|
|
- assert(type->isIntegerType() && "Illegal type in IntegerLiteral");
|
|
|
|
- assert(V.getBitWidth() == C.getIntWidth(type) &&
|
|
|
|
- "Integer type is not the correct size for constant.");
|
|
|
|
- setValue(C, V);
|
|
|
|
- }
|
|
|
|
|
|
+ IntegerLiteral(ASTContext &C, const llvm::APInt &V, QualType type,
|
|
|
|
+ SourceLocation l);
|
|
|
|
|
|
/// \brief Returns a new integer literal with value 'V' and type 'type'.
|
|
/// \brief Returns a new integer literal with value 'V' and type 'type'.
|
|
/// \param type - either IntTy, LongTy, LongLongTy, UnsignedIntTy,
|
|
/// \param type - either IntTy, LongTy, LongLongTy, UnsignedIntTy,
|
|
@@ -1250,22 +1243,10 @@ class FloatingLiteral : public Expr, private APFloatStorage {
|
|
SourceLocation Loc;
|
|
SourceLocation Loc;
|
|
|
|
|
|
FloatingLiteral(ASTContext &C, const llvm::APFloat &V, bool isexact,
|
|
FloatingLiteral(ASTContext &C, const llvm::APFloat &V, bool isexact,
|
|
- QualType Type, SourceLocation L)
|
|
|
|
- : Expr(FloatingLiteralClass, Type, VK_RValue, OK_Ordinary, false, false,
|
|
|
|
- false, false), Loc(L) {
|
|
|
|
- FloatingLiteralBits.IsIEEE =
|
|
|
|
- &C.getTargetInfo().getLongDoubleFormat() == &llvm::APFloat::IEEEquad;
|
|
|
|
- FloatingLiteralBits.IsExact = isexact;
|
|
|
|
- setValue(C, V);
|
|
|
|
- }
|
|
|
|
|
|
+ QualType Type, SourceLocation L);
|
|
|
|
|
|
/// \brief Construct an empty floating-point literal.
|
|
/// \brief Construct an empty floating-point literal.
|
|
- explicit FloatingLiteral(ASTContext &C, EmptyShell Empty)
|
|
|
|
- : Expr(FloatingLiteralClass, Empty) {
|
|
|
|
- FloatingLiteralBits.IsIEEE =
|
|
|
|
- &C.getTargetInfo().getLongDoubleFormat() == &llvm::APFloat::IEEEquad;
|
|
|
|
- FloatingLiteralBits.IsExact = false;
|
|
|
|
- }
|
|
|
|
|
|
+ explicit FloatingLiteral(ASTContext &C, EmptyShell Empty);
|
|
|
|
|
|
public:
|
|
public:
|
|
static FloatingLiteral *Create(ASTContext &C, const llvm::APFloat &V,
|
|
static FloatingLiteral *Create(ASTContext &C, const llvm::APFloat &V,
|