diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ARCMigrate/TransformActions.cpp | 1 | ||||
-rw-r--r-- | lib/AST/Expr.cpp | 28 | ||||
-rw-r--r-- | lib/AST/LambdaMangleContext.cpp | 2 | ||||
-rw-r--r-- | lib/AST/StmtDumper.cpp | 1 | ||||
-rw-r--r-- | lib/AST/TypeLoc.cpp | 1 | ||||
-rw-r--r-- | lib/Analysis/CFG.cpp | 1 | ||||
-rw-r--r-- | lib/Analysis/PseudoConstantAnalysis.cpp | 1 | ||||
-rw-r--r-- | lib/CodeGen/CGDebugInfo.h | 1 | ||||
-rw-r--r-- | lib/Edit/RewriteObjCFoundationAPI.cpp | 1 | ||||
-rw-r--r-- | lib/Parse/ParseAST.cpp | 1 | ||||
-rw-r--r-- | lib/Sema/AttributeList.cpp | 1 | ||||
-rw-r--r-- | lib/Sema/SemaAccess.cpp | 6 | ||||
-rw-r--r-- | lib/Sema/SemaFixItUtils.cpp | 1 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Core/BasicValueFactory.cpp | 1 |
14 files changed, 45 insertions, 2 deletions
diff --git a/lib/ARCMigrate/TransformActions.cpp b/lib/ARCMigrate/TransformActions.cpp index 0ecfeb54f8..783db1c8f3 100644 --- a/lib/ARCMigrate/TransformActions.cpp +++ b/lib/ARCMigrate/TransformActions.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "Internals.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/Expr.h" #include "clang/Lex/Preprocessor.h" #include "clang/Basic/SourceManager.h" diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index b68f864711..f2f77367d8 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -555,6 +555,17 @@ void APNumericStorage::setIntValue(ASTContext &C, const llvm::APInt &Val) { VAL = 0; } +IntegerLiteral::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 * IntegerLiteral::Create(ASTContext &C, const llvm::APInt &V, QualType type, SourceLocation l) { @@ -566,6 +577,23 @@ IntegerLiteral::Create(ASTContext &C, EmptyShell Empty) { return new (C) IntegerLiteral(Empty); } +FloatingLiteral::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); +} + +FloatingLiteral::FloatingLiteral(ASTContext &C, EmptyShell Empty) + : Expr(FloatingLiteralClass, Empty) { + FloatingLiteralBits.IsIEEE = + &C.getTargetInfo().getLongDoubleFormat() == &llvm::APFloat::IEEEquad; + FloatingLiteralBits.IsExact = false; +} + FloatingLiteral * FloatingLiteral::Create(ASTContext &C, const llvm::APFloat &V, bool isexact, QualType Type, SourceLocation L) { diff --git a/lib/AST/LambdaMangleContext.cpp b/lib/AST/LambdaMangleContext.cpp index f5272a7fdb..6f4fe2d4b4 100644 --- a/lib/AST/LambdaMangleContext.cpp +++ b/lib/AST/LambdaMangleContext.cpp @@ -11,7 +11,9 @@ // the Itanium C++ ABI mangling numbers for lambda expressions. // //===----------------------------------------------------------------------===// + #include "clang/AST/LambdaMangleContext.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/DeclCXX.h" using namespace clang; diff --git a/lib/AST/StmtDumper.cpp b/lib/AST/StmtDumper.cpp index d5e12c873d..962e35269c 100644 --- a/lib/AST/StmtDumper.cpp +++ b/lib/AST/StmtDumper.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "clang/AST/StmtVisitor.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/PrettyPrinter.h" diff --git a/lib/AST/TypeLoc.cpp b/lib/AST/TypeLoc.cpp index caa19b19df..c7bb7da4d1 100644 --- a/lib/AST/TypeLoc.cpp +++ b/lib/AST/TypeLoc.cpp @@ -13,6 +13,7 @@ #include "llvm/Support/raw_ostream.h" #include "clang/AST/TypeLocVisitor.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/Expr.h" #include "llvm/Support/ErrorHandling.h" using namespace clang; diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp index 9ac92dce37..b69fbd6afb 100644 --- a/lib/Analysis/CFG.cpp +++ b/lib/Analysis/CFG.cpp @@ -14,6 +14,7 @@ #include "llvm/Support/SaveAndRestore.h" #include "clang/Analysis/CFG.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/StmtVisitor.h" #include "clang/AST/PrettyPrinter.h" diff --git a/lib/Analysis/PseudoConstantAnalysis.cpp b/lib/Analysis/PseudoConstantAnalysis.cpp index c8b491a216..5d659ce585 100644 --- a/lib/Analysis/PseudoConstantAnalysis.cpp +++ b/lib/Analysis/PseudoConstantAnalysis.cpp @@ -17,6 +17,7 @@ #include "clang/AST/Decl.h" #include "clang/AST/Expr.h" #include "clang/AST/Stmt.h" +#include "llvm/ADT/SmallPtrSet.h" #include <deque> using namespace clang; diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h index 616b703822..44cc49ade1 100644 --- a/lib/CodeGen/CGDebugInfo.h +++ b/lib/CodeGen/CGDebugInfo.h @@ -30,6 +30,7 @@ namespace llvm { } namespace clang { + class CXXMethodDecl; class VarDecl; class ObjCInterfaceDecl; class ClassTemplateSpecializationDecl; diff --git a/lib/Edit/RewriteObjCFoundationAPI.cpp b/lib/Edit/RewriteObjCFoundationAPI.cpp index 6ef2e642fb..0e7b877994 100644 --- a/lib/Edit/RewriteObjCFoundationAPI.cpp +++ b/lib/Edit/RewriteObjCFoundationAPI.cpp @@ -14,6 +14,7 @@ #include "clang/Edit/Rewriters.h" #include "clang/Edit/Commit.h" #include "clang/Lex/Lexer.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/ExprObjC.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/NSAPI.h" diff --git a/lib/Parse/ParseAST.cpp b/lib/Parse/ParseAST.cpp index c50c1c980e..bd4f859521 100644 --- a/lib/Parse/ParseAST.cpp +++ b/lib/Parse/ParseAST.cpp @@ -18,6 +18,7 @@ #include "clang/Sema/SemaConsumer.h" #include "clang/Sema/ExternalSemaSource.h" #include "clang/AST/ASTConsumer.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/ExternalASTSource.h" #include "clang/AST/Stmt.h" diff --git a/lib/Sema/AttributeList.cpp b/lib/Sema/AttributeList.cpp index 93f8c5d359..0f209fd7d6 100644 --- a/lib/Sema/AttributeList.cpp +++ b/lib/Sema/AttributeList.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "clang/Sema/AttributeList.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/Expr.h" #include "clang/Basic/IdentifierTable.h" #include "llvm/ADT/StringSwitch.h" diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index 7a7185f33d..f71a38816f 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/lib/Sema/SemaAccess.cpp @@ -152,7 +152,8 @@ struct AccessTarget : public AccessedEntity { CXXRecordDecl *NamingClass, DeclAccessPair FoundDecl, QualType BaseObjectType) - : AccessedEntity(Context, Member, NamingClass, FoundDecl, BaseObjectType) { + : AccessedEntity(Context.getDiagAllocator(), Member, NamingClass, + FoundDecl, BaseObjectType) { initialize(); } @@ -161,7 +162,8 @@ struct AccessTarget : public AccessedEntity { CXXRecordDecl *BaseClass, CXXRecordDecl *DerivedClass, AccessSpecifier Access) - : AccessedEntity(Context, Base, BaseClass, DerivedClass, Access) { + : AccessedEntity(Context.getDiagAllocator(), Base, BaseClass, DerivedClass, + Access) { initialize(); } diff --git a/lib/Sema/SemaFixItUtils.cpp b/lib/Sema/SemaFixItUtils.cpp index fa99ef160a..b61b9307dd 100644 --- a/lib/Sema/SemaFixItUtils.cpp +++ b/lib/Sema/SemaFixItUtils.cpp @@ -11,6 +11,7 @@ // //===----------------------------------------------------------------------===// +#include "clang/AST/ASTContext.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/ExprObjC.h" #include "clang/Lex/Preprocessor.h" diff --git a/lib/StaticAnalyzer/Core/BasicValueFactory.cpp b/lib/StaticAnalyzer/Core/BasicValueFactory.cpp index fe96700772..20c73612c4 100644 --- a/lib/StaticAnalyzer/Core/BasicValueFactory.cpp +++ b/lib/StaticAnalyzer/Core/BasicValueFactory.cpp @@ -13,6 +13,7 @@ // //===----------------------------------------------------------------------===// +#include "clang/AST/ASTContext.h" #include "clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h" #include "clang/StaticAnalyzer/Core/PathSensitive/Store.h" |