aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2010-09-17 15:54:40 +0000
committerDimitry Andric <dim@FreeBSD.org>2010-09-17 15:54:40 +0000
commit3d1dcd9bfdb15c49ee34d576a065079ac5c4d29f (patch)
tree0bbe07708f7571f8b5291f6d7b96c102b7c99dee
parenta0482fa4e7fa27b01184f938097f0666b78016dd (diff)
downloadsrc-3d1dcd9bfdb15c49ee34d576a065079ac5c4d29f.tar.gz
src-3d1dcd9bfdb15c49ee34d576a065079ac5c4d29f.zip
Vendor import of clang r114020 (from the release_28 branch):vendor/clang/clang-r114020
Notes
Notes: svn path=/vendor/clang/dist/; revision=212795 svn path=/vendor/clang/clang-r114020/; revision=212796; tag=vendor/clang/clang-r114020
-rw-r--r--clang.xcodeproj/project.pbxproj469
-rw-r--r--docs/InternalsManual.html57
-rw-r--r--docs/LanguageExtensions.html22
-rw-r--r--docs/UsersManual.html54
-rw-r--r--docs/tools/clang.pod6
-rw-r--r--examples/CMakeLists.txt1
-rw-r--r--examples/Makefile2
-rw-r--r--examples/PrintFunctionNames/Makefile11
-rw-r--r--examples/PrintFunctionNames/PrintFunctionNames.cpp22
-rw-r--r--examples/PrintFunctionNames/PrintFunctionNames.exports1
-rw-r--r--examples/clang-interpreter/CMakeLists.txt2
-rw-r--r--examples/clang-interpreter/Makefile6
-rw-r--r--examples/clang-interpreter/main.cpp8
-rw-r--r--examples/wpa/CMakeLists.txt1
-rw-r--r--examples/wpa/Makefile4
-rw-r--r--examples/wpa/clang-wpa.cpp13
-rw-r--r--include/clang-c/Index.h554
-rw-r--r--include/clang/AST/ASTConsumer.h14
-rw-r--r--include/clang/AST/ASTContext.h81
-rw-r--r--include/clang/AST/ASTImporter.h2
-rw-r--r--include/clang/AST/Attr.h607
-rw-r--r--include/clang/AST/CMakeLists.txt6
-rw-r--r--include/clang/AST/CanonicalType.h9
-rw-r--r--include/clang/AST/Decl.h238
-rw-r--r--include/clang/AST/DeclBase.h181
-rw-r--r--include/clang/AST/DeclCXX.h279
-rw-r--r--include/clang/AST/DeclContextInternals.h160
-rw-r--r--include/clang/AST/DeclFriend.h16
-rw-r--r--include/clang/AST/DeclGroup.h1
-rw-r--r--include/clang/AST/DeclObjC.h150
-rw-r--r--include/clang/AST/DeclTemplate.h679
-rw-r--r--include/clang/AST/DeclarationName.h147
-rw-r--r--include/clang/AST/Expr.h748
-rw-r--r--include/clang/AST/ExprCXX.h405
-rw-r--r--include/clang/AST/ExternalASTSource.h93
-rw-r--r--include/clang/AST/FullExpr.h1
-rw-r--r--include/clang/AST/Makefile8
-rw-r--r--include/clang/AST/NestedNameSpecifier.h2
-rw-r--r--include/clang/AST/OperationKinds.h158
-rw-r--r--include/clang/AST/RecursiveASTVisitor.h318
-rw-r--r--include/clang/AST/Redeclarable.h3
-rw-r--r--include/clang/AST/Stmt.h37
-rw-r--r--include/clang/AST/StmtCXX.h38
-rw-r--r--include/clang/AST/StmtVisitor.h107
-rw-r--r--include/clang/AST/Type.h143
-rw-r--r--include/clang/AST/TypeLoc.h4
-rw-r--r--include/clang/AST/TypeOrdering.h21
-rw-r--r--include/clang/Analysis/Analyses/FormatString.h595
-rw-r--r--include/clang/Analysis/Analyses/LiveVariables.h5
-rw-r--r--include/clang/Analysis/Analyses/PrintfFormatString.h445
-rw-r--r--include/clang/Analysis/Analyses/PseudoConstantAnalysis.h45
-rw-r--r--include/clang/Analysis/AnalysisContext.h53
-rw-r--r--include/clang/Analysis/CFG.h19
-rw-r--r--include/clang/Analysis/CFGStmtMap.h52
-rw-r--r--include/clang/Analysis/FlowSensitive/DataflowSolver.h17
-rw-r--r--include/clang/Analysis/ProgramPoint.h39
-rw-r--r--include/clang/Analysis/Visitors/CFGStmtVisitor.h4
-rw-r--r--include/clang/Basic/Attr.td90
-rw-r--r--include/clang/Basic/Builtins.def149
-rw-r--r--include/clang/Basic/Builtins.h5
-rw-r--r--include/clang/Basic/BuiltinsARM.def14
-rw-r--r--include/clang/Basic/BuiltinsX86.def221
-rw-r--r--include/clang/Basic/DeclNodes.td5
-rw-r--r--include/clang/Basic/Diagnostic.h71
-rw-r--r--include/clang/Basic/DiagnosticCommonKinds.td3
-rw-r--r--include/clang/Basic/DiagnosticDriverKinds.td2
-rw-r--r--include/clang/Basic/DiagnosticFrontendKinds.td2
-rw-r--r--include/clang/Basic/DiagnosticGroups.td27
-rw-r--r--include/clang/Basic/DiagnosticLexKinds.td26
-rw-r--r--include/clang/Basic/DiagnosticParseKinds.td20
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td150
-rw-r--r--include/clang/Basic/IdentifierTable.h74
-rw-r--r--include/clang/Basic/LangOptions.h3
-rw-r--r--include/clang/Basic/Linkage.h11
-rw-r--r--include/clang/Basic/Makefile1
-rw-r--r--include/clang/Basic/OnDiskHashTable.h83
-rw-r--r--include/clang/Basic/SourceManager.h48
-rw-r--r--include/clang/Basic/Specifiers.h62
-rw-r--r--include/clang/Basic/StmtNodes.td1
-rw-r--r--include/clang/Basic/TargetInfo.h43
-rw-r--r--include/clang/Basic/TargetOptions.h8
-rw-r--r--include/clang/Basic/TokenKinds.def13
-rw-r--r--include/clang/Basic/arm_neon.td2
-rw-r--r--include/clang/CMakeLists.txt1
-rw-r--r--include/clang/Checker/BugReporter/BugReporter.h3
-rw-r--r--include/clang/Checker/PathSensitive/AnalysisManager.h52
-rw-r--r--include/clang/Checker/PathSensitive/Checker.h31
-rw-r--r--include/clang/Checker/PathSensitive/CheckerHelpers.h40
-rw-r--r--include/clang/Checker/PathSensitive/ConstraintManager.h3
-rw-r--r--include/clang/Checker/PathSensitive/Environment.h8
-rw-r--r--include/clang/Checker/PathSensitive/GRCoreEngine.h168
-rw-r--r--include/clang/Checker/PathSensitive/GRExprEngine.h196
-rw-r--r--include/clang/Checker/PathSensitive/GRState.h99
-rw-r--r--include/clang/Checker/PathSensitive/GRSubEngine.h33
-rw-r--r--include/clang/Checker/PathSensitive/GRTransferFuncs.h6
-rw-r--r--include/clang/Checker/PathSensitive/GRWorkList.h10
-rw-r--r--include/clang/Checker/PathSensitive/MemRegion.h127
-rw-r--r--include/clang/Checker/PathSensitive/SVals.h27
-rw-r--r--include/clang/Checker/PathSensitive/Store.h41
-rw-r--r--include/clang/Checker/PathSensitive/SymbolManager.h79
-rw-r--r--include/clang/Checker/PathSensitive/ValueManager.h3
-rw-r--r--include/clang/Driver/CC1Options.td45
-rw-r--r--include/clang/Driver/Compilation.h2
-rw-r--r--include/clang/Driver/Driver.h29
-rw-r--r--include/clang/Driver/HostInfo.h9
-rw-r--r--include/clang/Driver/Job.h34
-rw-r--r--include/clang/Driver/OptParser.td3
-rw-r--r--include/clang/Driver/OptTable.h11
-rw-r--r--include/clang/Driver/Option.h10
-rw-r--r--include/clang/Driver/Options.td13
-rw-r--r--include/clang/Driver/Tool.h4
-rw-r--r--include/clang/Driver/ToolChain.h18
-rw-r--r--include/clang/Frontend/ASTConsumers.h9
-rw-r--r--include/clang/Frontend/ASTUnit.h341
-rw-r--r--include/clang/Frontend/AnalyzerOptions.h3
-rw-r--r--include/clang/Frontend/CodeGenOptions.h15
-rw-r--r--include/clang/Frontend/CompilerInstance.h59
-rw-r--r--include/clang/Frontend/DeclXML.def20
-rw-r--r--include/clang/Frontend/DiagnosticOptions.h2
-rw-r--r--include/clang/Frontend/DocumentXML.h1
-rw-r--r--include/clang/Frontend/FrontendAction.h14
-rw-r--r--include/clang/Frontend/FrontendActions.h33
-rw-r--r--include/clang/Frontend/FrontendOptions.h16
-rw-r--r--include/clang/Frontend/HeaderSearchOptions.h20
-rw-r--r--include/clang/Frontend/PCHDeserializationListener.h36
-rw-r--r--include/clang/Frontend/PreprocessorOptions.h67
-rw-r--r--include/clang/Frontend/PreprocessorOutputOptions.h16
-rw-r--r--include/clang/Frontend/StmtXML.def99
-rw-r--r--include/clang/Frontend/TypeXML.def8
-rw-r--r--include/clang/Frontend/Utils.h7
-rw-r--r--include/clang/FrontendTool/Utils.h30
-rw-r--r--include/clang/Index/TranslationUnit.h2
-rw-r--r--include/clang/Index/Utils.h36
-rw-r--r--include/clang/Lex/CodeCompletionHandler.h67
-rw-r--r--include/clang/Lex/ExternalPreprocessorSource.h2
-rw-r--r--include/clang/Lex/HeaderSearch.h2
-rw-r--r--include/clang/Lex/Lexer.h29
-rw-r--r--include/clang/Lex/MacroInfo.h37
-rw-r--r--include/clang/Lex/PPCallbacks.h10
-rw-r--r--include/clang/Lex/PTHLexer.h2
-rw-r--r--include/clang/Lex/PreprocessingRecord.h3
-rw-r--r--include/clang/Lex/Preprocessor.h73
-rw-r--r--include/clang/Lex/Token.h1
-rw-r--r--include/clang/Makefile2
-rw-r--r--include/clang/Parse/Action.h3309
-rw-r--r--include/clang/Parse/Ownership.h845
-rw-r--r--include/clang/Parse/ParseAST.h (renamed from include/clang/Sema/ParseAST.h)8
-rw-r--r--include/clang/Parse/Parser.h509
-rw-r--r--include/clang/Rewrite/FixItRewriter.h11
-rw-r--r--include/clang/Rewrite/FrontendActions.h4
-rw-r--r--include/clang/Sema/AnalysisBasedWarnings.h (renamed from lib/Sema/AnalysisBasedWarnings.h)11
-rw-r--r--include/clang/Sema/AttributeList.h (renamed from include/clang/Parse/AttributeList.h)30
-rw-r--r--include/clang/Sema/CXXFieldCollector.h (renamed from lib/Sema/CXXFieldCollector.h)0
-rw-r--r--include/clang/Sema/CodeCompleteConsumer.h495
-rw-r--r--include/clang/Sema/DeclSpec.h (renamed from include/clang/Parse/DeclSpec.h)127
-rw-r--r--include/clang/Sema/DelayedDiagnostic.h168
-rw-r--r--include/clang/Sema/Designator.h (renamed from include/clang/Parse/Designator.h)79
-rw-r--r--include/clang/Sema/ExternalSemaSource.h2
-rw-r--r--include/clang/Sema/IdentifierResolver.h (renamed from lib/Sema/IdentifierResolver.h)29
-rw-r--r--include/clang/Sema/Initialization.h (renamed from lib/Sema/SemaInit.h)41
-rw-r--r--include/clang/Sema/Lookup.h (renamed from lib/Sema/Lookup.h)79
-rw-r--r--include/clang/Sema/ObjCMethodList.h38
-rw-r--r--include/clang/Sema/Overload.h (renamed from lib/Sema/SemaOverload.h)37
-rw-r--r--include/clang/Sema/Ownership.h462
-rw-r--r--include/clang/Sema/ParsedTemplate.h (renamed from include/clang/Parse/Template.h)43
-rw-r--r--include/clang/Sema/PrettyDeclStackTrace.h46
-rw-r--r--include/clang/Sema/Scope.h (renamed from include/clang/Parse/Scope.h)26
-rw-r--r--include/clang/Sema/ScopeInfo.h137
-rw-r--r--include/clang/Sema/Sema.h (renamed from lib/Sema/Sema.h)3192
-rw-r--r--include/clang/Sema/SemaInternal.h30
-rw-r--r--include/clang/Sema/Template.h (renamed from lib/Sema/SemaTemplate.h)95
-rw-r--r--include/clang/Sema/TemplateDeduction.h111
-rw-r--r--include/clang/Serialization/ASTBitCodes.h (renamed from include/clang/Frontend/PCHBitCodes.h)193
-rw-r--r--include/clang/Serialization/ASTDeserializationListener.h49
-rw-r--r--include/clang/Serialization/ASTReader.h (renamed from include/clang/Frontend/PCHReader.h)667
-rw-r--r--include/clang/Serialization/ASTWriter.h (renamed from include/clang/Frontend/PCHWriter.h)257
-rw-r--r--include/clang/Serialization/CMakeLists.txt12
-rw-r--r--include/clang/Serialization/Makefile19
-rw-r--r--lib/AST/ASTConsumer.cpp3
-rw-r--r--lib/AST/ASTContext.cpp595
-rw-r--r--lib/AST/ASTDiagnostic.cpp11
-rw-r--r--lib/AST/ASTImporter.cpp104
-rw-r--r--lib/AST/AttrImpl.cpp196
-rw-r--r--lib/AST/CMakeLists.txt4
-rw-r--r--lib/AST/CXXABI.h39
-rw-r--r--lib/AST/Decl.cpp272
-rw-r--r--lib/AST/DeclBase.cpp251
-rw-r--r--lib/AST/DeclCXX.cpp109
-rw-r--r--lib/AST/DeclGroup.cpp6
-rw-r--r--lib/AST/DeclObjC.cpp183
-rw-r--r--lib/AST/DeclPrinter.cpp19
-rw-r--r--lib/AST/DeclTemplate.cpp174
-rw-r--r--lib/AST/DeclarationName.cpp116
-rw-r--r--lib/AST/Expr.cpp589
-rw-r--r--lib/AST/ExprCXX.cpp329
-rw-r--r--lib/AST/ExprClassification.cpp34
-rw-r--r--lib/AST/ExprConstant.cpp505
-rw-r--r--lib/AST/FullExpr.cpp13
-rw-r--r--lib/AST/ItaniumCXXABI.cpp52
-rw-r--r--lib/AST/Makefile1
-rw-r--r--lib/AST/MicrosoftCXXABI.cpp48
-rw-r--r--lib/AST/NestedNameSpecifier.cpp5
-rw-r--r--lib/AST/ParentMap.cpp2
-rw-r--r--lib/AST/RecordLayout.cpp4
-rw-r--r--lib/AST/RecordLayoutBuilder.cpp113
-rw-r--r--lib/AST/Stmt.cpp94
-rw-r--r--lib/AST/StmtDumper.cpp38
-rw-r--r--lib/AST/StmtPrinter.cpp92
-rw-r--r--lib/AST/StmtProfile.cpp107
-rw-r--r--lib/AST/TemplateBase.cpp17
-rw-r--r--lib/AST/Type.cpp157
-rw-r--r--lib/AST/TypeLoc.cpp14
-rw-r--r--lib/AST/TypePrinter.cpp9
-rw-r--r--lib/Analysis/AnalysisContext.cpp45
-rw-r--r--lib/Analysis/CFG.cpp164
-rw-r--r--lib/Analysis/CFGStmtMap.cpp88
-rw-r--r--lib/Analysis/CMakeLists.txt4
-rw-r--r--lib/Analysis/FormatString.cpp474
-rw-r--r--lib/Analysis/FormatStringParsing.h72
-rw-r--r--lib/Analysis/LiveVariables.cpp24
-rw-r--r--lib/Analysis/Makefile1
-rw-r--r--lib/Analysis/PrintfFormatString.cpp572
-rw-r--r--lib/Analysis/PseudoConstantAnalysis.cpp238
-rw-r--r--lib/Analysis/ReachableCode.cpp2
-rw-r--r--lib/Analysis/ScanfFormatString.cpp221
-rw-r--r--lib/Analysis/UninitializedValues.cpp4
-rw-r--r--lib/Basic/Builtins.cpp20
-rw-r--r--lib/Basic/Diagnostic.cpp64
-rw-r--r--lib/Basic/FileManager.cpp16
-rw-r--r--lib/Basic/IdentifierTable.cpp12
-rw-r--r--lib/Basic/Makefile1
-rw-r--r--lib/Basic/SourceManager.cpp34
-rw-r--r--lib/Basic/TargetInfo.cpp22
-rw-r--r--lib/Basic/Targets.cpp84
-rw-r--r--lib/Basic/Version.cpp2
-rw-r--r--lib/CMakeLists.txt2
-rw-r--r--lib/Checker/AdjustedReturnValueChecker.cpp3
-rw-r--r--lib/Checker/AggExprVisitor.cpp11
-rw-r--r--lib/Checker/AnalysisConsumer.cpp12
-rw-r--r--lib/Checker/AnalysisManager.cpp31
-rw-r--r--lib/Checker/ArrayBoundChecker.cpp2
-rw-r--r--lib/Checker/BasicObjCFoundationChecks.cpp5
-rw-r--r--lib/Checker/BasicStore.cpp63
-rw-r--r--lib/Checker/BasicValueFactory.cpp32
-rw-r--r--lib/Checker/BugReporter.cpp51
-rw-r--r--lib/Checker/BugReporterVisitors.cpp49
-rw-r--r--lib/Checker/CFRefCount.cpp202
-rw-r--r--lib/Checker/CMakeLists.txt4
-rw-r--r--lib/Checker/CStringChecker.cpp594
-rw-r--r--lib/Checker/CallAndMessageChecker.cpp2
-rw-r--r--lib/Checker/CallInliner.cpp54
-rw-r--r--lib/Checker/CastSizeChecker.cpp4
-rw-r--r--lib/Checker/CheckDeadStores.cpp4
-rw-r--r--lib/Checker/CheckSecuritySyntaxOnly.cpp16
-rw-r--r--lib/Checker/CheckerHelpers.cpp80
-rw-r--r--lib/Checker/CocoaConventions.cpp5
-rw-r--r--lib/Checker/DivZeroChecker.cpp8
-rw-r--r--lib/Checker/Environment.cpp41
-rw-r--r--lib/Checker/FixedAddressChecker.cpp2
-rw-r--r--lib/Checker/FlatStore.cpp82
-rw-r--r--lib/Checker/GRCXXExprEngine.cpp34
-rw-r--r--lib/Checker/GRCoreEngine.cpp154
-rw-r--r--lib/Checker/GRExprEngine.cpp678
-rw-r--r--lib/Checker/GRExprEngineExperimentalChecks.cpp16
-rw-r--r--lib/Checker/GRExprEngineExperimentalChecks.h5
-rw-r--r--lib/Checker/GRState.cpp224
-rw-r--r--lib/Checker/IdempotentOperationChecker.cpp673
-rw-r--r--lib/Checker/LLVMConventionsChecker.cpp1
-rw-r--r--lib/Checker/Makefile1
-rw-r--r--lib/Checker/MallocChecker.cpp251
-rw-r--r--lib/Checker/MemRegion.cpp69
-rw-r--r--lib/Checker/OSAtomicChecker.cpp8
-rw-r--r--lib/Checker/PointerArithChecker.cpp3
-rw-r--r--lib/Checker/PointerSubChecker.cpp2
-rw-r--r--lib/Checker/RangeConstraintManager.cpp1
-rw-r--r--lib/Checker/RegionStore.cpp356
-rw-r--r--lib/Checker/ReturnPointerRangeChecker.cpp2
-rw-r--r--lib/Checker/ReturnUndefChecker.cpp1
-rw-r--r--lib/Checker/SVals.cpp7
-rw-r--r--lib/Checker/SValuator.cpp4
-rw-r--r--lib/Checker/SimpleConstraintManager.cpp70
-rw-r--r--lib/Checker/SimpleConstraintManager.h4
-rw-r--r--lib/Checker/SimpleSValuator.cpp284
-rw-r--r--lib/Checker/StackAddrLeakChecker.cpp2
-rw-r--r--lib/Checker/Store.cpp41
-rw-r--r--lib/Checker/StreamChecker.cpp197
-rw-r--r--lib/Checker/SymbolManager.cpp139
-rw-r--r--lib/Checker/UndefBranchChecker.cpp17
-rw-r--r--lib/Checker/UndefinedAssignmentChecker.cpp12
-rw-r--r--lib/Checker/UnixAPIChecker.cpp2
-rw-r--r--lib/Checker/UnreachableCodeChecker.cpp226
-rw-r--r--lib/Checker/VLASizeChecker.cpp2
-rw-r--r--lib/Checker/ValueManager.cpp17
-rw-r--r--lib/CodeGen/ABIInfo.h106
-rw-r--r--lib/CodeGen/CGBlocks.cpp197
-rw-r--r--lib/CodeGen/CGBlocks.h18
-rw-r--r--lib/CodeGen/CGBuiltin.cpp388
-rw-r--r--lib/CodeGen/CGCXX.cpp190
-rw-r--r--lib/CodeGen/CGCXXABI.h200
-rw-r--r--lib/CodeGen/CGCall.cpp481
-rw-r--r--lib/CodeGen/CGClass.cpp450
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp477
-rw-r--r--lib/CodeGen/CGDebugInfo.h51
-rw-r--r--lib/CodeGen/CGDecl.cpp164
-rw-r--r--lib/CodeGen/CGDeclCXX.cpp72
-rw-r--r--lib/CodeGen/CGException.cpp578
-rw-r--r--lib/CodeGen/CGException.h313
-rw-r--r--lib/CodeGen/CGExpr.cpp501
-rw-r--r--lib/CodeGen/CGExprAgg.cpp201
-rw-r--r--lib/CodeGen/CGExprCXX.cpp860
-rw-r--r--lib/CodeGen/CGExprComplex.cpp4
-rw-r--r--lib/CodeGen/CGExprConstant.cpp125
-rw-r--r--lib/CodeGen/CGExprScalar.cpp463
-rw-r--r--lib/CodeGen/CGObjC.cpp15
-rw-r--r--lib/CodeGen/CGObjCGNU.cpp64
-rw-r--r--lib/CodeGen/CGObjCMac.cpp993
-rw-r--r--lib/CodeGen/CGObjCRuntime.h13
-rw-r--r--lib/CodeGen/CGRTTI.cpp192
-rw-r--r--lib/CodeGen/CGRecordLayout.h28
-rw-r--r--lib/CodeGen/CGRecordLayoutBuilder.cpp81
-rw-r--r--lib/CodeGen/CGStmt.cpp131
-rw-r--r--lib/CodeGen/CGTemporaries.cpp86
-rw-r--r--lib/CodeGen/CGVTT.cpp3
-rw-r--r--lib/CodeGen/CGVTables.cpp92
-rw-r--r--lib/CodeGen/CGValue.h71
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp1125
-rw-r--r--lib/CodeGen/CodeGenFunction.h321
-rw-r--r--lib/CodeGen/CodeGenModule.cpp454
-rw-r--r--lib/CodeGen/CodeGenModule.h77
-rw-r--r--lib/CodeGen/CodeGenTypes.cpp39
-rw-r--r--lib/CodeGen/CodeGenTypes.h28
-rw-r--r--lib/CodeGen/ItaniumCXXABI.cpp992
-rw-r--r--lib/CodeGen/Makefile1
-rw-r--r--lib/CodeGen/Mangle.cpp120
-rw-r--r--lib/CodeGen/MicrosoftCXXABI.cpp37
-rw-r--r--lib/CodeGen/TargetInfo.cpp1183
-rw-r--r--lib/CodeGen/TargetInfo.h10
-rw-r--r--lib/Driver/Compilation.cpp12
-rw-r--r--lib/Driver/Driver.cpp126
-rw-r--r--lib/Driver/HostInfo.cpp177
-rw-r--r--lib/Driver/InputInfo.h15
-rw-r--r--lib/Driver/Job.cpp12
-rw-r--r--lib/Driver/Makefile1
-rw-r--r--lib/Driver/OptTable.cpp2
-rw-r--r--lib/Driver/Option.cpp2
-rw-r--r--lib/Driver/ToolChain.cpp140
-rw-r--r--lib/Driver/ToolChains.cpp265
-rw-r--r--lib/Driver/ToolChains.h50
-rw-r--r--lib/Driver/Tools.cpp500
-rw-r--r--lib/Driver/Tools.h95
-rw-r--r--lib/Frontend/ASTConsumers.cpp2
-rw-r--r--lib/Frontend/ASTMerge.cpp8
-rw-r--r--lib/Frontend/ASTUnit.cpp1586
-rw-r--r--lib/Frontend/CMakeLists.txt8
-rw-r--r--lib/Frontend/CacheTokens.cpp13
-rw-r--r--lib/Frontend/CompilerInstance.cpp127
-rw-r--r--lib/Frontend/CompilerInvocation.cpp111
-rw-r--r--lib/Frontend/DependencyFile.cpp1
-rw-r--r--lib/Frontend/DiagChecker.cpp2
-rw-r--r--lib/Frontend/FrontendAction.cpp36
-rw-r--r--lib/Frontend/FrontendActions.cpp88
-rw-r--r--lib/Frontend/InitHeaderSearch.cpp42
-rw-r--r--lib/Frontend/InitPreprocessor.cpp33
-rw-r--r--lib/Frontend/Makefile1
-rw-r--r--lib/Frontend/PrintParserCallbacks.cpp852
-rw-r--r--lib/Frontend/PrintPreprocessedOutput.cpp59
-rw-r--r--lib/Frontend/StmtXML.cpp4
-rw-r--r--lib/Frontend/TextDiagnosticPrinter.cpp46
-rw-r--r--lib/Frontend/VerifyDiagnosticsClient.cpp14
-rw-r--r--lib/FrontendTool/CMakeLists.txt5
-rw-r--r--lib/FrontendTool/ExecuteCompilerInvocation.cpp155
-rw-r--r--lib/FrontendTool/Makefile13
-rw-r--r--lib/Headers/CMakeLists.txt3
-rw-r--r--lib/Headers/Makefile1
-rw-r--r--lib/Headers/altivec.h4512
-rw-r--r--lib/Headers/avxintrin.h1156
-rw-r--r--lib/Headers/emmintrin.h9
-rw-r--r--lib/Headers/immintrin.h59
-rw-r--r--lib/Headers/mmintrin.h58
-rw-r--r--lib/Headers/nmmintrin.h44
-rw-r--r--lib/Headers/smmintrin.h12
-rw-r--r--lib/Headers/stddef.h3
-rw-r--r--lib/Headers/x86intrin.h31
-rw-r--r--lib/Headers/xmmintrin.h51
-rw-r--r--lib/Index/CMakeLists.txt1
-rw-r--r--lib/Index/Entity.cpp4
-rw-r--r--lib/Index/Makefile1
-rw-r--r--lib/Index/ResolveLocation.cpp602
-rw-r--r--lib/Lex/Lexer.cpp292
-rw-r--r--lib/Lex/LiteralSupport.cpp44
-rw-r--r--lib/Lex/MacroInfo.cpp19
-rw-r--r--lib/Lex/Makefile1
-rw-r--r--lib/Lex/PPDirectives.cpp51
-rw-r--r--lib/Lex/PPExpressions.cpp19
-rw-r--r--lib/Lex/PPMacroExpansion.cpp24
-rw-r--r--lib/Lex/PTHLexer.cpp30
-rw-r--r--lib/Lex/Pragma.cpp270
-rw-r--r--lib/Lex/PreprocessingRecord.cpp3
-rw-r--r--lib/Lex/Preprocessor.cpp29
-rw-r--r--lib/Lex/TokenLexer.cpp18
-rwxr-xr-xlib/Makefile2
-rw-r--r--lib/Parse/CMakeLists.txt6
-rw-r--r--lib/Parse/Makefile1
-rw-r--r--lib/Parse/MinimalAction.cpp281
-rw-r--r--lib/Parse/ParseAST.cpp (renamed from lib/Sema/ParseAST.cpp)69
-rw-r--r--lib/Parse/ParseCXXInlineMethods.cpp24
-rw-r--r--lib/Parse/ParseDecl.cpp369
-rw-r--r--lib/Parse/ParseDeclCXX.cpp308
-rw-r--r--lib/Parse/ParseExpr.cpp323
-rw-r--r--lib/Parse/ParseExprCXX.cpp180
-rw-r--r--lib/Parse/ParseInit.cpp48
-rw-r--r--lib/Parse/ParseObjc.cpp420
-rw-r--r--lib/Parse/ParsePragma.cpp120
-rw-r--r--lib/Parse/ParsePragma.h39
-rw-r--r--lib/Parse/ParseStmt.cpp282
-rw-r--r--lib/Parse/ParseTemplate.cpp121
-rw-r--r--lib/Parse/ParseTentative.cpp37
-rw-r--r--lib/Parse/Parser.cpp149
-rw-r--r--lib/Rewrite/CMakeLists.txt6
-rw-r--r--lib/Rewrite/DeltaTree.cpp10
-rw-r--r--lib/Rewrite/FixItRewriter.cpp29
-rw-r--r--lib/Rewrite/FrontendActions.cpp21
-rw-r--r--lib/Rewrite/HTMLRewrite.cpp3
-rw-r--r--lib/Rewrite/Makefile1
-rw-r--r--lib/Rewrite/RewriteObjC.cpp388
-rw-r--r--lib/Sema/AnalysisBasedWarnings.cpp39
-rw-r--r--lib/Sema/AttributeList.cpp (renamed from lib/Parse/AttributeList.cpp)12
-rw-r--r--lib/Sema/CMakeLists.txt3
-rw-r--r--lib/Sema/CodeCompleteConsumer.cpp233
-rw-r--r--lib/Sema/DeclSpec.cpp (renamed from lib/Parse/DeclSpec.cpp)110
-rw-r--r--lib/Sema/IdentifierResolver.cpp35
-rw-r--r--lib/Sema/JumpDiagnostics.cpp29
-rw-r--r--lib/Sema/Makefile1
-rw-r--r--lib/Sema/Sema.cpp261
-rw-r--r--lib/Sema/SemaAccess.cpp218
-rw-r--r--lib/Sema/SemaAttr.cpp135
-rw-r--r--lib/Sema/SemaCXXCast.cpp183
-rw-r--r--lib/Sema/SemaCXXScopeSpec.cpp42
-rw-r--r--lib/Sema/SemaChecking.cpp870
-rw-r--r--lib/Sema/SemaCodeComplete.cpp2077
-rw-r--r--lib/Sema/SemaDecl.cpp1400
-rw-r--r--lib/Sema/SemaDeclAttr.cpp453
-rw-r--r--lib/Sema/SemaDeclCXX.cpp1068
-rw-r--r--lib/Sema/SemaDeclObjC.cpp442
-rw-r--r--lib/Sema/SemaExceptionSpec.cpp10
-rw-r--r--lib/Sema/SemaExpr.cpp1704
-rw-r--r--lib/Sema/SemaExprCXX.cpp604
-rw-r--r--lib/Sema/SemaExprObjC.cpp136
-rw-r--r--lib/Sema/SemaInit.cpp383
-rw-r--r--lib/Sema/SemaLookup.cpp168
-rw-r--r--lib/Sema/SemaObjCProperty.cpp175
-rw-r--r--lib/Sema/SemaOverload.cpp1374
-rw-r--r--lib/Sema/SemaStmt.cpp382
-rw-r--r--lib/Sema/SemaTemplate.cpp550
-rw-r--r--lib/Sema/SemaTemplateDeduction.cpp191
-rw-r--r--lib/Sema/SemaTemplateInstantiate.cpp87
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp397
-rw-r--r--lib/Sema/SemaType.cpp154
-rw-r--r--lib/Sema/TargetAttributesSema.cpp17
-rw-r--r--lib/Sema/TargetAttributesSema.h2
-rw-r--r--lib/Sema/TreeTransform.h2028
-rw-r--r--lib/Serialization/ASTCommon.cpp69
-rw-r--r--lib/Serialization/ASTCommon.h50
-rw-r--r--lib/Serialization/ASTReader.cpp (renamed from lib/Frontend/PCHReader.cpp)2206
-rw-r--r--lib/Serialization/ASTReaderDecl.cpp (renamed from lib/Frontend/PCHReaderDecl.cpp)892
-rw-r--r--lib/Serialization/ASTReaderStmt.cpp (renamed from lib/Frontend/PCHReaderStmt.cpp)611
-rw-r--r--lib/Serialization/ASTWriter.cpp (renamed from lib/Frontend/PCHWriter.cpp)1677
-rw-r--r--lib/Serialization/ASTWriterDecl.cpp (renamed from lib/Frontend/PCHWriterDecl.cpp)542
-rw-r--r--lib/Serialization/ASTWriterStmt.cpp (renamed from lib/Frontend/PCHWriterStmt.cpp)520
-rw-r--r--lib/Serialization/CMakeLists.txt23
-rw-r--r--lib/Serialization/GeneratePCH.cpp (renamed from lib/Frontend/GeneratePCH.cpp)43
-rw-r--r--lib/Serialization/Makefile19
-rw-r--r--test/Analysis/additive-folding.c14
-rw-r--r--test/Analysis/array-struct-region.c47
-rw-r--r--test/Analysis/bstring.c37
-rw-r--r--test/Analysis/constant-folding.c74
-rw-r--r--test/Analysis/dead-stores.c32
-rw-r--r--test/Analysis/flat-store.c11
-rw-r--r--test/Analysis/idempotent-operations.c203
-rw-r--r--test/Analysis/idempotent-operations.cpp15
-rw-r--r--test/Analysis/malloc.c124
-rw-r--r--test/Analysis/misc-ps-region-store.cpp27
-rw-r--r--test/Analysis/misc-ps-region-store.m101
-rw-r--r--test/Analysis/misc-ps.m58
-rw-r--r--test/Analysis/null-deref-ps.c9
-rw-r--r--test/Analysis/outofbound.c24
-rw-r--r--test/Analysis/plist-output.m2
-rw-r--r--test/Analysis/retain-release-region-store.m27
-rw-r--r--test/Analysis/retain-release.m9
-rw-r--r--test/Analysis/stack-addr-ps.cpp8
-rw-r--r--test/Analysis/stream.c38
-rw-r--r--test/Analysis/string.c240
-rw-r--r--test/Analysis/uninit-vals-ps-region.m4
-rw-r--r--test/Analysis/unreachable-code-path.c104
-rw-r--r--test/CMakeLists.txt6
-rw-r--r--test/CXX/class.access/class.protected/p1.cpp69
-rw-r--r--test/CXX/class.access/p4.cpp25
-rw-r--r--test/CXX/class.access/p6.cpp20
-rw-r--r--test/CXX/class/class.mem/p1.cpp64
-rw-r--r--test/CXX/class/class.static/class.static.data/p4.cpp25
-rw-r--r--test/CXX/conv/conv.ptr/p2.cpp6
-rw-r--r--test/CXX/dcl.dcl/basic.namespace/namespace.def/p1.cpp9
-rw-r--r--test/CXX/dcl.dcl/basic.namespace/namespace.def/p7.cpp13
-rw-r--r--test/CXX/dcl.dcl/basic.namespace/namespace.def/p8.cpp97
-rw-r--r--test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp1
-rw-r--r--test/CXX/dcl.dcl/basic.namespace/namespace.udir/p6.cpp15
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp10
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp7
-rw-r--r--test/CXX/dcl.decl/dcl.init/p5.cpp20
-rw-r--r--test/CXX/expr/expr.unary/expr.unary.op/p4.cpp45
-rw-r--r--test/CXX/special/class.dtor/p9.cpp85
-rw-r--r--test/CXX/temp/temp.arg/temp.arg.type/p2-cxx0x.cpp20
-rw-r--r--test/CXX/temp/temp.decls/temp.friend/p4.cpp18
-rw-r--r--test/CXX/temp/temp.fct.spec/temp.deduct/sfinae-1.cpp27
-rw-r--r--test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p6.cpp18
-rw-r--r--test/CXX/temp/temp.param/p4.cpp3
-rw-r--r--test/CXX/temp/temp.spec/temp.explicit/p3.cpp27
-rw-r--r--test/CodeCompletion/enum-switch-case.c21
-rw-r--r--test/CodeCompletion/functions.cpp2
-rw-r--r--test/CodeGen/2009-04-23-dbg.c2
-rw-r--r--test/CodeGen/2009-10-20-GlobalDebug.c2
-rw-r--r--test/CodeGen/2010-08-10-DbgConstant.c5
-rw-r--r--test/CodeGen/_Bool-conversion.c12
-rw-r--r--test/CodeGen/address-space-field1.c26
-rw-r--r--test/CodeGen/address-space-field2.c46
-rw-r--r--test/CodeGen/address-space-field3.c42
-rw-r--r--test/CodeGen/address-space-field4.c55
-rw-r--r--test/CodeGen/asm-errors.c2
-rw-r--r--test/CodeGen/asm-inout.c19
-rw-r--r--test/CodeGen/asm.c22
-rw-r--r--test/CodeGen/asm_arm.c22
-rw-r--r--test/CodeGen/atomic.c15
-rw-r--r--test/CodeGen/available-externally-suppress.c15
-rw-r--r--test/CodeGen/bitfield-2.c8
-rw-r--r--test/CodeGen/block-decl-merging.c20
-rw-r--r--test/CodeGen/blockstret.c4
-rw-r--r--test/CodeGen/builtin-expect.c11
-rw-r--r--test/CodeGen/builtins-arm.c2
-rw-r--r--test/CodeGen/builtins-ppc-altivec.c987
-rw-r--r--test/CodeGen/builtins-x86.c117
-rw-r--r--test/CodeGen/const-arithmetic.c4
-rw-r--r--test/CodeGen/const-init.c7
-rw-r--r--test/CodeGen/debug-info-enum.c11
-rw-r--r--test/CodeGen/debug-info-scope.c14
-rw-r--r--test/CodeGen/designated-initializers.c27
-rw-r--r--test/CodeGen/enum2.c8
-rw-r--r--test/CodeGen/exprs.c7
-rw-r--r--test/CodeGen/fold-const-declref.c9
-rw-r--r--test/CodeGen/func-in-block.c1
-rw-r--r--test/CodeGen/lineno-dbginfo.c3
-rw-r--r--test/CodeGen/packed-structure.c89
-rw-r--r--test/CodeGen/palignr.c2
-rw-r--r--test/CodeGen/pragma-visibility.c24
-rw-r--r--test/CodeGen/statements.c9
-rw-r--r--test/CodeGen/struct-passing.c12
-rw-r--r--test/CodeGen/thread-specifier.c1
-rw-r--r--test/CodeGen/trapv.c47
-rw-r--r--test/CodeGen/unwind-attr.c24
-rw-r--r--test/CodeGen/vector.c17
-rw-r--r--test/CodeGen/x86_32-arguments.c16
-rw-r--r--test/CodeGen/x86_64-arguments.c122
-rw-r--r--test/CodeGenCXX/anonymous-namespaces.cpp38
-rw-r--r--test/CodeGenCXX/anonymous-union-member-initializer.cpp12
-rw-r--r--test/CodeGenCXX/arm.cpp274
-rw-r--r--test/CodeGenCXX/condition.cpp16
-rw-r--r--test/CodeGenCXX/copy-constructor-elim-2.cpp26
-rw-r--r--test/CodeGenCXX/debug-info-byval.cpp31
-rw-r--r--test/CodeGenCXX/debug-info-class.cpp12
-rw-r--r--test/CodeGenCXX/debug-info-ctor.cpp14
-rw-r--r--test/CodeGenCXX/debug-info-enum.cpp8
-rw-r--r--test/CodeGenCXX/debug-info-friend.cpp11
-rw-r--r--test/CodeGenCXX/debug-info-template.cpp9
-rw-r--r--test/CodeGenCXX/debug-info.cpp5
-rw-r--r--test/CodeGenCXX/delete.cpp50
-rw-r--r--test/CodeGenCXX/dependent-type-member-pointer.cpp18
-rw-r--r--test/CodeGenCXX/destructors.cpp56
-rw-r--r--test/CodeGenCXX/dyncast.cpp76
-rw-r--r--test/CodeGenCXX/eh.cpp165
-rw-r--r--test/CodeGenCXX/exceptions-no-rtti.cpp9
-rw-r--r--test/CodeGenCXX/explicit-instantiation.cpp31
-rw-r--r--test/CodeGenCXX/expr.cpp21
-rw-r--r--test/CodeGenCXX/global-init.cpp48
-rw-r--r--test/CodeGenCXX/key-function-vtable.cpp4
-rw-r--r--test/CodeGenCXX/mangle-exprs.cpp2
-rw-r--r--test/CodeGenCXX/mangle.cpp117
-rw-r--r--test/CodeGenCXX/member-function-pointers.cpp79
-rw-r--r--test/CodeGenCXX/member-functions.cpp2
-rw-r--r--test/CodeGenCXX/member-qual-debug-info.cpp20
-rw-r--r--test/CodeGenCXX/new.cpp65
-rw-r--r--test/CodeGenCXX/nonconst-init.cpp5
-rw-r--r--test/CodeGenCXX/operator-new.cpp16
-rw-r--r--test/CodeGenCXX/pointers-to-data-members.cpp30
-rw-r--r--test/CodeGenCXX/pragma-visibility.cpp72
-rw-r--r--test/CodeGenCXX/reference-cast.cpp170
-rw-r--r--test/CodeGenCXX/rtti-fundamental.cpp114
-rw-r--r--test/CodeGenCXX/rtti-linkage.cpp24
-rw-r--r--test/CodeGenCXX/static-init-2.cpp2
-rw-r--r--test/CodeGenCXX/template-anonymous-types.cpp37
-rw-r--r--test/CodeGenCXX/threadsafe-statics-exceptions.cpp2
-rw-r--r--test/CodeGenCXX/thunks.cpp14
-rw-r--r--test/CodeGenCXX/uncode-string.cpp6
-rw-r--r--test/CodeGenCXX/value-init.cpp89
-rw-r--r--test/CodeGenCXX/virt-template-vtable.cpp9
-rw-r--r--test/CodeGenCXX/volatile.cpp35
-rw-r--r--test/CodeGenCXX/vtable-linkage.cpp28
-rw-r--r--test/CodeGenCXX/vtt-layout.cpp6
-rw-r--r--test/CodeGenCXX/x86_32-arguments.cpp2
-rw-r--r--test/CodeGenCXX/x86_64-arguments.cpp74
-rw-r--r--test/CodeGenObjC/bitfield-access.m43
-rw-r--r--test/CodeGenObjC/block-var-layout.m123
-rw-r--r--test/CodeGenObjC/debug-info-linkagename.m3
-rw-r--r--test/CodeGenObjC/exceptions.m102
-rw-r--r--test/CodeGenObjC/for-in.m4
-rw-r--r--test/CodeGenObjC/fpret.m38
-rw-r--r--test/CodeGenObjC/gnu-exceptions.m29
-rw-r--r--test/CodeGenObjC/ivar-layout-nonfragile-abi2.m51
-rw-r--r--test/CodeGenObjC/property-dbg.m2
-rw-r--r--test/CodeGenObjC/return-objc-object.mm19
-rw-r--r--test/CodeGenObjC/super-dotsyntax-struct-property.m47
-rw-r--r--test/CodeGenObjC/synchronized.m56
-rw-r--r--test/CodeGenObjC/unwind-fn.m2
-rw-r--r--test/CodeGenObjC/x86_64-struct-return-gc.m2
-rw-r--r--test/CodeGenObjCXX/exceptions.mm17
-rw-r--r--test/CodeGenObjCXX/property-objects.mm8
-rw-r--r--test/CodeGenObjCXX/references.mm20
-rw-r--r--test/CodeGenObjCXX/rtti.mm52
-rw-r--r--test/Coverage/parse-callbacks.c4
-rw-r--r--test/Coverage/parse-callbacks.m4
-rw-r--r--test/Driver/at_file.c30
-rw-r--r--test/Driver/at_file.c.args11
-rw-r--r--test/Driver/bindings.c6
-rw-r--r--test/Driver/cxx-pth.cpp12
-rw-r--r--test/Driver/darwin-as.c10
-rw-r--r--test/Driver/darwin-cc.c4
-rw-r--r--test/Driver/darwin-debug-flags.c2
-rw-r--r--test/Driver/darwin-ld.c37
-rw-r--r--test/Driver/darwin-xarch.c8
-rw-r--r--test/Driver/freebsd.c26
-rw-r--r--test/Driver/gcc_forward.c13
-rw-r--r--test/Driver/rewrite-objc.m6
-rw-r--r--test/FixIt/fixit.c3
-rw-r--r--test/Frontend/Inputs/lit.local.cfg1
-rw-r--r--test/Frontend/Inputs/test.h1
-rw-r--r--test/Frontend/Inputs/test2.h1
-rw-r--r--test/Frontend/Inputs/test3.h1
-rw-r--r--test/Frontend/print-header-includes.c8
-rw-r--r--test/Headers/x86-intrinsics-headers.c29
-rw-r--r--test/Index/Inputs/crash-recovery-code-complete-remap.c12
-rw-r--r--test/Index/Inputs/crash-recovery-reparse-remap.c11
-rw-r--r--test/Index/Inputs/preamble-reparse-1.c2
-rw-r--r--test/Index/Inputs/preamble-reparse-2.c1
-rw-r--r--test/Index/Inputs/preamble.h6
-rw-r--r--test/Index/Inputs/prefix.h4
-rw-r--r--test/Index/TestClassDecl.m2
-rw-r--r--test/Index/annotate-tokens-pp.c131
-rw-r--r--test/Index/annotate-tokens.c15
-rw-r--r--test/Index/annotate-tokens.cpp23
-rw-r--r--test/Index/annotate-tokens.m106
-rw-r--r--test/Index/c-index-api-loadTU-test.m13
-rw-r--r--test/Index/cindex-from-source.m3
-rw-r--r--test/Index/code-completion.cpp28
-rw-r--r--test/Index/complete-at-exprstmt.m18
-rw-r--r--test/Index/complete-blocks.m24
-rw-r--r--test/Index/complete-ctor-inits.cpp40
-rw-r--r--test/Index/complete-declarators.cpp39
-rw-r--r--test/Index/complete-declarators.m45
-rw-r--r--test/Index/complete-exprs.c31
-rw-r--r--test/Index/complete-hiding.c29
-rw-r--r--test/Index/complete-macros.c3
-rw-r--r--test/Index/complete-memfunc-cvquals.cpp86
-rw-r--r--test/Index/complete-method-decls.m116
-rw-r--r--test/Index/complete-natural.m56
-rw-r--r--test/Index/complete-objc-message-id.m12
-rw-r--r--test/Index/complete-objc-message.m97
-rw-r--r--test/Index/complete-pch.m12
-rw-r--r--test/Index/complete-preprocessor.m80
-rw-r--r--test/Index/complete-recovery.m2
-rw-r--r--test/Index/complete-super.cpp33
-rw-r--r--test/Index/complete-super.m55
-rw-r--r--test/Index/complete-templates.cpp19
-rw-r--r--test/Index/complete-unterminated.c30
-rw-r--r--test/Index/crash-recovery-code-complete.c10
-rw-r--r--test/Index/crash-recovery-reparse.c10
-rw-r--r--test/Index/crash-recovery.c7
-rw-r--r--test/Index/index-templates.cpp147
-rw-r--r--test/Index/invalid-rdar-8236270.cpp11
-rw-r--r--test/Index/load-classes.cpp28
-rw-r--r--test/Index/load-decls.c16
-rw-r--r--test/Index/load-namespaces.cpp50
-rw-r--r--test/Index/load-stmts.cpp105
-rw-r--r--test/Index/local-symbols.m18
-rw-r--r--test/Index/preamble-reparse.c2
-rw-r--r--test/Index/preamble.c28
-rw-r--r--test/Index/print-typekind.c27
-rw-r--r--test/Index/rdar-8288645-invalid-code.mm8
-rw-r--r--test/Index/usrs.cpp53
-rw-r--r--test/Index/usrs.m61
-rw-r--r--test/Lexer/c90.c16
-rw-r--r--test/Lexer/constants.c3
-rw-r--r--test/Lexer/has_feature_cxx0x.cpp10
-rw-r--r--test/Lexer/ms-extensions.c (renamed from test/Lexer/constants-ms.c)16
-rw-r--r--test/Lexer/preamble.c37
-rw-r--r--test/Makefile4
-rw-r--r--test/PCH/Inputs/chain-cxx1.h19
-rw-r--r--test/PCH/Inputs/chain-cxx2.h32
-rw-r--r--test/PCH/Inputs/chain-decls1.h11
-rw-r--r--test/PCH/Inputs/chain-decls2.h12
-rw-r--r--test/PCH/Inputs/chain-ext_vector1.h3
-rw-r--r--test/PCH/Inputs/chain-ext_vector2.h3
-rw-r--r--test/PCH/Inputs/chain-external-defs1.h13
-rw-r--r--test/PCH/Inputs/chain-external-defs2.h11
-rw-r--r--test/PCH/Inputs/chain-macro-override1.h4
-rw-r--r--test/PCH/Inputs/chain-macro-override2.h4
-rw-r--r--test/PCH/Inputs/chain-macro1.h1
-rw-r--r--test/PCH/Inputs/chain-macro2.h1
-rw-r--r--test/PCH/Inputs/chain-selectors1.h12
-rw-r--r--test/PCH/Inputs/chain-selectors2.h11
-rw-r--r--test/PCH/Inputs/chain-trivial1.h0
-rw-r--r--test/PCH/Inputs/chain-trivial2.h0
-rw-r--r--test/PCH/Inputs/preamble.h1
-rw-r--r--test/PCH/chain-cxx.cpp28
-rw-r--r--test/PCH/chain-decls.c27
-rw-r--r--test/PCH/chain-ext_vector.c11
-rw-r--r--test/PCH/chain-external-defs.c54
-rw-r--r--test/PCH/chain-macro-override.c13
-rw-r--r--test/PCH/chain-macro.c9
-rw-r--r--test/PCH/chain-predecl.h3
-rw-r--r--test/PCH/chain-predecl.m16
-rw-r--r--test/PCH/chain-selectors.m24
-rw-r--r--test/PCH/chain-trivial.c4
-rw-r--r--test/PCH/cxx-offsetof-base.cpp2
-rw-r--r--test/PCH/cxx-offsetof-base.h5
-rw-r--r--test/PCH/cxx-required-decls.cpp10
-rw-r--r--test/PCH/cxx-required-decls.h12
-rw-r--r--test/PCH/cxx-static_assert.cpp11
-rw-r--r--test/PCH/cxx-static_assert.h9
-rw-r--r--test/PCH/cxx-templates.cpp14
-rw-r--r--test/PCH/cxx-templates.h37
-rw-r--r--test/PCH/cxx-traits.cpp8
-rw-r--r--test/PCH/cxx-traits.h11
-rw-r--r--test/PCH/cxx-typeid.cpp9
-rw-r--r--test/PCH/cxx-typeid.h3
-rw-r--r--test/PCH/namespaces.cpp7
-rw-r--r--test/PCH/objcxx-ivar-class.h15
-rw-r--r--test/PCH/objcxx-ivar-class.mm15
-rw-r--r--test/PCH/pragma-weak.c10
-rw-r--r--test/PCH/pragma-weak.h10
-rw-r--r--test/PCH/preamble.c21
-rw-r--r--test/PCH/pth.c7
-rw-r--r--test/PCH/pth.h12
-rw-r--r--test/PCH/reinclude.cpp8
-rw-r--r--test/PCH/reinclude1.h4
-rw-r--r--test/PCH/reinclude2.h1
-rw-r--r--test/PCH/selector-warning.h24
-rw-r--r--test/PCH/selector-warning.m19
-rwxr-xr-xtest/Parser/2008-10-31-parse-noop-failure.c4
-rw-r--r--test/Parser/MicrosoftExtensions.c4
-rw-r--r--test/Parser/asm-constraints-pr7869.c45
-rw-r--r--test/Parser/asm.c3
-rw-r--r--test/Parser/block-block-storageclass.c4
-rw-r--r--test/Parser/block-pointer-decl.c4
-rw-r--r--test/Parser/cxx-altivec.cpp35
-rw-r--r--test/Parser/cxx-ambig-decl-expr-xfail.cpp16
-rw-r--r--test/Parser/cxx-ambig-decl-expr.cpp10
-rw-r--r--test/Parser/cxx-attributes.cpp18
-rw-r--r--test/Parser/cxx-condition.cpp4
-rw-r--r--test/Parser/cxx-decl.cpp7
-rw-r--r--test/Parser/cxx-default-args.cpp7
-rw-r--r--test/Parser/cxx-namespace-alias.cpp7
-rw-r--r--test/Parser/cxx-typeof.cpp6
-rw-r--r--test/Parser/declarators.c3
-rw-r--r--test/Parser/expressions.c30
-rw-r--r--test/Parser/expressions.m2
-rw-r--r--test/Parser/method-prototype-1.m2
-rw-r--r--test/Parser/objc-messaging-1.m27
-rw-r--r--test/Parser/pragma-options.c10
-rw-r--r--test/Parser/pragma-visibility.c9
-rw-r--r--test/Parser/selector-1.m2
-rw-r--r--test/Parser/typeof.c7
-rw-r--r--test/Parser/types.c2
-rw-r--r--test/Preprocessor/dump-macros-undef.c8
-rw-r--r--test/Preprocessor/init.c10
-rw-r--r--test/Preprocessor/macro_fn_comma_swallow.c23
-rw-r--r--test/Preprocessor/macro_paste_msextensions.c (renamed from test/Preprocessor/macro_paste_mscomment.c)8
-rw-r--r--test/Preprocessor/pragma-pushpop-macro.c33
-rw-r--r--test/Preprocessor/pragma_diagnostic.c3
-rw-r--r--test/Preprocessor/pragma_microsoft.c20
-rw-r--r--test/Preprocessor/pushable-diagnostics.c2
-rw-r--r--test/Rewriter/rewrite-block-consts.mm19
-rw-r--r--test/Rewriter/rewrite-constructor-init.mm24
-rw-r--r--test/Sema/altivec-init.c19
-rw-r--r--test/Sema/array-init.c8
-rw-r--r--test/Sema/array-size-64.c7
-rw-r--r--test/Sema/array-size.c10
-rw-r--r--test/Sema/block-misc.c5
-rw-r--r--test/Sema/builtins-arm.c11
-rw-r--r--test/Sema/builtins.c20
-rw-r--r--test/Sema/cast-incomplete.c14
-rw-r--r--test/Sema/compound-literal.c2
-rw-r--r--test/Sema/const-eval.c8
-rw-r--r--test/Sema/enum.c6
-rw-r--r--test/Sema/expr-comma-c89.c6
-rw-r--r--test/Sema/expr-comma.c8
-rw-r--r--test/Sema/exprs.c5
-rw-r--r--test/Sema/ext_vector_casts.c2
-rw-r--r--test/Sema/format-strings-scanf.c34
-rw-r--r--test/Sema/format-strings.c17
-rw-r--r--test/Sema/knr-def-call.c11
-rw-r--r--test/Sema/overloadable.c11
-rw-r--r--test/Sema/pragma-align-packed.c7
-rw-r--r--test/Sema/recover-goto.c3
-rw-r--r--test/Sema/scope-check.c32
-rw-r--r--test/Sema/switch.c6
-rw-r--r--test/Sema/typedef-variable-type.c7
-rw-r--r--test/Sema/vector-ops.c25
-rw-r--r--test/Sema/warn-cast-align.c41
-rw-r--r--test/Sema/warn-unused-function.c12
-rw-r--r--test/Sema/warn-write-strings.c6
-rw-r--r--test/SemaCXX/MicrosoftExtensions.cpp44
-rw-r--r--test/SemaCXX/abstract.cpp71
-rw-r--r--test/SemaCXX/access-member-pointer.cpp11
-rw-r--r--test/SemaCXX/addr-of-overloaded-function.cpp10
-rw-r--r--test/SemaCXX/altivec.cpp18
-rw-r--r--test/SemaCXX/anonymous-struct.cpp11
-rw-r--r--test/SemaCXX/attr-unavailable.cpp6
-rw-r--r--test/SemaCXX/blocks.cpp27
-rw-r--r--test/SemaCXX/borland-extensions.cpp26
-rw-r--r--test/SemaCXX/constructor-initializer.cpp14
-rw-r--r--test/SemaCXX/conversion-function.cpp122
-rw-r--r--test/SemaCXX/copy-assignment.cpp12
-rw-r--r--test/SemaCXX/crash-PR7625.cpp6
-rw-r--r--test/SemaCXX/decltype.cpp18
-rw-r--r--test/SemaCXX/default-constructor-initializers.cpp8
-rw-r--r--test/SemaCXX/destructor.cpp16
-rw-r--r--test/SemaCXX/enum.cpp5
-rw-r--r--test/SemaCXX/exception-spec.cpp12
-rw-r--r--test/SemaCXX/expressions.cpp7
-rw-r--r--test/SemaCXX/flexible-array-test.cpp10
-rw-r--r--test/SemaCXX/i-c-e-cxx.cpp2
-rw-r--r--test/SemaCXX/increment-decrement.cpp (renamed from test/SemaCXX/inc-decrement-qualifiers.cpp)5
-rw-r--r--test/SemaCXX/linkage-spec.cpp32
-rw-r--r--test/SemaCXX/member-expr.cpp14
-rw-r--r--test/SemaCXX/member-pointer-ms.cpp14
-rw-r--r--test/SemaCXX/member-pointer.cpp102
-rw-r--r--test/SemaCXX/new-delete.cpp44
-rw-r--r--test/SemaCXX/offsetof.cpp13
-rw-r--r--test/SemaCXX/overload-call-copycon.cpp28
-rw-r--r--test/SemaCXX/qualified-member-enum.cpp10
-rw-r--r--test/SemaCXX/return-noreturn.cpp5
-rw-r--r--test/SemaCXX/return-stack-addr.cpp11
-rw-r--r--test/SemaCXX/scope-check.cpp30
-rw-r--r--test/SemaCXX/switch.cpp3
-rw-r--r--test/SemaCXX/type-traits.cpp130
-rw-r--r--test/SemaCXX/unary-real-imag.cpp6
-rw-r--r--test/SemaCXX/unreachable-code.cpp17
-rw-r--r--test/SemaCXX/vector-no-lax.cpp9
-rw-r--r--test/SemaCXX/vector.cpp14
-rw-r--r--test/SemaCXX/virtual-base-used.cpp42
-rw-r--r--test/SemaCXX/warn-cast-align.cpp45
-rw-r--r--test/SemaCXX/warn-for-var-in-else.cpp45
-rw-r--r--test/SemaCXX/warn-global-constructors.cpp81
-rw-r--r--test/SemaCXX/warn-unused-filescoped.cpp56
-rw-r--r--test/SemaObjC/block-type-safety.m17
-rw-r--r--test/SemaObjC/compare-qualified-class.m30
-rw-r--r--test/SemaObjC/comptypes-5.m4
-rw-r--r--test/SemaObjC/conflict-nonfragile-abi2.m34
-rw-r--r--test/SemaObjC/crash-label.m11
-rw-r--r--test/SemaObjC/default-synthesize-1.m116
-rw-r--r--test/SemaObjC/deref-interface.m2
-rw-r--r--test/SemaObjC/iboutletcollection-attr.m30
-rw-r--r--test/SemaObjC/method-lookup-3.m5
-rw-r--r--test/SemaObjC/method-no-context.m3
-rw-r--r--test/SemaObjC/nonnull.m2
-rw-r--r--test/SemaObjC/property-and-ivar-use.m36
-rw-r--r--test/SemaObjC/property-not-lvalue.m6
-rw-r--r--test/SemaObjC/protocol-attribute.m6
-rw-r--r--test/SemaObjC/protocols.m4
-rw-r--r--test/SemaObjC/static-ivar-ref-1.m18
-rw-r--r--test/SemaObjC/synth-provisional-ivars.m50
-rw-r--r--test/SemaObjC/warn-strict-selector-match.m75
-rw-r--r--test/SemaObjCXX/conversion-to-objc-pointer-2.mm3
-rw-r--r--test/SemaObjCXX/cxxoperator-selector.mm24
-rw-r--r--test/SemaObjCXX/deduction.mm7
-rw-r--r--test/SemaObjCXX/exceptions-fragile.mm12
-rw-r--r--test/SemaObjCXX/expr-objcxx.mm4
-rw-r--r--test/SemaObjCXX/foreach-block.mm14
-rw-r--r--test/SemaObjCXX/instantiate-stmt.mm1
-rw-r--r--test/SemaObjCXX/message.mm2
-rw-r--r--test/SemaObjCXX/objc-decls-inside-namespace.mm5
-rw-r--r--test/SemaObjCXX/pointer-to-objc-pointer-conv.mm28
-rw-r--r--test/SemaObjCXX/references.mm36
-rw-r--r--test/SemaObjCXX/warn-strict-selector-match.mm18
-rw-r--r--test/SemaTemplate/class-template-id.cpp4
-rw-r--r--test/SemaTemplate/crash-8204126.cpp6
-rw-r--r--test/SemaTemplate/current-instantiation.cpp35
-rw-r--r--test/SemaTemplate/deduction-crash.cpp2
-rw-r--r--test/SemaTemplate/deduction.cpp29
-rw-r--r--test/SemaTemplate/dependent-base-member-init.cpp9
-rw-r--r--test/SemaTemplate/dependent-class-member-operator.cpp11
-rw-r--r--test/SemaTemplate/dependent-expr.cpp5
-rw-r--r--test/SemaTemplate/inject-templated-friend-post.cpp72
-rw-r--r--test/SemaTemplate/inject-templated-friend.cpp48
-rw-r--r--test/SemaTemplate/instantiate-anonymous-union.cpp19
-rw-r--r--test/SemaTemplate/instantiate-attr.cpp13
-rw-r--r--test/SemaTemplate/instantiate-clang.cpp2
-rw-r--r--test/SemaTemplate/instantiate-declref.cpp10
-rw-r--r--test/SemaTemplate/instantiate-expr-3.cpp10
-rw-r--r--test/SemaTemplate/instantiate-expr-4.cpp2
-rw-r--r--test/SemaTemplate/instantiate-function-1.cpp6
-rw-r--r--test/SemaTemplate/instantiate-member-template.cpp14
-rw-r--r--test/SemaTemplate/member-access-expr.cpp11
-rw-r--r--test/SemaTemplate/member-template-access-expr.cpp19
-rw-r--r--test/SemaTemplate/nested-name-spec-template.cpp11
-rw-r--r--test/SemaTemplate/recovery-crash.cpp19
-rw-r--r--test/SemaTemplate/temp.cpp18
-rw-r--r--test/SemaTemplate/temp_arg_nontype.cpp40
-rw-r--r--test/SemaTemplate/temp_arg_template.cpp18
-rw-r--r--test/SemaTemplate/temp_arg_type.cpp4
-rw-r--r--test/lit.cfg6
-rw-r--r--tools/c-index-test/CMakeLists.txt3
-rw-r--r--tools/c-index-test/Makefile5
-rw-r--r--tools/c-index-test/c-index-test.c268
-rw-r--r--tools/driver/CMakeLists.txt5
-rw-r--r--tools/driver/Info.plist.in18
-rw-r--r--tools/driver/Makefile33
-rw-r--r--tools/driver/cc1_main.cpp149
-rw-r--r--tools/driver/cc1as_main.cpp41
-rw-r--r--tools/driver/driver.cpp160
-rw-r--r--tools/libclang/CIndex.cpp1131
-rw-r--r--tools/libclang/CIndexCXX.cpp124
-rw-r--r--tools/libclang/CIndexCodeCompletion.cpp306
-rw-r--r--tools/libclang/CIndexDiagnostic.cpp27
-rw-r--r--tools/libclang/CIndexUSRs.cpp237
-rw-r--r--tools/libclang/CMakeLists.txt27
-rw-r--r--tools/libclang/CXCursor.cpp98
-rw-r--r--tools/libclang/CXCursor.h28
-rw-r--r--tools/libclang/CXType.cpp (renamed from tools/libclang/CXTypes.cpp)13
-rw-r--r--tools/libclang/CXType.h29
-rw-r--r--tools/libclang/Makefile26
-rw-r--r--tools/libclang/libclang.darwin.exports19
-rw-r--r--tools/libclang/libclang.exports19
-rw-r--r--www/analyzer/latest_checker.html.incl2
-rw-r--r--www/compatibility.html75
-rw-r--r--www/cxx_status.html4
-rw-r--r--www/get_started.html2
-rw-r--r--www/hacking.html5
-rw-r--r--www/menu.html.incl2
947 files changed, 63717 insertions, 33921 deletions
diff --git a/clang.xcodeproj/project.pbxproj b/clang.xcodeproj/project.pbxproj
index 40c1f5f458cd..2a256450887b 100644
--- a/clang.xcodeproj/project.pbxproj
+++ b/clang.xcodeproj/project.pbxproj
@@ -9,15 +9,11 @@
/* Begin PBXBuildFile section */
03F50AC60D416EAA00B9CF60 /* Targets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 03F50AC50D416EAA00B9CF60 /* Targets.cpp */; };
1A2193CE0F45EEB700C0713D /* Mangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2193CC0F45EEB700C0713D /* Mangle.cpp */; };
- 1A2A54B50FD1DD1C00F4CE45 /* AnalysisConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */; };
1A2A54B60FD1DD1C00F4CE45 /* ASTConsumers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */; };
1A2A54B80FD1DD1C00F4CE45 /* CacheTokens.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */; };
1A2A54B90FD1DD1C00F4CE45 /* DependencyFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A80FD1DD1C00F4CE45 /* DependencyFile.cpp */; };
1A2A54BA0FD1DD1C00F4CE45 /* DiagChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A90FD1DD1C00F4CE45 /* DiagChecker.cpp */; };
1A2A54BB0FD1DD1C00F4CE45 /* DocumentXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AA0FD1DD1C00F4CE45 /* DocumentXML.cpp */; };
- 1A2A54BC0FD1DD1C00F4CE45 /* GeneratePCH.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AB0FD1DD1C00F4CE45 /* GeneratePCH.cpp */; };
- 1A2A54BD0FD1DD1C00F4CE45 /* HTMLPrint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AC0FD1DD1C00F4CE45 /* HTMLPrint.cpp */; };
- 1A2A54BE0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AD0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp */; };
1A2A54BF0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AE0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp */; };
1A2A54C40FD1DD1C00F4CE45 /* StmtXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B30FD1DD1C00F4CE45 /* StmtXML.cpp */; };
1A2A54C50FD1DD1C00F4CE45 /* Warnings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */; };
@@ -93,12 +89,9 @@
1ADF47AF0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */; };
1AF1B50F109A4FB800AFAFAC /* CGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */; };
1AFDD8721161085D00AE030A /* ASTMerge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFDD8701161085D00AE030A /* ASTMerge.cpp */; };
- 1AFDD8731161085D00AE030A /* CodeGenAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */; };
1AFF8AE31012BFC900D248DA /* CGRecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */; };
3507E4C20E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */; };
- 352246E70F5C6BE000D0D279 /* HTMLDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */; };
352246E80F5C6BE000D0D279 /* InitHeaderSearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */; };
- 352246EA0F5C6BE000D0D279 /* PlistDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E40F5C6BE000D0D279 /* PlistDiagnostics.cpp */; };
352246EB0F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */; };
352246EC0F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */; };
352712510DAFE54700C76352 /* IdentifierResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352712500DAFE54700C76352 /* IdentifierResolver.cpp */; };
@@ -142,10 +135,16 @@
35EFEFB60DB67ED60020783D /* GRTransferFuncs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35EFEFB50DB67ED60020783D /* GRTransferFuncs.cpp */; };
35F2A01E0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35F2A01D0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp */; };
35F8D0D60D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35F8D0D50D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp */; };
+ 57AA9250121C8B9400B4AA6C /* ASTReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57AA924D121C8B9400B4AA6C /* ASTReader.cpp */; };
+ 57AA9251121C8B9400B4AA6C /* ASTReaderDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57AA924E121C8B9400B4AA6C /* ASTReaderDecl.cpp */; };
+ 57AA9252121C8B9400B4AA6C /* ASTReaderStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57AA924F121C8B9400B4AA6C /* ASTReaderStmt.cpp */; };
+ 57EB566A121B034300ECA335 /* GeneratePCH.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57EB5662121B034300ECA335 /* GeneratePCH.cpp */; };
+ 57EB566B121B034300ECA335 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 57EB5663121B034300ECA335 /* Makefile */; };
+ 57F66612121B4DE600DCE3B7 /* ASTWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57F6660F121B4DE600DCE3B7 /* ASTWriter.cpp */; };
+ 57F66613121B4DE600DCE3B7 /* ASTWriterDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57F66610121B4DE600DCE3B7 /* ASTWriterDecl.cpp */; };
+ 57F66614121B4DE600DCE3B7 /* ASTWriterStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57F66611121B4DE600DCE3B7 /* ASTWriterStmt.cpp */; };
72D16C1F0D9975C400E6DA4A /* HTMLRewrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 72D16C1E0D9975C400E6DA4A /* HTMLRewrite.cpp */; };
84AF36A10CB17A3B00C820A5 /* DeclObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 84AF36A00CB17A3B00C820A5 /* DeclObjC.h */; };
- 84D9A8880C1A57E100AC7ABC /* AttributeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84D9A8870C1A57E100AC7ABC /* AttributeList.cpp */; };
- 84D9A88C0C1A581300AC7ABC /* AttributeList.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 84D9A88B0C1A581300AC7ABC /* AttributeList.h */; };
9012911D1048068D0083456D /* ASTUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9012911C1048068D0083456D /* ASTUnit.cpp */; };
90129121104812F90083456D /* CIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9012911F104812F90083456D /* CIndex.cpp */; };
906BF4B00F83BA2E001071FA /* ConvertUTF.c in Sources */ = {isa = PBXBuildFile; fileRef = 906BF4AF0F83BA2E001071FA /* ConvertUTF.c */; };
@@ -159,7 +158,6 @@
90FD6D81103C3D49005F5B73 /* Indexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D75103C3D49005F5B73 /* Indexer.cpp */; };
90FD6D82103C3D49005F5B73 /* IndexProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D76103C3D49005F5B73 /* IndexProvider.cpp */; };
90FD6D83103C3D49005F5B73 /* Program.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D77103C3D49005F5B73 /* Program.cpp */; };
- 90FD6D84103C3D49005F5B73 /* ResolveLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D79103C3D49005F5B73 /* ResolveLocation.cpp */; };
90FD6D85103C3D49005F5B73 /* SelectorMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D7A103C3D49005F5B73 /* SelectorMap.cpp */; };
90FD6DB6103D977E005F5B73 /* index-test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6DB5103D977E005F5B73 /* index-test.cpp */; };
BDF87CF70FD746F300BBF872 /* SemaTemplateDeduction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */; };
@@ -168,6 +166,20 @@
BF89C3F911595A01001C2D68 /* SemaType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3F811595A01001C2D68 /* SemaType.cpp */; };
BF89C3FB11595A37001C2D68 /* SemaCodeComplete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */; };
BF89C3FD11595A5D001C2D68 /* SemaExceptionSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */; };
+ BF9FEDF91225E67B003A8B71 /* Action.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEDF81225E67B003A8B71 /* Action.cpp */; };
+ BF9FEDFB1225E6A9003A8B71 /* AttributeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEDFA1225E6A9003A8B71 /* AttributeList.cpp */; };
+ BF9FEDFD1225E6C6003A8B71 /* DeclSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEDFC1225E6C6003A8B71 /* DeclSpec.cpp */; };
+ BF9FEDFF1225E6DD003A8B71 /* TargetAttributesSema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEDFE1225E6DD003A8B71 /* TargetAttributesSema.cpp */; };
+ BF9FEE021225E73F003A8B71 /* ExprClassification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE011225E73F003A8B71 /* ExprClassification.cpp */; };
+ BF9FEE041225E759003A8B71 /* ItaniumCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE031225E759003A8B71 /* ItaniumCXXABI.cpp */; };
+ BF9FEE061225E770003A8B71 /* MicrosoftCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE051225E770003A8B71 /* MicrosoftCXXABI.cpp */; };
+ BF9FEE2C1225E7EA003A8B71 /* BackendUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE2B1225E7EA003A8B71 /* BackendUtil.cpp */; };
+ BF9FEE311225E86C003A8B71 /* CodeGenAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE301225E86C003A8B71 /* CodeGenAction.cpp */; };
+ BF9FEE331225E898003A8B71 /* ItaniumCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE321225E898003A8B71 /* ItaniumCXXABI.cpp */; };
+ BF9FEE351225E8B1003A8B71 /* MicrosoftCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE341225E8B1003A8B71 /* MicrosoftCXXABI.cpp */; };
+ BF9FEE381225E925003A8B71 /* BoostConAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE371225E925003A8B71 /* BoostConAction.cpp */; };
+ BF9FEE521226FE9F003A8B71 /* ParseAST.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEE511226FE9F003A8B71 /* ParseAST.cpp */; };
+ BF9FEEF2122D8068003A8B71 /* PreprocessingRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF9FEEF1122D8068003A8B71 /* PreprocessingRecord.cpp */; };
BFE2F6AB11DA955A0007EDC0 /* DeltaTree.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F67D11DA95590007EDC0 /* DeltaTree.d */; };
BFE2F6AC11DA955A0007EDC0 /* DeltaTree.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F67E11DA955A0007EDC0 /* DeltaTree.o */; };
BFE2F6AD11DA955A0007EDC0 /* FixItRewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F67F11DA955A0007EDC0 /* FixItRewriter.d */; };
@@ -179,15 +191,8 @@
BFE2F6B311DA955A0007EDC0 /* HTMLRewrite.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */; };
BFE2F6B411DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */; };
BFE2F6B511DA955A0007EDC0 /* RewriteMacros.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */; };
- BFE2F6B611DA955A0007EDC0 /* RewriteMacros.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68811DA955A0007EDC0 /* RewriteMacros.o */; };
BFE2F6B711DA955A0007EDC0 /* RewriteObjC.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */; };
- BFE2F6B811DA955A0007EDC0 /* RewriteObjC.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68A11DA955A0007EDC0 /* RewriteObjC.o */; };
BFE2F6B911DA955A0007EDC0 /* Rewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68B11DA955A0007EDC0 /* Rewriter.d */; };
- BFE2F6BA11DA955A0007EDC0 /* Rewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68C11DA955A0007EDC0 /* Rewriter.o */; };
- BFE2F6BB11DA955A0007EDC0 /* RewriteRope.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68D11DA955A0007EDC0 /* RewriteRope.d */; };
- BFE2F6BC11DA955A0007EDC0 /* RewriteRope.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68E11DA955A0007EDC0 /* RewriteRope.o */; };
- BFE2F6BD11DA955A0007EDC0 /* RewriteTest.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68F11DA955A0007EDC0 /* RewriteTest.d */; };
- BFE2F6BE11DA955A0007EDC0 /* RewriteTest.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69011DA955A0007EDC0 /* RewriteTest.o */; };
BFE2F6BF11DA955A0007EDC0 /* TokenRewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */; };
BFE2F6C011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */; };
BFE2F6C111DA955A0007EDC0 /* DeltaTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69311DA955A0007EDC0 /* DeltaTree.cpp */; };
@@ -201,9 +206,6 @@
BFE2F6C911DA955A0007EDC0 /* HTMLRewrite.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */; };
BFE2F6CA11DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */; };
BFE2F6CB11DA955A0007EDC0 /* Rewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69F11DA955A0007EDC0 /* Rewriter.d */; };
- BFE2F6CC11DA955A0007EDC0 /* Rewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F6A011DA955A0007EDC0 /* Rewriter.o */; };
- BFE2F6CD11DA955A0007EDC0 /* RewriteRope.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A111DA955A0007EDC0 /* RewriteRope.d */; };
- BFE2F6CE11DA955A0007EDC0 /* RewriteRope.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F6A211DA955A0007EDC0 /* RewriteRope.o */; };
BFE2F6CF11DA955A0007EDC0 /* TokenRewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */; };
BFE2F6D011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */; };
BFE2F6D111DA955A0007EDC0 /* RewriteMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A511DA955A0007EDC0 /* RewriteMacros.cpp */; };
@@ -215,12 +217,8 @@
DE01DA490B12ADA300AC22CE /* PPCallbacks.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE01DA480B12ADA300AC22CE /* PPCallbacks.h */; };
DE06756C0C051CFE00EBBFD8 /* ParseExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */; };
DE06B73E0A8307640050E87E /* LangOptions.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06B73D0A8307640050E87E /* LangOptions.h */; };
- DE06BECB0A854E4B0050E87E /* Scope.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06BECA0A854E4B0050E87E /* Scope.h */; };
DE06D4310A8BB52D0050E87E /* Parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06D42F0A8BB52D0050E87E /* Parser.cpp */; };
- DE06E8140A8FF9330050E87E /* Action.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06E8130A8FF9330050E87E /* Action.h */; };
DE0FCA630A95859D00248FD5 /* Expr.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE0FCA620A95859D00248FD5 /* Expr.h */; };
- DE17336E0B068DC20080B521 /* DeclSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE17336D0B068DC20080B521 /* DeclSpec.cpp */; };
- DE1733700B068DC60080B521 /* DeclSpec.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE17336F0B068DC60080B521 /* DeclSpec.h */; };
DE1F22030A7D852A00FBF588 /* Parser.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE1F22020A7D852A00FBF588 /* Parser.h */; };
DE224FF80C7AA98800D370A5 /* CGExprComplex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE224FF70C7AA98800D370A5 /* CGExprComplex.cpp */; };
DE2252700C7E82D000D370A5 /* CGExprScalar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE22526F0C7E82D000D370A5 /* CGExprScalar.cpp */; };
@@ -231,13 +229,11 @@
DE3450D70AEB543100DBC861 /* DirectoryLookup.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3450D60AEB543100DBC861 /* DirectoryLookup.h */; };
DE3452810AEF1B1800DBC861 /* Stmt.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3452800AEF1B1800DBC861 /* Stmt.h */; };
DE345C1A0AFC658B00DBC861 /* StmtVisitor.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE345C190AFC658B00DBC861 /* StmtVisitor.h */; };
- DE345F220AFD347900DBC861 /* StmtNodes.def in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE345F210AFD347900DBC861 /* StmtNodes.def */; };
DE3460000AFDCC1900DBC861 /* ParseObjc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE345FFF0AFDCC1900DBC861 /* ParseObjc.cpp */; };
DE3460050AFDCC6500DBC861 /* ParseInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3460040AFDCC6500DBC861 /* ParseInit.cpp */; };
DE34600B0AFDCCBF00DBC861 /* ParseStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE34600A0AFDCCBF00DBC861 /* ParseStmt.cpp */; };
DE34600F0AFDCCCE00DBC861 /* ParseDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE34600E0AFDCCCE00DBC861 /* ParseDecl.cpp */; };
DE3460130AFDCCDA00DBC861 /* ParseExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3460120AFDCCDA00DBC861 /* ParseExpr.cpp */; };
- DE3461270AFE68BE00DBC861 /* MinimalAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3461260AFE68BE00DBC861 /* MinimalAction.cpp */; };
DE3464220B03040900DBC861 /* Type.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3464210B03040900DBC861 /* Type.h */; };
DE37252E0FE481AD00CF2CC2 /* Builtins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE37252D0FE481AD00CF2CC2 /* Builtins.cpp */; };
DE38CD500D794D0100A273B6 /* CGObjCGNU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE38CD4F0D794D0100A273B6 /* CGObjCGNU.cpp */; };
@@ -261,10 +257,7 @@
DE67E70F0C020ECF00F66BC5 /* SemaExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */; };
DE67E7110C020ED400F66BC5 /* SemaExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */; };
DE67E7130C020ED900F66BC5 /* SemaDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7120C020ED900F66BC5 /* SemaDecl.cpp */; };
- DE67E7150C020EDF00F66BC5 /* Sema.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE67E7140C020EDF00F66BC5 /* Sema.h */; };
DE67E7170C020EE400F66BC5 /* Sema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7160C020EE400F66BC5 /* Sema.cpp */; };
- DE67E71A0C020F4F00F66BC5 /* ParseAST.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */; };
- DE67E7280C02109800F66BC5 /* ParseAST.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE67E7270C02109800F66BC5 /* ParseAST.h */; };
DE6951C70C4D1F5D00A5826B /* RecordLayout.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6951C60C4D1F5D00A5826B /* RecordLayout.h */; };
DE6954640C5121BD00A5826B /* Token.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6954630C5121BD00A5826B /* Token.h */; };
DE704B260D0FBEBE009C7762 /* SemaDeclObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */; };
@@ -290,10 +283,6 @@
DECAB0D00DB3C84200E13CCB /* RewriteRope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECAB0CF0DB3C84200E13CCB /* RewriteRope.cpp */; };
DECB6D650F9AE26600F5FBC7 /* JumpDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB6D640F9AE26600F5FBC7 /* JumpDiagnostics.cpp */; };
DECB6F070F9D93A800F5FBC7 /* InitPreprocessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB6F060F9D93A800F5FBC7 /* InitPreprocessor.cpp */; };
- DECB77130FA5752300F5FBC7 /* PCHReaderStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB77120FA5752300F5FBC7 /* PCHReaderStmt.cpp */; };
- DECB77790FA579B000F5FBC7 /* PCHReaderDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB77780FA579B000F5FBC7 /* PCHReaderDecl.cpp */; };
- DECB77F70FA5850200F5FBC7 /* PCHWriterDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB77F60FA5850200F5FBC7 /* PCHWriterDecl.cpp */; };
- DECB78170FA5882F00F5FBC7 /* PCHWriterStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB78160FA5882F00F5FBC7 /* PCHWriterStmt.cpp */; };
DED626C90AE0C065001E80A4 /* TargetInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED626C80AE0C065001E80A4 /* TargetInfo.cpp */; };
DED7D7410A524295003AD0FB /* Diagnostic.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7310A524295003AD0FB /* Diagnostic.h */; };
DED7D7430A524295003AD0FB /* FileManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7330A524295003AD0FB /* FileManager.h */; };
@@ -336,9 +325,6 @@
DEEBBD440C19C5D200A9FE82 /* TODO.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEEBBD430C19C5D200A9FE82 /* TODO.txt */; };
DEEBC3BA0C2363B800A9FE82 /* CodeGenTypes.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEEBC3B90C2363B800A9FE82 /* CodeGenTypes.h */; };
DEEBC3BC0C2363BC00A9FE82 /* CodeGenTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEEBC3BB0C2363BC00A9FE82 /* CodeGenTypes.cpp */; };
- DEF165710F8FB34D0098507F /* PCHWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF165700F8FB34D0098507F /* PCHWriter.cpp */; };
- DEF165750F8FB3510098507F /* PCHReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF165740F8FB3510098507F /* PCHReader.cpp */; };
- DEF168400F9548DC0098507F /* FixItRewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF1683F0F9548DC0098507F /* FixItRewriter.cpp */; };
DEF2E95F0C5FBD74000C4259 /* InternalsManual.html in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEF2E95E0C5FBD74000C4259 /* InternalsManual.html */; };
DEF2EFF30C6CDD74000C4259 /* CGExprAgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF2EFF20C6CDD74000C4259 /* CGExprAgg.cpp */; };
DEF2F0100C6CFED5000C4259 /* SemaChecking.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF2F00F0C6CFED5000C4259 /* SemaChecking.cpp */; };
@@ -371,8 +357,6 @@
DEAEED4B0A5AF89A0045101B /* NOTES.txt in CopyFiles */,
DE1F22030A7D852A00FBF588 /* Parser.h in CopyFiles */,
DE06B73E0A8307640050E87E /* LangOptions.h in CopyFiles */,
- DE06BECB0A854E4B0050E87E /* Scope.h in CopyFiles */,
- DE06E8140A8FF9330050E87E /* Action.h in CopyFiles */,
DEC8D9910A9433CD00353FCA /* Decl.h in CopyFiles */,
DEC8D9A40A94346E00353FCA /* AST.h in CopyFiles */,
DE0FCA630A95859D00248FD5 /* Expr.h in CopyFiles */,
@@ -381,20 +365,15 @@
DE3450D70AEB543100DBC861 /* DirectoryLookup.h in CopyFiles */,
DE3452810AEF1B1800DBC861 /* Stmt.h in CopyFiles */,
DE345C1A0AFC658B00DBC861 /* StmtVisitor.h in CopyFiles */,
- DE345F220AFD347900DBC861 /* StmtNodes.def in CopyFiles */,
DE3464220B03040900DBC861 /* Type.h in CopyFiles */,
DE75ED290B044DC90020CF81 /* ASTContext.h in CopyFiles */,
- DE1733700B068DC60080B521 /* DeclSpec.h in CopyFiles */,
DE01DA490B12ADA300AC22CE /* PPCallbacks.h in CopyFiles */,
1A30A9E90B93A4C800201A91 /* ExprCXX.h in CopyFiles */,
1A869A700BA2164C008DA07A /* LiteralSupport.h in CopyFiles */,
- DE67E7150C020EDF00F66BC5 /* Sema.h in CopyFiles */,
- DE67E7280C02109800F66BC5 /* ParseAST.h in CopyFiles */,
DE928B200C0565B000231DA4 /* ModuleBuilder.h in CopyFiles */,
DE928B7D0C0A615100231DA4 /* CodeGenModule.h in CopyFiles */,
DE928B810C0A615B00231DA4 /* CodeGenFunction.h in CopyFiles */,
DEEBBD440C19C5D200A9FE82 /* TODO.txt in CopyFiles */,
- 84D9A88C0C1A581300AC7ABC /* AttributeList.h in CopyFiles */,
DEEBC3BA0C2363B800A9FE82 /* CodeGenTypes.h in CopyFiles */,
DE6951C70C4D1F5D00A5826B /* RecordLayout.h in CopyFiles */,
DE6954640C5121BD00A5826B /* Token.h in CopyFiles */,
@@ -422,15 +401,11 @@
1A2193CB0F45EEB700C0713D /* ABIInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ABIInfo.h; path = lib/CodeGen/ABIInfo.h; sourceTree = "<group>"; tabWidth = 2; };
1A2193CC0F45EEB700C0713D /* Mangle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Mangle.cpp; path = lib/CodeGen/Mangle.cpp; sourceTree = "<group>"; tabWidth = 2; };
1A2193CD0F45EEB700C0713D /* Mangle.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Mangle.h; path = lib/CodeGen/Mangle.h; sourceTree = "<group>"; tabWidth = 2; };
- 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisConsumer.cpp; path = lib/Frontend/AnalysisConsumer.cpp; sourceTree = "<group>"; };
1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ASTConsumers.cpp; path = lib/Frontend/ASTConsumers.cpp; sourceTree = "<group>"; tabWidth = 2; };
1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CacheTokens.cpp; path = lib/Frontend/CacheTokens.cpp; sourceTree = "<group>"; };
1A2A54A80FD1DD1C00F4CE45 /* DependencyFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DependencyFile.cpp; path = lib/Frontend/DependencyFile.cpp; sourceTree = "<group>"; };
1A2A54A90FD1DD1C00F4CE45 /* DiagChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DiagChecker.cpp; path = lib/Frontend/DiagChecker.cpp; sourceTree = "<group>"; };
1A2A54AA0FD1DD1C00F4CE45 /* DocumentXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DocumentXML.cpp; path = lib/Frontend/DocumentXML.cpp; sourceTree = "<group>"; };
- 1A2A54AB0FD1DD1C00F4CE45 /* GeneratePCH.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GeneratePCH.cpp; path = lib/Frontend/GeneratePCH.cpp; sourceTree = "<group>"; };
- 1A2A54AC0FD1DD1C00F4CE45 /* HTMLPrint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLPrint.cpp; path = lib/Frontend/HTMLPrint.cpp; sourceTree = "<group>"; };
- 1A2A54AD0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintParserCallbacks.cpp; path = lib/Frontend/PrintParserCallbacks.cpp; sourceTree = "<group>"; };
1A2A54AE0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintPreprocessedOutput.cpp; path = lib/Frontend/PrintPreprocessedOutput.cpp; sourceTree = "<group>"; };
1A2A54B30FD1DD1C00F4CE45 /* StmtXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StmtXML.cpp; path = lib/Frontend/StmtXML.cpp; sourceTree = "<group>"; };
1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Warnings.cpp; path = lib/Frontend/Warnings.cpp; sourceTree = "<group>"; };
@@ -455,7 +430,6 @@
1A649E1E0F9599DA005B965E /* CGCXX.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGCXX.h; path = lib/CodeGen/CGCXX.h; sourceTree = "<group>"; tabWidth = 2; };
1A6B6CD110693FC900BB4A8F /* CodeCompleteConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CodeCompleteConsumer.cpp; path = lib/Sema/CodeCompleteConsumer.cpp; sourceTree = "<group>"; tabWidth = 2; };
1A6B6CD210693FC900BB4A8F /* SemaCodeComplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaCodeComplete.cpp; path = lib/Sema/SemaCodeComplete.cpp; sourceTree = "<group>"; tabWidth = 2; };
- 1A6B6CD310693FC900BB4A8F /* SemaTemplate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = SemaTemplate.h; path = lib/Sema/SemaTemplate.h; sourceTree = "<group>"; tabWidth = 2; };
1A6B6E991069833600BB4A8F /* CGExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGExprCXX.cpp; path = lib/CodeGen/CGExprCXX.cpp; sourceTree = "<group>"; tabWidth = 2; };
1A6C01F6108128710072DEE4 /* CGRTTI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGRTTI.cpp; path = lib/CodeGen/CGRTTI.cpp; sourceTree = "<group>"; tabWidth = 2; };
1A6FE7080FD6F85800E00CA9 /* CGTemporaries.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGTemporaries.cpp; path = lib/CodeGen/CGTemporaries.cpp; sourceTree = "<group>"; tabWidth = 2; };
@@ -532,15 +506,11 @@
1AE4EE3B103B89CA00888A23 /* TreeTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TreeTransform.h; path = lib/Sema/TreeTransform.h; sourceTree = "<group>"; tabWidth = 2; };
1AF1B50E109A4FB800AFAFAC /* CGException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGException.cpp; path = lib/CodeGen/CGException.cpp; sourceTree = "<group>"; tabWidth = 2; };
1AFDD8701161085D00AE030A /* ASTMerge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTMerge.cpp; path = lib/Frontend/ASTMerge.cpp; sourceTree = "<group>"; };
- 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CodeGenAction.cpp; path = lib/Frontend/CodeGenAction.cpp; sourceTree = "<group>"; };
1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGRecordLayoutBuilder.cpp; path = lib/CodeGen/CGRecordLayoutBuilder.cpp; sourceTree = "<group>"; tabWidth = 2; };
3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckObjCInstMethSignature.cpp; path = lib/Analysis/CheckObjCInstMethSignature.cpp; sourceTree = "<group>"; };
- 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLDiagnostics.cpp; path = lib/Frontend/HTMLDiagnostics.cpp; sourceTree = "<group>"; };
352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitHeaderSearch.cpp; path = lib/Frontend/InitHeaderSearch.cpp; sourceTree = "<group>"; };
- 352246E40F5C6BE000D0D279 /* PlistDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlistDiagnostics.cpp; path = lib/Frontend/PlistDiagnostics.cpp; sourceTree = "<group>"; };
352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextDiagnosticBuffer.cpp; path = lib/Frontend/TextDiagnosticBuffer.cpp; sourceTree = "<group>"; };
352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextDiagnosticPrinter.cpp; path = lib/Frontend/TextDiagnosticPrinter.cpp; sourceTree = "<group>"; };
- 3527124F0DAFE54700C76352 /* IdentifierResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = IdentifierResolver.h; path = lib/Sema/IdentifierResolver.h; sourceTree = "<group>"; tabWidth = 2; };
352712500DAFE54700C76352 /* IdentifierResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = IdentifierResolver.cpp; path = lib/Sema/IdentifierResolver.cpp; sourceTree = "<group>"; tabWidth = 2; };
352C19DC0CA321C80045DB98 /* CFGRecStmtDeclVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFGRecStmtDeclVisitor.h; path = clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h; sourceTree = "<group>"; };
352C19DD0CA321C80045DB98 /* CFGRecStmtVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFGRecStmtVisitor.h; path = clang/Analysis/Visitors/CFGRecStmtVisitor.h; sourceTree = "<group>"; };
@@ -561,7 +531,6 @@
355106880E9A851B006A4E44 /* MemRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemRegion.h; path = clang/Analysis/PathSensitive/MemRegion.h; sourceTree = "<group>"; };
3551068A0E9A8546006A4E44 /* ParsePragma.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParsePragma.cpp; path = lib/Parse/ParsePragma.cpp; sourceTree = "<group>"; tabWidth = 2; };
3551068B0E9A8546006A4E44 /* ParseTentative.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseTentative.cpp; path = lib/Parse/ParseTentative.cpp; sourceTree = "<group>"; tabWidth = 2; };
- 3551068E0E9A855F006A4E44 /* AccessSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = AccessSpecifier.h; path = clang/Parse/AccessSpecifier.h; sourceTree = "<group>"; tabWidth = 2; };
3551068F0E9A857C006A4E44 /* ParsePragma.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ParsePragma.h; path = lib/Parse/ParsePragma.h; sourceTree = "<group>"; tabWidth = 2; };
3552E7540E520D80003A8CA5 /* PPCaching.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCaching.cpp; sourceTree = "<group>"; };
3552E7580E520DD7003A8CA5 /* CGObjCMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGObjCMac.cpp; path = lib/CodeGen/CGObjCMac.cpp; sourceTree = "<group>"; tabWidth = 2; };
@@ -570,9 +539,7 @@
35544B860F5C7FD700D92AA9 /* SimpleConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SimpleConstraintManager.cpp; path = lib/Analysis/SimpleConstraintManager.cpp; sourceTree = "<group>"; };
35544B870F5C7FD700D92AA9 /* SimpleConstraintManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SimpleConstraintManager.h; path = lib/Analysis/SimpleConstraintManager.h; sourceTree = "<group>"; };
35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateInstantiate.cpp; path = lib/Sema/SemaTemplateInstantiate.cpp; sourceTree = "<group>"; tabWidth = 2; };
- 35585DBD0EAFBC4500D0A97A /* CXXFieldCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CXXFieldCollector.h; path = lib/Sema/CXXFieldCollector.h; sourceTree = "<group>"; tabWidth = 2; };
35585DBE0EAFBC4500D0A97A /* SemaOverload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaOverload.cpp; path = lib/Sema/SemaOverload.cpp; sourceTree = "<group>"; tabWidth = 2; };
- 35585DBF0EAFBC4500D0A97A /* SemaOverload.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = SemaOverload.h; path = lib/Sema/SemaOverload.h; sourceTree = "<group>"; tabWidth = 2; };
3558F76C0E267C8300A5B0DF /* BasicStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicStore.cpp; path = lib/Analysis/BasicStore.cpp; sourceTree = "<group>"; };
3558F76F0E267C9A00A5B0DF /* Store.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Store.h; path = clang/Analysis/PathSensitive/Store.h; sourceTree = "<group>"; };
355CF6820C90A8B600A08AA3 /* LocalCheckers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LocalCheckers.h; path = clang/Analysis/LocalCheckers.h; sourceTree = "<group>"; };
@@ -626,11 +593,20 @@
35F8D0D50D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicObjCFoundationChecks.cpp; path = lib/Analysis/BasicObjCFoundationChecks.cpp; sourceTree = "<group>"; };
35F9B1550D1C6B2E00DDFDAE /* LiveVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LiveVariables.h; path = clang/Analysis/Analyses/LiveVariables.h; sourceTree = "<group>"; };
35F9B1560D1C6B2E00DDFDAE /* UninitializedValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UninitializedValues.h; path = clang/Analysis/Analyses/UninitializedValues.h; sourceTree = "<group>"; };
+ 574F4C25121B4EF000AEAC20 /* ASTWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTWriter.h; path = clang/Serialization/ASTWriter.h; sourceTree = "<group>"; };
+ 57AA924D121C8B9400B4AA6C /* ASTReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTReader.cpp; sourceTree = "<group>"; };
+ 57AA924E121C8B9400B4AA6C /* ASTReaderDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTReaderDecl.cpp; sourceTree = "<group>"; };
+ 57AA924F121C8B9400B4AA6C /* ASTReaderStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTReaderStmt.cpp; sourceTree = "<group>"; };
+ 57E15B21121C8D2B0051C2CC /* ASTDeserializationListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTDeserializationListener.h; path = clang/Serialization/ASTDeserializationListener.h; sourceTree = "<group>"; };
+ 57E15B22121C8D2B0051C2CC /* ASTReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTReader.h; path = clang/Serialization/ASTReader.h; sourceTree = "<group>"; };
+ 57EB5661121B034300ECA335 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
+ 57EB5662121B034300ECA335 /* GeneratePCH.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeneratePCH.cpp; sourceTree = "<group>"; };
+ 57EB5663121B034300ECA335 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
+ 57F6660F121B4DE600DCE3B7 /* ASTWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTWriter.cpp; sourceTree = "<group>"; };
+ 57F66610121B4DE600DCE3B7 /* ASTWriterDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTWriterDecl.cpp; sourceTree = "<group>"; };
+ 57F66611121B4DE600DCE3B7 /* ASTWriterStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTWriterStmt.cpp; sourceTree = "<group>"; };
72D16C1E0D9975C400E6DA4A /* HTMLRewrite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLRewrite.cpp; path = lib/Rewrite/HTMLRewrite.cpp; sourceTree = "<group>"; };
- 7F270AFE107A90010031B377 /* CodeCompleteConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodeCompleteConsumer.h; path = clang/Sema/CodeCompleteConsumer.h; sourceTree = "<group>"; };
84AF36A00CB17A3B00C820A5 /* DeclObjC.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclObjC.h; path = clang/AST/DeclObjC.h; sourceTree = "<group>"; tabWidth = 2; };
- 84D9A8870C1A57E100AC7ABC /* AttributeList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = AttributeList.cpp; path = lib/Parse/AttributeList.cpp; sourceTree = "<group>"; tabWidth = 2; };
- 84D9A88B0C1A581300AC7ABC /* AttributeList.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = AttributeList.h; path = clang/Parse/AttributeList.h; sourceTree = "<group>"; tabWidth = 2; };
8DD76F6C0486A84900D96B5E /* clang */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = clang; sourceTree = BUILT_PRODUCTS_DIR; };
9012911510470FCE0083456D /* Index.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Index.h; path = "clang-c/Index.h"; sourceTree = "<group>"; };
9012911C1048068D0083456D /* ASTUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTUnit.cpp; path = lib/Frontend/ASTUnit.cpp; sourceTree = "<group>"; };
@@ -642,8 +618,6 @@
9047537D1096376F00CBDDDD /* TypeLocNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; name = TypeLocNodes.def; path = clang/AST/TypeLocNodes.def; sourceTree = "<group>"; tabWidth = 2; };
9047537E1096376F00CBDDDD /* TypeLocVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TypeLocVisitor.h; path = clang/AST/TypeLocVisitor.h; sourceTree = "<group>"; tabWidth = 2; };
9047537F1096376F00CBDDDD /* TypeVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TypeVisitor.h; path = clang/AST/TypeVisitor.h; sourceTree = "<group>"; tabWidth = 2; };
- 9063F2210F9E8BDF002F7251 /* ExternalSemaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExternalSemaSource.h; path = clang/Sema/ExternalSemaSource.h; sourceTree = "<group>"; };
- 9063F2220F9E8BDF002F7251 /* SemaConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaConsumer.h; path = clang/Sema/SemaConsumer.h; sourceTree = "<group>"; };
9063F2280F9E911F002F7251 /* OnDiskHashTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnDiskHashTable.h; sourceTree = "<group>"; };
9063F2290F9E911F002F7251 /* SourceManagerInternals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceManagerInternals.h; sourceTree = "<group>"; };
9063F22A0F9E911F002F7251 /* TemplateKinds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TemplateKinds.h; sourceTree = "<group>"; };
@@ -678,10 +652,8 @@
90FD6D76103C3D49005F5B73 /* IndexProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IndexProvider.cpp; path = lib/Index/IndexProvider.cpp; sourceTree = "<group>"; };
90FD6D77103C3D49005F5B73 /* Program.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Program.cpp; path = lib/Index/Program.cpp; sourceTree = "<group>"; };
90FD6D78103C3D49005F5B73 /* ProgramImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProgramImpl.h; path = lib/Index/ProgramImpl.h; sourceTree = "<group>"; };
- 90FD6D79103C3D49005F5B73 /* ResolveLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ResolveLocation.cpp; path = lib/Index/ResolveLocation.cpp; sourceTree = "<group>"; };
90FD6D7A103C3D49005F5B73 /* SelectorMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SelectorMap.cpp; path = lib/Index/SelectorMap.cpp; sourceTree = "<group>"; };
90FD6D86103C3D80005F5B73 /* Analyses.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Analyses.def; path = clang/Frontend/Analyses.def; sourceTree = "<group>"; };
- 90FD6D87103C3D80005F5B73 /* AnalysisConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisConsumer.h; path = clang/Frontend/AnalysisConsumer.h; sourceTree = "<group>"; };
90FD6D88103C3D80005F5B73 /* ASTConsumers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTConsumers.h; path = clang/Frontend/ASTConsumers.h; sourceTree = "<group>"; };
90FD6D89103C3D80005F5B73 /* ASTUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTUnit.h; path = clang/Frontend/ASTUnit.h; sourceTree = "<group>"; };
90FD6D8A103C3D80005F5B73 /* CommandLineSourceLoc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandLineSourceLoc.h; path = clang/Frontend/CommandLineSourceLoc.h; sourceTree = "<group>"; };
@@ -693,16 +665,104 @@
90FD6D90103C3D80005F5B73 /* TypeXML.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TypeXML.def; path = clang/Frontend/TypeXML.def; sourceTree = "<group>"; };
90FD6D91103C3D80005F5B73 /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Utils.h; path = clang/Frontend/Utils.h; sourceTree = "<group>"; };
90FD6DB5103D977E005F5B73 /* index-test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "index-test.cpp"; path = "tools/index-test/index-test.cpp"; sourceTree = "<group>"; };
+ BD59A948121496B9003A5A02 /* AnalysisBasedWarnings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisBasedWarnings.h; path = clang/Sema/AnalysisBasedWarnings.h; sourceTree = "<group>"; };
+ BD59A949121496B9003A5A02 /* CodeCompleteConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodeCompleteConsumer.h; path = clang/Sema/CodeCompleteConsumer.h; sourceTree = "<group>"; };
+ BD59A94A121496B9003A5A02 /* CXXFieldCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CXXFieldCollector.h; path = clang/Sema/CXXFieldCollector.h; sourceTree = "<group>"; };
+ BD59A94B121496B9003A5A02 /* ExternalSemaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExternalSemaSource.h; path = clang/Sema/ExternalSemaSource.h; sourceTree = "<group>"; };
+ BD59A94C121496B9003A5A02 /* IdentifierResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IdentifierResolver.h; path = clang/Sema/IdentifierResolver.h; sourceTree = "<group>"; };
+ BD59A94D121496B9003A5A02 /* Initialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Initialization.h; path = clang/Sema/Initialization.h; sourceTree = "<group>"; };
+ BD59A94E121496B9003A5A02 /* Lookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Lookup.h; path = clang/Sema/Lookup.h; sourceTree = "<group>"; };
+ BD59A94F121496B9003A5A02 /* Overload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Overload.h; path = clang/Sema/Overload.h; sourceTree = "<group>"; };
+ BD59A951121496B9003A5A02 /* Sema.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sema.h; path = clang/Sema/Sema.h; sourceTree = "<group>"; };
+ BD59A952121496B9003A5A02 /* SemaConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaConsumer.h; path = clang/Sema/SemaConsumer.h; sourceTree = "<group>"; };
+ BD59A953121496B9003A5A02 /* SemaDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaDiagnostic.h; path = clang/Sema/SemaDiagnostic.h; sourceTree = "<group>"; };
+ BD59A954121496B9003A5A02 /* Template.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Template.h; path = clang/Sema/Template.h; sourceTree = "<group>"; };
BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateDeduction.cpp; path = lib/Sema/SemaTemplateDeduction.cpp; sourceTree = "<group>"; tabWidth = 2; };
- BF89C3E0115957FF001C2D68 /* AnalysisBasedWarnings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisBasedWarnings.h; path = lib/Sema/AnalysisBasedWarnings.h; sourceTree = "<group>"; };
BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisBasedWarnings.cpp; path = lib/Sema/AnalysisBasedWarnings.cpp; sourceTree = "<group>"; };
- BF89C3E311595835001C2D68 /* Lookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Lookup.h; path = lib/Sema/Lookup.h; sourceTree = "<group>"; };
- BF89C3E411595855001C2D68 /* SemaInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaInit.h; path = lib/Sema/SemaInit.h; sourceTree = "<group>"; };
BF89C3E5115958A1001C2D68 /* TargetAttributesSema.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetAttributesSema.h; path = lib/Sema/TargetAttributesSema.h; sourceTree = "<group>"; };
BF89C3E81159594A001C2D68 /* SemaObjCProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaObjCProperty.cpp; path = lib/Sema/SemaObjCProperty.cpp; sourceTree = "<group>"; };
BF89C3F811595A01001C2D68 /* SemaType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaType.cpp; path = lib/Sema/SemaType.cpp; sourceTree = "<group>"; };
BF89C3FA11595A37001C2D68 /* SemaCodeComplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaCodeComplete.cpp; path = lib/Sema/SemaCodeComplete.cpp; sourceTree = "<group>"; };
BF89C3FC11595A5D001C2D68 /* SemaExceptionSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExceptionSpec.cpp; path = lib/Sema/SemaExceptionSpec.cpp; sourceTree = "<group>"; };
+ BF9FED6E1225DF55003A8B71 /* TemplateDeduction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TemplateDeduction.h; path = clang/Sema/TemplateDeduction.h; sourceTree = "<group>"; };
+ BF9FED6F1225DF7F003A8B71 /* Action.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Action.h; path = clang/Sema/Action.h; sourceTree = "<group>"; };
+ BF9FED701225DFA1003A8B71 /* AttributeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AttributeList.h; path = clang/Sema/AttributeList.h; sourceTree = "<group>"; };
+ BF9FED711225DFD9003A8B71 /* DeclSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DeclSpec.h; path = clang/Sema/DeclSpec.h; sourceTree = "<group>"; };
+ BF9FED721225DFD9003A8B71 /* Designator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Designator.h; path = clang/Sema/Designator.h; sourceTree = "<group>"; };
+ BF9FED731225E005003A8B71 /* Ownership.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Ownership.h; path = clang/Sema/Ownership.h; sourceTree = "<group>"; };
+ BF9FED741225E005003A8B71 /* ParsedTemplate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParsedTemplate.h; path = clang/Sema/ParsedTemplate.h; sourceTree = "<group>"; };
+ BF9FED751225E005003A8B71 /* Scope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scope.h; path = clang/Sema/Scope.h; sourceTree = "<group>"; };
+ BF9FED761225E005003A8B71 /* ScopeInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScopeInfo.h; path = clang/Sema/ScopeInfo.h; sourceTree = "<group>"; };
+ BF9FED771225E032003A8B71 /* ObjCMethodList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjCMethodList.h; path = clang/Sema/ObjCMethodList.h; sourceTree = "<group>"; };
+ BF9FED781225E041003A8B71 /* SemaInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaInternal.h; path = clang/Sema/SemaInternal.h; sourceTree = "<group>"; };
+ BF9FEDB21225E1D2003A8B71 /* CodeCompletionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeCompletionHandler.h; sourceTree = "<group>"; };
+ BF9FEDB31225E1E1003A8B71 /* ExternalPreprocessorSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExternalPreprocessorSource.h; sourceTree = "<group>"; };
+ BF9FEDB41225E1F3003A8B71 /* PreprocessingRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreprocessingRecord.h; sourceTree = "<group>"; };
+ BF9FEDB51225E213003A8B71 /* ParseAST.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParseAST.h; path = clang/Parse/ParseAST.h; sourceTree = "<group>"; };
+ BF9FEDB61225E252003A8B71 /* OperationKinds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OperationKinds.h; path = clang/AST/OperationKinds.h; sourceTree = "<group>"; };
+ BF9FEDB71225E26A003A8B71 /* RecursiveASTVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RecursiveASTVisitor.h; path = clang/AST/RecursiveASTVisitor.h; sourceTree = "<group>"; };
+ BF9FEDB81225E2DE003A8B71 /* BackendUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BackendUtil.h; path = clang/CodeGen/BackendUtil.h; sourceTree = "<group>"; };
+ BF9FEDB91225E2DE003A8B71 /* CodeGenAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodeGenAction.h; path = clang/CodeGen/CodeGenAction.h; sourceTree = "<group>"; };
+ BF9FEDBA1225E30E003A8B71 /* ASTBitCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTBitCodes.h; path = clang/Serialization/ASTBitCodes.h; sourceTree = "<group>"; };
+ BF9FEDBB1225E34B003A8B71 /* FixItRewriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FixItRewriter.h; path = clang/Rewrite/FixItRewriter.h; sourceTree = "<group>"; };
+ BF9FEDBC1225E34B003A8B71 /* FrontendActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendActions.h; path = clang/Rewrite/FrontendActions.h; sourceTree = "<group>"; };
+ BF9FEDBD1225E35F003A8B71 /* Rewriters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rewriters.h; path = clang/Rewrite/Rewriters.h; sourceTree = "<group>"; };
+ BF9FEDBE1225E373003A8B71 /* ASTConsumers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTConsumers.h; path = clang/Rewrite/ASTConsumers.h; sourceTree = "<group>"; };
+ BF9FEDBF1225E392003A8B71 /* AnalyzerOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalyzerOptions.h; path = clang/Frontend/AnalyzerOptions.h; sourceTree = "<group>"; };
+ BF9FEDC01225E3AB003A8B71 /* ChainedDiagnosticClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChainedDiagnosticClient.h; path = clang/Frontend/ChainedDiagnosticClient.h; sourceTree = "<group>"; };
+ BF9FEDC11225E3AB003A8B71 /* CodeGenOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodeGenOptions.h; path = clang/Frontend/CodeGenOptions.h; sourceTree = "<group>"; };
+ BF9FEDC21225E3C2003A8B71 /* CompilerInstance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompilerInstance.h; path = clang/Frontend/CompilerInstance.h; sourceTree = "<group>"; };
+ BF9FEDC31225E3C2003A8B71 /* CompilerInvocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompilerInvocation.h; path = clang/Frontend/CompilerInvocation.h; sourceTree = "<group>"; };
+ BF9FEDC41225E3DA003A8B71 /* DependencyOutputOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DependencyOutputOptions.h; path = clang/Frontend/DependencyOutputOptions.h; sourceTree = "<group>"; };
+ BF9FEDC51225E3DA003A8B71 /* DiagnosticOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DiagnosticOptions.h; path = clang/Frontend/DiagnosticOptions.h; sourceTree = "<group>"; };
+ BF9FEDC61225E3F6003A8B71 /* FrontendAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendAction.h; path = clang/Frontend/FrontendAction.h; sourceTree = "<group>"; };
+ BF9FEDC71225E3F6003A8B71 /* FrontendActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendActions.h; path = clang/Frontend/FrontendActions.h; sourceTree = "<group>"; };
+ BF9FEDC81225E40A003A8B71 /* FrontendOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendOptions.h; path = clang/Frontend/FrontendOptions.h; sourceTree = "<group>"; };
+ BF9FEDC91225E40A003A8B71 /* FrontendPluginRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendPluginRegistry.h; path = clang/Frontend/FrontendPluginRegistry.h; sourceTree = "<group>"; };
+ BF9FEDCA1225E40A003A8B71 /* HeaderSearchOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HeaderSearchOptions.h; path = clang/Frontend/HeaderSearchOptions.h; sourceTree = "<group>"; };
+ BF9FEDCB1225E40A003A8B71 /* LangStandard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LangStandard.h; path = clang/Frontend/LangStandard.h; sourceTree = "<group>"; };
+ BF9FEDCC1225E41D003A8B71 /* PreprocessorOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PreprocessorOptions.h; path = clang/Frontend/PreprocessorOptions.h; sourceTree = "<group>"; };
+ BF9FEDCD1225E41D003A8B71 /* PreprocessorOutputOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PreprocessorOutputOptions.h; path = clang/Frontend/PreprocessorOutputOptions.h; sourceTree = "<group>"; };
+ BF9FEDCE1225E42C003A8B71 /* VerifyDiagnosticsClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VerifyDiagnosticsClient.h; path = clang/Frontend/VerifyDiagnosticsClient.h; sourceTree = "<group>"; };
+ BF9FEDCF1225E443003A8B71 /* LangStandards.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LangStandards.def; path = clang/Frontend/LangStandards.def; sourceTree = "<group>"; };
+ BF9FEDE71225E488003A8B71 /* CC1AsOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CC1AsOptions.h; path = clang/Driver/CC1AsOptions.h; sourceTree = "<group>"; };
+ BF9FEDE81225E49D003A8B71 /* CC1Options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CC1Options.h; path = clang/Driver/CC1Options.h; sourceTree = "<group>"; };
+ BF9FEDE91225E4BD003A8B71 /* OptSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptSpecifier.h; path = clang/Driver/OptSpecifier.h; sourceTree = "<group>"; };
+ BF9FEDEA1225E4BD003A8B71 /* OptTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptTable.h; path = clang/Driver/OptTable.h; sourceTree = "<group>"; };
+ BF9FEDEB1225E4F2003A8B71 /* AttrKinds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AttrKinds.h; sourceTree = "<group>"; };
+ BF9FEDEC1225E514003A8B71 /* Version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Version.h; sourceTree = "<group>"; };
+ BF9FEDED1225E52F003A8B71 /* arm_neon.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = arm_neon.td; sourceTree = "<group>"; };
+ BF9FEDEE1225E52F003A8B71 /* Attr.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Attr.td; sourceTree = "<group>"; };
+ BF9FEDEF1225E55C003A8B71 /* BuiltinsARM.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BuiltinsARM.def; sourceTree = "<group>"; };
+ BF9FEDF01225E574003A8B71 /* Specifiers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Specifiers.h; sourceTree = "<group>"; };
+ BF9FEDF11225E574003A8B71 /* StmtNodes.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = StmtNodes.td; sourceTree = "<group>"; };
+ BF9FEDF21225E58B003A8B71 /* TargetOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetOptions.h; sourceTree = "<group>"; };
+ BF9FEDF31225E5B6003A8B71 /* DeclNodes.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DeclNodes.td; sourceTree = "<group>"; };
+ BF9FEDF41225E5D5003A8B71 /* Linkage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Linkage.h; sourceTree = "<group>"; };
+ BF9FEDF51225E5D5003A8B71 /* MacroBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroBuilder.h; sourceTree = "<group>"; };
+ BF9FEDF61225E5FB003A8B71 /* Version.inc.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Version.inc.in; sourceTree = "<group>"; };
+ BF9FEDF71225E613003A8B71 /* DiagnosticCategories.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DiagnosticCategories.td; sourceTree = "<group>"; };
+ BF9FEDF81225E67B003A8B71 /* Action.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Action.cpp; path = lib/Sema/Action.cpp; sourceTree = "<group>"; };
+ BF9FEDFA1225E6A9003A8B71 /* AttributeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AttributeList.cpp; path = lib/Sema/AttributeList.cpp; sourceTree = "<group>"; };
+ BF9FEDFC1225E6C6003A8B71 /* DeclSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeclSpec.cpp; path = lib/Sema/DeclSpec.cpp; sourceTree = "<group>"; };
+ BF9FEDFE1225E6DD003A8B71 /* TargetAttributesSema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetAttributesSema.cpp; path = lib/Sema/TargetAttributesSema.cpp; sourceTree = "<group>"; };
+ BF9FEE001225E718003A8B71 /* CXXABI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CXXABI.h; sourceTree = "<group>"; };
+ BF9FEE011225E73F003A8B71 /* ExprClassification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExprClassification.cpp; sourceTree = "<group>"; };
+ BF9FEE031225E759003A8B71 /* ItaniumCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ItaniumCXXABI.cpp; sourceTree = "<group>"; };
+ BF9FEE051225E770003A8B71 /* MicrosoftCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MicrosoftCXXABI.cpp; sourceTree = "<group>"; };
+ BF9FEE2B1225E7EA003A8B71 /* BackendUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BackendUtil.cpp; path = lib/CodeGen/BackendUtil.cpp; sourceTree = "<group>"; };
+ BF9FEE2D1225E80F003A8B71 /* CGCXXABI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGCXXABI.h; path = lib/CodeGen/CGCXXABI.h; sourceTree = "<group>"; };
+ BF9FEE2E1225E82D003A8B71 /* CGException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGException.h; path = lib/CodeGen/CGException.h; sourceTree = "<group>"; };
+ BF9FEE2F1225E854003A8B71 /* CGRecordLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGRecordLayout.h; path = lib/CodeGen/CGRecordLayout.h; sourceTree = "<group>"; };
+ BF9FEE301225E86C003A8B71 /* CodeGenAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CodeGenAction.cpp; path = lib/CodeGen/CodeGenAction.cpp; sourceTree = "<group>"; };
+ BF9FEE321225E898003A8B71 /* ItaniumCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ItaniumCXXABI.cpp; path = lib/CodeGen/ItaniumCXXABI.cpp; sourceTree = "<group>"; };
+ BF9FEE341225E8B1003A8B71 /* MicrosoftCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MicrosoftCXXABI.cpp; path = lib/CodeGen/MicrosoftCXXABI.cpp; sourceTree = "<group>"; };
+ BF9FEE361225E8CF003A8B71 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.txt; path = lib/CodeGen/README.txt; sourceTree = "<group>"; };
+ BF9FEE371225E925003A8B71 /* BoostConAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BoostConAction.cpp; path = lib/Frontend/BoostConAction.cpp; sourceTree = "<group>"; };
+ BF9FEE451225EA24003A8B71 /* DelayedDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DelayedDiagnostic.h; path = clang/Sema/DelayedDiagnostic.h; sourceTree = "<group>"; };
+ BF9FEE511226FE9F003A8B71 /* ParseAST.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParseAST.cpp; path = lib/Parse/ParseAST.cpp; sourceTree = "<group>"; };
+ BF9FEE531226FEC1003A8B71 /* RAIIObjectsForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAIIObjectsForParser.h; path = lib/Parse/RAIIObjectsForParser.h; sourceTree = "<group>"; };
+ BF9FEEF1122D8068003A8B71 /* PreprocessingRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreprocessingRecord.cpp; sourceTree = "<group>"; };
BFE2F67A11DA95590007EDC0 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
BFE2F67C11DA95590007EDC0 /* .dir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .dir; sourceTree = "<group>"; };
BFE2F67D11DA95590007EDC0 /* DeltaTree.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = DeltaTree.d; sourceTree = "<group>"; };
@@ -716,15 +776,8 @@
BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLRewrite.d; sourceTree = "<group>"; };
BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLRewrite.o; sourceTree = "<group>"; };
BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteMacros.d; sourceTree = "<group>"; };
- BFE2F68811DA955A0007EDC0 /* RewriteMacros.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteMacros.o; sourceTree = "<group>"; };
BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteObjC.d; sourceTree = "<group>"; };
- BFE2F68A11DA955A0007EDC0 /* RewriteObjC.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteObjC.o; sourceTree = "<group>"; };
BFE2F68B11DA955A0007EDC0 /* Rewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = Rewriter.d; sourceTree = "<group>"; };
- BFE2F68C11DA955A0007EDC0 /* Rewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Rewriter.o; sourceTree = "<group>"; };
- BFE2F68D11DA955A0007EDC0 /* RewriteRope.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteRope.d; sourceTree = "<group>"; };
- BFE2F68E11DA955A0007EDC0 /* RewriteRope.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteRope.o; sourceTree = "<group>"; };
- BFE2F68F11DA955A0007EDC0 /* RewriteTest.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteTest.d; sourceTree = "<group>"; };
- BFE2F69011DA955A0007EDC0 /* RewriteTest.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteTest.o; sourceTree = "<group>"; };
BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = TokenRewriter.d; sourceTree = "<group>"; };
BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = TokenRewriter.o; sourceTree = "<group>"; };
BFE2F69311DA955A0007EDC0 /* DeltaTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeltaTree.cpp; sourceTree = "<group>"; };
@@ -739,9 +792,6 @@
BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLRewrite.d; sourceTree = "<group>"; };
BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLRewrite.o; sourceTree = "<group>"; };
BFE2F69F11DA955A0007EDC0 /* Rewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = Rewriter.d; sourceTree = "<group>"; };
- BFE2F6A011DA955A0007EDC0 /* Rewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Rewriter.o; sourceTree = "<group>"; };
- BFE2F6A111DA955A0007EDC0 /* RewriteRope.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteRope.d; sourceTree = "<group>"; };
- BFE2F6A211DA955A0007EDC0 /* RewriteRope.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = RewriteRope.o; sourceTree = "<group>"; };
BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = TokenRewriter.d; sourceTree = "<group>"; };
BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = TokenRewriter.o; sourceTree = "<group>"; };
BFE2F6A511DA955A0007EDC0 /* RewriteMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RewriteMacros.cpp; sourceTree = "<group>"; };
@@ -753,13 +803,8 @@
DE01DA480B12ADA300AC22CE /* PPCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPCallbacks.h; sourceTree = "<group>"; };
DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseExprCXX.cpp; path = lib/Parse/ParseExprCXX.cpp; sourceTree = "<group>"; tabWidth = 2; };
DE06B73D0A8307640050E87E /* LangOptions.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = LangOptions.h; sourceTree = "<group>"; tabWidth = 2; };
- DE06BECA0A854E4B0050E87E /* Scope.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Scope.h; path = clang/Parse/Scope.h; sourceTree = "<group>"; tabWidth = 2; };
DE06D42F0A8BB52D0050E87E /* Parser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Parser.cpp; path = lib/Parse/Parser.cpp; sourceTree = "<group>"; tabWidth = 2; };
- DE06E8130A8FF9330050E87E /* Action.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Action.h; path = clang/Parse/Action.h; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
DE0FCA620A95859D00248FD5 /* Expr.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Expr.h; path = clang/AST/Expr.h; sourceTree = "<group>"; tabWidth = 2; };
- DE1263C20EF2341900F56D2B /* Ownership.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Ownership.h; path = clang/Parse/Ownership.h; sourceTree = "<group>"; tabWidth = 2; };
- DE17336D0B068DC20080B521 /* DeclSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = DeclSpec.cpp; path = lib/Parse/DeclSpec.cpp; sourceTree = "<group>"; tabWidth = 2; };
- DE17336F0B068DC60080B521 /* DeclSpec.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclSpec.h; path = clang/Parse/DeclSpec.h; sourceTree = "<group>"; tabWidth = 2; };
DE1F22020A7D852A00FBF588 /* Parser.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Parser.h; path = clang/Parse/Parser.h; sourceTree = "<group>"; tabWidth = 2; };
DE224FF70C7AA98800D370A5 /* CGExprComplex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGExprComplex.cpp; path = lib/CodeGen/CGExprComplex.cpp; sourceTree = "<group>"; tabWidth = 2; };
DE22526F0C7E82D000D370A5 /* CGExprScalar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGExprScalar.cpp; path = lib/CodeGen/CGExprScalar.cpp; sourceTree = "<group>"; tabWidth = 2; };
@@ -770,13 +815,11 @@
DE3450D60AEB543100DBC861 /* DirectoryLookup.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DirectoryLookup.h; sourceTree = "<group>"; };
DE3452800AEF1B1800DBC861 /* Stmt.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Stmt.h; path = clang/AST/Stmt.h; sourceTree = "<group>"; tabWidth = 2; };
DE345C190AFC658B00DBC861 /* StmtVisitor.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtVisitor.h; path = clang/AST/StmtVisitor.h; sourceTree = "<group>"; tabWidth = 2; };
- DE345F210AFD347900DBC861 /* StmtNodes.def */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = text; name = StmtNodes.def; path = clang/AST/StmtNodes.def; sourceTree = "<group>"; tabWidth = 2; };
DE345FFF0AFDCC1900DBC861 /* ParseObjc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseObjc.cpp; path = lib/Parse/ParseObjc.cpp; sourceTree = "<group>"; tabWidth = 2; };
DE3460040AFDCC6500DBC861 /* ParseInit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseInit.cpp; path = lib/Parse/ParseInit.cpp; sourceTree = "<group>"; tabWidth = 2; };
DE34600A0AFDCCBF00DBC861 /* ParseStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseStmt.cpp; path = lib/Parse/ParseStmt.cpp; sourceTree = "<group>"; tabWidth = 2; };
DE34600E0AFDCCCE00DBC861 /* ParseDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseDecl.cpp; path = lib/Parse/ParseDecl.cpp; sourceTree = "<group>"; tabWidth = 2; };
DE3460120AFDCCDA00DBC861 /* ParseExpr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseExpr.cpp; path = lib/Parse/ParseExpr.cpp; sourceTree = "<group>"; tabWidth = 2; };
- DE3461260AFE68BE00DBC861 /* MinimalAction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = MinimalAction.cpp; path = lib/Parse/MinimalAction.cpp; sourceTree = "<group>"; tabWidth = 2; };
DE3464210B03040900DBC861 /* Type.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Type.h; path = clang/AST/Type.h; sourceTree = "<group>"; tabWidth = 2; };
DE37251C0FE4818000CF2CC2 /* Builtins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Builtins.h; sourceTree = "<group>"; };
DE37252A0FE4818F00CF2CC2 /* Builtins.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Builtins.def; sourceTree = "<group>"; };
@@ -788,8 +831,6 @@
DE38CD4F0D794D0100A273B6 /* CGObjCGNU.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGObjCGNU.cpp; path = lib/CodeGen/CGObjCGNU.cpp; sourceTree = "<group>"; tabWidth = 2; };
DE3986EF0CB8D4B300223765 /* IdentifierTable.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = IdentifierTable.h; sourceTree = "<group>"; tabWidth = 2; };
DE3986F30CB8D50C00223765 /* IdentifierTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = IdentifierTable.cpp; sourceTree = "<group>"; tabWidth = 2; };
- DE3B90DE0EAC5EF200D01046 /* ExtensionRAIIObject.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExtensionRAIIObject.h; path = lib/Parse/ExtensionRAIIObject.h; sourceTree = "<group>"; tabWidth = 2; };
- DE3B92230EB5152000D01046 /* Designator.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Designator.h; path = clang/Parse/Designator.h; sourceTree = "<group>"; tabWidth = 2; };
DE41211D0D7F1BBE0080F80A /* GRWorkList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRWorkList.h; path = clang/Analysis/PathSensitive/GRWorkList.h; sourceTree = "<group>"; };
DE41211E0D7F1BBE0080F80A /* SymbolManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolManager.h; path = clang/Analysis/PathSensitive/SymbolManager.h; sourceTree = "<group>"; };
DE41211F0D7F1BBE0080F80A /* GRBlockCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRBlockCounter.h; path = clang/Analysis/PathSensitive/GRBlockCounter.h; sourceTree = "<group>"; };
@@ -819,10 +860,7 @@
DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExprCXX.cpp; path = lib/Sema/SemaExprCXX.cpp; sourceTree = "<group>"; tabWidth = 2; };
DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExpr.cpp; path = lib/Sema/SemaExpr.cpp; sourceTree = "<group>"; tabWidth = 2; };
DE67E7120C020ED900F66BC5 /* SemaDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDecl.cpp; path = lib/Sema/SemaDecl.cpp; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
- DE67E7140C020EDF00F66BC5 /* Sema.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Sema.h; path = lib/Sema/Sema.h; sourceTree = "<group>"; tabWidth = 2; };
DE67E7160C020EE400F66BC5 /* Sema.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Sema.cpp; path = lib/Sema/Sema.cpp; sourceTree = "<group>"; tabWidth = 2; };
- DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseAST.cpp; path = lib/Sema/ParseAST.cpp; sourceTree = "<group>"; tabWidth = 2; };
- DE67E7270C02109800F66BC5 /* ParseAST.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ParseAST.h; path = clang/Sema/ParseAST.h; sourceTree = "<group>"; };
DE6951C60C4D1F5D00A5826B /* RecordLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = RecordLayout.h; path = clang/AST/RecordLayout.h; sourceTree = "<group>"; tabWidth = 2; };
DE6954630C5121BD00A5826B /* Token.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Token.h; sourceTree = "<group>"; };
DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDeclObjC.cpp; path = lib/Sema/SemaDeclObjC.cpp; sourceTree = "<group>"; tabWidth = 2; };
@@ -849,7 +887,6 @@
DEA09A6E0F31756F000C2258 /* ASTDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ASTDiagnostic.h; path = clang/AST/ASTDiagnostic.h; sourceTree = "<group>"; tabWidth = 2; };
DEA09A830F3175BF000C2258 /* LexDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LexDiagnostic.h; sourceTree = "<group>"; };
DEA09A860F3175CA000C2258 /* ParseDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ParseDiagnostic.h; path = clang/Parse/ParseDiagnostic.h; sourceTree = "<group>"; tabWidth = 2; };
- DEA09A890F3175D9000C2258 /* SemaDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaDiagnostic.h; path = clang/Sema/SemaDiagnostic.h; sourceTree = "<group>"; };
DEAABDF70F5F477C0098928A /* PrettyStackTrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrettyStackTrace.h; sourceTree = "<group>"; };
DEAEE98A0A5A2B970045101B /* MultipleIncludeOpt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MultipleIncludeOpt.h; sourceTree = "<group>"; };
DEAEED4A0A5AF89A0045101B /* NOTES.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = NOTES.txt; sourceTree = "<group>"; };
@@ -862,14 +899,9 @@
DEC8D9A30A94346E00353FCA /* AST.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = AST.h; path = clang/AST/AST.h; sourceTree = "<group>"; tabWidth = 2; };
DECAB0CF0DB3C84200E13CCB /* RewriteRope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RewriteRope.cpp; path = lib/Rewrite/RewriteRope.cpp; sourceTree = "<group>"; };
DECB6D640F9AE26600F5FBC7 /* JumpDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = JumpDiagnostics.cpp; path = lib/Sema/JumpDiagnostics.cpp; sourceTree = "<group>"; tabWidth = 2; };
- DECB6F030F9D939A00F5FBC7 /* InitPreprocessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InitPreprocessor.h; path = clang/Frontend/InitPreprocessor.h; sourceTree = "<group>"; };
DECB6F060F9D93A800F5FBC7 /* InitPreprocessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitPreprocessor.cpp; path = lib/Frontend/InitPreprocessor.cpp; sourceTree = "<group>"; };
DECB734E0FA3ED8400F5FBC7 /* StmtObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtObjC.h; path = clang/AST/StmtObjC.h; sourceTree = "<group>"; tabWidth = 2; };
DECB73550FA3EE5A00F5FBC7 /* StmtCXX.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtCXX.h; path = clang/AST/StmtCXX.h; sourceTree = "<group>"; tabWidth = 2; };
- DECB77120FA5752300F5FBC7 /* PCHReaderStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = PCHReaderStmt.cpp; path = lib/Frontend/PCHReaderStmt.cpp; sourceTree = "<group>"; tabWidth = 2; };
- DECB77780FA579B000F5FBC7 /* PCHReaderDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PCHReaderDecl.cpp; path = lib/Frontend/PCHReaderDecl.cpp; sourceTree = "<group>"; };
- DECB77F60FA5850200F5FBC7 /* PCHWriterDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PCHWriterDecl.cpp; path = lib/Frontend/PCHWriterDecl.cpp; sourceTree = "<group>"; };
- DECB78160FA5882F00F5FBC7 /* PCHWriterStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PCHWriterStmt.cpp; path = lib/Frontend/PCHWriterStmt.cpp; sourceTree = "<group>"; };
DED626C80AE0C065001E80A4 /* TargetInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = TargetInfo.cpp; sourceTree = "<group>"; tabWidth = 2; };
DED7D7310A524295003AD0FB /* Diagnostic.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = Diagnostic.h; sourceTree = "<group>"; tabWidth = 2; };
DED7D7330A524295003AD0FB /* FileManager.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = FileManager.h; sourceTree = "<group>"; tabWidth = 2; };
@@ -893,7 +925,6 @@
DED7D7D70A524302003AD0FB /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = "<group>"; };
DED7D9170A52518C003AD0FB /* ScratchBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScratchBuffer.h; sourceTree = "<group>"; };
DED7D9E40A5257F6003AD0FB /* ScratchBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScratchBuffer.cpp; sourceTree = "<group>"; };
- DEDFE5270F63A9230035BD10 /* DeclNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; name = DeclNodes.def; path = clang/AST/DeclNodes.def; sourceTree = "<group>"; tabWidth = 2; };
DEDFE5CB0F7206CC0035BD10 /* NestedNameSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = NestedNameSpecifier.h; path = clang/AST/NestedNameSpecifier.h; sourceTree = "<group>"; tabWidth = 2; };
DEDFE6450F7B3B4E0035BD10 /* driver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = driver.cpp; path = tools/driver/driver.cpp; sourceTree = "<group>"; };
DEDFE6480F7B3B830035BD10 /* Types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Types.cpp; path = lib/Driver/Types.cpp; sourceTree = "<group>"; tabWidth = 2; };
@@ -920,11 +951,7 @@
DEEBBD430C19C5D200A9FE82 /* TODO.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = TODO.txt; sourceTree = "<group>"; };
DEEBC3B90C2363B800A9FE82 /* CodeGenTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CodeGenTypes.h; path = lib/CodeGen/CodeGenTypes.h; sourceTree = "<group>"; tabWidth = 2; };
DEEBC3BB0C2363BC00A9FE82 /* CodeGenTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CodeGenTypes.cpp; path = lib/CodeGen/CodeGenTypes.cpp; sourceTree = "<group>"; tabWidth = 2; };
- DEF1615E0F65C81C0098507F /* InitHeaderSearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InitHeaderSearch.h; path = clang/Frontend/InitHeaderSearch.h; sourceTree = "<group>"; };
- DEF1615F0F65C81C0098507F /* ManagerRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ManagerRegistry.h; path = clang/Frontend/ManagerRegistry.h; sourceTree = "<group>"; };
DEF161600F65C81C0098507F /* TextDiagnosticBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextDiagnosticBuffer.h; path = clang/Frontend/TextDiagnosticBuffer.h; sourceTree = "<group>"; };
- DEF161610F65C81C0098507F /* PathDiagnosticClients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PathDiagnosticClients.h; path = clang/Frontend/PathDiagnosticClients.h; sourceTree = "<group>"; };
- DEF161620F65C81C0098507F /* CompileOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompileOptions.h; path = clang/Frontend/CompileOptions.h; sourceTree = "<group>"; };
DEF161630F65C81C0098507F /* TextDiagnosticPrinter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextDiagnosticPrinter.h; path = clang/Frontend/TextDiagnosticPrinter.h; sourceTree = "<group>"; };
DEF165140F8D46980098507F /* Tool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Tool.h; path = clang/Driver/Tool.h; sourceTree = "<group>"; };
DEF165150F8D46980098507F /* Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Types.h; path = clang/Driver/Types.h; sourceTree = "<group>"; };
@@ -942,13 +969,6 @@
DEF165220F8D46980098507F /* Util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Util.h; path = clang/Driver/Util.h; sourceTree = "<group>"; };
DEF165230F8D46980098507F /* Phases.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Phases.h; path = clang/Driver/Phases.h; sourceTree = "<group>"; };
DEF165240F8D46980098507F /* DriverDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DriverDiagnostic.h; path = clang/Driver/DriverDiagnostic.h; sourceTree = "<group>"; };
- DEF165700F8FB34D0098507F /* PCHWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = PCHWriter.cpp; path = lib/Frontend/PCHWriter.cpp; sourceTree = "<group>"; tabWidth = 2; };
- DEF165740F8FB3510098507F /* PCHReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = PCHReader.cpp; path = lib/Frontend/PCHReader.cpp; sourceTree = "<group>"; tabWidth = 2; };
- DEF165780F8FB3690098507F /* PCHWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PCHWriter.h; path = clang/Frontend/PCHWriter.h; sourceTree = "<group>"; };
- DEF1657B0F8FB36E0098507F /* PCHReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PCHReader.h; path = clang/Frontend/PCHReader.h; sourceTree = "<group>"; };
- DEF1657E0F8FB3730098507F /* PCHBitCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PCHBitCodes.h; path = clang/Frontend/PCHBitCodes.h; sourceTree = "<group>"; };
- DEF1683F0F9548DC0098507F /* FixItRewriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FixItRewriter.cpp; path = lib/Frontend/FixItRewriter.cpp; sourceTree = "<group>"; };
- DEF168620F9549250098507F /* FixItRewriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FixItRewriter.h; path = clang/Frontend/FixItRewriter.h; sourceTree = "<group>"; };
DEF169220F9645960098507F /* FrontendDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendDiagnostic.h; path = clang/Frontend/FrontendDiagnostic.h; sourceTree = "<group>"; };
DEF1692C0F9645BF0098507F /* AnalysisDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisDiagnostic.h; path = clang/Analysis/AnalysisDiagnostic.h; sourceTree = "<group>"; };
DEF16BE40FA13A5B0098507F /* TypeNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; name = TypeNodes.def; path = clang/AST/TypeNodes.def; sourceTree = "<group>"; tabWidth = 2; };
@@ -973,16 +993,9 @@
BFE2F6B011DA955A0007EDC0 /* FrontendActions.o in Frameworks */,
BFE2F6B211DA955A0007EDC0 /* HTMLPrint.o in Frameworks */,
BFE2F6B411DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */,
- BFE2F6B611DA955A0007EDC0 /* RewriteMacros.o in Frameworks */,
- BFE2F6B811DA955A0007EDC0 /* RewriteObjC.o in Frameworks */,
- BFE2F6BA11DA955A0007EDC0 /* Rewriter.o in Frameworks */,
- BFE2F6BC11DA955A0007EDC0 /* RewriteRope.o in Frameworks */,
- BFE2F6BE11DA955A0007EDC0 /* RewriteTest.o in Frameworks */,
BFE2F6C011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */,
BFE2F6C811DA955A0007EDC0 /* DeltaTree.o in Frameworks */,
BFE2F6CA11DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */,
- BFE2F6CC11DA955A0007EDC0 /* Rewriter.o in Frameworks */,
- BFE2F6CE11DA955A0007EDC0 /* RewriteRope.o in Frameworks */,
BFE2F6D011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1005,6 +1018,7 @@
08FB7795FE84155DC02AAC07 /* Libraries */ = {
isa = PBXGroup;
children = (
+ 57EB5660121B034300ECA335 /* Serialization */,
BFE2F67911DA95590007EDC0 /* Rewrite */,
90FD6D6C103C3D2D005F5B73 /* Index */,
DED7D7500A5242C7003AD0FB /* Basic */,
@@ -1083,11 +1097,10 @@
352246E00F5C6BC000D0D279 /* Frontend */ = {
isa = PBXGroup;
children = (
+ BF9FEE371225E925003A8B71 /* BoostConAction.cpp */,
1AFDD8701161085D00AE030A /* ASTMerge.cpp */,
9012911C1048068D0083456D /* ASTUnit.cpp */,
- 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */,
1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */,
- 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */,
1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */,
1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */,
1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */,
@@ -1095,24 +1108,12 @@
1A2A54A80FD1DD1C00F4CE45 /* DependencyFile.cpp */,
1A2A54A90FD1DD1C00F4CE45 /* DiagChecker.cpp */,
1A2A54AA0FD1DD1C00F4CE45 /* DocumentXML.cpp */,
- DEF1683F0F9548DC0098507F /* FixItRewriter.cpp */,
1ACB57DE1105820D0047B991 /* FrontendAction.cpp */,
1ACB57DF1105820D0047B991 /* FrontendActions.cpp */,
1ACB57E01105820D0047B991 /* FrontendOptions.cpp */,
- 1A2A54AB0FD1DD1C00F4CE45 /* GeneratePCH.cpp */,
- 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */,
- 1A2A54AC0FD1DD1C00F4CE45 /* HTMLPrint.cpp */,
352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */,
DECB6F060F9D93A800F5FBC7 /* InitPreprocessor.cpp */,
1ACB57E11105820D0047B991 /* LangStandards.cpp */,
- DEF165740F8FB3510098507F /* PCHReader.cpp */,
- DECB77780FA579B000F5FBC7 /* PCHReaderDecl.cpp */,
- DECB77120FA5752300F5FBC7 /* PCHReaderStmt.cpp */,
- DEF165700F8FB34D0098507F /* PCHWriter.cpp */,
- DECB77F60FA5850200F5FBC7 /* PCHWriterDecl.cpp */,
- DECB78160FA5882F00F5FBC7 /* PCHWriterStmt.cpp */,
- 352246E40F5C6BE000D0D279 /* PlistDiagnostics.cpp */,
- 1A2A54AD0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp */,
1A2A54AE0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp */,
352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */,
352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */,
@@ -1230,6 +1231,34 @@
name = Analyses;
sourceTree = "<group>";
};
+ 57EB5654121B023900ECA335 /* Serialization */ = {
+ isa = PBXGroup;
+ children = (
+ BF9FEDBA1225E30E003A8B71 /* ASTBitCodes.h */,
+ 57E15B21121C8D2B0051C2CC /* ASTDeserializationListener.h */,
+ 57E15B22121C8D2B0051C2CC /* ASTReader.h */,
+ 574F4C25121B4EF000AEAC20 /* ASTWriter.h */,
+ );
+ name = Serialization;
+ sourceTree = "<group>";
+ };
+ 57EB5660121B034300ECA335 /* Serialization */ = {
+ isa = PBXGroup;
+ children = (
+ 57AA924D121C8B9400B4AA6C /* ASTReader.cpp */,
+ 57AA924E121C8B9400B4AA6C /* ASTReaderDecl.cpp */,
+ 57AA924F121C8B9400B4AA6C /* ASTReaderStmt.cpp */,
+ 57F6660F121B4DE600DCE3B7 /* ASTWriter.cpp */,
+ 57F66610121B4DE600DCE3B7 /* ASTWriterDecl.cpp */,
+ 57F66611121B4DE600DCE3B7 /* ASTWriterStmt.cpp */,
+ 57EB5661121B034300ECA335 /* CMakeLists.txt */,
+ 57EB5662121B034300ECA335 /* GeneratePCH.cpp */,
+ 57EB5663121B034300ECA335 /* Makefile */,
+ );
+ name = Serialization;
+ path = lib/Serialization;
+ sourceTree = "<group>";
+ };
9012911210470FAF0083456D /* clang-c */ = {
isa = PBXGroup;
children = (
@@ -1297,7 +1326,6 @@
90FD6D76103C3D49005F5B73 /* IndexProvider.cpp */,
90FD6D77103C3D49005F5B73 /* Program.cpp */,
90FD6D78103C3D49005F5B73 /* ProgramImpl.h */,
- 90FD6D79103C3D49005F5B73 /* ResolveLocation.cpp */,
90FD6D7A103C3D49005F5B73 /* SelectorMap.cpp */,
);
name = Index;
@@ -1349,15 +1377,8 @@
BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */,
BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */,
BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */,
- BFE2F68811DA955A0007EDC0 /* RewriteMacros.o */,
BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */,
- BFE2F68A11DA955A0007EDC0 /* RewriteObjC.o */,
BFE2F68B11DA955A0007EDC0 /* Rewriter.d */,
- BFE2F68C11DA955A0007EDC0 /* Rewriter.o */,
- BFE2F68D11DA955A0007EDC0 /* RewriteRope.d */,
- BFE2F68E11DA955A0007EDC0 /* RewriteRope.o */,
- BFE2F68F11DA955A0007EDC0 /* RewriteTest.d */,
- BFE2F69011DA955A0007EDC0 /* RewriteTest.o */,
BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */,
BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */,
);
@@ -1373,9 +1394,6 @@
BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */,
BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */,
BFE2F69F11DA955A0007EDC0 /* Rewriter.d */,
- BFE2F6A011DA955A0007EDC0 /* Rewriter.o */,
- BFE2F6A111DA955A0007EDC0 /* RewriteRope.d */,
- BFE2F6A211DA955A0007EDC0 /* RewriteRope.o */,
BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */,
BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */,
);
@@ -1396,15 +1414,9 @@
DE1F21F20A7D84E800FBF588 /* Parse */ = {
isa = PBXGroup;
children = (
- 3551068E0E9A855F006A4E44 /* AccessSpecifier.h */,
- 84D9A88B0C1A581300AC7ABC /* AttributeList.h */,
- DE06E8130A8FF9330050E87E /* Action.h */,
- DE17336F0B068DC60080B521 /* DeclSpec.h */,
- DE3B92230EB5152000D01046 /* Designator.h */,
- DE1263C20EF2341900F56D2B /* Ownership.h */,
+ BF9FEDB51225E213003A8B71 /* ParseAST.h */,
DEA09A860F3175CA000C2258 /* ParseDiagnostic.h */,
DE1F22020A7D852A00FBF588 /* Parser.h */,
- DE06BECA0A854E4B0050E87E /* Scope.h */,
);
name = Parse;
sourceTree = "<group>";
@@ -1412,10 +1424,7 @@
DE1F22600A7D8C9B00FBF588 /* Parse */ = {
isa = PBXGroup;
children = (
- 84D9A8870C1A57E100AC7ABC /* AttributeList.cpp */,
- DE17336D0B068DC20080B521 /* DeclSpec.cpp */,
- DE3B90DE0EAC5EF200D01046 /* ExtensionRAIIObject.h */,
- DE3461260AFE68BE00DBC861 /* MinimalAction.cpp */,
+ BF9FEE511226FE9F003A8B71 /* ParseAST.cpp */,
DE34600E0AFDCCCE00DBC861 /* ParseDecl.cpp */,
DE2255FB0C8004E600D370A5 /* ParseDeclCXX.cpp */,
DE3460120AFDCCDA00DBC861 /* ParseExpr.cpp */,
@@ -1429,6 +1438,7 @@
353959D40EE5F88A00E82461 /* ParseTemplate.cpp */,
3551068B0E9A8546006A4E44 /* ParseTentative.cpp */,
DE06D42F0A8BB52D0050E87E /* Parser.cpp */,
+ BF9FEE531226FEC1003A8B71 /* RAIIObjectsForParser.h */,
);
name = Parse;
sourceTree = "<group>";
@@ -1461,16 +1471,14 @@
DE67E7070C020EAB00F66BC5 /* Sema */ = {
isa = PBXGroup;
children = (
+ BF9FEDFE1225E6DD003A8B71 /* TargetAttributesSema.cpp */,
+ BF9FEDFC1225E6C6003A8B71 /* DeclSpec.cpp */,
+ BF9FEDFA1225E6A9003A8B71 /* AttributeList.cpp */,
+ BF9FEDF81225E67B003A8B71 /* Action.cpp */,
BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */,
- BF89C3E0115957FF001C2D68 /* AnalysisBasedWarnings.h */,
- 35585DBD0EAFBC4500D0A97A /* CXXFieldCollector.h */,
1A6B6CD110693FC900BB4A8F /* CodeCompleteConsumer.cpp */,
- 3527124F0DAFE54700C76352 /* IdentifierResolver.h */,
352712500DAFE54700C76352 /* IdentifierResolver.cpp */,
DECB6D640F9AE26600F5FBC7 /* JumpDiagnostics.cpp */,
- BF89C3E311595835001C2D68 /* Lookup.h */,
- DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */,
- DE67E7140C020EDF00F66BC5 /* Sema.h */,
DE67E7160C020EE400F66BC5 /* Sema.cpp */,
1A701B630F7C8FE400FEC4D1 /* SemaAccess.cpp */,
DEB07AC70F4A427E00F5A2BE /* SemaAttr.cpp */,
@@ -1485,17 +1493,14 @@
DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */,
DE47999B0D2EBE1A00706D2D /* SemaExprObjC.cpp */,
DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */,
- BF89C3E411595855001C2D68 /* SemaInit.h */,
3599299A0DE2425300A8A33E /* SemaInit.cpp */,
357EA27C0F2526F300439B60 /* SemaLookup.cpp */,
1A6B6CD210693FC900BB4A8F /* SemaCodeComplete.cpp */,
35E194680ECB82FB00F21733 /* SemaCXXCast.cpp */,
BF89C3E81159594A001C2D68 /* SemaObjCProperty.cpp */,
35585DBE0EAFBC4500D0A97A /* SemaOverload.cpp */,
- 35585DBF0EAFBC4500D0A97A /* SemaOverload.h */,
DE67E70C0C020ECA00F66BC5 /* SemaStmt.cpp */,
3591853E0EFB1088000039AF /* SemaTemplate.cpp */,
- 1A6B6CD310693FC900BB4A8F /* SemaTemplate.h */,
BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */,
35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */,
1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */,
@@ -1509,11 +1514,30 @@
DE67E7260C02108300F66BC5 /* Sema */ = {
isa = PBXGroup;
children = (
- 7F270AFE107A90010031B377 /* CodeCompleteConsumer.h */,
- 9063F2210F9E8BDF002F7251 /* ExternalSemaSource.h */,
- 9063F2220F9E8BDF002F7251 /* SemaConsumer.h */,
- DE67E7270C02109800F66BC5 /* ParseAST.h */,
- DEA09A890F3175D9000C2258 /* SemaDiagnostic.h */,
+ BF9FEE451225EA24003A8B71 /* DelayedDiagnostic.h */,
+ BF9FED781225E041003A8B71 /* SemaInternal.h */,
+ BF9FED771225E032003A8B71 /* ObjCMethodList.h */,
+ BF9FED731225E005003A8B71 /* Ownership.h */,
+ BF9FED741225E005003A8B71 /* ParsedTemplate.h */,
+ BF9FED751225E005003A8B71 /* Scope.h */,
+ BF9FED761225E005003A8B71 /* ScopeInfo.h */,
+ BF9FED711225DFD9003A8B71 /* DeclSpec.h */,
+ BF9FED721225DFD9003A8B71 /* Designator.h */,
+ BF9FED701225DFA1003A8B71 /* AttributeList.h */,
+ BF9FED6F1225DF7F003A8B71 /* Action.h */,
+ BF9FED6E1225DF55003A8B71 /* TemplateDeduction.h */,
+ BD59A948121496B9003A5A02 /* AnalysisBasedWarnings.h */,
+ BD59A949121496B9003A5A02 /* CodeCompleteConsumer.h */,
+ BD59A94A121496B9003A5A02 /* CXXFieldCollector.h */,
+ BD59A94B121496B9003A5A02 /* ExternalSemaSource.h */,
+ BD59A94C121496B9003A5A02 /* IdentifierResolver.h */,
+ BD59A94D121496B9003A5A02 /* Initialization.h */,
+ BD59A94E121496B9003A5A02 /* Lookup.h */,
+ BD59A94F121496B9003A5A02 /* Overload.h */,
+ BD59A951121496B9003A5A02 /* Sema.h */,
+ BD59A952121496B9003A5A02 /* SemaConsumer.h */,
+ BD59A953121496B9003A5A02 /* SemaDiagnostic.h */,
+ BD59A954121496B9003A5A02 /* Template.h */,
);
name = Sema;
sourceTree = "<group>";
@@ -1521,6 +1545,14 @@
DE927FCC0C0557CD00231DA4 /* CodeGen */ = {
isa = PBXGroup;
children = (
+ BF9FEE361225E8CF003A8B71 /* README.txt */,
+ BF9FEE341225E8B1003A8B71 /* MicrosoftCXXABI.cpp */,
+ BF9FEE321225E898003A8B71 /* ItaniumCXXABI.cpp */,
+ BF9FEE301225E86C003A8B71 /* CodeGenAction.cpp */,
+ BF9FEE2F1225E854003A8B71 /* CGRecordLayout.h */,
+ BF9FEE2E1225E82D003A8B71 /* CGException.h */,
+ BF9FEE2D1225E80F003A8B71 /* CGCXXABI.h */,
+ BF9FEE2B1225E7EA003A8B71 /* BackendUtil.cpp */,
1A2193CB0F45EEB700C0713D /* ABIInfo.h */,
1A471AB40F437BC500753CE8 /* CGBlocks.cpp */,
1A649E1D0F9599D9005B965E /* CGBlocks.h */,
@@ -1573,6 +1605,8 @@
DE928B140C05659A00231DA4 /* CodeGen */ = {
isa = PBXGroup;
children = (
+ BF9FEDB81225E2DE003A8B71 /* BackendUtil.h */,
+ BF9FEDB91225E2DE003A8B71 /* CodeGenAction.h */,
DE928B1F0C0565B000231DA4 /* ModuleBuilder.h */,
);
name = CodeGen;
@@ -1581,6 +1615,8 @@
DEC8D98B0A9433BC00353FCA /* AST */ = {
isa = PBXGroup;
children = (
+ BF9FEDB71225E26A003A8B71 /* RecursiveASTVisitor.h */,
+ BF9FEDB61225E252003A8B71 /* OperationKinds.h */,
1A15C407118226980092260D /* ASTImporter.h */,
1A15C408118226980092260D /* ASTVector.h */,
1A15C409118226980092260D /* CharUnits.h */,
@@ -1613,7 +1649,6 @@
84AF36A00CB17A3B00C820A5 /* DeclObjC.h */,
35EE48AD0E0C4CB200715C54 /* DeclCXX.h */,
358D23090E8BEB850003DDCC /* DeclGroup.h */,
- DEDFE5270F63A9230035BD10 /* DeclNodes.def */,
DEB076C90F3A221200F5A2BE /* DeclTemplate.h */,
DE0FCA620A95859D00248FD5 /* Expr.h */,
1A30A9E80B93A4C800201A91 /* ExprCXX.h */,
@@ -1625,7 +1660,6 @@
DE6951C60C4D1F5D00A5826B /* RecordLayout.h */,
DE3452800AEF1B1800DBC861 /* Stmt.h */,
DECB73550FA3EE5A00F5FBC7 /* StmtCXX.h */,
- DE345F210AFD347900DBC861 /* StmtNodes.def */,
DECB734E0FA3ED8400F5FBC7 /* StmtObjC.h */,
DE345C190AFC658B00DBC861 /* StmtVisitor.h */,
35847BE30CC7DB9000C40FFF /* StmtIterator.h */,
@@ -1641,6 +1675,10 @@
DEC8D9920A9433F400353FCA /* AST */ = {
isa = PBXGroup;
children = (
+ BF9FEE051225E770003A8B71 /* MicrosoftCXXABI.cpp */,
+ BF9FEE031225E759003A8B71 /* ItaniumCXXABI.cpp */,
+ BF9FEE011225E73F003A8B71 /* ExprClassification.cpp */,
+ BF9FEE001225E718003A8B71 /* CXXABI.h */,
1ABD23B11182449800A48E65 /* APValue.cpp */,
1ABD23B21182449800A48E65 /* ASTConsumer.cpp */,
1ABD23B31182449800A48E65 /* ASTContext.cpp */,
@@ -1692,6 +1730,7 @@
DE67E7260C02108300F66BC5 /* Sema */,
DE928B140C05659A00231DA4 /* CodeGen */,
356EF9AF0C8F7DA4006650F5 /* Analysis */,
+ 57EB5654121B023900ECA335 /* Serialization */,
90FD6D5E103C3D03005F5B73 /* Index */,
DEF7D9F40C9C8B020001F598 /* Rewrite */,
DEF1615D0F65C7FC0098507F /* Frontend */,
@@ -1704,6 +1743,19 @@
DED7D7300A524295003AD0FB /* Basic */ = {
isa = PBXGroup;
children = (
+ BF9FEDF71225E613003A8B71 /* DiagnosticCategories.td */,
+ BF9FEDF61225E5FB003A8B71 /* Version.inc.in */,
+ BF9FEDF41225E5D5003A8B71 /* Linkage.h */,
+ BF9FEDF51225E5D5003A8B71 /* MacroBuilder.h */,
+ BF9FEDF31225E5B6003A8B71 /* DeclNodes.td */,
+ BF9FEDF21225E58B003A8B71 /* TargetOptions.h */,
+ BF9FEDF01225E574003A8B71 /* Specifiers.h */,
+ BF9FEDF11225E574003A8B71 /* StmtNodes.td */,
+ BF9FEDEF1225E55C003A8B71 /* BuiltinsARM.def */,
+ BF9FEDED1225E52F003A8B71 /* arm_neon.td */,
+ BF9FEDEE1225E52F003A8B71 /* Attr.td */,
+ BF9FEDEC1225E514003A8B71 /* Version.h */,
+ BF9FEDEB1225E4F2003A8B71 /* AttrKinds.h */,
DE37251C0FE4818000CF2CC2 /* Builtins.h */,
DE37252A0FE4818F00CF2CC2 /* Builtins.def */,
DE3725330FE4827200CF2CC2 /* BuiltinsPPC.def */,
@@ -1745,6 +1797,9 @@
DED7D7390A524295003AD0FB /* Lex */ = {
isa = PBXGroup;
children = (
+ BF9FEDB41225E1F3003A8B71 /* PreprocessingRecord.h */,
+ BF9FEDB31225E1E1003A8B71 /* ExternalPreprocessorSource.h */,
+ BF9FEDB21225E1D2003A8B71 /* CodeCompletionHandler.h */,
DE3450D60AEB543100DBC861 /* DirectoryLookup.h */,
DE704BD10D1647E7009C7762 /* HeaderMap.h */,
DE344AB70AE5DF6D00DBC861 /* HeaderSearch.h */,
@@ -1789,6 +1844,7 @@
DED7D78C0A5242E6003AD0FB /* Lex */ = {
isa = PBXGroup;
children = (
+ BF9FEEF1122D8068003A8B71 /* PreprocessingRecord.cpp */,
DE704DD10D1668A4009C7762 /* HeaderMap.cpp */,
DE344B530AE5E46C00DBC861 /* HeaderSearch.cpp */,
DED7D79E0A5242E6003AD0FB /* Lexer.cpp */,
@@ -1861,28 +1917,35 @@
DEF1615D0F65C7FC0098507F /* Frontend */ = {
isa = PBXGroup;
children = (
+ BF9FEDCE1225E42C003A8B71 /* VerifyDiagnosticsClient.h */,
+ BF9FEDCC1225E41D003A8B71 /* PreprocessorOptions.h */,
+ BF9FEDCD1225E41D003A8B71 /* PreprocessorOutputOptions.h */,
+ BF9FEDC81225E40A003A8B71 /* FrontendOptions.h */,
+ BF9FEDC91225E40A003A8B71 /* FrontendPluginRegistry.h */,
+ BF9FEDCA1225E40A003A8B71 /* HeaderSearchOptions.h */,
+ BF9FEDCB1225E40A003A8B71 /* LangStandard.h */,
+ BF9FEDC61225E3F6003A8B71 /* FrontendAction.h */,
+ BF9FEDC71225E3F6003A8B71 /* FrontendActions.h */,
+ BF9FEDC41225E3DA003A8B71 /* DependencyOutputOptions.h */,
+ BF9FEDC51225E3DA003A8B71 /* DiagnosticOptions.h */,
+ BF9FEDC21225E3C2003A8B71 /* CompilerInstance.h */,
+ BF9FEDC31225E3C2003A8B71 /* CompilerInvocation.h */,
+ BF9FEDC01225E3AB003A8B71 /* ChainedDiagnosticClient.h */,
+ BF9FEDC11225E3AB003A8B71 /* CodeGenOptions.h */,
+ BF9FEDBF1225E392003A8B71 /* AnalyzerOptions.h */,
90FD6D86103C3D80005F5B73 /* Analyses.def */,
- 90FD6D87103C3D80005F5B73 /* AnalysisConsumer.h */,
90FD6D88103C3D80005F5B73 /* ASTConsumers.h */,
90FD6D89103C3D80005F5B73 /* ASTUnit.h */,
90FD6D8A103C3D80005F5B73 /* CommandLineSourceLoc.h */,
90FD6D8B103C3D80005F5B73 /* DeclContextXML.def */,
90FD6D8C103C3D80005F5B73 /* DeclXML.def */,
90FD6D8D103C3D80005F5B73 /* DocumentXML.def */,
+ BF9FEDCF1225E443003A8B71 /* LangStandards.def */,
90FD6D8E103C3D80005F5B73 /* DocumentXML.h */,
90FD6D8F103C3D80005F5B73 /* StmtXML.def */,
90FD6D90103C3D80005F5B73 /* TypeXML.def */,
90FD6D91103C3D80005F5B73 /* Utils.h */,
- DEF161620F65C81C0098507F /* CompileOptions.h */,
- DEF168620F9549250098507F /* FixItRewriter.h */,
DEF169220F9645960098507F /* FrontendDiagnostic.h */,
- DEF1615E0F65C81C0098507F /* InitHeaderSearch.h */,
- DECB6F030F9D939A00F5FBC7 /* InitPreprocessor.h */,
- DEF1615F0F65C81C0098507F /* ManagerRegistry.h */,
- DEF1657E0F8FB3730098507F /* PCHBitCodes.h */,
- DEF1657B0F8FB36E0098507F /* PCHReader.h */,
- DEF165780F8FB3690098507F /* PCHWriter.h */,
- DEF161610F65C81C0098507F /* PathDiagnosticClients.h */,
DEF161600F65C81C0098507F /* TextDiagnosticBuffer.h */,
DEF161630F65C81C0098507F /* TextDiagnosticPrinter.h */,
);
@@ -1892,6 +1955,10 @@
DEF165020F8D46810098507F /* Driver */ = {
isa = PBXGroup;
children = (
+ BF9FEDE91225E4BD003A8B71 /* OptSpecifier.h */,
+ BF9FEDEA1225E4BD003A8B71 /* OptTable.h */,
+ BF9FEDE81225E49D003A8B71 /* CC1Options.h */,
+ BF9FEDE71225E488003A8B71 /* CC1AsOptions.h */,
DEF165160F8D46980098507F /* Action.h */,
DEF1651D0F8D46980098507F /* ArgList.h */,
DEF1651E0F8D46980098507F /* Arg.h */,
@@ -1919,6 +1986,10 @@
DEF7D9F40C9C8B020001F598 /* Rewrite */ = {
isa = PBXGroup;
children = (
+ BF9FEDBE1225E373003A8B71 /* ASTConsumers.h */,
+ BF9FEDBD1225E35F003A8B71 /* Rewriters.h */,
+ BF9FEDBB1225E34B003A8B71 /* FixItRewriter.h */,
+ BF9FEDBC1225E34B003A8B71 /* FrontendActions.h */,
DEFFECA30DB093D100B4E7C3 /* DeltaTree.h */,
35F2BE7B0DAC2963006E7668 /* HTMLRewrite.h */,
DEF7D9F60C9C8B1A0001F598 /* Rewriter.h */,
@@ -1969,6 +2040,12 @@
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
projectDirPath = "";
projectRoot = "";
@@ -2001,8 +2078,6 @@
DE34600B0AFDCCBF00DBC861 /* ParseStmt.cpp in Sources */,
DE34600F0AFDCCCE00DBC861 /* ParseDecl.cpp in Sources */,
DE3460130AFDCCDA00DBC861 /* ParseExpr.cpp in Sources */,
- DE3461270AFE68BE00DBC861 /* MinimalAction.cpp in Sources */,
- DE17336E0B068DC20080B521 /* DeclSpec.cpp in Sources */,
1A869AA80BA21ABA008DA07A /* LiteralSupport.cpp in Sources */,
DE67E70B0C020EC500F66BC5 /* SemaType.cpp in Sources */,
DE67E70D0C020ECA00F66BC5 /* SemaStmt.cpp in Sources */,
@@ -2010,7 +2085,6 @@
DE67E7110C020ED400F66BC5 /* SemaExpr.cpp in Sources */,
DE67E7130C020ED900F66BC5 /* SemaDecl.cpp in Sources */,
DE67E7170C020EE400F66BC5 /* Sema.cpp in Sources */,
- DE67E71A0C020F4F00F66BC5 /* ParseAST.cpp in Sources */,
DE06756C0C051CFE00EBBFD8 /* ParseExprCXX.cpp in Sources */,
DE928B130C05659200231DA4 /* ModuleBuilder.cpp in Sources */,
DE928B7F0C0A615600231DA4 /* CodeGenModule.cpp in Sources */,
@@ -2018,7 +2092,6 @@
DE4772FA0C10EAE5002239E8 /* CGStmt.cpp in Sources */,
DE4772FC0C10EAEC002239E8 /* CGExpr.cpp in Sources */,
DE4264FC0C113592005A861D /* CGDecl.cpp in Sources */,
- 84D9A8880C1A57E100AC7ABC /* AttributeList.cpp in Sources */,
DEEBC3BC0C2363BC00A9FE82 /* CodeGenTypes.cpp in Sources */,
DEF2EFF30C6CDD74000C4259 /* CGExprAgg.cpp in Sources */,
DEF2F0100C6CFED5000C4259 /* SemaChecking.cpp in Sources */,
@@ -2096,9 +2169,7 @@
DEB077990F44F97800F5A2BE /* TokenConcatenation.cpp in Sources */,
1A2193CE0F45EEB700C0713D /* Mangle.cpp in Sources */,
DEB07AC80F4A427E00F5A2BE /* SemaAttr.cpp in Sources */,
- 352246E70F5C6BE000D0D279 /* HTMLDiagnostics.cpp in Sources */,
352246E80F5C6BE000D0D279 /* InitHeaderSearch.cpp in Sources */,
- 352246EA0F5C6BE000D0D279 /* PlistDiagnostics.cpp in Sources */,
352246EB0F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp in Sources */,
352246EC0F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp in Sources */,
35544B880F5C7FD700D92AA9 /* RangeConstraintManager.cpp in Sources */,
@@ -2123,24 +2194,13 @@
DEDFE6680F7B3B830035BD10 /* Driver.cpp in Sources */,
1A701B640F7C8FE400FEC4D1 /* SemaAccess.cpp in Sources */,
906BF4B00F83BA2E001071FA /* ConvertUTF.c in Sources */,
- DEF165710F8FB34D0098507F /* PCHWriter.cpp in Sources */,
- DEF165750F8FB3510098507F /* PCHReader.cpp in Sources */,
- DEF168400F9548DC0098507F /* FixItRewriter.cpp in Sources */,
DECB6D650F9AE26600F5FBC7 /* JumpDiagnostics.cpp in Sources */,
DECB6F070F9D93A800F5FBC7 /* InitPreprocessor.cpp in Sources */,
- DECB77130FA5752300F5FBC7 /* PCHReaderStmt.cpp in Sources */,
- DECB77790FA579B000F5FBC7 /* PCHReaderDecl.cpp in Sources */,
- DECB77F70FA5850200F5FBC7 /* PCHWriterDecl.cpp in Sources */,
- DECB78170FA5882F00F5FBC7 /* PCHWriterStmt.cpp in Sources */,
- 1A2A54B50FD1DD1C00F4CE45 /* AnalysisConsumer.cpp in Sources */,
1A2A54B60FD1DD1C00F4CE45 /* ASTConsumers.cpp in Sources */,
1A2A54B80FD1DD1C00F4CE45 /* CacheTokens.cpp in Sources */,
1A2A54B90FD1DD1C00F4CE45 /* DependencyFile.cpp in Sources */,
1A2A54BA0FD1DD1C00F4CE45 /* DiagChecker.cpp in Sources */,
1A2A54BB0FD1DD1C00F4CE45 /* DocumentXML.cpp in Sources */,
- 1A2A54BC0FD1DD1C00F4CE45 /* GeneratePCH.cpp in Sources */,
- 1A2A54BD0FD1DD1C00F4CE45 /* HTMLPrint.cpp in Sources */,
- 1A2A54BE0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp in Sources */,
1A2A54BF0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp in Sources */,
1A2A54C40FD1DD1C00F4CE45 /* StmtXML.cpp in Sources */,
1A2A54C50FD1DD1C00F4CE45 /* Warnings.cpp in Sources */,
@@ -2157,7 +2217,6 @@
90FD6D81103C3D49005F5B73 /* Indexer.cpp in Sources */,
90FD6D82103C3D49005F5B73 /* IndexProvider.cpp in Sources */,
90FD6D83103C3D49005F5B73 /* Program.cpp in Sources */,
- 90FD6D84103C3D49005F5B73 /* ResolveLocation.cpp in Sources */,
90FD6D85103C3D49005F5B73 /* SelectorMap.cpp in Sources */,
90FD6DB6103D977E005F5B73 /* index-test.cpp in Sources */,
9012911D1048068D0083456D /* ASTUnit.cpp in Sources */,
@@ -2194,7 +2253,6 @@
BF89C3FB11595A37001C2D68 /* SemaCodeComplete.cpp in Sources */,
BF89C3FD11595A5D001C2D68 /* SemaExceptionSpec.cpp in Sources */,
1AFDD8721161085D00AE030A /* ASTMerge.cpp in Sources */,
- 1AFDD8731161085D00AE030A /* CodeGenAction.cpp in Sources */,
1ABD23D61182449800A48E65 /* APValue.cpp in Sources */,
1ABD23D71182449800A48E65 /* ASTConsumer.cpp in Sources */,
1ABD23D81182449800A48E65 /* ASTContext.cpp in Sources */,
@@ -2239,8 +2297,6 @@
BFE2F6B511DA955A0007EDC0 /* RewriteMacros.d in Sources */,
BFE2F6B711DA955A0007EDC0 /* RewriteObjC.d in Sources */,
BFE2F6B911DA955A0007EDC0 /* Rewriter.d in Sources */,
- BFE2F6BB11DA955A0007EDC0 /* RewriteRope.d in Sources */,
- BFE2F6BD11DA955A0007EDC0 /* RewriteTest.d in Sources */,
BFE2F6BF11DA955A0007EDC0 /* TokenRewriter.d in Sources */,
BFE2F6C111DA955A0007EDC0 /* DeltaTree.cpp in Sources */,
BFE2F6C211DA955A0007EDC0 /* FixItRewriter.cpp in Sources */,
@@ -2251,7 +2307,6 @@
BFE2F6C711DA955A0007EDC0 /* DeltaTree.d in Sources */,
BFE2F6C911DA955A0007EDC0 /* HTMLRewrite.d in Sources */,
BFE2F6CB11DA955A0007EDC0 /* Rewriter.d in Sources */,
- BFE2F6CD11DA955A0007EDC0 /* RewriteRope.d in Sources */,
BFE2F6CF11DA955A0007EDC0 /* TokenRewriter.d in Sources */,
BFE2F6D111DA955A0007EDC0 /* RewriteMacros.cpp in Sources */,
BFE2F6D211DA955A0007EDC0 /* RewriteObjC.cpp in Sources */,
@@ -2259,6 +2314,28 @@
BFE2F6D411DA955A0007EDC0 /* RewriteRope.cpp in Sources */,
BFE2F6D511DA955A0007EDC0 /* RewriteTest.cpp in Sources */,
BFE2F6D611DA955A0007EDC0 /* TokenRewriter.cpp in Sources */,
+ 57EB566A121B034300ECA335 /* GeneratePCH.cpp in Sources */,
+ 57EB566B121B034300ECA335 /* Makefile in Sources */,
+ 57F66612121B4DE600DCE3B7 /* ASTWriter.cpp in Sources */,
+ 57F66613121B4DE600DCE3B7 /* ASTWriterDecl.cpp in Sources */,
+ 57F66614121B4DE600DCE3B7 /* ASTWriterStmt.cpp in Sources */,
+ 57AA9250121C8B9400B4AA6C /* ASTReader.cpp in Sources */,
+ 57AA9251121C8B9400B4AA6C /* ASTReaderDecl.cpp in Sources */,
+ 57AA9252121C8B9400B4AA6C /* ASTReaderStmt.cpp in Sources */,
+ BF9FEDF91225E67B003A8B71 /* Action.cpp in Sources */,
+ BF9FEDFB1225E6A9003A8B71 /* AttributeList.cpp in Sources */,
+ BF9FEDFD1225E6C6003A8B71 /* DeclSpec.cpp in Sources */,
+ BF9FEDFF1225E6DD003A8B71 /* TargetAttributesSema.cpp in Sources */,
+ BF9FEE021225E73F003A8B71 /* ExprClassification.cpp in Sources */,
+ BF9FEE041225E759003A8B71 /* ItaniumCXXABI.cpp in Sources */,
+ BF9FEE061225E770003A8B71 /* MicrosoftCXXABI.cpp in Sources */,
+ BF9FEE2C1225E7EA003A8B71 /* BackendUtil.cpp in Sources */,
+ BF9FEE311225E86C003A8B71 /* CodeGenAction.cpp in Sources */,
+ BF9FEE331225E898003A8B71 /* ItaniumCXXABI.cpp in Sources */,
+ BF9FEE351225E8B1003A8B71 /* MicrosoftCXXABI.cpp in Sources */,
+ BF9FEE381225E925003A8B71 /* BoostConAction.cpp in Sources */,
+ BF9FEE521226FE9F003A8B71 /* ParseAST.cpp in Sources */,
+ BF9FEEF2122D8068003A8B71 /* PreprocessingRecord.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/docs/InternalsManual.html b/docs/InternalsManual.html
index 7aa26e00a4f1..6df26db8cfeb 100644
--- a/docs/InternalsManual.html
+++ b/docs/InternalsManual.html
@@ -707,9 +707,10 @@ above, it would be the location of the "a" identifier.</li>
last token replaced with the annotation token. In the example above, it would
be the location of the "c" identifier.</li>
-<li><b>void* "AnnotationValue"</b> - This contains an opaque object that the
-parser gets from Sema through an Actions module, it is passed around and Sema
-interprets it, based on the type of annotation token.</li>
+<li><b>void* "AnnotationValue"</b> - This contains an opaque object
+that the parser gets from Sema. The parser merely preserves the
+information for Sema to later interpret based on the annotation token
+kind.</li>
<li><b>TokenKind "Kind"</b> - This indicates the kind of Annotation token this
is. See below for the different valid kinds.</li>
@@ -719,21 +720,29 @@ is. See below for the different valid kinds.</li>
<ol>
<li><b>tok::annot_typename</b>: This annotation token represents a
-resolved typename token that is potentially qualified. The AnnotationValue
-field contains a pointer returned by Action::getTypeName(). In the case of the
-Sema actions module, this is a <tt>Decl*</tt> for the type.</li>
-
-<li><b>tok::annot_cxxscope</b>: This annotation token represents a C++ scope
-specifier, such as "A::B::". This corresponds to the grammar productions "::"
-and ":: [opt] nested-name-specifier". The AnnotationValue pointer is returned
-by the Action::ActOnCXXGlobalScopeSpecifier and
-Action::ActOnCXXNestedNameSpecifier callbacks. In the case of Sema, this is a
-<tt>DeclContext*</tt>.</li>
+resolved typename token that is potentially qualified. The
+AnnotationValue field contains the <tt>QualType</tt> returned by
+Sema::getTypeName(), possibly with source location information
+attached.</li>
+
+<li><b>tok::annot_cxxscope</b>: This annotation token represents a C++
+scope specifier, such as "A::B::". This corresponds to the grammar
+productions "::" and ":: [opt] nested-name-specifier". The
+AnnotationValue pointer is a <tt>NestedNameSpecifier*</tt> returned by
+the Sema::ActOnCXXGlobalScopeSpecifier and
+Sema::ActOnCXXNestedNameSpecifier callbacks.</li>
<li><b>tok::annot_template_id</b>: This annotation token represents a
C++ template-id such as "foo&lt;int, 4&gt;", where "foo" is the name
of a template. The AnnotationValue pointer is a pointer to a malloc'd
-TemplateIdAnnotation object. Depending on the context, a parsed template-id that names a type might become a typename annotation token (if all we care about is the named type, e.g., because it occurs in a type specifier) or might remain a template-id token (if we want to retain more source location information or produce a new type, e.g., in a declaration of a class template specialization). template-id annotation tokens that refer to a type can be "upgraded" to typename annotation tokens by the parser.</li>
+TemplateIdAnnotation object. Depending on the context, a parsed
+template-id that names a type might become a typename annotation token
+(if all we care about is the named type, e.g., because it occurs in a
+type specifier) or might remain a template-id token (if we want to
+retain more source location information or produce a new type, e.g.,
+in a declaration of a class template specialization). template-id
+annotation tokens that refer to a type can be "upgraded" to typename
+annotation tokens by the parser.</li>
</ol>
@@ -953,11 +962,12 @@ make sense to you :).</p>
<h3 id="QualType">The QualType class</h3>
<!-- ======================================================================= -->
-<p>The QualType class is designed as a trivial value class that is small,
-passed by-value and is efficient to query. The idea of QualType is that it
-stores the type qualifiers (const, volatile, restrict) separately from the types
-themselves: QualType is conceptually a pair of "Type*" and bits for the type
-qualifiers.</p>
+<p>The QualType class is designed as a trivial value class that is
+small, passed by-value and is efficient to query. The idea of
+QualType is that it stores the type qualifiers (const, volatile,
+restrict, plus some extended qualifiers required by language
+extensions) separately from the types themselves. QualType is
+conceptually a pair of "Type*" and the bits for these type qualifiers.</p>
<p>By storing the type qualifiers as bits in the conceptual pair, it is
extremely efficient to get the set of qualifiers on a QualType (just return the
@@ -972,10 +982,11 @@ both point to the same heap allocated "int" type). This reduces the heap size
used to represent bits and also means we do not have to consider qualifiers when
uniquing types (<a href="#Type">Type</a> does not even contain qualifiers).</p>
-<p>In practice, on hosts where it is safe, the 3 type qualifiers are stored in
-the low bit of the pointer to the Type object. This means that QualType is
-exactly the same size as a pointer, and this works fine on any system where
-malloc'd objects are at least 8 byte aligned.</p>
+<p>In practice, the two most common type qualifiers (const and
+restrict) are stored in the low bits of the pointer to the Type
+object, together with a flag indicating whether extended qualifiers
+are present (which must be heap-allocated). This means that QualType
+is exactly the same size as a pointer.</p>
<!-- ======================================================================= -->
<h3 id="DeclarationName">Declaration names</h3>
diff --git a/docs/LanguageExtensions.html b/docs/LanguageExtensions.html
index 838b65f27b81..75a4608993e9 100644
--- a/docs/LanguageExtensions.html
+++ b/docs/LanguageExtensions.html
@@ -40,6 +40,7 @@ td {
<li><a href="#cxx_static_assert">C++0x <tt>static_assert()</tt></a></li>
<li><a href="#cxx_auto_type">C++0x type inference</a></li>
<li><a href="#cxx_variadic_templates">C++0x variadic templates</a></li>
+ <li><a href="#cxx_inline_namespaces">C++0x inline namespaces</a></li>
</ul>
<li><a href="#blocks">Blocks</a></li>
<li><a href="#overloading-in-c">Function Overloading in C</a></li>
@@ -301,32 +302,34 @@ not yet implemented will be noted.</p>
<h3 id="cxx_attributes">C++0x attributes</h3>
<p>Use <tt>__has_feature(cxx_attributes)</tt> to determine if support for
-attribute parsing with C++0x's square bracket notation is enabled.
+attribute parsing with C++0x's square bracket notation is enabled.</p>
<h3 id="cxx_deleted_functions">C++0x deleted functions</tt></h3>
<p>Use <tt>__has_feature(cxx_deleted_functions)</tt> to determine if support for
-deleted function definitions (with <tt>= delete</tt>) is enabled.
+deleted function definitions (with <tt>= delete</tt>) is enabled.</p>
<h3 id="cxx_concepts">C++ TR concepts</h3>
<p>Use <tt>__has_feature(cxx_concepts)</tt> to determine if support for
-concepts is enabled. clang does not currently implement this feature.
+concepts is enabled. clang does not currently implement this feature.</p>
<h3 id="cxx_lambdas">C++0x lambdas</h3>
<p>Use <tt>__has_feature(cxx_lambdas)</tt> to determine if support for
-lambdas is enabled. clang does not currently implement this feature.
+lambdas is enabled. clang does not currently implement this feature.</p>
<h3 id="cxx_nullptr">C++0x <tt>nullptr</tt></h3>
<p>Use <tt>__has_feature(cxx_nullptr)</tt> to determine if support for
-<tt>nullptr</tt> is enabled. clang does not yet fully implement this feature.
+<tt>nullptr</tt> is enabled. clang does not yet fully implement this
+feature.</p>
<h3 id="cxx_rvalue_references">C++0x rvalue references</tt></h3>
<p>Use <tt>__has_feature(cxx_rvalue_references)</tt> to determine if support for
-rvalue references is enabled. clang does not yet fully implement this feature.
+rvalue references is enabled. clang does not yet fully implement this
+feature.</p>
<h3 id="cxx_static_assert">C++0x <tt>static_assert()</tt></h3>
@@ -339,12 +342,17 @@ compile-time assertions using <tt>static_assert</tt> is enabled.</p>
is supported using the <tt>auto</tt> specifier. If this is disabled,
<tt>auto</tt> will instead be a storage class specifier, as in C or C++98.</p>
-<h3 id="cxx_variadic_templates">C++0x variadic templates</tt></h3>
+<h3 id="cxx_variadic_templates">C++0x variadic templates</h3>
<p>Use <tt>__has_feature(cxx_variadic_templates)</tt> to determine if support
for templates taking any number of arguments with the ellipsis notation is
enabled. clang does not yet fully implement this feature.</p>
+<h3 id="cxx_inline_namespaces">C++0x inline namespaces</h3>
+
+<p>Use <tt>__has_feature(cxx_inline_namespaces)</tt> to determine if support for
+inline namespaces is enabled.</p>
+
<!-- ======================================================================= -->
<h2 id="blocks">Blocks</h2>
<!-- ======================================================================= -->
diff --git a/docs/UsersManual.html b/docs/UsersManual.html
index 51e699fc32cb..75241610a32d 100644
--- a/docs/UsersManual.html
+++ b/docs/UsersManual.html
@@ -39,6 +39,7 @@ td {
<li><a href="#diagnostics_categories">Diagnostic Categories</a></li>
<li><a href="#diagnostics_commandline">Controlling Diagnostics via Command Line Flags</a></li>
<li><a href="#diagnostics_pragmas">Controlling Diagnostics via Pragmas</a></li>
+ <li><a href="#analyzer_diagnositics">Controlling Static Analyzer Diagnostics</a></li>
</ul>
<li><a href="#precompiledheaders">Precompiled Headers</a></li>
<li><a href="#codegen">Controlling Code Generation</a></li>
@@ -358,6 +359,18 @@ exprs.c:47:15:{47:8-47:14}{47:17-47:24}: error: invalid operands to binary expre
<p>The {}'s are generated by -fdiagnostics-print-source-range-info.</p>
</dd>
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+<dt id="opt_fdiagnostics-parseable-fixits">
+<b>-fdiagnostics-parseable-fixits</b>:
+Print Fix-Its in a machine parseable form.</dt>
+<dd><p>This option makes Clang print available Fix-Its in a machine parseable format at the end of diagnostics. The following example illustrates the format:</p>
+
+<pre>
+ fix-it:"t.cpp":{7:25-7:29}:"Gamma"
+</pre>
+
+<p>The range printed is a half-open range, so in this example the characters at column 25 up to but not including column 29 on line 7 in t.cpp should be replaced with the string "Gamma". Either the range or the replacement string may be empty (representing strict insertions and strict erasures, respectively). Both the file name and the insertion string escape backslash (as "\\"), tabs (as "\t"), newlines (as "\n"), double quotes(as "\"") and non-printable characters (as octal "\xxx").</p>
+</dd>
</dl>
@@ -579,6 +592,42 @@ GCC do not support the exact same set of warnings, so even when using GCC
compatible #pragmas there is no guarantee that they will have identical behaviour
on both compilers. </p>
+<h4 id="analyzer_diagnositics">Controlling Static Analyzer Diagnostics</h4>
+
+<p>While not strictly part of the compiler, the diagnostics from Clang's <a
+href="http://clang-analyzer.llvm.org">static analyzer</a> can also be influenced
+by the user via changes to the source code. This can be done in two ways:
+
+<ul>
+
+<li id="analyzer_annotations"><b>Annotations</b>: The static analyzer recognizes various GCC-style
+attributes (e.g., <tt>__attribute__((nonnull)))</tt>) that can either suppress
+static analyzer warnings or teach the analyzer about code invariants which
+enable it to find more bugs. While many of these attributes are standard GCC
+attributes, additional ones have added to Clang to specifically support the
+static analyzer. Detailed information on these annotations can be found in the
+<a href="http://clang-analyzer.llvm.org/annotations.html">analyzer's
+documentation</a>.</li>
+
+<li><b><tt>__clang_analyzer__</tt></b>: When the static analyzer is using Clang
+to parse source files, it implicitly defines the preprocessor macro
+<tt>__clang_analyzer__</tt>. While discouraged, code can use this macro to
+selectively exclude code the analyzer examines. Here is an example:
+
+<pre>
+#ifndef __clang_analyzer__
+// Code not to be analyzed
+#endif
+</pre>
+
+In general, this usage is discouraged. Instead, we prefer that users file bugs
+against the analyzer when it flags false positives. There is also active
+discussion of allowing users in the future to selectively silence specific
+analyzer warnings (some which can already be done using <a
+href="analyzer_annotations">annotations</a>).</li>
+
+</ul>
+
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3 id="precompiledheaders">Precompiled Headers</h3>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
@@ -789,11 +838,6 @@ soon.</li>
the uses described in the bug, this is likely to be implemented at some
point, at least partially.</li>
-<li>clang does not support #pragma align
-(<a href="http://llvm.org/bugs/show_bug.cgi?id=3811">bug 3811</a>). This is a
-relatively small feature, so it is likely to be implemented relatively
-soon.</li>
-
<li>clang does not support code generation for local variables pinned to
registers (<a href="http://llvm.org/bugs/show_bug.cgi?id=3933">bug 3933</a>).
This is a relatively small feature, so it is likely to be implemented
diff --git a/docs/tools/clang.pod b/docs/tools/clang.pod
index 0c1ab574d535..032efcfcabc5 100644
--- a/docs/tools/clang.pod
+++ b/docs/tools/clang.pod
@@ -168,6 +168,10 @@ Enable support for Pascal-style strings with "\pfoo".
Enable support for Microsoft extensions.
+=item B<-fborland-extensions>
+
+Enable support for Borland extensions.
+
=item B<-fwritable-strings>
Make all string literals default to writable. This disables uniquing of
@@ -395,6 +399,7 @@ Show commands to run and use verbose output.
B<-fshow-source-location>
B<-fcaret-diagnostics>
B<-fdiagnostics-fixit-info>
+B<-fdiagnostics-parseable-fixits>
B<-fdiagnostics-print-source-range-info>
B<-fprint-source-range-info>
B<-fdiagnostics-show-option>
@@ -515,7 +520,6 @@ targets.
=head1 BUGS
-Clang currently does not have C++ support, and this manual page is incomplete.
To report bugs, please visit L<http://llvm.org/bugs/>. Most bug reports should
include preprocessed source files (use the B<-E> option) and the full output of
the compiler, along with information to reproduce.
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index d2738c69035e..9a32ee406523 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,4 +1,3 @@
add_subdirectory(clang-interpreter)
add_subdirectory(PrintFunctionNames)
-add_subdirectory(wpa)
diff --git a/examples/Makefile b/examples/Makefile
index c4af25263398..8cb431d73916 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -9,6 +9,6 @@
CLANG_LEVEL := ..
-PARALLEL_DIRS := clang-interpreter PrintFunctionNames wpa
+PARALLEL_DIRS := clang-interpreter PrintFunctionNames
include $(CLANG_LEVEL)/Makefile
diff --git a/examples/PrintFunctionNames/Makefile b/examples/PrintFunctionNames/Makefile
index 0ff5189437c7..125ac4854ffc 100644
--- a/examples/PrintFunctionNames/Makefile
+++ b/examples/PrintFunctionNames/Makefile
@@ -10,10 +10,15 @@
CLANG_LEVEL := ../..
LIBRARYNAME = PrintFunctionNames
+# If we don't need RTTI or EH, there's no reason to export anything
+# from the plugin.
+ifneq ($(REQUIRES_RTTI), 1)
+ifneq ($(REQUIRES_EH), 1)
+EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/PrintFunctionNames.exports
+endif
+endif
+
LINK_LIBS_IN_SHARED = 1
SHARED_LIBRARY = 1
-USEDLIBS = clangIndex.a clangFrontend.a clangDriver.a clangSema.a \
- clangAnalysis.a clangAST.a clangParse.a clangLex.a clangBasic.a
-
include $(CLANG_LEVEL)/Makefile
diff --git a/examples/PrintFunctionNames/PrintFunctionNames.cpp b/examples/PrintFunctionNames/PrintFunctionNames.cpp
index 397cf843fa7f..cc138f56dbba 100644
--- a/examples/PrintFunctionNames/PrintFunctionNames.cpp
+++ b/examples/PrintFunctionNames/PrintFunctionNames.cpp
@@ -15,6 +15,7 @@
#include "clang/Frontend/FrontendPluginRegistry.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/AST.h"
+#include "clang/Frontend/CompilerInstance.h"
#include "llvm/Support/raw_ostream.h"
using namespace clang;
@@ -29,7 +30,7 @@ public:
llvm::errs() << "top-level-decl: \"" << ND->getNameAsString() << "\"\n";
}
}
-};
+};
class PrintFunctionNamesAction : public PluginASTAction {
protected:
@@ -37,15 +38,26 @@ protected:
return new PrintFunctionsConsumer();
}
- bool ParseArgs(const std::vector<std::string>& args) {
- for (unsigned i=0; i<args.size(); ++i)
+ bool ParseArgs(const CompilerInstance &CI,
+ const std::vector<std::string>& args) {
+ for (unsigned i = 0, e = args.size(); i != e; ++i) {
llvm::errs() << "PrintFunctionNames arg = " << args[i] << "\n";
+
+ // Example error handling.
+ if (args[i] == "-an-error") {
+ Diagnostic &D = CI.getDiagnostics();
+ unsigned DiagID = D.getCustomDiagID(
+ Diagnostic::Error, "invalid argument '" + args[i] + "'");
+ D.Report(DiagID);
+ return false;
+ }
+ }
if (args.size() && args[0] == "help")
PrintHelp(llvm::errs());
return true;
}
- void PrintHelp(llvm::raw_ostream& ros) {
+ void PrintHelp(llvm::raw_ostream& ros) {
ros << "Help for PrintFunctionNames plugin goes here\n";
}
@@ -53,5 +65,5 @@ protected:
}
-FrontendPluginRegistry::Add<PrintFunctionNamesAction>
+static FrontendPluginRegistry::Add<PrintFunctionNamesAction>
X("print-fns", "print function names");
diff --git a/examples/PrintFunctionNames/PrintFunctionNames.exports b/examples/PrintFunctionNames/PrintFunctionNames.exports
new file mode 100644
index 000000000000..0ff590d30d7b
--- /dev/null
+++ b/examples/PrintFunctionNames/PrintFunctionNames.exports
@@ -0,0 +1 @@
+_ZN4llvm8Registry*
diff --git a/examples/clang-interpreter/CMakeLists.txt b/examples/clang-interpreter/CMakeLists.txt
index 1aa9b2b59224..73f28bb7a2e7 100644
--- a/examples/clang-interpreter/CMakeLists.txt
+++ b/examples/clang-interpreter/CMakeLists.txt
@@ -2,10 +2,12 @@ set(LLVM_NO_RTTI 1)
set(LLVM_USED_LIBS
clangFrontend
+ clangSerialization
clangDriver
clangCodeGen
clangSema
clangChecker
+ clangIndex
clangAnalysis
clangRewrite
clangAST
diff --git a/examples/clang-interpreter/Makefile b/examples/clang-interpreter/Makefile
index 6fa58d22cbd9..2f5e017af803 100644
--- a/examples/clang-interpreter/Makefile
+++ b/examples/clang-interpreter/Makefile
@@ -17,8 +17,8 @@ TOOL_NO_EXPORTS = 1
LINK_COMPONENTS := jit interpreter nativecodegen bitreader bitwriter ipo \
selectiondag asmparser
-USEDLIBS = clangFrontend.a clangDriver.a clangCodeGen.a clangSema.a \
- clangChecker.a clangAnalysis.a clangRewrite.a clangAST.a \
- clangParse.a clangLex.a clangBasic.a
+USEDLIBS = clangFrontend.a clangSerialization.a clangDriver.a clangCodeGen.a \
+ clangSema.a clangChecker.a clangAnalysis.a clangRewrite.a \
+ clangAST.a clangParse.a clangLex.a clangBasic.a
include $(CLANG_LEVEL)/Makefile
diff --git a/examples/clang-interpreter/main.cpp b/examples/clang-interpreter/main.cpp
index ec4e8619829f..2ccba8b24a85 100644
--- a/examples/clang-interpreter/main.cpp
+++ b/examples/clang-interpreter/main.cpp
@@ -66,11 +66,11 @@ int Execute(llvm::Module *Mod, char * const *envp) {
int main(int argc, const char **argv, char * const *envp) {
void *MainAddr = (void*) (intptr_t) GetExecutablePath;
llvm::sys::Path Path = GetExecutablePath(argv[0]);
- TextDiagnosticPrinter DiagClient(llvm::errs(), DiagnosticOptions());
+ TextDiagnosticPrinter *DiagClient =
+ new TextDiagnosticPrinter(llvm::errs(), DiagnosticOptions());
- Diagnostic Diags(&DiagClient);
- Driver TheDriver(Path.getBasename(), Path.getDirname(),
- llvm::sys::getHostTriple(),
+ Diagnostic Diags(DiagClient);
+ Driver TheDriver(Path.str(), llvm::sys::getHostTriple(),
"a.out", /*IsProduction=*/false, /*CXXIsProduction=*/false,
Diags);
TheDriver.setTitle("clang interpreter");
diff --git a/examples/wpa/CMakeLists.txt b/examples/wpa/CMakeLists.txt
index c2b2ce63a934..13e4298c1f2e 100644
--- a/examples/wpa/CMakeLists.txt
+++ b/examples/wpa/CMakeLists.txt
@@ -6,6 +6,7 @@ set(LLVM_USED_LIBS
clangDriver
clangSema
clangAnalysis
+ clangSerialization
clangChecker
clangRewrite
clangAST
diff --git a/examples/wpa/Makefile b/examples/wpa/Makefile
index bd6ebfdc9bfe..0a70ea6359c8 100644
--- a/examples/wpa/Makefile
+++ b/examples/wpa/Makefile
@@ -17,7 +17,7 @@ TOOL_NO_EXPORTS = 1
LINK_COMPONENTS := asmparser bitreader mc core
USEDLIBS = clangChecker.a clangIndex.a clangFrontend.a clangDriver.a \
- clangSema.a clangAnalysis.a clangAST.a clangParse.a clangLex.a \
- clangBasic.a
+ clangSema.a clangAnalysis.a clangSerialization.a \
+ clangAST.a clangParse.a clangLex.a clangBasic.a
include $(CLANG_LEVEL)/Makefile
diff --git a/examples/wpa/clang-wpa.cpp b/examples/wpa/clang-wpa.cpp
index 74ec368cfbe7..41dca0dc451e 100644
--- a/examples/wpa/clang-wpa.cpp
+++ b/examples/wpa/clang-wpa.cpp
@@ -62,6 +62,10 @@ public:
return AST->getPreprocessor();
}
+ virtual Diagnostic &getDiagnostic() {
+ return AST->getDiagnostics();
+ }
+
virtual DeclReferenceMap &getDeclReferenceMap() {
return DeclRefMap;
}
@@ -87,7 +91,7 @@ int main(int argc, char **argv) {
= CompilerInstance::createDiagnostics(DiagOpts, argc, argv);
for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i) {
const std::string &InFile = InputFilenames[i];
- llvm::OwningPtr<ASTUnit> AST(ASTUnit::LoadFromPCHFile(InFile, Diags));
+ llvm::OwningPtr<ASTUnit> AST(ASTUnit::LoadFromASTFile(InFile, Diags));
if (!AST)
return 1;
@@ -129,17 +133,18 @@ int main(int argc, char **argv) {
AnalysisManager AMgr(TU->getASTContext(), PP.getDiagnostics(),
PP.getLangOptions(), /* PathDiagnostic */ 0,
CreateRegionStoreManager,
- CreateRangeConstraintManager,
+ CreateRangeConstraintManager, &Idxer,
/* MaxNodes */ 300000, /* MaxLoop */ 3,
/* VisualizeEG */ false, /* VisualizeEGUbi */ false,
/* PurgeDead */ true, /* EagerlyAssume */ false,
- /* TrimGraph */ false, /* InlineCall */ true);
+ /* TrimGraph */ false, /* InlineCall */ true,
+ /* UseUnoptimizedCFG */ false);
GRTransferFuncs* TF = MakeCFRefCountTF(AMgr.getASTContext(), /*GC*/false,
AMgr.getLangOptions());
GRExprEngine Eng(AMgr, TF);
- Eng.ExecuteWorkList(AMgr.getStackFrame(FD), AMgr.getMaxNodes());
+ Eng.ExecuteWorkList(AMgr.getStackFrame(FD, TU), AMgr.getMaxNodes());
return 0;
}
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index b377b6d5fe2c..4631c65bf05a 100644
--- a/include/clang-c/Index.h
+++ b/include/clang-c/Index.h
@@ -98,6 +98,27 @@ struct CXUnsavedFile {
};
/**
+ * \brief Describes the availability of a particular entity, which indicates
+ * whether the use of this entity will result in a warning or error due to
+ * it being deprecated or unavailable.
+ */
+enum CXAvailabilityKind {
+ /**
+ * \brief The entity is available.
+ */
+ CXAvailability_Available,
+ /**
+ * \brief The entity is available, but has been deprecated (and its use is
+ * not recommended).
+ */
+ CXAvailability_Deprecated,
+ /**
+ * \brief The entity is not available; any use of it will be an error.
+ */
+ CXAvailability_NotAvailable
+};
+
+/**
* \defgroup CINDEX_STRING String manipulation routines
*
* @{
@@ -624,7 +645,7 @@ CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnitFromSourceFile(
CXIndex CIdx,
const char *source_filename,
int num_clang_command_line_args,
- const char **clang_command_line_args,
+ const char * const *clang_command_line_args,
unsigned num_unsaved_files,
struct CXUnsavedFile *unsaved_files);
@@ -635,11 +656,261 @@ CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit(CXIndex,
const char *ast_filename);
/**
+ * \brief Flags that control the creation of translation units.
+ *
+ * The enumerators in this enumeration type are meant to be bitwise
+ * ORed together to specify which options should be used when
+ * constructing the translation unit.
+ */
+enum CXTranslationUnit_Flags {
+ /**
+ * \brief Used to indicate that no special translation-unit options are
+ * needed.
+ */
+ CXTranslationUnit_None = 0x0,
+
+ /**
+ * \brief Used to indicate that the parser should construct a "detailed"
+ * preprocessing record, including all macro definitions and instantiations.
+ *
+ * Constructing a detailed preprocessing record requires more memory
+ * and time to parse, since the information contained in the record
+ * is usually not retained. However, it can be useful for
+ * applications that require more detailed information about the
+ * behavior of the preprocessor.
+ */
+ CXTranslationUnit_DetailedPreprocessingRecord = 0x01,
+
+ /**
+ * \brief Used to indicate that the translation unit is incomplete.
+ *
+ * When a translation unit is considered "incomplete", semantic
+ * analysis that is typically performed at the end of the
+ * translation unit will be suppressed. For example, this suppresses
+ * the completion of tentative declarations in C and of
+ * instantiation of implicitly-instantiation function templates in
+ * C++. This option is typically used when parsing a header with the
+ * intent of producing a precompiled header.
+ */
+ CXTranslationUnit_Incomplete = 0x02,
+
+ /**
+ * \brief Used to indicate that the translation unit should be built with an
+ * implicit precompiled header for the preamble.
+ *
+ * An implicit precompiled header is used as an optimization when a
+ * particular translation unit is likely to be reparsed many times
+ * when the sources aren't changing that often. In this case, an
+ * implicit precompiled header will be built containing all of the
+ * initial includes at the top of the main file (what we refer to as
+ * the "preamble" of the file). In subsequent parses, if the
+ * preamble or the files in it have not changed, \c
+ * clang_reparseTranslationUnit() will re-use the implicit
+ * precompiled header to improve parsing performance.
+ */
+ CXTranslationUnit_PrecompiledPreamble = 0x04,
+
+ /**
+ * \brief Used to indicate that the translation unit should cache some
+ * code-completion results with each reparse of the source file.
+ *
+ * Caching of code-completion results is a performance optimization that
+ * introduces some overhead to reparsing but improves the performance of
+ * code-completion operations.
+ */
+ CXTranslationUnit_CacheCompletionResults = 0x08
+};
+
+/**
+ * \brief Returns the set of flags that is suitable for parsing a translation
+ * unit that is being edited.
+ *
+ * The set of flags returned provide options for \c clang_parseTranslationUnit()
+ * to indicate that the translation unit is likely to be reparsed many times,
+ * either explicitly (via \c clang_reparseTranslationUnit()) or implicitly
+ * (e.g., by code completion (\c clang_codeCompletionAt())). The returned flag
+ * set contains an unspecified set of optimizations (e.g., the precompiled
+ * preamble) geared toward improving the performance of these routines. The
+ * set of optimizations enabled may change from one version to the next.
+ */
+CINDEX_LINKAGE unsigned clang_defaultEditingTranslationUnitOptions(void);
+
+/**
+ * \brief Parse the given source file and the translation unit corresponding
+ * to that file.
+ *
+ * This routine is the main entry point for the Clang C API, providing the
+ * ability to parse a source file into a translation unit that can then be
+ * queried by other functions in the API. This routine accepts a set of
+ * command-line arguments so that the compilation can be configured in the same
+ * way that the compiler is configured on the command line.
+ *
+ * \param CIdx The index object with which the translation unit will be
+ * associated.
+ *
+ * \param source_filename The name of the source file to load, or NULL if the
+ * source file is included in \p clang_command_line_args.
+ *
+ * \param command_line_args The command-line arguments that would be
+ * passed to the \c clang executable if it were being invoked out-of-process.
+ * These command-line options will be parsed and will affect how the translation
+ * unit is parsed. Note that the following options are ignored: '-c',
+ * '-emit-ast', '-fsyntex-only' (which is the default), and '-o <output file>'.
+ *
+ * \param num_command_line_args The number of command-line arguments in
+ * \p command_line_args.
+ *
+ * \param unsaved_files the files that have not yet been saved to disk
+ * but may be required for parsing, including the contents of
+ * those files. The contents and name of these files (as specified by
+ * CXUnsavedFile) are copied when necessary, so the client only needs to
+ * guarantee their validity until the call to this function returns.
+ *
+ * \param num_unsaved_files the number of unsaved file entries in \p
+ * unsaved_files.
+ *
+ * \param options A bitmask of options that affects how the translation unit
+ * is managed but not its compilation. This should be a bitwise OR of the
+ * CXTranslationUnit_XXX flags.
+ *
+ * \returns A new translation unit describing the parsed code and containing
+ * any diagnostics produced by the compiler. If there is a failure from which
+ * the compiler cannot recover, returns NULL.
+ */
+CINDEX_LINKAGE CXTranslationUnit clang_parseTranslationUnit(CXIndex CIdx,
+ const char *source_filename,
+ const char * const *command_line_args,
+ int num_command_line_args,
+ struct CXUnsavedFile *unsaved_files,
+ unsigned num_unsaved_files,
+ unsigned options);
+
+/**
+ * \brief Flags that control how translation units are saved.
+ *
+ * The enumerators in this enumeration type are meant to be bitwise
+ * ORed together to specify which options should be used when
+ * saving the translation unit.
+ */
+enum CXSaveTranslationUnit_Flags {
+ /**
+ * \brief Used to indicate that no special saving options are needed.
+ */
+ CXSaveTranslationUnit_None = 0x0
+};
+
+/**
+ * \brief Returns the set of flags that is suitable for saving a translation
+ * unit.
+ *
+ * The set of flags returned provide options for
+ * \c clang_saveTranslationUnit() by default. The returned flag
+ * set contains an unspecified set of options that save translation units with
+ * the most commonly-requested data.
+ */
+CINDEX_LINKAGE unsigned clang_defaultSaveOptions(CXTranslationUnit TU);
+
+/**
+ * \brief Saves a translation unit into a serialized representation of
+ * that translation unit on disk.
+ *
+ * Any translation unit that was parsed without error can be saved
+ * into a file. The translation unit can then be deserialized into a
+ * new \c CXTranslationUnit with \c clang_createTranslationUnit() or,
+ * if it is an incomplete translation unit that corresponds to a
+ * header, used as a precompiled header when parsing other translation
+ * units.
+ *
+ * \param TU The translation unit to save.
+ *
+ * \param FileName The file to which the translation unit will be saved.
+ *
+ * \param options A bitmask of options that affects how the translation unit
+ * is saved. This should be a bitwise OR of the
+ * CXSaveTranslationUnit_XXX flags.
+ *
+ * \returns Zero if the translation unit was saved successfully, a
+ * non-zero value otherwise.
+ */
+CINDEX_LINKAGE int clang_saveTranslationUnit(CXTranslationUnit TU,
+ const char *FileName,
+ unsigned options);
+
+/**
* \brief Destroy the specified CXTranslationUnit object.
*/
CINDEX_LINKAGE void clang_disposeTranslationUnit(CXTranslationUnit);
/**
+ * \brief Flags that control the reparsing of translation units.
+ *
+ * The enumerators in this enumeration type are meant to be bitwise
+ * ORed together to specify which options should be used when
+ * reparsing the translation unit.
+ */
+enum CXReparse_Flags {
+ /**
+ * \brief Used to indicate that no special reparsing options are needed.
+ */
+ CXReparse_None = 0x0
+};
+
+/**
+ * \brief Returns the set of flags that is suitable for reparsing a translation
+ * unit.
+ *
+ * The set of flags returned provide options for
+ * \c clang_reparseTranslationUnit() by default. The returned flag
+ * set contains an unspecified set of optimizations geared toward common uses
+ * of reparsing. The set of optimizations enabled may change from one version
+ * to the next.
+ */
+CINDEX_LINKAGE unsigned clang_defaultReparseOptions(CXTranslationUnit TU);
+
+/**
+ * \brief Reparse the source files that produced this translation unit.
+ *
+ * This routine can be used to re-parse the source files that originally
+ * created the given translation unit, for example because those source files
+ * have changed (either on disk or as passed via \p unsaved_files). The
+ * source code will be reparsed with the same command-line options as it
+ * was originally parsed.
+ *
+ * Reparsing a translation unit invalidates all cursors and source locations
+ * that refer into that translation unit. This makes reparsing a translation
+ * unit semantically equivalent to destroying the translation unit and then
+ * creating a new translation unit with the same command-line arguments.
+ * However, it may be more efficient to reparse a translation
+ * unit using this routine.
+ *
+ * \param TU The translation unit whose contents will be re-parsed. The
+ * translation unit must originally have been built with
+ * \c clang_createTranslationUnitFromSourceFile().
+ *
+ * \param num_unsaved_files The number of unsaved file entries in \p
+ * unsaved_files.
+ *
+ * \param unsaved_files The files that have not yet been saved to disk
+ * but may be required for parsing, including the contents of
+ * those files. The contents and name of these files (as specified by
+ * CXUnsavedFile) are copied when necessary, so the client only needs to
+ * guarantee their validity until the call to this function returns.
+ *
+ * \param options A bitset of options composed of the flags in CXReparse_Flags.
+ * The function \c clang_defaultReparseOptions() produces a default set of
+ * options recommended for most uses, based on the translation unit.
+ *
+ * \returns 0 if the sources could be reparsed. A non-zero value will be
+ * returned if reparsing was impossible, such that the translation unit is
+ * invalid. In such cases, the only valid call for \p TU is
+ * \c clang_disposeTranslationUnit(TU).
+ */
+CINDEX_LINKAGE int clang_reparseTranslationUnit(CXTranslationUnit TU,
+ unsigned num_unsaved_files,
+ struct CXUnsavedFile *unsaved_files,
+ unsigned options);
+
+/**
* @}
*/
@@ -705,9 +976,33 @@ enum CXCursorKind {
CXCursor_Namespace = 22,
/** \brief A linkage specification, e.g. 'extern "C"'. */
CXCursor_LinkageSpec = 23,
-
+ /** \brief A C++ constructor. */
+ CXCursor_Constructor = 24,
+ /** \brief A C++ destructor. */
+ CXCursor_Destructor = 25,
+ /** \brief A C++ conversion function. */
+ CXCursor_ConversionFunction = 26,
+ /** \brief A C++ template type parameter. */
+ CXCursor_TemplateTypeParameter = 27,
+ /** \brief A C++ non-type template parameter. */
+ CXCursor_NonTypeTemplateParameter = 28,
+ /** \brief A C++ template template parameter. */
+ CXCursor_TemplateTemplateParameter = 29,
+ /** \brief A C++ function template. */
+ CXCursor_FunctionTemplate = 30,
+ /** \brief A C++ class template. */
+ CXCursor_ClassTemplate = 31,
+ /** \brief A C++ class template partial specialization. */
+ CXCursor_ClassTemplatePartialSpecialization = 32,
+ /** \brief A C++ namespace alias declaration. */
+ CXCursor_NamespaceAlias = 33,
+ /** \brief A C++ using directive. */
+ CXCursor_UsingDirective = 34,
+ /** \brief A using declaration. */
+ CXCursor_UsingDeclaration = 35,
+
CXCursor_FirstDecl = CXCursor_UnexposedDecl,
- CXCursor_LastDecl = CXCursor_LinkageSpec,
+ CXCursor_LastDecl = CXCursor_UsingDeclaration,
/* References */
CXCursor_FirstRef = 40, /* Decl references */
@@ -730,7 +1025,17 @@ enum CXCursorKind {
* referenced by the type of size is the typedef for size_type.
*/
CXCursor_TypeRef = 43,
- CXCursor_LastRef = 43,
+ CXCursor_CXXBaseSpecifier = 44,
+ /**
+ * \brief A reference to a class template, function template, or template
+ * template parameter.
+ */
+ CXCursor_TemplateRef = 45,
+ /**
+ * \brief A reference to a namespace or namespace alias.
+ */
+ CXCursor_NamespaceRef = 46,
+ CXCursor_LastRef = CXCursor_NamespaceRef,
/* Error conditions */
CXCursor_FirstInvalid = 70,
@@ -949,6 +1254,16 @@ enum CXLinkageKind {
CINDEX_LINKAGE enum CXLinkageKind clang_getCursorLinkage(CXCursor cursor);
/**
+ * \brief Determine the availability of the entity that this cursor refers to.
+ *
+ * \param cursor The cursor to query.
+ *
+ * \returns The availability of the cursor.
+ */
+CINDEX_LINKAGE enum CXAvailabilityKind
+clang_getCursorAvailability(CXCursor cursor);
+
+/**
* \brief Describe the "language" of the entity referred to by a cursor.
*/
CINDEX_LINKAGE enum CXLanguageKind {
@@ -1023,7 +1338,7 @@ CINDEX_LINKAGE CXSourceRange clang_getCursorExtent(CXCursor);
/**
* @}
*/
-
+
/**
* \defgroup CINDEX_TYPES Type information for CXCursors
*
@@ -1152,6 +1467,53 @@ CINDEX_LINKAGE CXType clang_getResultType(CXType T);
CINDEX_LINKAGE CXType clang_getCursorResultType(CXCursor C);
/**
+ * \brief Return 1 if the CXType is a POD (plain old data) type, and 0
+ * otherwise.
+ */
+CINDEX_LINKAGE unsigned clang_isPODType(CXType T);
+
+/**
+ * \brief Returns 1 if the base class specified by the cursor with kind
+ * CX_CXXBaseSpecifier is virtual.
+ */
+CINDEX_LINKAGE unsigned clang_isVirtualBase(CXCursor);
+
+/**
+ * \brief Represents the C++ access control level to a base class for a
+ * cursor with kind CX_CXXBaseSpecifier.
+ */
+enum CX_CXXAccessSpecifier {
+ CX_CXXInvalidAccessSpecifier,
+ CX_CXXPublic,
+ CX_CXXProtected,
+ CX_CXXPrivate
+};
+
+/**
+ * \brief Returns the access control level for the C++ base specifier
+ * represented by a cursor with kind CX_CXXBaseSpecifier.
+ */
+CINDEX_LINKAGE enum CX_CXXAccessSpecifier clang_getCXXAccessSpecifier(CXCursor);
+
+/**
+ * @}
+ */
+
+/**
+ * \defgroup CINDEX_ATTRIBUTES Information for attributes
+ *
+ * @{
+ */
+
+
+/**
+ * \brief For cursors representing an iboutletcollection attribute,
+ * this function returns the collection element type.
+ *
+ */
+CINDEX_LINKAGE CXType clang_getIBOutletCollectionType(CXCursor);
+
+/**
* @}
*/
@@ -1364,11 +1726,61 @@ CINDEX_LINKAGE unsigned clang_isCursorDefinition(CXCursor);
*/
/**
- * \brief Determine if a C++ member function is declared 'static'.
+ * \brief Determine if a C++ member function or member function template is
+ * declared 'static'.
*/
CINDEX_LINKAGE unsigned clang_CXXMethod_isStatic(CXCursor C);
/**
+ * \brief Given a cursor that represents a template, determine
+ * the cursor kind of the specializations would be generated by instantiating
+ * the template.
+ *
+ * This routine can be used to determine what flavor of function template,
+ * class template, or class template partial specialization is stored in the
+ * cursor. For example, it can describe whether a class template cursor is
+ * declared with "struct", "class" or "union".
+ *
+ * \param C The cursor to query. This cursor should represent a template
+ * declaration.
+ *
+ * \returns The cursor kind of the specializations that would be generated
+ * by instantiating the template \p C. If \p C is not a template, returns
+ * \c CXCursor_NoDeclFound.
+ */
+CINDEX_LINKAGE enum CXCursorKind clang_getTemplateCursorKind(CXCursor C);
+
+/**
+ * \brief Given a cursor that may represent a specialization or instantiation
+ * of a template, retrieve the cursor that represents the template that it
+ * specializes or from which it was instantiated.
+ *
+ * This routine determines the template involved both for explicit
+ * specializations of templates and for implicit instantiations of the template,
+ * both of which are referred to as "specializations". For a class template
+ * specialization (e.g., \c std::vector<bool>), this routine will return
+ * either the primary template (\c std::vector) or, if the specialization was
+ * instantiated from a class template partial specialization, the class template
+ * partial specialization. For a class template partial specialization and a
+ * function template specialization (including instantiations), this
+ * this routine will return the specialized template.
+ *
+ * For members of a class template (e.g., member functions, member classes, or
+ * static data members), returns the specialized or instantiated member.
+ * Although not strictly "templates" in the C++ language, members of class
+ * templates have the same notions of specializations and instantiations that
+ * templates do, so this routine treats them similarly.
+ *
+ * \param C A cursor that may be a specialization of a template or a member
+ * of a template.
+ *
+ * \returns If the given cursor is a specialization or instantiation of a
+ * template or a member thereof, the template or member that it specializes or
+ * from which it was instantiated. Otherwise, returns a NULL cursor.
+ */
+CINDEX_LINKAGE CXCursor clang_getSpecializedCursorTemplate(CXCursor C);
+
+/**
* @}
*/
@@ -1817,6 +2229,17 @@ CINDEX_LINKAGE unsigned
clang_getCompletionPriority(CXCompletionString completion_string);
/**
+ * \brief Determine the availability of the entity that this code-completion
+ * string refers to.
+ *
+ * \param completion_string The completion string to query.
+ *
+ * \returns The availability of the completion string.
+ */
+CINDEX_LINKAGE enum CXAvailabilityKind
+clang_getCompletionAvailability(CXCompletionString completion_string);
+
+/**
* \brief Contains the results of code-completion.
*
* This data structure contains the results of code completion, as
@@ -1922,7 +2345,7 @@ CINDEX_LINKAGE
CXCodeCompleteResults *clang_codeComplete(CXIndex CIdx,
const char *source_filename,
int num_command_line_args,
- const char **command_line_args,
+ const char * const *command_line_args,
unsigned num_unsaved_files,
struct CXUnsavedFile *unsaved_files,
const char *complete_filename,
@@ -1930,11 +2353,126 @@ CXCodeCompleteResults *clang_codeComplete(CXIndex CIdx,
unsigned complete_column);
/**
+ * \brief Flags that can be passed to \c clang_codeCompleteAt() to
+ * modify its behavior.
+ *
+ * The enumerators in this enumeration can be bitwise-OR'd together to
+ * provide multiple options to \c clang_codeCompleteAt().
+ */
+enum CXCodeComplete_Flags {
+ /**
+ * \brief Whether to include macros within the set of code
+ * completions returned.
+ */
+ CXCodeComplete_IncludeMacros = 0x01,
+
+ /**
+ * \brief Whether to include code patterns for language constructs
+ * within the set of code completions, e.g., for loops.
+ */
+ CXCodeComplete_IncludeCodePatterns = 0x02
+};
+
+/**
+ * \brief Returns a default set of code-completion options that can be
+ * passed to\c clang_codeCompleteAt().
+ */
+CINDEX_LINKAGE unsigned clang_defaultCodeCompleteOptions(void);
+
+/**
+ * \brief Perform code completion at a given location in a translation unit.
+ *
+ * This function performs code completion at a particular file, line, and
+ * column within source code, providing results that suggest potential
+ * code snippets based on the context of the completion. The basic model
+ * for code completion is that Clang will parse a complete source file,
+ * performing syntax checking up to the location where code-completion has
+ * been requested. At that point, a special code-completion token is passed
+ * to the parser, which recognizes this token and determines, based on the
+ * current location in the C/Objective-C/C++ grammar and the state of
+ * semantic analysis, what completions to provide. These completions are
+ * returned via a new \c CXCodeCompleteResults structure.
+ *
+ * Code completion itself is meant to be triggered by the client when the
+ * user types punctuation characters or whitespace, at which point the
+ * code-completion location will coincide with the cursor. For example, if \c p
+ * is a pointer, code-completion might be triggered after the "-" and then
+ * after the ">" in \c p->. When the code-completion location is afer the ">",
+ * the completion results will provide, e.g., the members of the struct that
+ * "p" points to. The client is responsible for placing the cursor at the
+ * beginning of the token currently being typed, then filtering the results
+ * based on the contents of the token. For example, when code-completing for
+ * the expression \c p->get, the client should provide the location just after
+ * the ">" (e.g., pointing at the "g") to this code-completion hook. Then, the
+ * client can filter the results based on the current token text ("get"), only
+ * showing those results that start with "get". The intent of this interface
+ * is to separate the relatively high-latency acquisition of code-completion
+ * results from the filtering of results on a per-character basis, which must
+ * have a lower latency.
+ *
+ * \param TU The translation unit in which code-completion should
+ * occur. The source files for this translation unit need not be
+ * completely up-to-date (and the contents of those source files may
+ * be overridden via \p unsaved_files). Cursors referring into the
+ * translation unit may be invalidated by this invocation.
+ *
+ * \param complete_filename The name of the source file where code
+ * completion should be performed. This filename may be any file
+ * included in the translation unit.
+ *
+ * \param complete_line The line at which code-completion should occur.
+ *
+ * \param complete_column The column at which code-completion should occur.
+ * Note that the column should point just after the syntactic construct that
+ * initiated code completion, and not in the middle of a lexical token.
+ *
+ * \param unsaved_files the Tiles that have not yet been saved to disk
+ * but may be required for parsing or code completion, including the
+ * contents of those files. The contents and name of these files (as
+ * specified by CXUnsavedFile) are copied when necessary, so the
+ * client only needs to guarantee their validity until the call to
+ * this function returns.
+ *
+ * \param num_unsaved_files The number of unsaved file entries in \p
+ * unsaved_files.
+ *
+ * \param options Extra options that control the behavior of code
+ * completion, expressed as a bitwise OR of the enumerators of the
+ * CXCodeComplete_Flags enumeration. The
+ * \c clang_defaultCodeCompleteOptions() function returns a default set
+ * of code-completion options.
+ *
+ * \returns If successful, a new \c CXCodeCompleteResults structure
+ * containing code-completion results, which should eventually be
+ * freed with \c clang_disposeCodeCompleteResults(). If code
+ * completion fails, returns NULL.
+ */
+CINDEX_LINKAGE
+CXCodeCompleteResults *clang_codeCompleteAt(CXTranslationUnit TU,
+ const char *complete_filename,
+ unsigned complete_line,
+ unsigned complete_column,
+ struct CXUnsavedFile *unsaved_files,
+ unsigned num_unsaved_files,
+ unsigned options);
+
+/**
+ * \brief Sort the code-completion results in case-insensitive alphabetical
+ * order.
+ *
+ * \param Results The set of results to sort.
+ * \param NumResults The number of results in \p Results.
+ */
+CINDEX_LINKAGE
+void clang_sortCodeCompletionResults(CXCompletionResult *Results,
+ unsigned NumResults);
+
+/**
* \brief Free the given set of code-completion results.
*/
CINDEX_LINKAGE
void clang_disposeCodeCompleteResults(CXCodeCompleteResults *Results);
-
+
/**
* \brief Determine the number of diagnostics produced prior to the
* location where code completion was performed.
diff --git a/include/clang/AST/ASTConsumer.h b/include/clang/AST/ASTConsumer.h
index 06113954fc48..84833c099f97 100644
--- a/include/clang/AST/ASTConsumer.h
+++ b/include/clang/AST/ASTConsumer.h
@@ -18,9 +18,10 @@ namespace clang {
class ASTContext;
class CXXRecordDecl;
class DeclGroupRef;
- class TagDecl;
class HandleTagDeclDefinition;
+ class ASTDeserializationListener; // layering violation because void* is ugly
class SemaConsumer; // layering violation required for safe SemaConsumer
+ class TagDecl;
class VarDecl;
/// ASTConsumer - This is an abstract interface that should be implemented by
@@ -48,6 +49,11 @@ public:
/// elements). Use Decl::getNextDeclarator() to walk the chain.
virtual void HandleTopLevelDecl(DeclGroupRef D);
+ /// HandleInterestingDecl - Handle the specified interesting declaration. This
+ /// is called by the AST reader when deserializing things that might interest
+ /// the consumer. The default implementation forwards to HandleTopLevelDecl.
+ virtual void HandleInterestingDecl(DeclGroupRef D);
+
/// HandleTranslationUnit - This method is called when the ASTs for entire
/// translation unit have been parsed.
virtual void HandleTranslationUnit(ASTContext &Ctx) {}
@@ -80,6 +86,12 @@ public:
/// it was actually used.
virtual void HandleVTable(CXXRecordDecl *RD, bool DefinitionRequired) {}
+ /// \brief If the consumer is interested in entities being deserialized from
+ /// AST files, it should return a pointer to a ASTDeserializationListener here
+ ///
+ /// The return type is void* because ASTDS lives in Frontend.
+ virtual ASTDeserializationListener *GetASTDeserializationListener() { return 0; }
+
/// PrintStats - If desired, print any statistics.
virtual void PrintStats() {}
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index 3799451360f4..ae4ee946fe27 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -18,7 +18,6 @@
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/OperatorKinds.h"
#include "clang/Basic/PartialDiagnostic.h"
-#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/PrettyPrinter.h"
@@ -50,6 +49,7 @@ namespace clang {
class SelectorTable;
class SourceManager;
class TargetInfo;
+ class CXXABI;
// Decls
class DeclContext;
class CXXMethodDecl;
@@ -198,7 +198,7 @@ class ASTContext {
///
/// Since so few decls have attrs, we keep them in a hash map instead of
/// wasting space in the Decl class.
- llvm::DenseMap<const Decl*, Attr*> DeclAttrs;
+ llvm::DenseMap<const Decl*, AttrVec*> DeclAttrs;
/// \brief Keeps track of the static data member templates from which
/// static data members of class template specializations were instantiated.
@@ -275,13 +275,18 @@ class ASTContext {
/// this ASTContext object.
LangOptions LangOpts;
- /// MallocAlloc/BumpAlloc - The allocator objects used to create AST objects.
- bool FreeMemory;
- llvm::MallocAllocator MallocAlloc;
+ /// \brief The allocator used to create AST objects.
+ ///
+ /// AST objects are never destructed; rather, all memory associated with the
+ /// AST objects will be released when the ASTContext itself is destroyed.
llvm::BumpPtrAllocator BumpAlloc;
/// \brief Allocator for partial diagnostics.
PartialDiagnostic::StorageAllocator DiagAllocator;
+
+ /// \brief The current C++ ABI.
+ llvm::OwningPtr<CXXABI> ABI;
+ CXXABI *createCXXABI(const TargetInfo &T);
public:
const TargetInfo &Target;
@@ -301,13 +306,9 @@ public:
SourceManager& getSourceManager() { return SourceMgr; }
const SourceManager& getSourceManager() const { return SourceMgr; }
void *Allocate(unsigned Size, unsigned Align = 8) {
- return FreeMemory ? MallocAlloc.Allocate(Size, Align) :
- BumpAlloc.Allocate(Size, Align);
- }
- void Deallocate(void *Ptr) {
- if (FreeMemory)
- MallocAlloc.Deallocate(Ptr);
+ return BumpAlloc.Allocate(Size, Align);
}
+ void Deallocate(void *Ptr) { }
PartialDiagnostic::StorageAllocator &getDiagAllocator() {
return DiagAllocator;
@@ -320,10 +321,10 @@ public:
}
/// \brief Retrieve the attributes for the given declaration.
- Attr*& getDeclAttrs(const Decl *D) { return DeclAttrs[D]; }
+ AttrVec& getDeclAttrs(const Decl *D);
/// \brief Erase the attributes corresponding to the given declaration.
- void eraseDeclAttrs(const Decl *D) { DeclAttrs.erase(D); }
+ void eraseDeclAttrs(const Decl *D);
/// \brief If this variable is an instantiated static data member of a
/// class template specialization, returns the templated static data member
@@ -393,7 +394,7 @@ public:
ASTContext(const LangOptions& LOpts, SourceManager &SM, const TargetInfo &t,
IdentifierTable &idents, SelectorTable &sels,
Builtin::Context &builtins,
- bool FreeMemory = true, unsigned size_reserve=0);
+ unsigned size_reserve);
~ASTContext();
@@ -520,7 +521,7 @@ public:
llvm::SmallVectorImpl<const Expr *> &Layout);
/// This builds the struct used for __block variables.
- QualType BuildByRefType(const char *DeclName, QualType Ty);
+ QualType BuildByRefType(llvm::StringRef DeclName, QualType Ty);
/// Returns true iff we need copy/dispose helpers for the given type.
bool BlockRequiresCopying(QualType Ty);
@@ -873,7 +874,8 @@ public:
return getExtQualType(T, Qs);
}
- DeclarationName getNameForTemplate(TemplateName Name);
+ DeclarationNameInfo getNameForTemplate(TemplateName Name,
+ SourceLocation NameLoc);
TemplateName getOverloadedTemplateName(UnresolvedSetIterator Begin,
UnresolvedSetIterator End);
@@ -909,6 +911,11 @@ public:
///
Qualifiers::GC getObjCGCAttrKind(const QualType &Ty) const;
+ /// areCompatibleVectorTypes - Return true if the given vector types either
+ /// are of the same unqualified type or if one is GCC and other - equivalent
+ /// AltiVec vector type.
+ bool areCompatibleVectorTypes(QualType FirstVec, QualType SecondVec);
+
/// isObjCNSObjectType - Return true if this is an NSObject object with
/// its NSObject attribute set.
bool isObjCNSObjectType(QualType Ty) const;
@@ -1002,13 +1009,12 @@ public:
/// of class definition.
const CXXMethodDecl *getKeyFunction(const CXXRecordDecl *RD);
- void CollectObjCIvars(const ObjCInterfaceDecl *OI,
- llvm::SmallVectorImpl<FieldDecl*> &Fields);
-
void ShallowCollectObjCIvars(const ObjCInterfaceDecl *OI,
llvm::SmallVectorImpl<ObjCIvarDecl*> &Ivars);
- void CollectNonClassIvars(const ObjCInterfaceDecl *OI,
- llvm::SmallVectorImpl<ObjCIvarDecl*> &Ivars);
+
+ void DeepCollectObjCIvars(const ObjCInterfaceDecl *OI, bool leafClass,
+ llvm::SmallVectorImpl<ObjCIvarDecl*> &Ivars);
+
unsigned CountNonClassIvars(const ObjCInterfaceDecl *OI);
void CollectInheritedProtocols(const Decl *CDecl,
llvm::SmallPtrSet<ObjCProtocolDecl*, 8> &Protocols);
@@ -1067,8 +1073,6 @@ public:
bool UnwrapSimilarPointerTypes(QualType &T1, QualType &T2);
- /// \brief Retrieves the "canonical" declaration of
-
/// \brief Retrieves the "canonical" nested name specifier for a
/// given nested name specifier.
///
@@ -1218,7 +1222,8 @@ public:
//===--------------------------------------------------------------------===//
/// Compatibility predicates used to check assignment expressions.
- bool typesAreCompatible(QualType, QualType); // C99 6.2.7p1
+ bool typesAreCompatible(QualType T1, QualType T2,
+ bool CompareUnqualified = false); // C99 6.2.7p1
bool typesAreBlockPointerCompatible(QualType, QualType);
@@ -1235,6 +1240,8 @@ public:
bool ObjCQualifiedIdTypesAreCompatible(QualType LHS, QualType RHS,
bool ForCompare);
+ bool ObjCQualifiedClassTypesAreCompatible(QualType LHS, QualType RHS);
+
// Check the safety of assignment from LHS to RHS
bool canAssignObjCInterfaces(const ObjCObjectPointerType *LHSOPT,
const ObjCObjectPointerType *RHSOPT);
@@ -1246,10 +1253,13 @@ public:
bool areComparableObjCPointerTypes(QualType LHS, QualType RHS);
QualType areCommonBaseCompatible(const ObjCObjectPointerType *LHSOPT,
const ObjCObjectPointerType *RHSOPT);
-
+ bool canBindObjCObjectType(QualType To, QualType From);
+
// Functions for calculating composite types
- QualType mergeTypes(QualType, QualType, bool OfBlockPointer=false);
- QualType mergeFunctionTypes(QualType, QualType, bool OfBlockPointer=false);
+ QualType mergeTypes(QualType, QualType, bool OfBlockPointer=false,
+ bool Unqualified = false);
+ QualType mergeFunctionTypes(QualType, QualType, bool OfBlockPointer=false,
+ bool Unqualified = false);
QualType mergeObjCGCQualifiers(QualType, QualType);
@@ -1257,6 +1267,10 @@ public:
/// that are common to binary operators (C99 6.3.1.8, C++ [expr]p9)
/// and returns the result type of that conversion.
QualType UsualArithmeticConversionsType(QualType lhs, QualType rhs);
+
+ void ResetObjCLayout(const ObjCContainerDecl *CD) {
+ ObjCLayouts[CD] = 0;
+ }
//===--------------------------------------------------------------------===//
// Integer Predicates
@@ -1337,6 +1351,17 @@ public:
/// when it is called.
void AddDeallocation(void (*Callback)(void*), void *Data);
+ GVALinkage GetGVALinkageForFunction(const FunctionDecl *FD);
+ GVALinkage GetGVALinkageForVariable(const VarDecl *VD);
+
+ /// \brief Determines if the decl can be CodeGen'ed or deserialized from PCH
+ /// lazily, only when used; this is only relevant for function or file scoped
+ /// var definitions.
+ ///
+ /// \returns true if the function/var must be CodeGen'ed/deserialized even if
+ /// it is not used.
+ bool DeclMustBeEmitted(const Decl *D);
+
//===--------------------------------------------------------------------===//
// Statistics
//===--------------------------------------------------------------------===//
@@ -1386,7 +1411,7 @@ private:
const ASTRecordLayout &getObjCLayout(const ObjCInterfaceDecl *D,
const ObjCImplementationDecl *Impl);
-
+
private:
/// \brief A set of deallocations that should be performed when the
/// ASTContext is destroyed.
diff --git a/include/clang/AST/ASTImporter.h b/include/clang/AST/ASTImporter.h
index 7975c4378876..9380058118c5 100644
--- a/include/clang/AST/ASTImporter.h
+++ b/include/clang/AST/ASTImporter.h
@@ -14,8 +14,8 @@
#ifndef LLVM_CLANG_AST_ASTIMPORTER_H
#define LLVM_CLANG_AST_ASTIMPORTER_H
-#include "clang/AST/Type.h"
#include "clang/AST/DeclarationName.h"
+#include "clang/AST/Type.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h
index 9faa62eef6f7..62ca49fbf3b1 100644
--- a/include/clang/AST/Attr.h
+++ b/include/clang/AST/Attr.h
@@ -15,8 +15,11 @@
#define LLVM_CLANG_AST_ATTR_H
#include "llvm/Support/Casting.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "clang/Basic/AttrKinds.h"
+#include "clang/AST/Type.h"
+#include "clang/Basic/SourceLocation.h"
#include <cassert>
#include <cstring>
#include <algorithm>
@@ -27,28 +30,39 @@ namespace clang {
class IdentifierInfo;
class ObjCInterfaceDecl;
class Expr;
+ class QualType;
+ class FunctionDecl;
+ class TypeSourceInfo;
}
// Defined in ASTContext.h
void *operator new(size_t Bytes, clang::ASTContext &C,
size_t Alignment = 16) throw ();
+// FIXME: Being forced to not have a default argument here due to redeclaration
+// rules on default arguments sucks
+void *operator new[](size_t Bytes, clang::ASTContext &C,
+ size_t Alignment) throw ();
// It is good practice to pair new/delete operators. Also, MSVC gives many
// warnings if a matching delete overload is not declared, even though the
// throw() spec guarantees it will not be implicitly called.
void operator delete(void *Ptr, clang::ASTContext &C, size_t)
throw ();
+void operator delete[](void *Ptr, clang::ASTContext &C, size_t)
+ throw ();
namespace clang {
/// Attr - This represents one attribute.
class Attr {
private:
- Attr *Next;
- attr::Kind AttrKind;
+ SourceLocation Loc;
+ unsigned AttrKind : 16;
bool Inherited : 1;
protected:
+ virtual ~Attr();
+
void* operator new(size_t bytes) throw() {
assert(0 && "Attrs cannot be allocated with regular 'new'.");
return 0;
@@ -57,41 +71,36 @@ protected:
assert(0 && "Attrs cannot be released with regular 'delete'.");
}
-protected:
- Attr(attr::Kind AK) : Next(0), AttrKind(AK), Inherited(false) {}
- virtual ~Attr() {
- assert(Next == 0 && "Destroy didn't work");
+public:
+ // Forward so that the regular new and delete do not hide global ones.
+ void* operator new(size_t Bytes, ASTContext &C,
+ size_t Alignment = 16) throw() {
+ return ::operator new(Bytes, C, Alignment);
}
+ void operator delete(void *Ptr, ASTContext &C,
+ size_t Alignment) throw() {
+ return ::operator delete(Ptr, C, Alignment);
+ }
+
+protected:
+ Attr(attr::Kind AK, SourceLocation L)
+ : Loc(L), AttrKind(AK), Inherited(false) {}
+
public:
- virtual void Destroy(ASTContext &C);
/// \brief Whether this attribute should be merged to new
/// declarations.
virtual bool isMerged() const { return true; }
- attr::Kind getKind() const { return AttrKind; }
-
- Attr *getNext() { return Next; }
- const Attr *getNext() const { return Next; }
- void setNext(Attr *next) { Next = next; }
-
- template<typename T> const T *getNext() const {
- for (const Attr *attr = getNext(); attr; attr = attr->getNext())
- if (const T *V = dyn_cast<T>(attr))
- return V;
- return 0;
+ attr::Kind getKind() const {
+ return static_cast<attr::Kind>(AttrKind);
}
- bool isInherited() const { return Inherited; }
- void setInherited(bool value) { Inherited = value; }
-
- void addAttr(Attr *attr) {
- assert((attr != 0) && "addAttr(): attr is null");
+ SourceLocation getLocation() const { return Loc; }
+ void setLocation(SourceLocation L) { Loc = L; }
- // FIXME: This doesn't preserve the order in any way.
- attr->Next = Next;
- Next = attr;
- }
+ bool isInherited() const { return Inherited; }
+ void setInherited(bool I) { Inherited = I; }
// Clone this attribute.
virtual Attr* clone(ASTContext &C) const = 0;
@@ -101,490 +110,112 @@ public:
};
#include "clang/AST/Attrs.inc"
-
-class AttrWithString : public Attr {
-private:
- const char *Str;
- unsigned StrLen;
-protected:
- AttrWithString(attr::Kind AK, ASTContext &C, llvm::StringRef s);
- llvm::StringRef getString() const { return llvm::StringRef(Str, StrLen); }
- void ReplaceString(ASTContext &C, llvm::StringRef newS);
-public:
- virtual void Destroy(ASTContext &C);
-};
-
-#define DEF_SIMPLE_ATTR(ATTR) \
-class ATTR##Attr : public Attr { \
-public: \
- ATTR##Attr() : Attr(attr::ATTR) {} \
- virtual Attr *clone(ASTContext &C) const; \
- static bool classof(const Attr *A) { return A->getKind() == attr::ATTR; } \
- static bool classof(const ATTR##Attr *A) { return true; } \
-}
-DEF_SIMPLE_ATTR(Packed);
-
-/// \brief Attribute for specifying a maximum field alignment; this is only
-/// valid on record decls.
-class MaxFieldAlignmentAttr : public Attr {
- unsigned Alignment;
-
-public:
- MaxFieldAlignmentAttr(unsigned alignment)
- : Attr(attr::MaxFieldAlignment), Alignment(alignment) {}
+/// AttrVec - A vector of Attr, which is how they are stored on the AST.
+typedef llvm::SmallVector<Attr*, 2> AttrVec;
+typedef llvm::SmallVector<const Attr*, 2> ConstAttrVec;
- /// getAlignment - The specified alignment in bits.
- unsigned getAlignment() const { return Alignment; }
-
- virtual Attr* clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) {
- return A->getKind() == attr::MaxFieldAlignment;
- }
- static bool classof(const MaxFieldAlignmentAttr *A) { return true; }
-};
-
-DEF_SIMPLE_ATTR(AlignMac68k);
-
-/// \brief Atribute for specifying the alignment of a variable or type.
-///
-/// This node will either contain the precise Alignment (in bits, not bytes!)
-/// or will contain the expression for the alignment attribute in the case of
-/// a dependent expression within a class or function template. At template
-/// instantiation time these are transformed into concrete attributes.
-class AlignedAttr : public Attr {
- unsigned Alignment;
- Expr *AlignmentExpr;
-public:
- AlignedAttr(unsigned alignment)
- : Attr(attr::Aligned), Alignment(alignment), AlignmentExpr(0) {}
- AlignedAttr(Expr *E)
- : Attr(attr::Aligned), Alignment(0), AlignmentExpr(E) {}
-
- /// getAlignmentExpr - Get a dependent alignment expression if one is present.
- Expr *getAlignmentExpr() const {
- return AlignmentExpr;
- }
-
- /// isDependent - Is the alignment a dependent expression
- bool isDependent() const {
- return getAlignmentExpr();
- }
+/// DestroyAttrs - Destroy the contents of an AttrVec.
+inline void DestroyAttrs (AttrVec& V, ASTContext &C) {
+}
- /// getAlignment - The specified alignment in bits. Requires !isDependent().
- unsigned getAlignment() const {
- assert(!isDependent() && "Cannot get a value dependent alignment");
- return Alignment;
- }
+/// specific_attr_iterator - Iterates over a subrange of an AttrVec, only
+/// providing attributes that are of a specifc type.
+template <typename SpecificAttr>
+class specific_attr_iterator {
+ /// Current - The current, underlying iterator.
+ /// In order to ensure we don't dereference an invalid iterator unless
+ /// specifically requested, we don't necessarily advance this all the
+ /// way. Instead, we advance it when an operation is requested; if the
+ /// operation is acting on what should be a past-the-end iterator,
+ /// then we offer no guarantees, but this way we do not dererence a
+ /// past-the-end iterator when we move to a past-the-end position.
+ mutable AttrVec::const_iterator Current;
- /// getMaxAlignment - Get the maximum alignment of attributes on this list.
- unsigned getMaxAlignment() const {
- const AlignedAttr *Next = getNext<AlignedAttr>();
- if (Next)
- return std::max(Next->getMaxAlignment(), getAlignment());
- else
- return getAlignment();
+ void AdvanceToNext() const {
+ while (!llvm::isa<SpecificAttr>(*Current))
+ ++Current;
}
- virtual Attr* clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) {
- return A->getKind() == attr::Aligned;
+ void AdvanceToNext(AttrVec::const_iterator I) const {
+ while (Current != I && !llvm::isa<SpecificAttr>(*Current))
+ ++Current;
}
- static bool classof(const AlignedAttr *A) { return true; }
-};
-class AnnotateAttr : public AttrWithString {
public:
- AnnotateAttr(ASTContext &C, llvm::StringRef ann)
- : AttrWithString(attr::Annotate, C, ann) {}
-
- llvm::StringRef getAnnotation() const { return getString(); }
+ typedef SpecificAttr* value_type;
+ typedef SpecificAttr* reference;
+ typedef SpecificAttr* pointer;
+ typedef std::forward_iterator_tag iterator_category;
+ typedef std::ptrdiff_t difference_type;
- virtual Attr* clone(ASTContext &C) const;
+ specific_attr_iterator() : Current() { }
+ explicit specific_attr_iterator(AttrVec::const_iterator i) : Current(i) { }
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) {
- return A->getKind() == attr::Annotate;
+ reference operator*() const {
+ AdvanceToNext();
+ return llvm::cast<SpecificAttr>(*Current);
}
- static bool classof(const AnnotateAttr *A) { return true; }
-};
-
-class AsmLabelAttr : public AttrWithString {
-public:
- AsmLabelAttr(ASTContext &C, llvm::StringRef L)
- : AttrWithString(attr::AsmLabel, C, L) {}
-
- llvm::StringRef getLabel() const { return getString(); }
-
- virtual Attr* clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) {
- return A->getKind() == attr::AsmLabel;
- }
- static bool classof(const AsmLabelAttr *A) { return true; }
-};
-
-DEF_SIMPLE_ATTR(AlwaysInline);
-
-class AliasAttr : public AttrWithString {
-public:
- AliasAttr(ASTContext &C, llvm::StringRef aliasee)
- : AttrWithString(attr::Alias, C, aliasee) {}
-
- llvm::StringRef getAliasee() const { return getString(); }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) { return A->getKind() == attr::Alias; }
- static bool classof(const AliasAttr *A) { return true; }
-};
-
-class ConstructorAttr : public Attr {
- int priority;
-public:
- ConstructorAttr(int p) : Attr(attr::Constructor), priority(p) {}
-
- int getPriority() const { return priority; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A)
- { return A->getKind() == attr::Constructor; }
- static bool classof(const ConstructorAttr *A) { return true; }
-};
-
-class DestructorAttr : public Attr {
- int priority;
-public:
- DestructorAttr(int p) : Attr(attr::Destructor), priority(p) {}
-
- int getPriority() const { return priority; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A)
- { return A->getKind() == attr::Destructor; }
- static bool classof(const DestructorAttr *A) { return true; }
-};
-
-class IBOutletAttr : public Attr {
-public:
- IBOutletAttr() : Attr(attr::IBOutlet) {}
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) {
- return A->getKind() == attr::IBOutlet;
- }
- static bool classof(const IBOutletAttr *A) { return true; }
-};
-
-class IBOutletCollectionAttr : public Attr {
- const ObjCInterfaceDecl *D;
-public:
- IBOutletCollectionAttr(const ObjCInterfaceDecl *d = 0)
- : Attr(attr::IBOutletCollection), D(d) {}
-
- const ObjCInterfaceDecl *getClass() const { return D; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) {
- return A->getKind() == attr::IBOutletCollection;
+ pointer operator->() const {
+ AdvanceToNext();
+ return llvm::cast<SpecificAttr>(*Current);
}
- static bool classof(const IBOutletCollectionAttr *A) { return true; }
-};
-
-class IBActionAttr : public Attr {
-public:
- IBActionAttr() : Attr(attr::IBAction) {}
-
- virtual Attr *clone(ASTContext &C) const;
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) {
- return A->getKind() == attr::IBAction;
+ specific_attr_iterator& operator++() {
+ ++Current;
+ return *this;
}
- static bool classof(const IBActionAttr *A) { return true; }
-};
-
-DEF_SIMPLE_ATTR(AnalyzerNoReturn);
-DEF_SIMPLE_ATTR(Deprecated);
-DEF_SIMPLE_ATTR(GNUInline);
-DEF_SIMPLE_ATTR(Malloc);
-DEF_SIMPLE_ATTR(NoReturn);
-DEF_SIMPLE_ATTR(NoInstrumentFunction);
-
-class SectionAttr : public AttrWithString {
-public:
- SectionAttr(ASTContext &C, llvm::StringRef N)
- : AttrWithString(attr::Section, C, N) {}
-
- llvm::StringRef getName() const { return getString(); }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) {
- return A->getKind() == attr::Section;
+ specific_attr_iterator operator++(int) {
+ specific_attr_iterator Tmp(*this);
+ ++(*this);
+ return Tmp;
}
- static bool classof(const SectionAttr *A) { return true; }
-};
-
-DEF_SIMPLE_ATTR(Unavailable);
-DEF_SIMPLE_ATTR(Unused);
-DEF_SIMPLE_ATTR(Used);
-DEF_SIMPLE_ATTR(Weak);
-DEF_SIMPLE_ATTR(WeakImport);
-DEF_SIMPLE_ATTR(WeakRef);
-DEF_SIMPLE_ATTR(NoThrow);
-DEF_SIMPLE_ATTR(Const);
-DEF_SIMPLE_ATTR(Pure);
-
-class NonNullAttr : public Attr {
- unsigned* ArgNums;
- unsigned Size;
-public:
- NonNullAttr(ASTContext &C, unsigned* arg_nums = 0, unsigned size = 0);
-
- virtual void Destroy(ASTContext &C);
-
- typedef const unsigned *iterator;
- iterator begin() const { return ArgNums; }
- iterator end() const { return ArgNums + Size; }
- unsigned size() const { return Size; }
- bool isNonNull(unsigned arg) const {
- return ArgNums ? std::binary_search(ArgNums, ArgNums+Size, arg) : true;
+ friend bool operator==(specific_attr_iterator Left,
+ specific_attr_iterator Right) {
+ if (Left.Current < Right.Current)
+ Left.AdvanceToNext(Right.Current);
+ else
+ Right.AdvanceToNext(Left.Current);
+ return Left.Current == Right.Current;
}
-
- virtual Attr *clone(ASTContext &C) const;
-
- static bool classof(const Attr *A) { return A->getKind() == attr::NonNull; }
- static bool classof(const NonNullAttr *A) { return true; }
-};
-
-class FormatAttr : public AttrWithString {
- int formatIdx, firstArg;
-public:
- FormatAttr(ASTContext &C, llvm::StringRef type, int idx, int first)
- : AttrWithString(attr::Format, C, type), formatIdx(idx), firstArg(first) {}
-
- llvm::StringRef getType() const { return getString(); }
- void setType(ASTContext &C, llvm::StringRef type);
- int getFormatIdx() const { return formatIdx; }
- int getFirstArg() const { return firstArg; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) { return A->getKind() == attr::Format; }
- static bool classof(const FormatAttr *A) { return true; }
-};
-
-class FormatArgAttr : public Attr {
- int formatIdx;
-public:
- FormatArgAttr(int idx) : Attr(attr::FormatArg), formatIdx(idx) {}
- int getFormatIdx() const { return formatIdx; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) { return A->getKind() == attr::FormatArg; }
- static bool classof(const FormatArgAttr *A) { return true; }
-};
-
-class SentinelAttr : public Attr {
- int sentinel, NullPos;
-public:
- SentinelAttr(int sentinel_val, int nullPos) : Attr(attr::Sentinel),
- sentinel(sentinel_val), NullPos(nullPos) {}
- int getSentinel() const { return sentinel; }
- int getNullPos() const { return NullPos; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) { return A->getKind() == attr::Sentinel; }
- static bool classof(const SentinelAttr *A) { return true; }
-};
-
-class VisibilityAttr : public Attr {
-public:
- /// @brief An enumeration for the kinds of visibility of symbols.
- enum VisibilityTypes {
- DefaultVisibility = 0,
- HiddenVisibility,
- ProtectedVisibility
- };
-private:
- VisibilityTypes VisibilityType;
-public:
- VisibilityAttr(VisibilityTypes v) : Attr(attr::Visibility),
- VisibilityType(v) {}
-
- VisibilityTypes getVisibility() const { return VisibilityType; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A)
- { return A->getKind() == attr::Visibility; }
- static bool classof(const VisibilityAttr *A) { return true; }
-};
-
-DEF_SIMPLE_ATTR(FastCall);
-DEF_SIMPLE_ATTR(StdCall);
-DEF_SIMPLE_ATTR(ThisCall);
-DEF_SIMPLE_ATTR(CDecl);
-DEF_SIMPLE_ATTR(TransparentUnion);
-DEF_SIMPLE_ATTR(ObjCNSObject);
-DEF_SIMPLE_ATTR(ObjCException);
-
-class OverloadableAttr : public Attr {
-public:
- OverloadableAttr() : Attr(attr::Overloadable) { }
-
- virtual bool isMerged() const { return false; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- static bool classof(const Attr *A)
- { return A->getKind() == attr::Overloadable; }
- static bool classof(const OverloadableAttr *) { return true; }
-};
-
-class BlocksAttr : public Attr {
-public:
- enum BlocksAttrTypes {
- ByRef = 0
- };
-private:
- BlocksAttrTypes BlocksAttrType;
-public:
- BlocksAttr(BlocksAttrTypes t) : Attr(attr::Blocks), BlocksAttrType(t) {}
-
- BlocksAttrTypes getType() const { return BlocksAttrType; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) { return A->getKind() == attr::Blocks; }
- static bool classof(const BlocksAttr *A) { return true; }
-};
-
-class FunctionDecl;
-
-class CleanupAttr : public Attr {
- FunctionDecl *FD;
-
-public:
- CleanupAttr(FunctionDecl *fd) : Attr(attr::Cleanup), FD(fd) {}
-
- const FunctionDecl *getFunctionDecl() const { return FD; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) { return A->getKind() == attr::Cleanup; }
- static bool classof(const CleanupAttr *A) { return true; }
-};
-
-DEF_SIMPLE_ATTR(NoDebug);
-DEF_SIMPLE_ATTR(WarnUnusedResult);
-DEF_SIMPLE_ATTR(NoInline);
-
-class RegparmAttr : public Attr {
- unsigned NumParams;
-
-public:
- RegparmAttr(unsigned np) : Attr(attr::Regparm), NumParams(np) {}
-
- unsigned getNumParams() const { return NumParams; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) { return A->getKind() == attr::Regparm; }
- static bool classof(const RegparmAttr *A) { return true; }
-};
-
-class ReqdWorkGroupSizeAttr : public Attr {
- unsigned X, Y, Z;
-public:
- ReqdWorkGroupSizeAttr(unsigned X, unsigned Y, unsigned Z)
- : Attr(attr::ReqdWorkGroupSize), X(X), Y(Y), Z(Z) {}
-
- unsigned getXDim() const { return X; }
- unsigned getYDim() const { return Y; }
- unsigned getZDim() const { return Z; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A) {
- return A->getKind() == attr::ReqdWorkGroupSize;
+ friend bool operator!=(specific_attr_iterator Left,
+ specific_attr_iterator Right) {
+ return !(Left == Right);
}
- static bool classof(const ReqdWorkGroupSizeAttr *A) { return true; }
};
-class InitPriorityAttr : public Attr {
- unsigned Priority;
-public:
- InitPriorityAttr(unsigned priority)
- : Attr(attr::InitPriority), Priority(priority) {}
-
- virtual void Destroy(ASTContext &C) { Attr::Destroy(C); }
-
- unsigned getPriority() const { return Priority; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- static bool classof(const Attr *A)
- { return A->getKind() == attr::InitPriority; }
- static bool classof(const InitPriorityAttr *A) { return true; }
-};
-
-// Checker-specific attributes.
-DEF_SIMPLE_ATTR(CFReturnsNotRetained);
-DEF_SIMPLE_ATTR(CFReturnsRetained);
-DEF_SIMPLE_ATTR(NSReturnsNotRetained);
-DEF_SIMPLE_ATTR(NSReturnsRetained);
-
-// Target-specific attributes
-DEF_SIMPLE_ATTR(DLLImport);
-DEF_SIMPLE_ATTR(DLLExport);
-
-class MSP430InterruptAttr : public Attr {
- unsigned Number;
-
-public:
- MSP430InterruptAttr(unsigned n) : Attr(attr::MSP430Interrupt), Number(n) {}
-
- unsigned getNumber() const { return Number; }
-
- virtual Attr *clone(ASTContext &C) const;
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Attr *A)
- { return A->getKind() == attr::MSP430Interrupt; }
- static bool classof(const MSP430InterruptAttr *A) { return true; }
-};
+template <typename T>
+inline specific_attr_iterator<T> specific_attr_begin(const AttrVec& vec) {
+ return specific_attr_iterator<T>(vec.begin());
+}
+template <typename T>
+inline specific_attr_iterator<T> specific_attr_end(const AttrVec& vec) {
+ return specific_attr_iterator<T>(vec.end());
+}
-DEF_SIMPLE_ATTR(X86ForceAlignArgPointer);
+template <typename T>
+inline bool hasSpecificAttr(const AttrVec& vec) {
+ return specific_attr_begin<T>(vec) != specific_attr_end<T>(vec);
+}
+template <typename T>
+inline T *getSpecificAttr(const AttrVec& vec) {
+ specific_attr_iterator<T> i = specific_attr_begin<T>(vec);
+ if (i != specific_attr_end<T>(vec))
+ return *i;
+ else
+ return 0;
+}
-#undef DEF_SIMPLE_ATTR
+/// getMaxAlignment - Returns the highest alignment value found among
+/// AlignedAttrs in an AttrVec, or 0 if there are none.
+inline unsigned getMaxAttrAlignment(const AttrVec& V, ASTContext &Ctx) {
+ unsigned Align = 0;
+ specific_attr_iterator<AlignedAttr> i(V.begin()), e(V.end());
+ for(; i != e; ++i)
+ Align = std::max(Align, i->getAlignment(Ctx));
+ return Align;
+}
} // end namespace clang
diff --git a/include/clang/AST/CMakeLists.txt b/include/clang/AST/CMakeLists.txt
index 3b090715e083..800c58361b02 100644
--- a/include/clang/AST/CMakeLists.txt
+++ b/include/clang/AST/CMakeLists.txt
@@ -5,6 +5,12 @@ tablegen(Attrs.inc
add_custom_target(ClangAttrClasses
DEPENDS Attrs.inc)
+tablegen(AttrImpl.inc
+ -gen-clang-attr-impl
+ -I ${CMAKE_CURRENT_SOURCE_DIR}/../../)
+add_custom_target(ClangAttrImpl
+ DEPENDS AttrImpl.inc)
+
set(LLVM_TARGET_DEFINITIONS ../Basic/StmtNodes.td)
tablegen(StmtNodes.inc
-gen-clang-stmt-nodes)
diff --git a/include/clang/AST/CanonicalType.h b/include/clang/AST/CanonicalType.h
index 9f97fd8a7aee..dad4dfc926e1 100644
--- a/include/clang/AST/CanonicalType.h
+++ b/include/clang/AST/CanonicalType.h
@@ -273,6 +273,9 @@ public:
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isArrayType)
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasPointerRepresentation)
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasObjCPointerRepresentation)
+ LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasIntegerRepresentation)
+ LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasSignedIntegerRepresentation)
+ LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasUnsignedIntegerRepresentation)
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasFloatingRepresentation)
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isPromotableIntegerType)
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isSignedIntegerType)
@@ -700,9 +703,9 @@ inline CanQual<Type> CanQual<T>::getNonReferenceType() const {
template<typename T>
CanQual<T> CanQual<T>::getFromOpaquePtr(void *Ptr) {
CanQual<T> Result;
- Result.Stored.setFromOpaqueValue(Ptr);
- assert((!Result || Result.Stored.isCanonical())
- && "Type is not canonical!");
+ Result.Stored = QualType::getFromOpaquePtr(Ptr);
+ assert((!Result || Result.Stored.getAsOpaquePtr() == (void*)-1 ||
+ Result.Stored.isCanonical()) && "Type is not canonical!");
return Result;
}
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h
index 39cd51f606b5..674925532210 100644
--- a/include/clang/AST/Decl.h
+++ b/include/clang/AST/Decl.h
@@ -118,16 +118,6 @@ public:
return getIdentifier() ? getIdentifier()->getName() : "";
}
- /// getNameAsCString - Get the name of identifier for this declaration as a
- /// C string (const char*). This requires that the declaration have a name
- /// and that it be a simple identifier.
- //
- // FIXME: Deprecated, move clients to getName().
- const char *getNameAsCString() const {
- assert(Name.isIdentifier() && "Name is not a simple identifier");
- return getIdentifier() ? getIdentifier()->getNameStart() : "";
- }
-
/// getNameAsString - Get a human-readable name for the declaration, even if
/// it is one of the special kinds of names (C++ constructor, Objective-C
/// selector, etc). Creating this name requires expensive string
@@ -229,6 +219,8 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
/// NamespaceDecl - Represent a C++ namespace.
class NamespaceDecl : public NamedDecl, public DeclContext {
+ bool IsInline : 1;
+
SourceLocation LBracLoc, RBracLoc;
// For extended namespace definitions:
@@ -239,7 +231,7 @@ class NamespaceDecl : public NamedDecl, public DeclContext {
// there will be one NamespaceDecl for each declaration.
// NextNamespace points to the next extended declaration.
// OrigNamespace points to the original namespace declaration.
- // OrigNamespace of the first namespace decl points to itself.
+ // OrigNamespace of the first namespace decl points to its anonymous namespace
NamespaceDecl *NextNamespace;
/// \brief A pointer to either the original namespace definition for
@@ -258,28 +250,36 @@ class NamespaceDecl : public NamedDecl, public DeclContext {
NamespaceDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id)
: NamedDecl(Namespace, DC, L, Id), DeclContext(Namespace),
- NextNamespace(0), OrigOrAnonNamespace(0, true) { }
+ IsInline(false), NextNamespace(0), OrigOrAnonNamespace(0, true) { }
public:
static NamespaceDecl *Create(ASTContext &C, DeclContext *DC,
SourceLocation L, IdentifierInfo *Id);
- virtual void Destroy(ASTContext& C);
-
- // \brief Returns true if this is an anonymous namespace declaration.
- //
- // For example:
+ /// \brief Returns true if this is an anonymous namespace declaration.
+ ///
+ /// For example:
/// \code
- // namespace {
- // ...
- // };
- // \endcode
- // q.v. C++ [namespace.unnamed]
+ /// namespace {
+ /// ...
+ /// };
+ /// \endcode
+ /// q.v. C++ [namespace.unnamed]
bool isAnonymousNamespace() const {
return !getIdentifier();
}
- /// \brief Return the next extended namespace declaration or null if this
+ /// \brief Returns true if this is an inline namespace declaration.
+ bool isInline() const {
+ return IsInline;
+ }
+
+ /// \brief Set whether this is an inline namespace declaration.
+ void setInline(bool Inline) {
+ IsInline = Inline;
+ }
+
+ /// \brief Return the next extended namespace declaration or null if there
/// is none.
NamespaceDecl *getNextNamespace() { return NextNamespace; }
const NamespaceDecl *getNextNamespace() const { return NextNamespace; }
@@ -345,8 +345,8 @@ public:
return static_cast<NamespaceDecl *>(const_cast<DeclContext*>(DC));
}
- friend class PCHDeclReader;
- friend class PCHDeclWriter;
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
/// ValueDecl - Represent the declaration of a variable (in which case it is
@@ -392,8 +392,6 @@ struct QualifierInfo {
unsigned NumTPLists,
TemplateParameterList **TPLists);
- void Destroy(ASTContext &Context);
-
private:
// Copy constructor and copy assignment are disabled.
QualifierInfo(const QualifierInfo&);
@@ -421,9 +419,6 @@ protected:
: ValueDecl(DK, DC, L, N, T), DeclInfo(TInfo) {}
public:
- virtual ~DeclaratorDecl();
- virtual void Destroy(ASTContext &C);
-
TypeSourceInfo *getTypeSourceInfo() const {
return hasExtInfo()
? getExtInfo()->TInfo
@@ -507,36 +502,11 @@ struct EvaluatedStmt {
APValue Evaluated;
};
-// \brief Describes the kind of template specialization that a
-// particular template specialization declaration represents.
-enum TemplateSpecializationKind {
- /// This template specialization was formed from a template-id but
- /// has not yet been declared, defined, or instantiated.
- TSK_Undeclared = 0,
- /// This template specialization was implicitly instantiated from a
- /// template. (C++ [temp.inst]).
- TSK_ImplicitInstantiation,
- /// This template specialization was declared or defined by an
- /// explicit specialization (C++ [temp.expl.spec]) or partial
- /// specialization (C++ [temp.class.spec]).
- TSK_ExplicitSpecialization,
- /// This template specialization was instantiated from a template
- /// due to an explicit instantiation declaration request
- /// (C++0x [temp.explicit]).
- TSK_ExplicitInstantiationDeclaration,
- /// This template specialization was instantiated from a template
- /// due to an explicit instantiation definition request
- /// (C++ [temp.explicit]).
- TSK_ExplicitInstantiationDefinition
-};
-
/// VarDecl - An instance of this class is created to represent a variable
/// declaration or definition.
class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> {
public:
- enum StorageClass {
- None, Auto, Register, Extern, Static, PrivateExtern
- };
+ typedef clang::StorageClass StorageClass;
/// getStorageClassSpecifierString - Return the string used to
/// specify the storage class \arg SC.
@@ -568,10 +538,6 @@ private:
bool ThreadSpecified : 1;
bool HasCXXDirectInit : 1;
- /// DeclaredInCondition - Whether this variable was declared in a
- /// condition, e.g., if (int x = foo()) { ... }.
- bool DeclaredInCondition : 1;
-
/// \brief Whether this variable is the exception variable in a C++ catch
/// or an Objective-C @catch statement.
bool ExceptionVar : 1;
@@ -587,7 +553,7 @@ protected:
StorageClass SCAsWritten)
: DeclaratorDecl(DK, DC, L, Id, T, TInfo), Init(),
ThreadSpecified(false), HasCXXDirectInit(false),
- DeclaredInCondition(false), ExceptionVar(false), NRVOVariable(false) {
+ ExceptionVar(false), NRVOVariable(false) {
SClass = SC;
SClassAsWritten = SCAsWritten;
}
@@ -609,9 +575,6 @@ public:
QualType T, TypeSourceInfo *TInfo, StorageClass S,
StorageClass SCAsWritten);
- virtual void Destroy(ASTContext& C);
- virtual ~VarDecl();
-
virtual SourceLocation getInnerLocStart() const;
virtual SourceRange getSourceRange() const;
@@ -619,8 +582,14 @@ public:
StorageClass getStorageClassAsWritten() const {
return (StorageClass) SClassAsWritten;
}
- void setStorageClass(StorageClass SC) { SClass = SC; }
- void setStorageClassAsWritten(StorageClass SC) { SClassAsWritten = SC; }
+ void setStorageClass(StorageClass SC) {
+ assert(isLegalForVariable(SC));
+ SClass = SC;
+ }
+ void setStorageClassAsWritten(StorageClass SC) {
+ assert(isLegalForVariable(SC));
+ SClassAsWritten = SC;
+ }
void setThreadSpecified(bool T) { ThreadSpecified = T; }
bool isThreadSpecified() const {
@@ -630,25 +599,26 @@ public:
/// hasLocalStorage - Returns true if a variable with function scope
/// is a non-static local variable.
bool hasLocalStorage() const {
- if (getStorageClass() == None)
+ if (getStorageClass() == SC_None)
return !isFileVarDecl();
// Return true for: Auto, Register.
// Return false for: Extern, Static, PrivateExtern.
- return getStorageClass() <= Register;
+ return getStorageClass() >= SC_Auto;
}
/// isStaticLocal - Returns true if a variable with function scope is a
/// static local variable.
bool isStaticLocal() const {
- return getStorageClass() == Static && !isFileVarDecl();
+ return getStorageClass() == SC_Static && !isFileVarDecl();
}
/// hasExternStorage - Returns true if a variable has extern or
/// __private_extern__ storage.
bool hasExternalStorage() const {
- return getStorageClass() == Extern || getStorageClass() == PrivateExtern;
+ return getStorageClass() == SC_Extern ||
+ getStorageClass() == SC_PrivateExtern;
}
/// hasGlobalStorage - Returns true for all variables that do not
@@ -670,7 +640,7 @@ public:
if (getKind() != Decl::Var)
return false;
if (const DeclContext *DC = getDeclContext())
- return DC->getLookupContext()->isFunctionOrMethod();
+ return DC->getRedeclContext()->isFunctionOrMethod();
return false;
}
@@ -679,10 +649,8 @@ public:
bool isFunctionOrMethodVarDecl() const {
if (getKind() != Decl::Var)
return false;
- if (const DeclContext *DC = getDeclContext())
- return DC->getLookupContext()->isFunctionOrMethod() &&
- DC->getLookupContext()->getDeclKind() != Decl::Block;
- return false;
+ const DeclContext *DC = getDeclContext()->getRedeclContext();
+ return DC->isFunctionOrMethod() && DC->getDeclKind() != Decl::Block;
}
/// \brief Determines whether this is a static data member.
@@ -696,7 +664,7 @@ public:
/// \endcode
bool isStaticDataMember() const {
// If it wasn't static, it would be a FieldDecl.
- return getDeclContext()->isRecord();
+ return getKind() != Decl::ParmVar && getDeclContext()->isRecord();
}
virtual VarDecl *getCanonicalDecl();
@@ -743,11 +711,10 @@ public:
bool isFileVarDecl() const {
if (getKind() != Decl::Var)
return false;
- if (const DeclContext *Ctx = getDeclContext()) {
- Ctx = Ctx->getLookupContext();
- if (isa<TranslationUnitDecl>(Ctx) || isa<NamespaceDecl>(Ctx) )
- return true;
- }
+
+ if (getDeclContext()->getRedeclContext()->isFileContext())
+ return true;
+
if (isStaticDataMember())
return true;
@@ -912,18 +879,6 @@ public:
return HasCXXDirectInit;
}
- /// isDeclaredInCondition - Whether this variable was declared as
- /// part of a condition in an if/switch/while statement, e.g.,
- /// @code
- /// if (int x = foo()) { ... }
- /// @endcode
- bool isDeclaredInCondition() const {
- return DeclaredInCondition;
- }
- void setDeclaredInCondition(bool InCondition) {
- DeclaredInCondition = InCondition;
- }
-
/// \brief Determine whether this variable is the exception variable in a
/// C++ catch statememt or an Objective-C @catch statement.
bool isExceptionVariable() const {
@@ -973,7 +928,7 @@ class ImplicitParamDecl : public VarDecl {
protected:
ImplicitParamDecl(Kind DK, DeclContext *DC, SourceLocation L,
IdentifierInfo *Id, QualType Tw)
- : VarDecl(DK, DC, L, Id, Tw, /*TInfo=*/0, VarDecl::None, VarDecl::None) {}
+ : VarDecl(DK, DC, L, Id, Tw, /*TInfo=*/0, SC_None, SC_None) {}
public:
static ImplicitParamDecl *Create(ASTContext &C, DeclContext *DC,
SourceLocation L, IdentifierInfo *Id,
@@ -1117,9 +1072,7 @@ public:
class FunctionDecl : public DeclaratorDecl, public DeclContext,
public Redeclarable<FunctionDecl> {
public:
- enum StorageClass {
- None, Extern, Static, PrivateExtern
- };
+ typedef clang::StorageClass StorageClass;
/// \brief The kind of templated function a FunctionDecl can be.
enum TemplatedKind {
@@ -1179,11 +1132,15 @@ private:
DependentFunctionTemplateSpecializationInfo *>
TemplateOrSpecialization;
+ /// DNLoc - Provides source/type location info for the
+ /// declaration name embedded in the DeclaratorDecl base class.
+ DeclarationNameLoc DNLoc;
+
protected:
- FunctionDecl(Kind DK, DeclContext *DC, SourceLocation L,
- DeclarationName N, QualType T, TypeSourceInfo *TInfo,
+ FunctionDecl(Kind DK, DeclContext *DC, const DeclarationNameInfo &NameInfo,
+ QualType T, TypeSourceInfo *TInfo,
StorageClass S, StorageClass SCAsWritten, bool isInline)
- : DeclaratorDecl(DK, DC, L, N, T, TInfo),
+ : DeclaratorDecl(DK, DC, NameInfo.getLoc(), NameInfo.getName(), T, TInfo),
DeclContext(DK),
ParamInfo(0), Body(),
SClass(S), SClassAsWritten(SCAsWritten), IsInline(isInline),
@@ -1191,10 +1148,9 @@ protected:
HasWrittenPrototype(true), IsDeleted(false), IsTrivial(false),
IsCopyAssignment(false),
HasImplicitReturnZero(false),
- EndRangeLoc(L), TemplateOrSpecialization() {}
-
- virtual ~FunctionDecl() {}
- virtual void Destroy(ASTContext& C);
+ EndRangeLoc(NameInfo.getEndLoc()),
+ TemplateOrSpecialization(),
+ DNLoc(NameInfo.getInfo()) {}
typedef Redeclarable<FunctionDecl> redeclarable_base;
virtual FunctionDecl *getNextRedeclaration() { return RedeclLink.getNext(); }
@@ -1211,11 +1167,27 @@ public:
static FunctionDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L,
DeclarationName N, QualType T,
TypeSourceInfo *TInfo,
- StorageClass S = None,
- StorageClass SCAsWritten = None,
+ StorageClass S = SC_None,
+ StorageClass SCAsWritten = SC_None,
+ bool isInline = false,
+ bool hasWrittenPrototype = true) {
+ DeclarationNameInfo NameInfo(N, L);
+ return FunctionDecl::Create(C, DC, NameInfo, T, TInfo, S, SCAsWritten,
+ isInline, hasWrittenPrototype);
+ }
+
+ static FunctionDecl *Create(ASTContext &C, DeclContext *DC,
+ const DeclarationNameInfo &NameInfo,
+ QualType T, TypeSourceInfo *TInfo,
+ StorageClass S = SC_None,
+ StorageClass SCAsWritten = SC_None,
bool isInline = false,
bool hasWrittenPrototype = true);
+ DeclarationNameInfo getNameInfo() const {
+ return DeclarationNameInfo(getDeclName(), getLocation(), DNLoc);
+ }
+
virtual void getNameForDiagnostic(std::string &S,
const PrintingPolicy &Policy,
bool Qualified) const;
@@ -1245,7 +1217,7 @@ public:
/// set that function declaration to the actual declaration
/// containing the body (if there is one).
/// NOTE: For checking if there is a body, use hasBody() instead, to avoid
- /// unnecessary PCH de-serialization of the body.
+ /// unnecessary AST de-serialization of the body.
Stmt *getBody(const FunctionDecl *&Definition) const;
virtual Stmt *getBody() const {
@@ -1389,12 +1361,18 @@ public:
}
StorageClass getStorageClass() const { return StorageClass(SClass); }
- void setStorageClass(StorageClass SC) { SClass = SC; }
+ void setStorageClass(StorageClass SC) {
+ assert(isLegalForFunction(SC));
+ SClass = SC;
+ }
StorageClass getStorageClassAsWritten() const {
return StorageClass(SClassAsWritten);
}
- void setStorageClassAsWritten(StorageClass SC) { SClassAsWritten = SC; }
+ void setStorageClassAsWritten(StorageClass SC) {
+ assert(isLegalForFunction(SC));
+ SClassAsWritten = SC;
+ }
/// \brief Determine whether the "inline" keyword was specified for this
/// function.
@@ -1632,8 +1610,8 @@ public:
return static_cast<FunctionDecl *>(const_cast<DeclContext*>(DC));
}
- friend class PCHDeclReader;
- friend class PCHDeclWriter;
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
@@ -1705,7 +1683,6 @@ protected:
const llvm::APSInt &V)
: ValueDecl(EnumConstant, DC, L, Id, T), Init((Stmt*)E), Val(V) {}
- virtual ~EnumConstantDecl() {}
public:
static EnumConstantDecl *Create(ASTContext &C, EnumDecl *DC,
@@ -1713,8 +1690,6 @@ public:
QualType T, Expr *E,
const llvm::APSInt &V);
- virtual void Destroy(ASTContext& C);
-
const Expr *getInitExpr() const { return (const Expr*) Init; }
Expr *getInitExpr() { return (Expr*) Init; }
const llvm::APSInt &getInitVal() const { return Val; }
@@ -1722,6 +1697,8 @@ public:
void setInitExpr(Expr *E) { Init = (Stmt*) E; }
void setInitVal(const llvm::APSInt &V) { Val = V; }
+ SourceRange getSourceRange() const;
+
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const EnumConstantDecl *D) { return true; }
@@ -1770,8 +1747,6 @@ class TypedefDecl : public TypeDecl, public Redeclarable<TypedefDecl> {
IdentifierInfo *Id, TypeSourceInfo *TInfo)
: TypeDecl(Typedef, DC, L, Id), TInfo(TInfo) {}
- virtual ~TypedefDecl();
-
protected:
typedef Redeclarable<TypedefDecl> redeclarable_base;
virtual TypedefDecl *getNextRedeclaration() { return RedeclLink.getNext(); }
@@ -1832,6 +1807,9 @@ private:
/// it is a declaration ("struct foo;").
bool IsDefinition : 1;
+ /// IsBeingDefined - True if this is currently being defined.
+ bool IsBeingDefined : 1;
+
/// IsEmbeddedInDeclarator - True if this tag declaration is
/// "embedded" (i.e., defined or declared for the very first time)
/// in the syntax of a declarator.
@@ -1873,6 +1851,7 @@ protected:
"EnumDecl not matched with TTK_Enum");
TagDeclKind = TK;
IsDefinition = false;
+ IsBeingDefined = false;
IsEmbeddedInDeclarator = false;
setPreviousDeclaration(PrevDecl);
}
@@ -1881,8 +1860,6 @@ protected:
virtual TagDecl *getNextRedeclaration() { return RedeclLink.getNext(); }
public:
- void Destroy(ASTContext &C);
-
typedef redeclarable_base::redecl_iterator redecl_iterator;
redecl_iterator redecls_begin() const {
return redeclarable_base::redecls_begin();
@@ -1911,11 +1888,22 @@ public:
return const_cast<TagDecl*>(this)->getCanonicalDecl();
}
+ /// isThisDeclarationADefinition() - Return true if this declaration
+ /// defines the type. Provided for consistency.
+ bool isThisDeclarationADefinition() const {
+ return isDefinition();
+ }
+
/// isDefinition - Return true if this decl has its body specified.
bool isDefinition() const {
return IsDefinition;
}
+ /// isBeingDefined - Return true if this decl is currently being defined.
+ bool isBeingDefined() const {
+ return IsBeingDefined;
+ }
+
bool isEmbeddedInDeclarator() const {
return IsEmbeddedInDeclarator;
}
@@ -2003,8 +1991,8 @@ public:
return static_cast<TagDecl *>(const_cast<DeclContext*>(DC));
}
- friend class PCHDeclReader;
- friend class PCHDeclWriter;
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
/// EnumDecl - Represents an enum. As an extension, we allow forward-declared
@@ -2037,6 +2025,8 @@ class EnumDecl : public TagDecl {
IdentifierInfo *Id, EnumDecl *PrevDecl, SourceLocation TKL)
: TagDecl(Enum, TTK_Enum, DC, L, Id, PrevDecl, TKL), InstantiatedFrom(0) {
IntegerType = QualType();
+ NumNegativeBits = 0;
+ NumPositiveBits = 0;
}
public:
EnumDecl *getCanonicalDecl() {
@@ -2058,8 +2048,6 @@ public:
SourceLocation TKL, EnumDecl *PrevDecl);
static EnumDecl *Create(ASTContext &C, EmptyShell Empty);
- virtual void Destroy(ASTContext& C);
-
/// completeDefinition - When created, the EnumDecl corresponds to a
/// forward-declared enum. This method is used to mark the
/// declaration as being defined; it's enumerators have already been
@@ -2167,7 +2155,6 @@ protected:
RecordDecl(Kind DK, TagKind TK, DeclContext *DC,
SourceLocation L, IdentifierInfo *Id,
RecordDecl *PrevDecl, SourceLocation TKL);
- virtual ~RecordDecl();
public:
static RecordDecl *Create(ASTContext &C, TagKind TK, DeclContext *DC,
@@ -2183,8 +2170,6 @@ public:
return cast_or_null<RecordDecl>(TagDecl::getPreviousDeclaration());
}
- virtual void Destroy(ASTContext& C);
-
bool hasFlexibleArrayMember() const { return HasFlexibleArrayMember; }
void setHasFlexibleArrayMember(bool V) { HasFlexibleArrayMember = V; }
@@ -2307,9 +2292,6 @@ protected:
IsVariadic(false), ParamInfo(0), NumParams(0), Body(0),
SignatureAsWritten(0) {}
- virtual ~BlockDecl();
- virtual void Destroy(ASTContext& C);
-
public:
static BlockDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L);
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index be30b8ed296b..1369c2b5955a 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -222,11 +222,13 @@ protected:
// NOTE: VC++ treats enums as signed, avoid using the AccessSpecifier enum
unsigned Access : 2;
friend class CXXClassMemberWrapper;
-
- // PCHLevel - the "level" of precompiled header/AST file from which this
- // declaration was built.
- unsigned PCHLevel : 3;
-
+
+ /// PCHLevel - the "level" of AST file from which this declaration was built.
+ unsigned PCHLevel : 2;
+
+ /// ChangedAfterLoad - if this declaration has changed since being loaded
+ bool ChangedAfterLoad : 1;
+
/// IdentifierNamespace - This specifies what IDNS_* namespace this lives in.
unsigned IdentifierNamespace : 15;
@@ -243,7 +245,7 @@ protected:
: NextDeclInContext(0), DeclCtx(DC),
Loc(L), DeclKind(DK), InvalidDecl(0),
HasAttrs(false), Implicit(false), Used(false),
- Access(AS_none), PCHLevel(0),
+ Access(AS_none), PCHLevel(0), ChangedAfterLoad(false),
IdentifierNamespace(getIdentifierNamespaceForKind(DK)) {
if (Decl::CollectingStats()) add(DK);
}
@@ -251,7 +253,7 @@ protected:
Decl(Kind DK, EmptyShell Empty)
: NextDeclInContext(0), DeclKind(DK), InvalidDecl(0),
HasAttrs(false), Implicit(false), Used(false),
- Access(AS_none), PCHLevel(0),
+ Access(AS_none), PCHLevel(0), ChangedAfterLoad(false),
IdentifierNamespace(getIdentifierNamespaceForKind(DK)) {
if (Decl::CollectingStats()) add(DK);
}
@@ -305,24 +307,52 @@ public:
}
bool hasAttrs() const { return HasAttrs; }
- void initAttrs(Attr *attrs);
- void addAttr(Attr *attr);
- const Attr *getAttrs() const {
- if (!HasAttrs) return 0; // common case, no attributes.
- return getAttrsImpl(); // Uncommon case, out of line hash lookup.
+ void setAttrs(const AttrVec& Attrs);
+ AttrVec& getAttrs() {
+ return const_cast<AttrVec&>(const_cast<const Decl*>(this)->getAttrs());
}
+ const AttrVec &getAttrs() const;
void swapAttrs(Decl *D);
- void invalidateAttrs();
+ void dropAttrs();
+
+ void addAttr(Attr *A) {
+ if (hasAttrs())
+ getAttrs().push_back(A);
+ else
+ setAttrs(AttrVec(1, A));
+ }
+
+ typedef AttrVec::const_iterator attr_iterator;
+
+ // FIXME: Do not rely on iterators having comparable singular values.
+ // Note that this should error out if they do not.
+ attr_iterator attr_begin() const {
+ return hasAttrs() ? getAttrs().begin() : 0;
+ }
+ attr_iterator attr_end() const {
+ return hasAttrs() ? getAttrs().end() : 0;
+ }
- template<typename T> const T *getAttr() const {
- for (const Attr *attr = getAttrs(); attr; attr = attr->getNext())
- if (const T *V = dyn_cast<T>(attr))
- return V;
- return 0;
+ template <typename T>
+ specific_attr_iterator<T> specific_attr_begin() const {
+ return specific_attr_iterator<T>(attr_begin());
+ }
+ template <typename T>
+ specific_attr_iterator<T> specific_attr_end() const {
+ return specific_attr_iterator<T>(attr_end());
}
+ template<typename T> T *getAttr() const {
+ return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 0;
+ }
template<typename T> bool hasAttr() const {
- return getAttr<T>() != 0;
+ return hasAttrs() && hasSpecificAttr<T>(getAttrs());
+ }
+
+ /// getMaxAlignment - return the maximum alignment specified by attributes
+ /// on this decl, 0 if there are none.
+ unsigned getMaxAlignment() const {
+ return hasAttrs() ? getMaxAttrAlignment(getAttrs(), getASTContext()) : 0;
}
/// setInvalidDecl - Indicates the Decl had a semantic error. This
@@ -343,22 +373,21 @@ public:
/// (in addition to the "used" bit set by \c setUsed()) when determining
/// whether the function is used.
bool isUsed(bool CheckUsedAttr = true) const;
-
+
void setUsed(bool U = true) { Used = U; }
/// \brief Retrieve the level of precompiled header from which this
/// declaration was generated.
///
/// The PCH level of a declaration describes where the declaration originated
- /// from. A PCH level of 0 indicates that the declaration was not from a
- /// precompiled header. A PCH level of 1 indicates that the declaration was
- /// from a top-level precompiled header; 2 indicates that the declaration
- /// comes from a precompiled header on which the top-level precompiled header
- /// depends, and so on.
+ /// from. A PCH level of 0 indicates that the declaration was parsed from
+ /// source. A PCH level of 1 indicates that the declaration was loaded from
+ /// a top-level AST file. A PCH level 2 indicates that the declaration was
+ /// loaded from a PCH file the AST file depends on, and so on.
unsigned getPCHLevel() const { return PCHLevel; }
/// \brief The maximum PCH level that any declaration may have.
- static const unsigned MaxPCHLevel = 7;
+ static const unsigned MaxPCHLevel = 3;
/// \brief Set the PCH level of this declaration.
void setPCHLevel(unsigned Level) {
@@ -366,6 +395,19 @@ public:
PCHLevel = Level;
}
+ /// \brief Query whether this declaration was changed in a significant way
+ /// since being loaded from an AST file.
+ ///
+ /// In an epic violation of layering, what is "significant" is entirely
+ /// up to the serialization system, but implemented in AST and Sema.
+ bool isChangedSinceDeserialization() const { return ChangedAfterLoad; }
+
+ /// \brief Mark this declaration as having changed since deserialization, or
+ /// reset the flag.
+ void setChangedSinceDeserialization(bool Changed) {
+ ChangedAfterLoad = Changed;
+ }
+
unsigned getIdentifierNamespace() const {
return IdentifierNamespace;
}
@@ -411,10 +453,10 @@ public:
void setLexicalDeclContext(DeclContext *DC);
- // isDefinedOutsideFunctionOrMethod - This predicate returns true if this
- // scoped decl is defined outside the current function or method. This is
- // roughly global variables and functions, but also handles enums (which could
- // be defined inside or outside a function etc).
+ /// isDefinedOutsideFunctionOrMethod - This predicate returns true if this
+ /// scoped decl is defined outside the current function or method. This is
+ /// roughly global variables and functions, but also handles enums (which
+ /// could be defined inside or outside a function etc).
bool isDefinedOutsideFunctionOrMethod() const;
/// \brief Retrieves the "canonical" declaration of the given declaration.
@@ -572,9 +614,6 @@ public:
static DeclContext *castToDeclContext(const Decl *);
static Decl *castFromDeclContext(const DeclContext *);
- /// Destroy - Call destructors and release memory.
- virtual void Destroy(ASTContext& C);
-
void print(llvm::raw_ostream &Out, unsigned Indentation = 0) const;
void print(llvm::raw_ostream &Out, const PrintingPolicy &Policy,
unsigned Indentation = 0) const;
@@ -603,6 +642,29 @@ public:
virtual void print(llvm::raw_ostream &OS) const;
};
+class DeclContextLookupResult
+ : public std::pair<NamedDecl**,NamedDecl**> {
+public:
+ DeclContextLookupResult(NamedDecl **I, NamedDecl **E)
+ : std::pair<NamedDecl**,NamedDecl**>(I, E) {}
+ DeclContextLookupResult()
+ : std::pair<NamedDecl**,NamedDecl**>() {}
+
+ using std::pair<NamedDecl**,NamedDecl**>::operator=;
+};
+
+class DeclContextLookupConstResult
+ : public std::pair<NamedDecl*const*, NamedDecl*const*> {
+public:
+ DeclContextLookupConstResult(std::pair<NamedDecl**,NamedDecl**> R)
+ : std::pair<NamedDecl*const*, NamedDecl*const*>(R) {}
+ DeclContextLookupConstResult(NamedDecl * const *I, NamedDecl * const *E)
+ : std::pair<NamedDecl*const*, NamedDecl*const*>(I, E) {}
+ DeclContextLookupConstResult()
+ : std::pair<NamedDecl*const*, NamedDecl*const*>() {}
+
+ using std::pair<NamedDecl*const*,NamedDecl*const*>::operator=;
+};
/// DeclContext - This is used only as base class of specific decl types that
/// can act as declaration contexts. These decls are (only the top classes
@@ -654,8 +716,6 @@ protected:
ExternalVisibleStorage(false), LookupPtr(0), FirstDecl(0),
LastDecl(0) { }
- void DestroyDecls(ASTContext &C);
-
public:
~DeclContext();
@@ -724,6 +784,8 @@ public:
return DeclKind == Decl::Namespace;
}
+ bool isInlineNamespace() const;
+
/// \brief Determines whether this context is dependent on a
/// template parameter.
bool isDependentContext() const;
@@ -742,19 +804,18 @@ public:
/// Here, E is a transparent context, so its enumerator (Val1) will
/// appear (semantically) that it is in the same context of E.
/// Examples of transparent contexts include: enumerations (except for
- /// C++0x scoped enums), C++ linkage specifications, and C++0x
- /// inline namespaces.
+ /// C++0x scoped enums), and C++ linkage specifications.
bool isTransparentContext() const;
/// \brief Determine whether this declaration context is equivalent
/// to the declaration context DC.
- bool Equals(DeclContext *DC) {
+ bool Equals(const DeclContext *DC) const {
return DC && this->getPrimaryContext() == DC->getPrimaryContext();
}
/// \brief Determine whether this declaration context encloses the
/// declaration context DC.
- bool Encloses(DeclContext *DC);
+ bool Encloses(const DeclContext *DC) const;
/// getPrimaryContext - There may be many different
/// declarations of the same entity (including forward declarations
@@ -767,13 +828,12 @@ public:
return const_cast<DeclContext*>(this)->getPrimaryContext();
}
- /// getLookupContext - Retrieve the innermost non-transparent
- /// context of this context, which corresponds to the innermost
- /// location from which name lookup can find the entities in this
- /// context.
- DeclContext *getLookupContext();
- const DeclContext *getLookupContext() const {
- return const_cast<DeclContext *>(this)->getLookupContext();
+ /// getRedeclContext - Retrieve the context in which an entity conflicts with
+ /// other entities of the same name, or where it is a redeclaration if the
+ /// two entities are compatible. This skips through transparent contexts.
+ DeclContext *getRedeclContext();
+ const DeclContext *getRedeclContext() const {
+ return const_cast<DeclContext *>(this)->getRedeclContext();
}
/// \brief Retrieve the nearest enclosing namespace context.
@@ -782,6 +842,14 @@ public:
return const_cast<DeclContext *>(this)->getEnclosingNamespaceContext();
}
+ /// \brief Test if this context is part of the enclosing namespace set of
+ /// the context NS, as defined in C++0x [namespace.def]p9. If either context
+ /// isn't a namespace, this is equivalent to Equals().
+ ///
+ /// The enclosing namespace set of a namespace is the namespace and, if it is
+ /// inline, its enclosing namespace, recursively.
+ bool InEnclosingNamespaceSetOf(const DeclContext *NS) const;
+
/// getNextContext - If this is a DeclContext that may have other
/// DeclContexts that are semantically connected but syntactically
/// different, such as C++ namespaces, this routine retrieves the
@@ -845,6 +913,12 @@ public:
decl_iterator decls_end() const;
bool decls_empty() const;
+ /// noload_decls_begin/end - Iterate over the declarations stored in this
+ /// context that are currently loaded; don't attempt to retrieve anything
+ /// from an external source.
+ decl_iterator noload_decls_begin() const;
+ decl_iterator noload_decls_end() const;
+
/// specific_decl_iterator - Iterates over a subrange of
/// declarations stored in a DeclContext, providing only those that
/// are of type SpecificDecl (or a class derived from it). This
@@ -1020,9 +1094,8 @@ public:
/// access to the results of lookup up a name within this context.
typedef NamedDecl * const * lookup_const_iterator;
- typedef std::pair<lookup_iterator, lookup_iterator> lookup_result;
- typedef std::pair<lookup_const_iterator, lookup_const_iterator>
- lookup_const_result;
+ typedef DeclContextLookupResult lookup_result;
+ typedef DeclContextLookupConstResult lookup_const_result;
/// lookup - Find the declarations (if any) with the given Name in
/// this context. Returns a range of iterators that contains all of
@@ -1052,6 +1125,14 @@ public:
/// the declaration chains.
void makeDeclVisibleInContext(NamedDecl *D, bool Recoverable = true);
+ /// \brief Deserialize all the visible declarations from external storage.
+ ///
+ /// Name lookup deserializes visible declarations lazily, thus a DeclContext
+ /// may not have a complete name lookup table. This function deserializes
+ /// the rest of visible declarations from the external storage and completes
+ /// the name lookup table.
+ void MaterializeVisibleDeclsFromExternalStorage();
+
/// udir_iterator - Iterates through the using-directives stored
/// within this context.
typedef UsingDirectiveDecl * const * udir_iterator;
@@ -1109,7 +1190,6 @@ public:
private:
void LoadLexicalDeclsFromExternalStorage() const;
- void LoadVisibleDeclsFromExternalStorage() const;
friend class DependentDiagnostic;
StoredDeclsMap *CreateStoredDeclsMap(ASTContext &C) const;
@@ -1123,7 +1203,6 @@ inline bool Decl::isTemplateParameter() const {
getKind() == TemplateTemplateParm;
}
-
// Specialization selected when ToTy is not a known subclass of DeclContext.
template <class ToTy,
bool IsKnownSubtype = ::llvm::is_base_of< DeclContext, ToTy>::value>
diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h
index 41474ab21e32..a9802bfcaf4e 100644
--- a/include/clang/AST/DeclCXX.h
+++ b/include/clang/AST/DeclCXX.h
@@ -17,6 +17,7 @@
#include "clang/AST/Expr.h"
#include "clang/AST/Decl.h"
+#include "clang/AST/TypeLoc.h"
#include "clang/AST/UnresolvedSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/SmallPtrSet.h"
@@ -159,7 +160,6 @@ class CXXBaseSpecifier {
/// Range - The source code range that covers the full base
/// specifier, including the "virtual" (if present) and access
/// specifier (if present).
- // FIXME: Move over to a TypeLoc!
SourceRange Range;
/// Virtual - Whether this is a virtual base class or not.
@@ -177,15 +177,17 @@ class CXXBaseSpecifier {
/// VC++ bug.
unsigned Access : 2;
- /// BaseType - The type of the base class. This will be a class or
- /// struct (or a typedef of such).
- QualType BaseType;
+ /// BaseTypeInfo - The type of the base class. This will be a class or struct
+ /// (or a typedef of such). The source code range does not include the
+ /// "virtual" or access specifier.
+ TypeSourceInfo *BaseTypeInfo;
public:
CXXBaseSpecifier() { }
- CXXBaseSpecifier(SourceRange R, bool V, bool BC, AccessSpecifier A, QualType T)
- : Range(R), Virtual(V), BaseOfClass(BC), Access(A), BaseType(T) { }
+ CXXBaseSpecifier(SourceRange R, bool V, bool BC, AccessSpecifier A,
+ TypeSourceInfo *TInfo)
+ : Range(R), Virtual(V), BaseOfClass(BC), Access(A), BaseTypeInfo(TInfo) { }
/// getSourceRange - Retrieves the source range that contains the
/// entire base specifier.
@@ -195,7 +197,7 @@ public:
/// class (or not).
bool isVirtual() const { return Virtual; }
- /// \brief Determine whether this base class if a base of a class declared
+ /// \brief Determine whether this base class is a base of a class declared
/// with the 'class' keyword (vs. one declared with the 'struct' keyword).
bool isBaseOfClass() const { return BaseOfClass; }
@@ -221,7 +223,10 @@ public:
/// getType - Retrieves the type of the base class. This type will
/// always be an unqualified class type.
- QualType getType() const { return BaseType; }
+ QualType getType() const { return BaseTypeInfo->getType(); }
+
+ /// getTypeLoc - Retrieves the type and source location of the base class.
+ TypeSourceInfo *getTypeSourceInfo() const { return BaseTypeInfo; }
};
/// CXXRecordDecl - Represents a C++ struct/union/class.
@@ -400,8 +405,6 @@ protected:
CXXRecordDecl *PrevDecl,
SourceLocation TKL = SourceLocation());
- ~CXXRecordDecl();
-
public:
/// base_class_iterator - Iterator that traverses the base classes
/// of a class.
@@ -449,8 +452,6 @@ public:
bool DelayTypeCreation = false);
static CXXRecordDecl *Create(ASTContext &C, EmptyShell Empty);
- virtual void Destroy(ASTContext& C);
-
bool isDynamicClass() const {
return data().Polymorphic || data().NumVBases != 0;
}
@@ -1056,29 +1057,30 @@ public:
return true;
}
- friend class PCHDeclReader;
- friend class PCHDeclWriter;
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
/// CXXMethodDecl - Represents a static or instance method of a
/// struct/union/class.
class CXXMethodDecl : public FunctionDecl {
protected:
- CXXMethodDecl(Kind DK, CXXRecordDecl *RD, SourceLocation L,
- DeclarationName N, QualType T, TypeSourceInfo *TInfo,
+ CXXMethodDecl(Kind DK, CXXRecordDecl *RD,
+ const DeclarationNameInfo &NameInfo,
+ QualType T, TypeSourceInfo *TInfo,
bool isStatic, StorageClass SCAsWritten, bool isInline)
- : FunctionDecl(DK, RD, L, N, T, TInfo, (isStatic ? Static : None),
+ : FunctionDecl(DK, RD, NameInfo, T, TInfo, (isStatic ? SC_Static : SC_None),
SCAsWritten, isInline) {}
public:
static CXXMethodDecl *Create(ASTContext &C, CXXRecordDecl *RD,
- SourceLocation L, DeclarationName N,
- QualType T, TypeSourceInfo *TInfo,
- bool isStatic = false,
- StorageClass SCAsWritten = FunctionDecl::None,
- bool isInline = false);
+ const DeclarationNameInfo &NameInfo,
+ QualType T, TypeSourceInfo *TInfo,
+ bool isStatic = false,
+ StorageClass SCAsWritten = SC_None,
+ bool isInline = false);
- bool isStatic() const { return getStorageClass() == Static; }
+ bool isStatic() const { return getStorageClass() == SC_Static; }
bool isInstance() const { return !isStatic(); }
bool isVirtual() const {
@@ -1249,9 +1251,6 @@ public:
VarDecl **Indices,
unsigned NumIndices);
- /// \brief Destroy the base or member initializer.
- void Destroy(ASTContext &Context);
-
/// isBaseInitializer - Returns true when this initializer is
/// initializing a base class.
bool isBaseInitializer() const { return BaseOrMember.is<TypeSourceInfo*>(); }
@@ -1285,7 +1284,7 @@ public:
/// getMember - If this is a member initializer, returns the
/// declaration of the non-static data member being
/// initialized. Otherwise, returns NULL.
- FieldDecl *getMember() {
+ FieldDecl *getMember() const {
if (isMemberInitializer())
return BaseOrMember.get<FieldDecl*>();
else
@@ -1363,7 +1362,7 @@ public:
reinterpret_cast<VarDecl **>(this + 1)[I] = Index;
}
- Expr *getInit() { return static_cast<Expr *>(Init); }
+ Expr *getInit() const { return static_cast<Expr *>(Init); }
};
/// CXXConstructorDecl - Represents a C++ constructor within a
@@ -1394,22 +1393,21 @@ class CXXConstructorDecl : public CXXMethodDecl {
CXXBaseOrMemberInitializer **BaseOrMemberInitializers;
unsigned NumBaseOrMemberInitializers;
- CXXConstructorDecl(CXXRecordDecl *RD, SourceLocation L,
- DeclarationName N, QualType T, TypeSourceInfo *TInfo,
+ CXXConstructorDecl(CXXRecordDecl *RD, const DeclarationNameInfo &NameInfo,
+ QualType T, TypeSourceInfo *TInfo,
bool isExplicitSpecified, bool isInline,
bool isImplicitlyDeclared)
- : CXXMethodDecl(CXXConstructor, RD, L, N, T, TInfo, false,
- FunctionDecl::None, isInline),
+ : CXXMethodDecl(CXXConstructor, RD, NameInfo, T, TInfo, false,
+ SC_None, isInline),
IsExplicitSpecified(isExplicitSpecified), ImplicitlyDefined(false),
BaseOrMemberInitializers(0), NumBaseOrMemberInitializers(0) {
setImplicit(isImplicitlyDeclared);
}
- virtual void Destroy(ASTContext& C);
public:
static CXXConstructorDecl *Create(ASTContext &C, EmptyShell Empty);
static CXXConstructorDecl *Create(ASTContext &C, CXXRecordDecl *RD,
- SourceLocation L, DeclarationName N,
+ const DeclarationNameInfo &NameInfo,
QualType T, TypeSourceInfo *TInfo,
bool isExplicit,
bool isInline, bool isImplicitlyDeclared);
@@ -1519,8 +1517,8 @@ public:
static bool classof(const CXXConstructorDecl *D) { return true; }
static bool classofKind(Kind K) { return K == CXXConstructor; }
- friend class PCHDeclReader;
- friend class PCHDeclWriter;
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
/// CXXDestructorDecl - Represents a C++ destructor within a
@@ -1543,11 +1541,10 @@ class CXXDestructorDecl : public CXXMethodDecl {
FunctionDecl *OperatorDelete;
- CXXDestructorDecl(CXXRecordDecl *RD, SourceLocation L,
- DeclarationName N, QualType T,
- bool isInline, bool isImplicitlyDeclared)
- : CXXMethodDecl(CXXDestructor, RD, L, N, T, /*TInfo=*/0, false,
- FunctionDecl::None, isInline),
+ CXXDestructorDecl(CXXRecordDecl *RD, const DeclarationNameInfo &NameInfo,
+ QualType T, bool isInline, bool isImplicitlyDeclared)
+ : CXXMethodDecl(CXXDestructor, RD, NameInfo, T, /*TInfo=*/0, false,
+ SC_None, isInline),
ImplicitlyDefined(false), OperatorDelete(0) {
setImplicit(isImplicitlyDeclared);
}
@@ -1555,7 +1552,7 @@ class CXXDestructorDecl : public CXXMethodDecl {
public:
static CXXDestructorDecl *Create(ASTContext& C, EmptyShell Empty);
static CXXDestructorDecl *Create(ASTContext &C, CXXRecordDecl *RD,
- SourceLocation L, DeclarationName N,
+ const DeclarationNameInfo &NameInfo,
QualType T, bool isInline,
bool isImplicitlyDeclared);
@@ -1585,8 +1582,8 @@ public:
static bool classof(const CXXDestructorDecl *D) { return true; }
static bool classofKind(Kind K) { return K == CXXDestructor; }
- friend class PCHDeclReader;
- friend class PCHDeclWriter;
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
/// CXXConversionDecl - Represents a C++ conversion function within a
@@ -1604,17 +1601,17 @@ class CXXConversionDecl : public CXXMethodDecl {
/// explicitly wrote a cast. This is a C++0x feature.
bool IsExplicitSpecified : 1;
- CXXConversionDecl(CXXRecordDecl *RD, SourceLocation L,
- DeclarationName N, QualType T, TypeSourceInfo *TInfo,
+ CXXConversionDecl(CXXRecordDecl *RD, const DeclarationNameInfo &NameInfo,
+ QualType T, TypeSourceInfo *TInfo,
bool isInline, bool isExplicitSpecified)
- : CXXMethodDecl(CXXConversion, RD, L, N, T, TInfo, false,
- FunctionDecl::None, isInline),
+ : CXXMethodDecl(CXXConversion, RD, NameInfo, T, TInfo, false,
+ SC_None, isInline),
IsExplicitSpecified(isExplicitSpecified) { }
public:
static CXXConversionDecl *Create(ASTContext &C, EmptyShell Empty);
static CXXConversionDecl *Create(ASTContext &C, CXXRecordDecl *RD,
- SourceLocation L, DeclarationName N,
+ const DeclarationNameInfo &NameInfo,
QualType T, TypeSourceInfo *TInfo,
bool isInline, bool isExplicit);
@@ -1642,8 +1639,8 @@ public:
static bool classof(const CXXConversionDecl *D) { return true; }
static bool classofKind(Kind K) { return K == CXXConversion; }
- friend class PCHDeclReader;
- friend class PCHDeclWriter;
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
/// LinkageSpecDecl - This represents a linkage specification. For example:
@@ -1710,7 +1707,9 @@ public:
// artificial name, for all using-directives in order to store
// them in DeclContext effectively.
class UsingDirectiveDecl : public NamedDecl {
-
+ /// \brief The location of the "using" keyword.
+ SourceLocation UsingLoc;
+
/// SourceLocation - Location of 'namespace' token.
SourceLocation NamespaceLoc;
@@ -1722,10 +1721,6 @@ class UsingDirectiveDecl : public NamedDecl {
/// name, if any.
NestedNameSpecifier *Qualifier;
- /// IdentLoc - Location of nominated namespace-name identifier.
- // FIXME: We don't store location of scope specifier.
- SourceLocation IdentLoc;
-
/// NominatedNamespace - Namespace nominated by using-directive.
NamedDecl *NominatedNamespace;
@@ -1740,17 +1735,16 @@ class UsingDirectiveDecl : public NamedDecl {
return DeclarationName::getUsingDirectiveName();
}
- UsingDirectiveDecl(DeclContext *DC, SourceLocation L,
+ UsingDirectiveDecl(DeclContext *DC, SourceLocation UsingLoc,
SourceLocation NamespcLoc,
SourceRange QualifierRange,
NestedNameSpecifier *Qualifier,
SourceLocation IdentLoc,
NamedDecl *Nominated,
DeclContext *CommonAncestor)
- : NamedDecl(UsingDirective, DC, L, getName()),
+ : NamedDecl(UsingDirective, DC, IdentLoc, getName()), UsingLoc(UsingLoc),
NamespaceLoc(NamespcLoc), QualifierRange(QualifierRange),
- Qualifier(Qualifier), IdentLoc(IdentLoc),
- NominatedNamespace(Nominated),
+ Qualifier(Qualifier), NominatedNamespace(Nominated),
CommonAncestor(CommonAncestor) {
}
@@ -1759,18 +1753,10 @@ public:
/// that qualifies the namespace name.
SourceRange getQualifierRange() const { return QualifierRange; }
- /// \brief Set the source range of the nested-name-specifier that
- /// qualifies the namespace name.
- void setQualifierRange(SourceRange R) { QualifierRange = R; }
-
/// \brief Retrieve the nested-name-specifier that qualifies the
/// name of the namespace.
NestedNameSpecifier *getQualifier() const { return Qualifier; }
- /// \brief Set the nested-name-specifier that qualifes the name of the
- /// namespace.
- void setQualifier(NestedNameSpecifier *NNS) { Qualifier = NNS; }
-
NamedDecl *getNominatedNamespaceAsWritten() { return NominatedNamespace; }
const NamedDecl *getNominatedNamespaceAsWritten() const {
return NominatedNamespace;
@@ -1783,34 +1769,23 @@ public:
return const_cast<UsingDirectiveDecl*>(this)->getNominatedNamespace();
}
- /// setNominatedNamespace - Set the namespace nominataed by the
- /// using-directive.
- void setNominatedNamespace(NamedDecl* NS);
-
/// \brief Returns the common ancestor context of this using-directive and
/// its nominated namespace.
DeclContext *getCommonAncestor() { return CommonAncestor; }
const DeclContext *getCommonAncestor() const { return CommonAncestor; }
- /// \brief Set the common ancestor context of this using-directive and its
- /// nominated namespace.
- void setCommonAncestor(DeclContext* Cxt) { CommonAncestor = Cxt; }
-
+ /// \brief Return the location of the "using" keyword.
+ SourceLocation getUsingLoc() const { return UsingLoc; }
+
// FIXME: Could omit 'Key' in name.
/// getNamespaceKeyLocation - Returns location of namespace keyword.
SourceLocation getNamespaceKeyLocation() const { return NamespaceLoc; }
- /// setNamespaceKeyLocation - Set the the location of the namespacekeyword.
- void setNamespaceKeyLocation(SourceLocation L) { NamespaceLoc = L; }
-
/// getIdentLocation - Returns location of identifier.
- SourceLocation getIdentLocation() const { return IdentLoc; }
-
- /// setIdentLocation - set the location of the identifier.
- void setIdentLocation(SourceLocation L) { IdentLoc = L; }
+ SourceLocation getIdentLocation() const { return getLocation(); }
static UsingDirectiveDecl *Create(ASTContext &C, DeclContext *DC,
- SourceLocation L,
+ SourceLocation UsingLoc,
SourceLocation NamespaceLoc,
SourceRange QualifierRange,
NestedNameSpecifier *Qualifier,
@@ -1818,12 +1793,18 @@ public:
NamedDecl *Nominated,
DeclContext *CommonAncestor);
+ SourceRange getSourceRange() const {
+ return SourceRange(UsingLoc, getLocation());
+ }
+
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const UsingDirectiveDecl *D) { return true; }
static bool classofKind(Kind K) { return K == UsingDirective; }
// Friend for getUsingDirectiveName.
friend class DeclContext;
+
+ friend class ASTDeclReader;
};
/// NamespaceAliasDecl - Represents a C++ namespace alias. For example:
@@ -1832,7 +1813,8 @@ public:
/// namespace Foo = Bar;
/// @endcode
class NamespaceAliasDecl : public NamedDecl {
- SourceLocation AliasLoc;
+ /// \brief The location of the "namespace" keyword.
+ SourceLocation NamespaceLoc;
/// \brief The source range that covers the nested-name-specifier
/// preceding the namespace name.
@@ -1849,15 +1831,17 @@ class NamespaceAliasDecl : public NamedDecl {
/// NamespaceDecl or a NamespaceAliasDecl.
NamedDecl *Namespace;
- NamespaceAliasDecl(DeclContext *DC, SourceLocation L,
+ NamespaceAliasDecl(DeclContext *DC, SourceLocation NamespaceLoc,
SourceLocation AliasLoc, IdentifierInfo *Alias,
SourceRange QualifierRange,
NestedNameSpecifier *Qualifier,
SourceLocation IdentLoc, NamedDecl *Namespace)
- : NamedDecl(NamespaceAlias, DC, L, Alias), AliasLoc(AliasLoc),
- QualifierRange(QualifierRange), Qualifier(Qualifier),
- IdentLoc(IdentLoc), Namespace(Namespace) { }
+ : NamedDecl(NamespaceAlias, DC, AliasLoc, Alias),
+ NamespaceLoc(NamespaceLoc), QualifierRange(QualifierRange),
+ Qualifier(Qualifier), IdentLoc(IdentLoc), Namespace(Namespace) { }
+ friend class ASTDeclReader;
+
public:
/// \brief Retrieve the source range of the nested-name-specifier
/// that qualifiers the namespace name.
@@ -1889,41 +1873,31 @@ public:
/// Returns the location of the alias name, i.e. 'foo' in
/// "namespace foo = ns::bar;".
- SourceLocation getAliasLoc() const { return AliasLoc; }
-
- /// Set the location o;f the alias name, e.e., 'foo' in
- /// "namespace foo = ns::bar;".
- void setAliasLoc(SourceLocation L) { AliasLoc = L; }
+ SourceLocation getAliasLoc() const { return getLocation(); }
/// Returns the location of the 'namespace' keyword.
- SourceLocation getNamespaceLoc() const { return getLocation(); }
+ SourceLocation getNamespaceLoc() const { return NamespaceLoc; }
/// Returns the location of the identifier in the named namespace.
SourceLocation getTargetNameLoc() const { return IdentLoc; }
- /// Set the location of the identifier in the named namespace.
- void setTargetNameLoc(SourceLocation L) { IdentLoc = L; }
-
/// \brief Retrieve the namespace that this alias refers to, which
/// may either be a NamespaceDecl or a NamespaceAliasDecl.
NamedDecl *getAliasedNamespace() const { return Namespace; }
- /// \brief Set the namespace or namespace alias pointed to by this
- /// alias decl.
- void setAliasedNamespace(NamedDecl *ND) {
- assert((isa<NamespaceAliasDecl>(ND) || isa<NamespaceDecl>(ND)) &&
- "expecting namespace or namespace alias decl");
- Namespace = ND;
- }
-
static NamespaceAliasDecl *Create(ASTContext &C, DeclContext *DC,
- SourceLocation L, SourceLocation AliasLoc,
+ SourceLocation NamespaceLoc,
+ SourceLocation AliasLoc,
IdentifierInfo *Alias,
SourceRange QualifierRange,
NestedNameSpecifier *Qualifier,
SourceLocation IdentLoc,
NamedDecl *Namespace);
+ virtual SourceRange getSourceRange() const {
+ return SourceRange(NamespaceLoc, IdentLoc);
+ }
+
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const NamespaceAliasDecl *D) { return true; }
static bool classofKind(Kind K) { return K == NamespaceAlias; }
@@ -2002,6 +1976,10 @@ class UsingDecl : public NamedDecl {
/// \brief Target nested name specifier.
NestedNameSpecifier* TargetNestedName;
+ /// DNLoc - Provides source/type location info for the
+ /// declaration name embedded in the ValueDecl base class.
+ DeclarationNameLoc DNLoc;
+
/// \brief The collection of shadow declarations associated with
/// this using declaration. This set can change as a class is
/// processed.
@@ -2010,34 +1988,31 @@ class UsingDecl : public NamedDecl {
// \brief Has 'typename' keyword.
bool IsTypeName;
- UsingDecl(DeclContext *DC, SourceLocation L, SourceRange NNR,
+ UsingDecl(DeclContext *DC, SourceRange NNR,
SourceLocation UL, NestedNameSpecifier* TargetNNS,
- DeclarationName Name, bool IsTypeNameArg)
- : NamedDecl(Using, DC, L, Name),
+ const DeclarationNameInfo &NameInfo, bool IsTypeNameArg)
+ : NamedDecl(Using, DC, NameInfo.getLoc(), NameInfo.getName()),
NestedNameRange(NNR), UsingLocation(UL), TargetNestedName(TargetNNS),
- IsTypeName(IsTypeNameArg) {
+ DNLoc(NameInfo.getInfo()), IsTypeName(IsTypeNameArg) {
}
public:
- // FIXME: Should be const?
/// \brief Returns the source range that covers the nested-name-specifier
/// preceding the namespace name.
- SourceRange getNestedNameRange() { return NestedNameRange; }
+ SourceRange getNestedNameRange() const { return NestedNameRange; }
/// \brief Set the source range of the nested-name-specifier.
void setNestedNameRange(SourceRange R) { NestedNameRange = R; }
- // FIXME; Should be const?
// FIXME: Naming is inconsistent with other get*Loc functions.
/// \brief Returns the source location of the "using" keyword.
- SourceLocation getUsingLocation() { return UsingLocation; }
+ SourceLocation getUsingLocation() const { return UsingLocation; }
/// \brief Set the source location of the 'using' keyword.
void setUsingLocation(SourceLocation L) { UsingLocation = L; }
-
/// \brief Get the target nested name declaration.
- NestedNameSpecifier* getTargetNestedNameDecl() {
+ NestedNameSpecifier* getTargetNestedNameDecl() const {
return TargetNestedName;
}
@@ -2046,6 +2021,10 @@ public:
TargetNestedName = NNS;
}
+ DeclarationNameInfo getNameInfo() const {
+ return DeclarationNameInfo(getDeclName(), getLocation(), DNLoc);
+ }
+
/// \brief Return true if the using declaration has 'typename'.
bool isTypeName() const { return IsTypeName; }
@@ -2076,15 +2055,21 @@ public:
}
static UsingDecl *Create(ASTContext &C, DeclContext *DC,
- SourceLocation IdentL, SourceRange NNR, SourceLocation UsingL,
- NestedNameSpecifier* TargetNNS, DeclarationName Name, bool IsTypeNameArg);
+ SourceRange NNR, SourceLocation UsingL,
+ NestedNameSpecifier* TargetNNS,
+ const DeclarationNameInfo &NameInfo,
+ bool IsTypeNameArg);
+
+ SourceRange getSourceRange() const {
+ return SourceRange(UsingLocation, getNameInfo().getEndLoc());
+ }
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const UsingDecl *D) { return true; }
static bool classofKind(Kind K) { return K == Using; }
- friend class PCHDeclReader;
- friend class PCHDeclWriter;
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
/// UnresolvedUsingValueDecl - Represents a dependent using
@@ -2105,14 +2090,18 @@ class UnresolvedUsingValueDecl : public ValueDecl {
NestedNameSpecifier *TargetNestedNameSpecifier;
+ /// DNLoc - Provides source/type location info for the
+ /// declaration name embedded in the ValueDecl base class.
+ DeclarationNameLoc DNLoc;
+
UnresolvedUsingValueDecl(DeclContext *DC, QualType Ty,
SourceLocation UsingLoc, SourceRange TargetNNR,
NestedNameSpecifier *TargetNNS,
- SourceLocation TargetNameLoc,
- DeclarationName TargetName)
- : ValueDecl(UnresolvedUsingValue, DC, TargetNameLoc, TargetName, Ty),
- TargetNestedNameRange(TargetNNR), UsingLocation(UsingLoc),
- TargetNestedNameSpecifier(TargetNNS)
+ const DeclarationNameInfo &NameInfo)
+ : ValueDecl(UnresolvedUsingValue, DC,
+ NameInfo.getLoc(), NameInfo.getName(), Ty),
+ TargetNestedNameRange(TargetNNR), UsingLocation(UsingLoc),
+ TargetNestedNameSpecifier(TargetNNS), DNLoc(NameInfo.getInfo())
{ }
public:
@@ -2125,7 +2114,7 @@ public:
void setTargetNestedNameRange(SourceRange R) { TargetNestedNameRange = R; }
/// \brief Get target nested name declaration.
- NestedNameSpecifier* getTargetNestedNameSpecifier() {
+ NestedNameSpecifier* getTargetNestedNameSpecifier() const {
return TargetNestedNameSpecifier;
}
@@ -2140,10 +2129,18 @@ public:
/// \brief Set the source location of the 'using' keyword.
void setUsingLoc(SourceLocation L) { UsingLocation = L; }
+ DeclarationNameInfo getNameInfo() const {
+ return DeclarationNameInfo(getDeclName(), getLocation(), DNLoc);
+ }
+
static UnresolvedUsingValueDecl *
Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc,
SourceRange TargetNNR, NestedNameSpecifier *TargetNNS,
- SourceLocation TargetNameLoc, DeclarationName TargetName);
+ const DeclarationNameInfo &NameInfo);
+
+ SourceRange getSourceRange() const {
+ return SourceRange(UsingLocation, getNameInfo().getEndLoc());
+ }
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const UnresolvedUsingValueDecl *D) { return true; }
@@ -2181,43 +2178,34 @@ class UnresolvedUsingTypenameDecl : public TypeDecl {
TypenameLocation(TypenameLoc), TargetNestedNameSpecifier(TargetNNS)
{ }
+ friend class ASTDeclReader;
+
public:
/// \brief Returns the source range that covers the nested-name-specifier
/// preceding the namespace name.
SourceRange getTargetNestedNameRange() const { return TargetNestedNameRange; }
- /// \brief Set the source range coverting the nested-name-specifier preceding
- /// the namespace name.
- void setTargetNestedNameRange(SourceRange R) { TargetNestedNameRange = R; }
-
/// \brief Get target nested name declaration.
NestedNameSpecifier* getTargetNestedNameSpecifier() {
return TargetNestedNameSpecifier;
}
- /// \brief Set the nested name declaration.
- void setTargetNestedNameSpecifier(NestedNameSpecifier* NNS) {
- TargetNestedNameSpecifier = NNS;
- }
-
/// \brief Returns the source location of the 'using' keyword.
SourceLocation getUsingLoc() const { return UsingLocation; }
- /// \brief Set the source location of the 'using' keyword.
- void setUsingLoc(SourceLocation L) { UsingLocation = L; }
-
/// \brief Returns the source location of the 'typename' keyword.
SourceLocation getTypenameLoc() const { return TypenameLocation; }
- /// \brief Set the source location of the 'typename' keyword.
- void setTypenameLoc(SourceLocation L) { TypenameLocation = L; }
-
static UnresolvedUsingTypenameDecl *
Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc,
SourceLocation TypenameLoc,
SourceRange TargetNNR, NestedNameSpecifier *TargetNNS,
SourceLocation TargetNameLoc, DeclarationName TargetName);
+ SourceRange getSourceRange() const {
+ return SourceRange(UsingLocation, getLocation());
+ }
+
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const UnresolvedUsingTypenameDecl *D) { return true; }
static bool classofKind(Kind K) { return K == UnresolvedUsingTypename; }
@@ -2243,12 +2231,11 @@ public:
StringLiteral *getMessage() { return Message; }
const StringLiteral *getMessage() const { return Message; }
- virtual ~StaticAssertDecl();
- virtual void Destroy(ASTContext& C);
-
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(StaticAssertDecl *D) { return true; }
static bool classofKind(Kind K) { return K == StaticAssert; }
+
+ friend class ASTDeclReader;
};
/// Insertion operator for diagnostics. This allows sending AccessSpecifier's
diff --git a/include/clang/AST/DeclContextInternals.h b/include/clang/AST/DeclContextInternals.h
index 9602b677fca5..97da6ca9a1ef 100644
--- a/include/clang/AST/DeclContextInternals.h
+++ b/include/clang/AST/DeclContextInternals.h
@@ -29,108 +29,54 @@ class DependentDiagnostic;
/// StoredDeclsList - This is an array of decls optimized a common case of only
/// containing one entry.
struct StoredDeclsList {
- /// The kind of data encoded in this list.
- enum DataKind {
- /// \brief The data is a NamedDecl*.
- DK_Decl = 0,
- /// \brief The data is a declaration ID (an unsigned value),
- /// shifted left by 2 bits.
- DK_DeclID = 1,
- /// \brief The data is a pointer to a vector (of type VectorTy)
- /// that contains declarations.
- DK_Decl_Vector = 2,
- /// \brief The data is a pointer to a vector (of type VectorTy)
- /// that contains declaration ID.
- DK_ID_Vector = 3
- };
-
- /// VectorTy - When in vector form, this is what the Data pointer points to.
- typedef llvm::SmallVector<uintptr_t, 4> VectorTy;
-
- /// \brief The stored data, which will be either a declaration ID, a
- /// pointer to a NamedDecl, or a pointer to a vector.
- uintptr_t Data;
+
+ /// DeclsTy - When in vector form, this is what the Data pointer points to.
+ typedef llvm::SmallVector<NamedDecl *, 4> DeclsTy;
+
+ /// \brief The stored data, which will be either a pointer to a NamedDecl,
+ /// or a pointer to a vector.
+ llvm::PointerUnion<NamedDecl *, DeclsTy *> Data;
public:
- StoredDeclsList() : Data(0) {}
+ StoredDeclsList() {}
StoredDeclsList(const StoredDeclsList &RHS) : Data(RHS.Data) {
- if (VectorTy *RHSVec = RHS.getAsVector()) {
- VectorTy *New = new VectorTy(*RHSVec);
- Data = reinterpret_cast<uintptr_t>(New) | (Data & 0x03);
- }
+ if (DeclsTy *RHSVec = RHS.getAsVector())
+ Data = new DeclsTy(*RHSVec);
}
~StoredDeclsList() {
// If this is a vector-form, free the vector.
- if (VectorTy *Vector = getAsVector())
+ if (DeclsTy *Vector = getAsVector())
delete Vector;
}
StoredDeclsList &operator=(const StoredDeclsList &RHS) {
- if (VectorTy *Vector = getAsVector())
+ if (DeclsTy *Vector = getAsVector())
delete Vector;
Data = RHS.Data;
- if (VectorTy *RHSVec = RHS.getAsVector()) {
- VectorTy *New = new VectorTy(*RHSVec);
- Data = reinterpret_cast<uintptr_t>(New) | (Data & 0x03);
- }
+ if (DeclsTy *RHSVec = RHS.getAsVector())
+ Data = new DeclsTy(*RHSVec);
return *this;
}
- bool isNull() const { return (Data & ~0x03) == 0; }
+ bool isNull() const { return Data.isNull(); }
NamedDecl *getAsDecl() const {
- if ((Data & 0x03) != DK_Decl)
- return 0;
-
- return reinterpret_cast<NamedDecl *>(Data & ~0x03);
+ return Data.dyn_cast<NamedDecl *>();
}
- VectorTy *getAsVector() const {
- if ((Data & 0x03) != DK_ID_Vector && (Data & 0x03) != DK_Decl_Vector)
- return 0;
-
- return reinterpret_cast<VectorTy *>(Data & ~0x03);
+ DeclsTy *getAsVector() const {
+ return Data.dyn_cast<DeclsTy *>();
}
void setOnlyValue(NamedDecl *ND) {
assert(!getAsVector() && "Not inline");
- Data = reinterpret_cast<uintptr_t>(ND);
- }
-
- void setFromDeclIDs(const llvm::SmallVectorImpl<unsigned> &Vec) {
- if (Vec.size() > 1) {
- VectorTy *Vector = getAsVector();
- if (!Vector) {
- Vector = new VectorTy;
- Data = reinterpret_cast<uintptr_t>(Vector) | DK_ID_Vector;
- }
-
- Vector->resize(Vec.size());
- std::copy(Vec.begin(), Vec.end(), Vector->begin());
- return;
- }
-
- if (VectorTy *Vector = getAsVector())
- delete Vector;
-
- if (Vec.empty())
- Data = 0;
- else
- Data = (Vec[0] << 2) | DK_DeclID;
- }
-
- /// \brief Force the stored declarations list to contain actual
- /// declarations.
- ///
- /// This routine will resolve any declaration IDs for declarations
- /// that may not yet have been loaded from external storage.
- void materializeDecls(ASTContext &Context);
-
- bool hasDeclarationIDs() const {
- DataKind DK = (DataKind)(Data & 0x03);
- return DK == DK_DeclID || DK == DK_ID_Vector;
+ Data = ND;
+ // Make sure that Data is a plain NamedDecl* so we can use its address
+ // at getLookupResult.
+ assert(*(NamedDecl **)&Data == ND &&
+ "PointerUnion mangles the NamedDecl pointer!");
}
void remove(NamedDecl *D) {
@@ -138,30 +84,26 @@ public:
if (NamedDecl *Singleton = getAsDecl()) {
assert(Singleton == D && "list is different singleton");
(void)Singleton;
- Data = 0;
+ Data = (NamedDecl *)0;
return;
}
- VectorTy &Vec = *getAsVector();
- VectorTy::iterator I = std::find(Vec.begin(), Vec.end(),
- reinterpret_cast<uintptr_t>(D));
+ DeclsTy &Vec = *getAsVector();
+ DeclsTy::iterator I = std::find(Vec.begin(), Vec.end(), D);
assert(I != Vec.end() && "list does not contain decl");
Vec.erase(I);
- assert(std::find(Vec.begin(), Vec.end(), reinterpret_cast<uintptr_t>(D))
+ assert(std::find(Vec.begin(), Vec.end(), D)
== Vec.end() && "list still contains decl");
}
/// getLookupResult - Return an array of all the decls that this list
/// represents.
- DeclContext::lookup_result getLookupResult(ASTContext &Context) {
+ DeclContext::lookup_result getLookupResult() {
if (isNull())
return DeclContext::lookup_result(DeclContext::lookup_iterator(0),
DeclContext::lookup_iterator(0));
- if (hasDeclarationIDs())
- materializeDecls(Context);
-
// If we have a single NamedDecl, return it.
if (getAsDecl()) {
assert(!isNull() && "Empty list isn't allowed");
@@ -172,19 +114,15 @@ public:
}
assert(getAsVector() && "Must have a vector at this point");
- VectorTy &Vector = *getAsVector();
+ DeclsTy &Vector = *getAsVector();
// Otherwise, we have a range result.
- return DeclContext::lookup_result((NamedDecl **)&Vector[0],
- (NamedDecl **)&Vector[0]+Vector.size());
+ return DeclContext::lookup_result(&Vector[0], &Vector[0]+Vector.size());
}
/// HandleRedeclaration - If this is a redeclaration of an existing decl,
/// replace the old one with D and return true. Otherwise return false.
- bool HandleRedeclaration(ASTContext &Context, NamedDecl *D) {
- if (hasDeclarationIDs())
- materializeDecls(Context);
-
+ bool HandleRedeclaration(NamedDecl *D) {
// Most decls only have one entry in their list, special case it.
if (NamedDecl *OldD = getAsDecl()) {
if (!D->declarationReplaces(OldD))
@@ -194,12 +132,12 @@ public:
}
// Determine if this declaration is actually a redeclaration.
- VectorTy &Vec = *getAsVector();
- for (VectorTy::iterator OD = Vec.begin(), ODEnd = Vec.end();
+ DeclsTy &Vec = *getAsVector();
+ for (DeclsTy::iterator OD = Vec.begin(), ODEnd = Vec.end();
OD != ODEnd; ++OD) {
- NamedDecl *OldD = reinterpret_cast<NamedDecl *>(*OD);
+ NamedDecl *OldD = *OD;
if (D->declarationReplaces(OldD)) {
- *OD = reinterpret_cast<uintptr_t>(D);
+ *OD = D;
return true;
}
}
@@ -211,17 +149,15 @@ public:
/// not a redeclaration to merge it into the appropriate place in our list.
///
void AddSubsequentDecl(NamedDecl *D) {
- assert(!hasDeclarationIDs() && "Must materialize before adding decls");
-
// If this is the second decl added to the list, convert this to vector
// form.
if (NamedDecl *OldD = getAsDecl()) {
- VectorTy *VT = new VectorTy();
- VT->push_back(reinterpret_cast<uintptr_t>(OldD));
- Data = reinterpret_cast<uintptr_t>(VT) | DK_Decl_Vector;
+ DeclsTy *VT = new DeclsTy();
+ VT->push_back(OldD);
+ Data = VT;
}
- VectorTy &Vec = *getAsVector();
+ DeclsTy &Vec = *getAsVector();
// Using directives end up in a special entry which contains only
// other using directives, so all this logic is wasted for them.
@@ -232,32 +168,30 @@ public:
// iterator which points at the first tag will start a span of
// decls that only contains tags.
if (D->hasTagIdentifierNamespace())
- Vec.push_back(reinterpret_cast<uintptr_t>(D));
+ Vec.push_back(D);
// Resolved using declarations go at the front of the list so that
// they won't show up in other lookup results. Unresolved using
// declarations (which are always in IDNS_Using | IDNS_Ordinary)
// follow that so that the using declarations will be contiguous.
else if (D->getIdentifierNamespace() & Decl::IDNS_Using) {
- VectorTy::iterator I = Vec.begin();
+ DeclsTy::iterator I = Vec.begin();
if (D->getIdentifierNamespace() != Decl::IDNS_Using) {
while (I != Vec.end() &&
- reinterpret_cast<NamedDecl *>(*I)
- ->getIdentifierNamespace() == Decl::IDNS_Using)
+ (*I)->getIdentifierNamespace() == Decl::IDNS_Using)
++I;
}
- Vec.insert(I, reinterpret_cast<uintptr_t>(D));
+ Vec.insert(I, D);
// All other declarations go at the end of the list, but before any
// tag declarations. But we can be clever about tag declarations
// because there can only ever be one in a scope.
- } else if (reinterpret_cast<NamedDecl *>(Vec.back())
- ->hasTagIdentifierNamespace()) {
- uintptr_t TagD = Vec.back();
- Vec.back() = reinterpret_cast<uintptr_t>(D);
+ } else if (Vec.back()->hasTagIdentifierNamespace()) {
+ NamedDecl *TagD = Vec.back();
+ Vec.back() = D;
Vec.push_back(TagD);
} else
- Vec.push_back(reinterpret_cast<uintptr_t>(D));
+ Vec.push_back(D);
}
};
diff --git a/include/clang/AST/DeclFriend.h b/include/clang/AST/DeclFriend.h
index 2807d16379ae..4b5e6fd48bb3 100644
--- a/include/clang/AST/DeclFriend.h
+++ b/include/clang/AST/DeclFriend.h
@@ -68,16 +68,16 @@ public:
SourceLocation FriendL);
static FriendDecl *Create(ASTContext &C, EmptyShell Empty);
- /// If this friend declaration names an (untemplated but
- /// possibly dependent) type, return the type; otherwise
- /// return null. This is used only for C++0x's unelaborated
- /// friend type declarations.
+ /// If this friend declaration names an (untemplated but possibly
+ /// dependent) type, return the type; otherwise return null. This
+ /// is used for elaborated-type-specifiers and, in C++0x, for
+ /// arbitrary friend type declarations.
TypeSourceInfo *getFriendType() const {
return Friend.dyn_cast<TypeSourceInfo*>();
}
- /// If this friend declaration doesn't name an unelaborated
- /// type, return the inner declaration.
+ /// If this friend declaration doesn't name a type, return the inner
+ /// declaration.
NamedDecl *getFriendDecl() const {
return Friend.dyn_cast<NamedDecl*>();
}
@@ -92,8 +92,8 @@ public:
static bool classof(const FriendDecl *D) { return true; }
static bool classofKind(Kind K) { return K == Decl::Friend; }
- friend class PCHDeclReader;
- friend class PCHDeclWriter;
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
/// An iterator over the friend declarations of a class.
diff --git a/include/clang/AST/DeclGroup.h b/include/clang/AST/DeclGroup.h
index e1fae8f2ae67..030291ea7345 100644
--- a/include/clang/AST/DeclGroup.h
+++ b/include/clang/AST/DeclGroup.h
@@ -34,7 +34,6 @@ private:
public:
static DeclGroup *Create(ASTContext &C, Decl **Decls, unsigned NumDecls);
- void Destroy(ASTContext& C);
unsigned size() const { return NumDecls; }
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index 30f63d895959..ad26748e1343 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -21,7 +21,6 @@ namespace clang {
class Expr;
class Stmt;
class FunctionDecl;
-class AttributeList;
class RecordDecl;
class ObjCIvarDecl;
class ObjCMethodDecl;
@@ -41,12 +40,6 @@ protected:
public:
ObjCListBase() : List(0), NumElts(0) {}
- ~ObjCListBase() {
- assert(List == 0 && "Destroy should have been called before dtor");
- }
-
- void Destroy(ASTContext &Ctx);
-
unsigned size() const { return NumElts; }
bool empty() const { return NumElts == 0; }
@@ -92,7 +85,6 @@ public:
void set(ObjCProtocolDecl* const* InList, unsigned Elts,
const SourceLocation *Locs, ASTContext &Ctx);
- void Destroy(ASTContext &Ctx);
};
@@ -128,6 +120,9 @@ private:
// Synthesized declaration method for a property setter/getter
bool IsSynthesized : 1;
+
+ // Method has a definition.
+ bool IsDefined : 1;
// NOTE: VC++ treats enums as signed, avoid using ImplementationControl enum
/// @required/@optional
@@ -171,29 +166,25 @@ private:
bool isInstance = true,
bool isVariadic = false,
bool isSynthesized = false,
+ bool isDefined = false,
ImplementationControl impControl = None,
unsigned numSelectorArgs = 0)
: NamedDecl(ObjCMethod, contextDecl, beginLoc, SelInfo),
DeclContext(ObjCMethod),
IsInstance(isInstance), IsVariadic(isVariadic),
IsSynthesized(isSynthesized),
+ IsDefined(isDefined),
DeclImplementation(impControl), objcDeclQualifier(OBJC_TQ_None),
NumSelectorArgs(numSelectorArgs), MethodDeclType(T),
ResultTInfo(ResultTInfo),
EndLoc(endLoc), Body(0), SelfDecl(0), CmdDecl(0) {}
- virtual ~ObjCMethodDecl() {}
-
/// \brief A definition will return its interface declaration.
/// An interface declaration will return its definition.
/// Otherwise it will return itself.
virtual ObjCMethodDecl *getNextRedeclaration();
public:
-
- /// Destroy - Call destructors and release memory.
- virtual void Destroy(ASTContext& C);
-
static ObjCMethodDecl *Create(ASTContext &C,
SourceLocation beginLoc,
SourceLocation endLoc, Selector SelInfo,
@@ -203,6 +194,7 @@ public:
bool isInstance = true,
bool isVariadic = false,
bool isSynthesized = false,
+ bool isDefined = false,
ImplementationControl impControl = None,
unsigned numSelectorArgs = 0);
@@ -296,6 +288,9 @@ public:
bool isSynthesized() const { return IsSynthesized; }
void setSynthesized(bool isSynth) { IsSynthesized = isSynth; }
+
+ bool isDefined() const { return IsDefined; }
+ void setDefined(bool isDefined) { IsDefined = isDefined; }
// Related to protocols declared in @protocol
void setDeclImplementation(ImplementationControl ic) {
@@ -326,21 +321,6 @@ public:
}
};
-/// ObjCMethodList - a linked list of methods with different signatures.
-struct ObjCMethodList {
- ObjCMethodDecl *Method;
- ObjCMethodList *Next;
-
- ObjCMethodList() {
- Method = 0;
- Next = 0;
- }
- ObjCMethodList(ObjCMethodDecl *M, ObjCMethodList *C) {
- Method = M;
- Next = C;
- }
-};
-
/// ObjCContainerDecl - Represents a container for method declarations.
/// Current sub-classes are ObjCInterfaceDecl, ObjCCategoryDecl,
/// ObjCProtocolDecl, and ObjCImplDecl.
@@ -355,8 +335,6 @@ public:
IdentifierInfo *Id)
: NamedDecl(DK, DC, L, Id), DeclContext(DK) {}
- virtual ~ObjCContainerDecl() {}
-
// Iterator access to properties.
typedef specific_decl_iterator<ObjCPropertyDecl> prop_iterator;
prop_iterator prop_begin() const {
@@ -465,12 +443,19 @@ class ObjCInterfaceDecl : public ObjCContainerDecl {
/// Class's super class.
ObjCInterfaceDecl *SuperClass;
- /// Protocols referenced in interface header declaration
+ /// Protocols referenced in the @interface declaration
ObjCProtocolList ReferencedProtocols;
+
+ /// Protocols reference in both the @interface and class extensions.
+ ObjCList<ObjCProtocolDecl> AllReferencedProtocols;
/// List of categories defined for this class.
/// FIXME: Why is this a linked list??
ObjCCategoryDecl *CategoryList;
+
+ /// IvarList - List of all ivars defined by this class; including class
+ /// extensions and implementation. This list is built lazily.
+ ObjCIvarDecl *IvarList;
bool ForwardDecl:1; // declared with @class.
bool InternalInterface:1; // true - no @interface for @implementation
@@ -482,13 +467,7 @@ class ObjCInterfaceDecl : public ObjCContainerDecl {
ObjCInterfaceDecl(DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id,
SourceLocation CLoc, bool FD, bool isInternal);
- virtual ~ObjCInterfaceDecl() {}
-
public:
-
- /// Destroy - Call destructors and release memory.
- virtual void Destroy(ASTContext& C);
-
static ObjCInterfaceDecl *Create(ASTContext &C, DeclContext *DC,
SourceLocation atLoc,
IdentifierInfo *Id,
@@ -513,25 +492,49 @@ public:
}
typedef ObjCProtocolList::iterator protocol_iterator;
- protocol_iterator protocol_begin() const {return ReferencedProtocols.begin();}
- protocol_iterator protocol_end() const { return ReferencedProtocols.end(); }
+
+ protocol_iterator protocol_begin() const {
+ return ReferencedProtocols.begin();
+ }
+ protocol_iterator protocol_end() const {
+ return ReferencedProtocols.end();
+ }
+
typedef ObjCProtocolList::loc_iterator protocol_loc_iterator;
+
protocol_loc_iterator protocol_loc_begin() const {
return ReferencedProtocols.loc_begin();
}
+
protocol_loc_iterator protocol_loc_end() const {
return ReferencedProtocols.loc_end();
}
- unsigned protocol_size() const { return ReferencedProtocols.size(); }
+
+ typedef ObjCList<ObjCProtocolDecl>::iterator all_protocol_iterator;
+
+ all_protocol_iterator all_referenced_protocol_begin() const {
+ return AllReferencedProtocols.empty() ? protocol_begin()
+ : AllReferencedProtocols.begin();
+ }
+ all_protocol_iterator all_referenced_protocol_end() const {
+ return AllReferencedProtocols.empty() ? protocol_end()
+ : AllReferencedProtocols.end();
+ }
typedef specific_decl_iterator<ObjCIvarDecl> ivar_iterator;
+
ivar_iterator ivar_begin() const { return ivar_iterator(decls_begin()); }
ivar_iterator ivar_end() const { return ivar_iterator(decls_end()); }
+
unsigned ivar_size() const {
return std::distance(ivar_begin(), ivar_end());
}
+
bool ivar_empty() const { return ivar_begin() == ivar_end(); }
-
+
+ ObjCIvarDecl *all_declared_ivar_begin();
+ void setIvarList(ObjCIvarDecl *ivar) { IvarList = ivar; }
+
/// setProtocolList - Set the list of protocols that this interface
/// implements.
void setProtocolList(ObjCProtocolDecl *const* List, unsigned Num,
@@ -543,7 +546,6 @@ public:
/// into the protocol list for this class.
void mergeClassExtensionProtocolList(ObjCProtocolDecl *const* List,
unsigned Num,
- const SourceLocation *Locs,
ASTContext &C);
bool isForwardDecl() const { return ForwardDecl; }
@@ -625,6 +627,9 @@ public:
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const ObjCInterfaceDecl *D) { return true; }
static bool classofKind(Kind K) { return K == ObjCInterface; }
+
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
/// ObjCIvarDecl - Represents an ObjC instance variable. In general, ObjC
@@ -650,21 +655,26 @@ public:
private:
ObjCIvarDecl(ObjCContainerDecl *DC, SourceLocation L, IdentifierInfo *Id,
- QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW)
+ QualType T, TypeSourceInfo *TInfo, AccessControl ac, Expr *BW,
+ bool synthesized)
: FieldDecl(ObjCIvar, DC, L, Id, T, TInfo, BW, /*Mutable=*/false),
- DeclAccess(ac) {}
+ NextIvar(0), DeclAccess(ac), Synthesized(synthesized) {}
public:
static ObjCIvarDecl *Create(ASTContext &C, ObjCContainerDecl *DC,
SourceLocation L, IdentifierInfo *Id, QualType T,
TypeSourceInfo *TInfo,
- AccessControl ac, Expr *BW = NULL);
+ AccessControl ac, Expr *BW = NULL,
+ bool synthesized=false);
/// \brief Return the class interface that this ivar is logically contained
/// in; this is either the interface where the ivar was declared, or the
/// interface the ivar is conceptually a part of in the case of synthesized
/// ivars.
const ObjCInterfaceDecl *getContainingInterface() const;
+
+ ObjCIvarDecl *getNextIvar() { return NextIvar; }
+ void setNextIvar(ObjCIvarDecl *ivar) { NextIvar = ivar; }
void setAccessControl(AccessControl ac) { DeclAccess = ac; }
@@ -674,13 +684,21 @@ public:
return DeclAccess == None ? Protected : AccessControl(DeclAccess);
}
+ void setSynthesize(bool synth) { Synthesized = synth; }
+ bool getSynthesize() const { return Synthesized; }
+
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const ObjCIvarDecl *D) { return true; }
static bool classofKind(Kind K) { return K == ObjCIvar; }
private:
+ /// NextIvar - Next Ivar in the list of ivars declared in class; class's
+ /// extensions and class's implementation
+ ObjCIvarDecl *NextIvar;
+
// NOTE: VC++ treats enums as signed, avoid using the AccessControl enum
unsigned DeclAccess : 3;
+ unsigned Synthesized : 1;
};
@@ -700,8 +718,6 @@ public:
IdentifierInfo *Id, QualType T,
Expr *BW);
- virtual void Destroy(ASTContext& C);
-
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const ObjCAtDefsFieldDecl *D) { return true; }
@@ -745,15 +761,10 @@ class ObjCProtocolDecl : public ObjCContainerDecl {
isForwardProtoDecl(true) {
}
- virtual ~ObjCProtocolDecl() {}
-
public:
static ObjCProtocolDecl *Create(ASTContext &C, DeclContext *DC,
SourceLocation L, IdentifierInfo *Id);
- /// Destroy - Call destructors and release memory.
- virtual void Destroy(ASTContext& C);
-
const ObjCProtocolList &getReferencedProtocols() const {
return ReferencedProtocols;
}
@@ -822,12 +833,7 @@ private:
ObjCClassDecl(DeclContext *DC, SourceLocation L,
ObjCInterfaceDecl *const *Elts, const SourceLocation *Locs,
unsigned nElts, ASTContext &C);
- virtual ~ObjCClassDecl() {}
public:
-
- /// Destroy - Call destructors and release memory.
- virtual void Destroy(ASTContext& C);
-
static ObjCClassDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L,
ObjCInterfaceDecl *const *Elts = 0,
const SourceLocation *Locs = 0,
@@ -860,7 +866,6 @@ class ObjCForwardProtocolDecl : public Decl {
ObjCForwardProtocolDecl(DeclContext *DC, SourceLocation L,
ObjCProtocolDecl *const *Elts, unsigned nElts,
const SourceLocation *Locs, ASTContext &C);
- virtual ~ObjCForwardProtocolDecl() {}
public:
static ObjCForwardProtocolDecl *Create(ASTContext &C, DeclContext *DC,
@@ -874,9 +879,6 @@ public:
return Create(C, DC, L, 0, 0, 0);
}
- /// Destroy - Call destructors and release memory.
- virtual void Destroy(ASTContext& C);
-
typedef ObjCProtocolList::iterator protocol_iterator;
protocol_iterator protocol_begin() const {return ReferencedProtocols.begin();}
protocol_iterator protocol_end() const { return ReferencedProtocols.end(); }
@@ -928,6 +930,9 @@ class ObjCCategoryDecl : public ObjCContainerDecl {
/// FIXME: this should not be a singly-linked list. Move storage elsewhere.
ObjCCategoryDecl *NextClassCategory;
+ /// true of class extension has at least one bitfield ivar.
+ bool HasSynthBitfield : 1;
+
/// \brief The location of the '@' in '@interface'
SourceLocation AtLoc;
@@ -938,8 +943,8 @@ class ObjCCategoryDecl : public ObjCContainerDecl {
SourceLocation ClassNameLoc, SourceLocation CategoryNameLoc,
IdentifierInfo *Id)
: ObjCContainerDecl(ObjCCategory, DC, ClassNameLoc, Id),
- ClassInterface(0), NextClassCategory(0), AtLoc(AtLoc),
- CategoryNameLoc(CategoryNameLoc) {
+ ClassInterface(0), NextClassCategory(0), HasSynthBitfield(false),
+ AtLoc(AtLoc), CategoryNameLoc(CategoryNameLoc) {
}
public:
@@ -991,6 +996,9 @@ public:
bool IsClassExtension() const { return getIdentifier() == 0; }
const ObjCCategoryDecl *getNextClassExtension() const;
+ bool hasSynthBitfield() const { return HasSynthBitfield; }
+ void setHasSynthBitfield (bool val) { HasSynthBitfield = val; }
+
typedef specific_decl_iterator<ObjCIvarDecl> ivar_iterator;
ivar_iterator ivar_begin() const {
return ivar_iterator(decls_begin());
@@ -1032,8 +1040,6 @@ protected:
ClassInterface(classInterface) {}
public:
- virtual ~ObjCImplDecl() {}
-
const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
ObjCInterfaceDecl *getClassInterface() { return ClassInterface; }
void setClassInterface(ObjCInterfaceDecl *IFace);
@@ -1165,11 +1171,15 @@ class ObjCImplementationDecl : public ObjCImplDecl {
CXXBaseOrMemberInitializer **IvarInitializers;
unsigned NumIvarInitializers;
+ /// true of class extension has at least one bitfield ivar.
+ bool HasSynthBitfield : 1;
+
ObjCImplementationDecl(DeclContext *DC, SourceLocation L,
ObjCInterfaceDecl *classInterface,
ObjCInterfaceDecl *superDecl)
: ObjCImplDecl(ObjCImplementation, DC, L, classInterface),
- SuperClass(superDecl), IvarInitializers(0), NumIvarInitializers(0) {}
+ SuperClass(superDecl), IvarInitializers(0), NumIvarInitializers(0),
+ HasSynthBitfield(false) {}
public:
static ObjCImplementationDecl *Create(ASTContext &C, DeclContext *DC,
SourceLocation L,
@@ -1207,6 +1217,9 @@ public:
void setIvarInitializers(ASTContext &C,
CXXBaseOrMemberInitializer ** initializers,
unsigned numInitializers);
+
+ bool hasSynthBitfield() const { return HasSynthBitfield; }
+ void setHasSynthBitfield (bool val) { HasSynthBitfield = val; }
/// getIdentifier - Get the identifier that names the class
/// interface associated with this implementation.
@@ -1262,6 +1275,9 @@ public:
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const ObjCImplementationDecl *D) { return true; }
static bool classofKind(Kind K) { return K == ObjCImplementation; }
+
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
diff --git a/include/clang/AST/DeclTemplate.h b/include/clang/AST/DeclTemplate.h
index 135dd3ae78d3..b532668242fd 100644
--- a/include/clang/AST/DeclTemplate.h
+++ b/include/clang/AST/DeclTemplate.h
@@ -23,6 +23,7 @@ namespace clang {
class TemplateParameterList;
class TemplateDecl;
+class RedeclarableTemplateDecl;
class FunctionTemplateDecl;
class ClassTemplateDecl;
class ClassTemplatePartialSpecializationDecl;
@@ -193,13 +194,6 @@ public:
TemplateArgumentList() : NumFlatArguments(0), NumStructuredArguments(0) { }
- /// Used to release the memory associated with a TemplateArgumentList
- /// object. FIXME: This is currently not called anywhere, but the
- /// memory will still be freed when using a BumpPtrAllocator.
- void Destroy(ASTContext &C);
-
- ~TemplateArgumentList();
-
/// \brief Copies the template arguments into a locally new[]'d array.
void init(ASTContext &Context,
const TemplateArgument *Args, unsigned NumArgs);
@@ -255,8 +249,6 @@ protected:
: NamedDecl(DK, DC, L, Name), TemplatedDecl(Decl),
TemplateParams(Params) { }
public:
- ~TemplateDecl();
-
/// Get the list of template parameters
TemplateParameterList *getTemplateParameters() const {
return TemplateParams;
@@ -268,6 +260,7 @@ public:
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const TemplateDecl *D) { return true; }
+ static bool classof(const RedeclarableTemplateDecl *D) { return true; }
static bool classof(const FunctionTemplateDecl *D) { return true; }
static bool classof(const ClassTemplateDecl *D) { return true; }
static bool classof(const TemplateTemplateParmDecl *D) { return true; }
@@ -490,122 +483,179 @@ public:
}
};
-/// Declaration of a template function.
-class FunctionTemplateDecl : public TemplateDecl {
- static void DeallocateCommon(void *Ptr);
-
+/// Declaration of a redeclarable template.
+class RedeclarableTemplateDecl : public TemplateDecl {
+
+ RedeclarableTemplateDecl *getPreviousDeclarationImpl() {
+ return CommonOrPrev.dyn_cast<RedeclarableTemplateDecl*>();
+ }
+
+ RedeclarableTemplateDecl *getCanonicalDeclImpl();
+
+ void setPreviousDeclarationImpl(RedeclarableTemplateDecl *Prev);
+
+ RedeclarableTemplateDecl *getInstantiatedFromMemberTemplateImpl() {
+ return getCommonPtr()->InstantiatedFromMember.getPointer();
+ }
+
+ void setInstantiatedFromMemberTemplateImpl(RedeclarableTemplateDecl *TD) {
+ assert(!getCommonPtr()->InstantiatedFromMember.getPointer());
+ getCommonPtr()->InstantiatedFromMember.setPointer(TD);
+ }
+
protected:
- /// \brief Data that is common to all of the declarations of a given
- /// function template.
- struct Common {
- Common() : InstantiatedFromMember(0, false) { }
+ template <typename EntryType> struct SpecEntryTraits {
+ typedef EntryType DeclType;
- /// \brief The function template specializations for this function
- /// template, including explicit specializations and instantiations.
- llvm::FoldingSet<FunctionTemplateSpecializationInfo> Specializations;
+ static DeclType *getMostRecentDeclaration(EntryType *D) {
+ return D->getMostRecentDeclaration();
+ }
+ };
+
+ template <typename EntryType,
+ typename _SETraits = SpecEntryTraits<EntryType>,
+ typename _DeclType = typename _SETraits::DeclType>
+ class SpecIterator : public std::iterator<std::forward_iterator_tag,
+ _DeclType*, ptrdiff_t,
+ _DeclType*, _DeclType*> {
+ typedef _SETraits SETraits;
+ typedef _DeclType DeclType;
+
+ typedef typename llvm::FoldingSet<EntryType>::iterator SetIteratorType;
+
+ SetIteratorType SetIter;
+
+ public:
+ SpecIterator() : SetIter() {}
+ SpecIterator(SetIteratorType SetIter) : SetIter(SetIter) {}
+
+ DeclType *operator*() const {
+ return SETraits::getMostRecentDeclaration(&*SetIter);
+ }
+ DeclType *operator->() const { return **this; }
+
+ SpecIterator &operator++() { ++SetIter; return *this; }
+ SpecIterator operator++(int) {
+ SpecIterator tmp(*this);
+ ++(*this);
+ return tmp;
+ }
+
+ bool operator==(SpecIterator Other) const {
+ return SetIter == Other.SetIter;
+ }
+ bool operator!=(SpecIterator Other) const {
+ return SetIter != Other.SetIter;
+ }
+ };
+
+ template <typename EntryType>
+ SpecIterator<EntryType> makeSpecIterator(llvm::FoldingSet<EntryType> &Specs,
+ bool isEnd) {
+ return SpecIterator<EntryType>(isEnd ? Specs.end() : Specs.begin());
+ }
+
+ template <class EntryType> typename SpecEntryTraits<EntryType>::DeclType*
+ findSpecializationImpl(llvm::FoldingSet<EntryType> &Specs,
+ const TemplateArgument *Args, unsigned NumArgs,
+ void *&InsertPos);
+
+ struct CommonBase {
+ CommonBase() : InstantiatedFromMember(0, false) { }
- /// \brief The member function template from which this was most
+ /// \brief The template from which this was most
/// directly instantiated (or null).
///
- /// The boolean value indicates whether this member function template
+ /// The boolean value indicates whether this template
/// was explicitly specialized.
- llvm::PointerIntPair<FunctionTemplateDecl*, 1, bool> InstantiatedFromMember;
+ llvm::PointerIntPair<RedeclarableTemplateDecl*, 1, bool>
+ InstantiatedFromMember;
+
+ /// \brief The latest declaration of this template.
+ RedeclarableTemplateDecl *Latest;
};
/// \brief A pointer to the previous declaration (if this is a redeclaration)
- /// or to the data that is common to all declarations of this function
- /// template.
- llvm::PointerUnion<Common*, FunctionTemplateDecl*> CommonOrPrev;
+ /// or to the data that is common to all declarations of this template.
+ llvm::PointerUnion<CommonBase*, RedeclarableTemplateDecl*> CommonOrPrev;
- /// \brief Retrieves the "common" pointer shared by all
- /// (re-)declarations of the same function template. Calling this routine
- /// may implicitly allocate memory for the common pointer.
- Common *getCommonPtr();
+ /// \brief Retrieves the "common" pointer shared by all (re-)declarations of
+ /// the same template. Calling this routine may implicitly allocate memory
+ /// for the common pointer.
+ CommonBase *getCommonPtr();
- FunctionTemplateDecl(DeclContext *DC, SourceLocation L, DeclarationName Name,
- TemplateParameterList *Params, NamedDecl *Decl)
- : TemplateDecl(FunctionTemplate, DC, L, Name, Params, Decl),
- CommonOrPrev((Common*)0) { }
+ virtual CommonBase *newCommon() = 0;
-public:
- void Destroy(ASTContext &C);
+ // Construct a template decl with name, parameters, and templated element.
+ RedeclarableTemplateDecl(Kind DK, DeclContext *DC, SourceLocation L,
+ DeclarationName Name, TemplateParameterList *Params,
+ NamedDecl *Decl)
+ : TemplateDecl(DK, DC, L, Name, Params, Decl),
+ CommonOrPrev((CommonBase*)0) { }
- /// Get the underlying function declaration of the template.
- FunctionDecl *getTemplatedDecl() const {
- return static_cast<FunctionDecl*>(TemplatedDecl);
- }
+public:
+ template <class decl_type> friend class RedeclarableTemplate;
- /// \brief Retrieve the set of function template specializations of this
- /// function template.
- llvm::FoldingSet<FunctionTemplateSpecializationInfo> &getSpecializations() {
- return getCommonPtr()->Specializations;
+ RedeclarableTemplateDecl *getCanonicalDecl() {
+ return getCanonicalDeclImpl();
}
- /// \brief Retrieve the previous declaration of this function template, or
+ /// \brief Retrieve the previous declaration of this template, or
/// NULL if no such declaration exists.
- const FunctionTemplateDecl *getPreviousDeclaration() const {
- return CommonOrPrev.dyn_cast<FunctionTemplateDecl*>();
+ RedeclarableTemplateDecl *getPreviousDeclaration() {
+ return getPreviousDeclarationImpl();
}
- /// \brief Retrieve the previous declaration of this function template, or
+ /// \brief Retrieve the previous declaration of this template, or
/// NULL if no such declaration exists.
- FunctionTemplateDecl *getPreviousDeclaration() {
- return CommonOrPrev.dyn_cast<FunctionTemplateDecl*>();
+ const RedeclarableTemplateDecl *getPreviousDeclaration() const {
+ return
+ const_cast<RedeclarableTemplateDecl*>(this)->getPreviousDeclaration();
}
- /// \brief Set the previous declaration of this function template.
- void setPreviousDeclaration(FunctionTemplateDecl *Prev) {
- if (Prev)
- CommonOrPrev = Prev;
+ /// \brief Retrieve the first declaration of this template, or itself
+ /// if this the first one.
+ RedeclarableTemplateDecl *getFirstDeclaration() {
+ return getCanonicalDecl();
}
- virtual FunctionTemplateDecl *getCanonicalDecl();
+ /// \brief Retrieve the first declaration of this template, or itself
+ /// if this the first one.
+ const RedeclarableTemplateDecl *getFirstDeclaration() const {
+ return
+ const_cast<RedeclarableTemplateDecl*>(this)->getFirstDeclaration();
+ }
- /// \brief Retrieve the member function template that this function template
- /// was instantiated from.
- ///
- /// This routine will return non-NULL for member function templates of
- /// class templates. For example, given:
- ///
- /// \code
- /// template <typename T>
- /// struct X {
- /// template <typename U> void f();
- /// };
- /// \endcode
- ///
- /// X<int>::A<float> is a CXXMethodDecl (whose parent is X<int>, a
- /// ClassTemplateSpecializationDecl) for which getPrimaryTemplate() will
- /// return X<int>::f, a FunctionTemplateDecl (whose parent is again
- /// X<int>) for which getInstantiatedFromMemberTemplate() will return
- /// X<T>::f, a FunctionTemplateDecl (whose parent is X<T>, a
- /// ClassTemplateDecl).
- ///
- /// \returns NULL if this is not an instantiation of a member function
- /// template.
- FunctionTemplateDecl *getInstantiatedFromMemberTemplate() {
- return getCommonPtr()->InstantiatedFromMember.getPointer();
+ /// \brief Retrieve the most recent declaration of this template, or itself
+ /// if this the most recent one.
+ RedeclarableTemplateDecl *getMostRecentDeclaration() {
+ return getCommonPtr()->Latest;
}
- void setInstantiatedFromMemberTemplate(FunctionTemplateDecl *FTD) {
- assert(!getCommonPtr()->InstantiatedFromMember.getPointer());
- getCommonPtr()->InstantiatedFromMember.setPointer(FTD);
+ /// \brief Retrieve the most recent declaration of this template, or itself
+ /// if this the most recent one.
+ const RedeclarableTemplateDecl *getMostRecentDeclaration() const {
+ return
+ const_cast<RedeclarableTemplateDecl*>(this)->getMostRecentDeclaration();
}
/// \brief Determines whether this template was a specialization of a
/// member template.
///
- /// In the following example, the function template \c X<int>::f is a
- /// member specialization.
+ /// In the following example, the function template \c X<int>::f and the
+ /// member template \c X<int>::Inner are member specializations.
///
/// \code
/// template<typename T>
/// struct X {
/// template<typename U> void f(T, U);
+ /// template<typename U> struct Inner;
/// };
///
/// template<> template<typename T>
/// void X<int>::f(int, T);
+ /// template<> template<typename T>
+ /// struct X<int>::Inner { /* ... */ };
/// \endcode
bool isMemberSpecialization() {
return getCommonPtr()->InstantiatedFromMember.getInt();
@@ -618,6 +668,197 @@ public:
getCommonPtr()->InstantiatedFromMember.setInt(true);
}
+ /// \brief Retrieve the previous declaration of this template, or
+ /// NULL if no such declaration exists.
+ RedeclarableTemplateDecl *getInstantiatedFromMemberTemplate() {
+ return getInstantiatedFromMemberTemplateImpl();
+ }
+
+ virtual RedeclarableTemplateDecl *getNextRedeclaration();
+
+ // Implement isa/cast/dyncast/etc.
+ static bool classof(const Decl *D) { return classofKind(D->getKind()); }
+ static bool classof(const RedeclarableTemplateDecl *D) { return true; }
+ static bool classof(const FunctionTemplateDecl *D) { return true; }
+ static bool classof(const ClassTemplateDecl *D) { return true; }
+ static bool classofKind(Kind K) {
+ return K >= firstRedeclarableTemplate && K <= lastRedeclarableTemplate;
+ }
+
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
+};
+
+template <class decl_type>
+class RedeclarableTemplate {
+ RedeclarableTemplateDecl *thisDecl() {
+ return static_cast<decl_type*>(this);
+ }
+
+public:
+ /// \brief Retrieve the previous declaration of this function template, or
+ /// NULL if no such declaration exists.
+ decl_type *getPreviousDeclaration() {
+ return static_cast<decl_type*>(thisDecl()->getPreviousDeclarationImpl());
+ }
+
+ /// \brief Retrieve the previous declaration of this function template, or
+ /// NULL if no such declaration exists.
+ const decl_type *getPreviousDeclaration() const {
+ return const_cast<RedeclarableTemplate*>(this)->getPreviousDeclaration();
+ }
+
+ /// \brief Set the previous declaration of this function template.
+ void setPreviousDeclaration(decl_type *Prev) {
+ thisDecl()->setPreviousDeclarationImpl(Prev);
+ }
+
+ decl_type *getCanonicalDecl() {
+ return static_cast<decl_type*>(thisDecl()->getCanonicalDeclImpl());
+ }
+
+ const decl_type *getCanonicalDecl() const {
+ return const_cast<RedeclarableTemplate*>(this)->getCanonicalDecl();
+ }
+
+ /// \brief Retrieve the member template that this template was instantiated
+ /// from.
+ ///
+ /// This routine will return non-NULL for member templates of
+ /// class templates. For example, given:
+ ///
+ /// \code
+ /// template <typename T>
+ /// struct X {
+ /// template <typename U> void f();
+ /// template <typename U> struct A {};
+ /// };
+ /// \endcode
+ ///
+ /// X<int>::f<float> is a CXXMethodDecl (whose parent is X<int>, a
+ /// ClassTemplateSpecializationDecl) for which getPrimaryTemplate() will
+ /// return X<int>::f, a FunctionTemplateDecl (whose parent is again
+ /// X<int>) for which getInstantiatedFromMemberTemplate() will return
+ /// X<T>::f, a FunctionTemplateDecl (whose parent is X<T>, a
+ /// ClassTemplateDecl).
+ ///
+ /// X<int>::A<float> is a ClassTemplateSpecializationDecl (whose parent
+ /// is X<int>, also a CTSD) for which getSpecializedTemplate() will
+ /// return X<int>::A<U>, a ClassTemplateDecl (whose parent is again
+ /// X<int>) for which getInstantiatedFromMemberTemplate() will return
+ /// X<T>::A<U>, a ClassTemplateDecl (whose parent is X<T>, also a CTD).
+ ///
+ /// \returns NULL if this is not an instantiation of a member template.
+ decl_type *getInstantiatedFromMemberTemplate() {
+ return static_cast<decl_type*>(
+ thisDecl()->getInstantiatedFromMemberTemplateImpl());
+ }
+
+ void setInstantiatedFromMemberTemplate(decl_type *TD) {
+ thisDecl()->setInstantiatedFromMemberTemplateImpl(TD);
+ }
+};
+
+template <> struct RedeclarableTemplateDecl::
+SpecEntryTraits<FunctionTemplateSpecializationInfo> {
+ typedef FunctionDecl DeclType;
+
+ static DeclType *
+ getMostRecentDeclaration(FunctionTemplateSpecializationInfo *I) {
+ return I->Function->getMostRecentDeclaration();
+ }
+};
+
+/// Declaration of a template function.
+class FunctionTemplateDecl : public RedeclarableTemplateDecl,
+ public RedeclarableTemplate<FunctionTemplateDecl> {
+ static void DeallocateCommon(void *Ptr);
+
+protected:
+ typedef RedeclarableTemplate<FunctionTemplateDecl> redeclarable_base;
+
+ /// \brief Data that is common to all of the declarations of a given
+ /// function template.
+ struct Common : CommonBase {
+ /// \brief The function template specializations for this function
+ /// template, including explicit specializations and instantiations.
+ llvm::FoldingSet<FunctionTemplateSpecializationInfo> Specializations;
+ };
+
+ FunctionTemplateDecl(DeclContext *DC, SourceLocation L, DeclarationName Name,
+ TemplateParameterList *Params, NamedDecl *Decl)
+ : RedeclarableTemplateDecl(FunctionTemplate, DC, L, Name, Params, Decl) { }
+
+ CommonBase *newCommon();
+
+ Common *getCommonPtr() {
+ return static_cast<Common *>(RedeclarableTemplateDecl::getCommonPtr());
+ }
+
+ friend void FunctionDecl::setFunctionTemplateSpecialization(
+ FunctionTemplateDecl *Template,
+ const TemplateArgumentList *TemplateArgs,
+ void *InsertPos,
+ TemplateSpecializationKind TSK,
+ const TemplateArgumentListInfo *TemplateArgsAsWritten,
+ SourceLocation PointOfInstantiation);
+
+ /// \brief Retrieve the set of function template specializations of this
+ /// function template.
+ llvm::FoldingSet<FunctionTemplateSpecializationInfo> &getSpecializations() {
+ return getCommonPtr()->Specializations;
+ }
+
+public:
+ /// Get the underlying function declaration of the template.
+ FunctionDecl *getTemplatedDecl() const {
+ return static_cast<FunctionDecl*>(TemplatedDecl);
+ }
+
+ /// Returns whether this template declaration defines the primary
+ /// pattern.
+ bool isThisDeclarationADefinition() const {
+ return getTemplatedDecl()->isThisDeclarationADefinition();
+ }
+
+ /// \brief Return the specialization with the provided arguments if it exists,
+ /// otherwise return the insertion point.
+ FunctionDecl *findSpecialization(const TemplateArgument *Args,
+ unsigned NumArgs, void *&InsertPos);
+
+ FunctionTemplateDecl *getCanonicalDecl() {
+ return redeclarable_base::getCanonicalDecl();
+ }
+ const FunctionTemplateDecl *getCanonicalDecl() const {
+ return redeclarable_base::getCanonicalDecl();
+ }
+
+ /// \brief Retrieve the previous declaration of this function template, or
+ /// NULL if no such declaration exists.
+ FunctionTemplateDecl *getPreviousDeclaration() {
+ return redeclarable_base::getPreviousDeclaration();
+ }
+
+ /// \brief Retrieve the previous declaration of this function template, or
+ /// NULL if no such declaration exists.
+ const FunctionTemplateDecl *getPreviousDeclaration() const {
+ return redeclarable_base::getPreviousDeclaration();
+ }
+
+ FunctionTemplateDecl *getInstantiatedFromMemberTemplate() {
+ return redeclarable_base::getInstantiatedFromMemberTemplate();
+ }
+
+ typedef SpecIterator<FunctionTemplateSpecializationInfo> spec_iterator;
+
+ spec_iterator spec_begin() {
+ return makeSpecIterator(getSpecializations(), false);
+ }
+
+ spec_iterator spec_end() {
+ return makeSpecIterator(getSpecializations(), true);
+ }
+
/// Create a template function node.
static FunctionTemplateDecl *Create(ASTContext &C, DeclContext *DC,
SourceLocation L,
@@ -630,8 +871,8 @@ public:
static bool classof(const FunctionTemplateDecl *D) { return true; }
static bool classofKind(Kind K) { return K == FunctionTemplate; }
- friend class PCHDeclReader;
- friend class PCHDeclWriter;
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
//===----------------------------------------------------------------------===//
@@ -781,8 +1022,7 @@ class NonTypeTemplateParmDecl
NonTypeTemplateParmDecl(DeclContext *DC, SourceLocation L, unsigned D,
unsigned P, IdentifierInfo *Id, QualType T,
TypeSourceInfo *TInfo)
- : VarDecl(NonTypeTemplateParm, DC, L, Id, T, TInfo, VarDecl::None,
- VarDecl::None),
+ : VarDecl(NonTypeTemplateParm, DC, L, Id, T, TInfo, SC_None, SC_None),
TemplateParmPosition(D, P), DefaultArgumentAndInherited(0, false)
{ }
@@ -904,13 +1144,20 @@ public:
DefaultArgumentWasInherited = false;
}
+ SourceRange getSourceRange() const {
+ SourceLocation End = getLocation();
+ if (hasDefaultArgument() && !defaultArgumentWasInherited())
+ End = getDefaultArgument().getSourceRange().getEnd();
+ return SourceRange(getTemplateParameters()->getTemplateLoc(), End);
+ }
+
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const TemplateTemplateParmDecl *D) { return true; }
static bool classofKind(Kind K) { return K == TemplateTemplateParm; }
- friend class PCHDeclReader;
- friend class PCHDeclWriter;
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
/// \brief Represents a class template specialization, which refers to
@@ -991,12 +1238,21 @@ public:
static ClassTemplateSpecializationDecl *
Create(ASTContext &Context, EmptyShell Empty);
- virtual void Destroy(ASTContext& C);
-
virtual void getNameForDiagnostic(std::string &S,
const PrintingPolicy &Policy,
bool Qualified) const;
+ ClassTemplateSpecializationDecl *getMostRecentDeclaration() {
+ CXXRecordDecl *Recent
+ = cast<CXXRecordDecl>(CXXRecordDecl::getMostRecentDeclaration());
+ if (!isa<ClassTemplateSpecializationDecl>(Recent)) {
+ // FIXME: Does injected class name need to be in the redeclarations chain?
+ assert(Recent->isInjectedClassName() && Recent->getPreviousDeclaration());
+ Recent = Recent->getPreviousDeclaration();
+ }
+ return cast<ClassTemplateSpecializationDecl>(Recent);
+ }
+
/// \brief Retrieve the template that this specialization specializes.
ClassTemplateDecl *getSpecializedTemplate() const;
@@ -1044,7 +1300,8 @@ public:
if (getSpecializationKind() != TSK_ImplicitInstantiation &&
getSpecializationKind() != TSK_ExplicitInstantiationDefinition &&
getSpecializationKind() != TSK_ExplicitInstantiationDeclaration)
- return (ClassTemplateDecl*)0;
+ return llvm::PointerUnion<ClassTemplateDecl *,
+ ClassTemplatePartialSpecializationDecl *>();
if (SpecializedPartialSpecialization *PartialSpec
= SpecializedTemplate.dyn_cast<SpecializedPartialSpecialization*>())
@@ -1123,7 +1380,8 @@ public:
/// \brief Sets the type of this specialization as it was written by
/// the user. This will be a class template specialization type.
void setTypeAsWritten(TypeSourceInfo *T) {
- if (!ExplicitInfo) ExplicitInfo = new ExplicitSpecializationInfo;
+ if (!ExplicitInfo)
+ ExplicitInfo = new (getASTContext()) ExplicitSpecializationInfo;
ExplicitInfo->TypeAsWritten = T;
}
/// \brief Gets the type of this specialization as it was written by
@@ -1138,13 +1396,15 @@ public:
}
/// \brief Sets the location of the extern keyword.
void setExternLoc(SourceLocation Loc) {
- if (!ExplicitInfo) ExplicitInfo = new ExplicitSpecializationInfo;
+ if (!ExplicitInfo)
+ ExplicitInfo = new (getASTContext()) ExplicitSpecializationInfo;
ExplicitInfo->ExternLoc = Loc;
}
/// \brief Sets the location of the template keyword.
void setTemplateKeywordLoc(SourceLocation Loc) {
- if (!ExplicitInfo) ExplicitInfo = new ExplicitSpecializationInfo;
+ if (!ExplicitInfo)
+ ExplicitInfo = new (getASTContext()) ExplicitSpecializationInfo;
ExplicitInfo->TemplateKeywordLoc = Loc;
}
/// \brief Gets the location of the template keyword, if present.
@@ -1242,6 +1502,11 @@ public:
static ClassTemplatePartialSpecializationDecl *
Create(ASTContext &Context, EmptyShell Empty);
+ ClassTemplatePartialSpecializationDecl *getMostRecentDeclaration() {
+ return cast<ClassTemplatePartialSpecializationDecl>(
+ ClassTemplateSpecializationDecl::getMostRecentDeclaration());
+ }
+
/// Get the list of template parameters
TemplateParameterList *getTemplateParameters() const {
return TemplateParams;
@@ -1355,15 +1620,16 @@ public:
};
/// Declaration of a class template.
-class ClassTemplateDecl : public TemplateDecl {
+class ClassTemplateDecl : public RedeclarableTemplateDecl,
+ public RedeclarableTemplate<ClassTemplateDecl> {
static void DeallocateCommon(void *Ptr);
protected:
+ typedef RedeclarableTemplate<ClassTemplateDecl> redeclarable_base;
+
/// \brief Data that is common to all of the declarations of a given
/// class template.
- struct Common {
- Common() : InstantiatedFromMember(0, 0) {}
-
+ struct Common : CommonBase {
/// \brief The class template specializations for this class
/// template, including explicit specializations and instantiations.
llvm::FoldingSet<ClassTemplateSpecializationDecl> Specializations;
@@ -1375,28 +1641,29 @@ protected:
/// \brief The injected-class-name type for this class template.
QualType InjectedClassNameType;
-
- /// \brief The templated member class from which this was most
- /// directly instantiated (or null).
- ///
- /// The boolean value indicates whether this member class template
- /// was explicitly specialized.
- llvm::PointerIntPair<ClassTemplateDecl *, 1, bool> InstantiatedFromMember;
};
- /// \brief A pointer to the previous declaration (if this is a redeclaration)
- /// or to the data that is common to all declarations of this class template.
- llvm::PointerUnion<Common*, ClassTemplateDecl*> CommonOrPrev;
+ /// \brief Retrieve the set of specializations of this class template.
+ llvm::FoldingSet<ClassTemplateSpecializationDecl> &getSpecializations() {
+ return getCommonPtr()->Specializations;
+ }
- /// \brief Retrieves the "common" pointer shared by all
- /// (re-)declarations of the same class template. Calling this routine
- /// may implicitly allocate memory for the common pointer.
- Common *getCommonPtr();
+ /// \brief Retrieve the set of partial specializations of this class
+ /// template.
+ llvm::FoldingSet<ClassTemplatePartialSpecializationDecl> &
+ getPartialSpecializations() {
+ return getCommonPtr()->PartialSpecializations;
+ }
ClassTemplateDecl(DeclContext *DC, SourceLocation L, DeclarationName Name,
TemplateParameterList *Params, NamedDecl *Decl)
- : TemplateDecl(ClassTemplate, DC, L, Name, Params, Decl),
- CommonOrPrev((Common*)0) { }
+ : RedeclarableTemplateDecl(ClassTemplate, DC, L, Name, Params, Decl) { }
+
+ CommonBase *newCommon();
+
+ Common *getCommonPtr() {
+ return static_cast<Common *>(RedeclarableTemplateDecl::getCommonPtr());
+ }
public:
/// Get the underlying class declarations of the template.
@@ -1404,48 +1671,71 @@ public:
return static_cast<CXXRecordDecl *>(TemplatedDecl);
}
- /// \brief Retrieve the previous declaration of this class template, or
- /// NULL if no such declaration exists.
- const ClassTemplateDecl *getPreviousDeclaration() const {
- return CommonOrPrev.dyn_cast<ClassTemplateDecl*>();
+ /// Returns whether this template declaration defines the primary
+ /// class pattern.
+ bool isThisDeclarationADefinition() const {
+ return getTemplatedDecl()->isThisDeclarationADefinition();
}
- /// \brief Retrieve the previous declaration of this function template, or
+ /// Create a class template node.
+ static ClassTemplateDecl *Create(ASTContext &C, DeclContext *DC,
+ SourceLocation L,
+ DeclarationName Name,
+ TemplateParameterList *Params,
+ NamedDecl *Decl,
+ ClassTemplateDecl *PrevDecl);
+
+ /// \brief Return the specialization with the provided arguments if it exists,
+ /// otherwise return the insertion point.
+ ClassTemplateSpecializationDecl *
+ findSpecialization(const TemplateArgument *Args, unsigned NumArgs,
+ void *&InsertPos);
+
+ /// \brief Insert the specified specialization knowing that it is not already
+ /// in. InsertPos must be obtained from findSpecialization.
+ void AddSpecialization(ClassTemplateSpecializationDecl *D, void *InsertPos) {
+ getSpecializations().InsertNode(D, InsertPos);
+ }
+
+ ClassTemplateDecl *getCanonicalDecl() {
+ return redeclarable_base::getCanonicalDecl();
+ }
+ const ClassTemplateDecl *getCanonicalDecl() const {
+ return redeclarable_base::getCanonicalDecl();
+ }
+
+ /// \brief Retrieve the previous declaration of this class template, or
/// NULL if no such declaration exists.
ClassTemplateDecl *getPreviousDeclaration() {
- return CommonOrPrev.dyn_cast<ClassTemplateDecl*>();
+ return redeclarable_base::getPreviousDeclaration();
}
- /// \brief Set the previous declaration of this class template.
- void setPreviousDeclaration(ClassTemplateDecl *Prev) {
- if (Prev)
- CommonOrPrev = Prev;
+ /// \brief Retrieve the previous declaration of this class template, or
+ /// NULL if no such declaration exists.
+ const ClassTemplateDecl *getPreviousDeclaration() const {
+ return redeclarable_base::getPreviousDeclaration();
}
- virtual ClassTemplateDecl *getCanonicalDecl();
-
- const ClassTemplateDecl *getCanonicalDecl() const {
- return const_cast<ClassTemplateDecl*>(this)->getCanonicalDecl();
+ ClassTemplateDecl *getInstantiatedFromMemberTemplate() {
+ return redeclarable_base::getInstantiatedFromMemberTemplate();
}
- /// Create a class template node.
- static ClassTemplateDecl *Create(ASTContext &C, DeclContext *DC,
- SourceLocation L,
- DeclarationName Name,
- TemplateParameterList *Params,
- NamedDecl *Decl,
- ClassTemplateDecl *PrevDecl);
+ /// \brief Return the partial specialization with the provided arguments if it
+ /// exists, otherwise return the insertion point.
+ ClassTemplatePartialSpecializationDecl *
+ findPartialSpecialization(const TemplateArgument *Args, unsigned NumArgs,
+ void *&InsertPos);
- /// \brief Retrieve the set of specializations of this class template.
- llvm::FoldingSet<ClassTemplateSpecializationDecl> &getSpecializations() {
- return getCommonPtr()->Specializations;
+ /// \brief Insert the specified partial specialization knowing that it is not
+ /// already in. InsertPos must be obtained from findPartialSpecialization.
+ void AddPartialSpecialization(ClassTemplatePartialSpecializationDecl *D,
+ void *InsertPos) {
+ getPartialSpecializations().InsertNode(D, InsertPos);
}
- /// \brief Retrieve the set of partial specializations of this class
- /// template.
- llvm::FoldingSet<ClassTemplatePartialSpecializationDecl> &
- getPartialSpecializations() {
- return getCommonPtr()->PartialSpecializations;
+ /// \brief Return the next partial specialization sequence number.
+ unsigned getNextPartialSpecSequenceNumber() {
+ return getPartialSpecializations().size();
}
/// \brief Retrieve the partial specializations as an ordered list.
@@ -1455,12 +1745,24 @@ public:
/// \brief Find a class template partial specialization with the given
/// type T.
///
- /// \brief A dependent type that names a specialization of this class
+ /// \param T a dependent type that names a specialization of this class
/// template.
///
/// \returns the class template partial specialization that exactly matches
/// the type \p T, or NULL if no such partial specialization exists.
ClassTemplatePartialSpecializationDecl *findPartialSpecialization(QualType T);
+
+ /// \brief Find a class template partial specialization which was instantiated
+ /// from the given member partial specialization.
+ ///
+ /// \param D a member class template partial specialization.
+ ///
+ /// \returns the class template partial specialization which was instantiated
+ /// from the given member partial specialization, or NULL if no such partial
+ /// specialization exists.
+ ClassTemplatePartialSpecializationDecl *
+ findPartialSpecInstantiatedFromMember(
+ ClassTemplatePartialSpecializationDecl *D);
/// \brief Retrieve the template specialization type of the
/// injected-class-name for this class template.
@@ -1478,78 +1780,45 @@ public:
/// \endcode
QualType getInjectedClassNameSpecialization();
- /// \brief Retrieve the member class template that this class template was
- /// derived from.
- ///
- /// This routine will return non-NULL for templated member classes of
- /// class templates. For example, given:
- ///
- /// \code
- /// template <typename T>
- /// struct X {
- /// template <typename U> struct A {};
- /// };
- /// \endcode
- ///
- /// X<int>::A<float> is a ClassTemplateSpecializationDecl (whose parent
- /// is X<int>, also a CTSD) for which getSpecializedTemplate() will
- /// return X<int>::A<U>, a TemplateClassDecl (whose parent is again
- /// X<int>) for which getInstantiatedFromMemberTemplate() will return
- /// X<T>::A<U>, a TemplateClassDecl (whose parent is X<T>, also a TCD).
- ///
- /// \returns null if this is not an instantiation of a member class template.
- ClassTemplateDecl *getInstantiatedFromMemberTemplate() {
- return getCommonPtr()->InstantiatedFromMember.getPointer();
+ typedef SpecIterator<ClassTemplateSpecializationDecl> spec_iterator;
+
+ spec_iterator spec_begin() {
+ return makeSpecIterator(getSpecializations(), false);
}
- void setInstantiatedFromMemberTemplate(ClassTemplateDecl *CTD) {
- assert(!getCommonPtr()->InstantiatedFromMember.getPointer());
- getCommonPtr()->InstantiatedFromMember.setPointer(CTD);
+ spec_iterator spec_end() {
+ return makeSpecIterator(getSpecializations(), true);
}
- /// \brief Determines whether this template was a specialization of a
- /// member template.
- ///
- /// In the following example, the member template \c X<int>::Inner is a
- /// member specialization.
- ///
- /// \code
- /// template<typename T>
- /// struct X {
- /// template<typename U> struct Inner;
- /// };
- ///
- /// template<> template<typename T>
- /// struct X<int>::Inner { /* ... */ };
- /// \endcode
- bool isMemberSpecialization() {
- return getCommonPtr()->InstantiatedFromMember.getInt();
+ typedef SpecIterator<ClassTemplatePartialSpecializationDecl>
+ partial_spec_iterator;
+
+ partial_spec_iterator partial_spec_begin() {
+ return makeSpecIterator(getPartialSpecializations(), false);
}
-
- /// \brief Note that this member template is a specialization.
- void setMemberSpecialization() {
- assert(getCommonPtr()->InstantiatedFromMember.getPointer() &&
- "Only member templates can be member template specializations");
- getCommonPtr()->InstantiatedFromMember.setInt(true);
+
+ partial_spec_iterator partial_spec_end() {
+ return makeSpecIterator(getPartialSpecializations(), true);
}
-
+
// Implement isa/cast/dyncast support
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const ClassTemplateDecl *D) { return true; }
static bool classofKind(Kind K) { return K == ClassTemplate; }
- virtual void Destroy(ASTContext& C);
-
- friend class PCHDeclReader;
- friend class PCHDeclWriter;
+ friend class ASTDeclReader;
+ friend class ASTDeclWriter;
};
/// Declaration of a friend template. For example:
///
/// template <typename T> class A {
/// friend class MyVector<T>; // not a friend template
-/// template <typename U> friend class B; // friend template
+/// template <typename U> friend class B; // not a friend template
/// template <typename U> friend class Foo<T>::Nested; // friend template
+/// };
+/// NOTE: This class is not currently in use. All of the above
+/// will yield a FriendDecl, not a FriendTemplateDecl.
class FriendTemplateDecl : public Decl {
public:
typedef llvm::PointerUnion<NamedDecl*,TypeSourceInfo*> FriendUnion;
@@ -1580,6 +1849,12 @@ private:
FriendLoc(FriendLoc)
{}
+ FriendTemplateDecl(EmptyShell Empty)
+ : Decl(Decl::FriendTemplate, Empty),
+ NumParams(0),
+ Params(0)
+ {}
+
public:
static FriendTemplateDecl *Create(ASTContext &Context,
DeclContext *DC, SourceLocation Loc,
@@ -1588,6 +1863,8 @@ public:
FriendUnion Friend,
SourceLocation FriendLoc);
+ static FriendTemplateDecl *Create(ASTContext &Context, EmptyShell Empty);
+
/// If this friend declaration names a templated type (or
/// a dependent member type of a templated type), return that
/// type; otherwise return null.
@@ -1620,6 +1897,8 @@ public:
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classofKind(Kind K) { return K == Decl::FriendTemplate; }
static bool classof(const FriendTemplateDecl *D) { return true; }
+
+ friend class ASTDeclReader;
};
/// Implementation of inline functions that require the template declarations
diff --git a/include/clang/AST/DeclarationName.h b/include/clang/AST/DeclarationName.h
index 8a771d513c42..8bb627597520 100644
--- a/include/clang/AST/DeclarationName.h
+++ b/include/clang/AST/DeclarationName.h
@@ -30,6 +30,7 @@ namespace clang {
class IdentifierInfo;
class MultiKeywordSelector;
class UsingDirectiveDecl;
+ class TypeSourceInfo;
/// DeclarationName - The name of a declaration. In the common case,
/// this just stores an IdentifierInfo pointer to a normal
@@ -367,6 +368,146 @@ public:
DeclarationName getCXXLiteralOperatorName(IdentifierInfo *II);
};
+/// DeclarationNameLoc - Additional source/type location info
+/// for a declaration name. Needs a DeclarationName in order
+/// to be interpreted correctly.
+struct DeclarationNameLoc {
+ union {
+ // The source location for identifier stored elsewhere.
+ // struct {} Identifier;
+
+ // Type info for constructors, destructors and conversion functions.
+ // Locations (if any) for the tilde (destructor) or operator keyword
+ // (conversion) are stored elsewhere.
+ struct {
+ TypeSourceInfo* TInfo;
+ } NamedType;
+
+ // The location (if any) of the operator keyword is stored elsewhere.
+ struct {
+ unsigned BeginOpNameLoc;
+ unsigned EndOpNameLoc;
+ } CXXOperatorName;
+
+ // The location (if any) of the operator keyword is stored elsewhere.
+ struct {
+ unsigned OpNameLoc;
+ } CXXLiteralOperatorName;
+
+ // struct {} CXXUsingDirective;
+ // struct {} ObjCZeroArgSelector;
+ // struct {} ObjCOneArgSelector;
+ // struct {} ObjCMultiArgSelector;
+ };
+
+ DeclarationNameLoc(DeclarationName Name);
+ // FIXME: this should go away once all DNLocs are properly initialized.
+ DeclarationNameLoc() { NamedType.TInfo = 0; }
+}; // struct DeclarationNameLoc
+
+
+/// DeclarationNameInfo - A collector data type for bundling together
+/// a DeclarationName and the correspnding source/type location info.
+struct DeclarationNameInfo {
+private:
+ /// Name - The declaration name, also encoding name kind.
+ DeclarationName Name;
+ /// Loc - The main source location for the declaration name.
+ SourceLocation NameLoc;
+ /// Info - Further source/type location info for special kinds of names.
+ DeclarationNameLoc LocInfo;
+
+public:
+ // FIXME: remove it.
+ DeclarationNameInfo() {}
+
+ DeclarationNameInfo(DeclarationName Name, SourceLocation NameLoc)
+ : Name(Name), NameLoc(NameLoc), LocInfo(Name) {}
+
+ DeclarationNameInfo(DeclarationName Name, SourceLocation NameLoc,
+ DeclarationNameLoc LocInfo)
+ : Name(Name), NameLoc(NameLoc), LocInfo(LocInfo) {}
+
+ /// getName - Returns the embedded declaration name.
+ DeclarationName getName() const { return Name; }
+ /// setName - Sets the embedded declaration name.
+ void setName(DeclarationName N) { Name = N; }
+
+ /// getLoc - Returns the main location of the declaration name.
+ SourceLocation getLoc() const { return NameLoc; }
+ /// setLoc - Sets the main location of the declaration name.
+ void setLoc(SourceLocation L) { NameLoc = L; }
+
+ const DeclarationNameLoc &getInfo() const { return LocInfo; }
+ DeclarationNameLoc &getInfo() { return LocInfo; }
+ void setInfo(const DeclarationNameLoc &Info) { LocInfo = Info; }
+
+ /// getNamedTypeInfo - Returns the source type info associated to
+ /// the name. Assumes it is a constructor, destructor or conversion.
+ TypeSourceInfo *getNamedTypeInfo() const {
+ assert(Name.getNameKind() == DeclarationName::CXXConstructorName ||
+ Name.getNameKind() == DeclarationName::CXXDestructorName ||
+ Name.getNameKind() == DeclarationName::CXXConversionFunctionName);
+ return LocInfo.NamedType.TInfo;
+ }
+ /// setNamedTypeInfo - Sets the source type info associated to
+ /// the name. Assumes it is a constructor, destructor or conversion.
+ void setNamedTypeInfo(TypeSourceInfo *TInfo) {
+ assert(Name.getNameKind() == DeclarationName::CXXConstructorName ||
+ Name.getNameKind() == DeclarationName::CXXDestructorName ||
+ Name.getNameKind() == DeclarationName::CXXConversionFunctionName);
+ LocInfo.NamedType.TInfo = TInfo;
+ }
+
+ /// getCXXOperatorNameRange - Gets the range of the operator name
+ /// (without the operator keyword). Assumes it is a (non-literal) operator.
+ SourceRange getCXXOperatorNameRange() const {
+ assert(Name.getNameKind() == DeclarationName::CXXOperatorName);
+ return SourceRange(
+ SourceLocation::getFromRawEncoding(LocInfo.CXXOperatorName.BeginOpNameLoc),
+ SourceLocation::getFromRawEncoding(LocInfo.CXXOperatorName.EndOpNameLoc)
+ );
+ }
+ /// setCXXOperatorNameRange - Sets the range of the operator name
+ /// (without the operator keyword). Assumes it is a C++ operator.
+ void setCXXOperatorNameRange(SourceRange R) {
+ assert(Name.getNameKind() == DeclarationName::CXXOperatorName);
+ LocInfo.CXXOperatorName.BeginOpNameLoc = R.getBegin().getRawEncoding();
+ LocInfo.CXXOperatorName.EndOpNameLoc = R.getEnd().getRawEncoding();
+ }
+
+ /// getCXXLiteralOperatorNameLoc - Returns the location of the literal
+ /// operator name (not the operator keyword).
+ /// Assumes it is a literal operator.
+ SourceLocation getCXXLiteralOperatorNameLoc() const {
+ assert(Name.getNameKind() == DeclarationName::CXXLiteralOperatorName);
+ return SourceLocation::
+ getFromRawEncoding(LocInfo.CXXLiteralOperatorName.OpNameLoc);
+ }
+ /// setCXXLiteralOperatorNameLoc - Sets the location of the literal
+ /// operator name (not the operator keyword).
+ /// Assumes it is a literal operator.
+ void setCXXLiteralOperatorNameLoc(SourceLocation Loc) {
+ assert(Name.getNameKind() == DeclarationName::CXXLiteralOperatorName);
+ LocInfo.CXXLiteralOperatorName.OpNameLoc = Loc.getRawEncoding();
+ }
+
+ /// getAsString - Retrieve the human-readable string for this name.
+ std::string getAsString() const;
+
+ /// printName - Print the human-readable name to a stream.
+ void printName(llvm::raw_ostream &OS) const;
+
+ /// getBeginLoc - Retrieve the location of the first token.
+ SourceLocation getBeginLoc() const { return NameLoc; }
+ /// getEndLoc - Retrieve the location of the last token.
+ SourceLocation getEndLoc() const;
+ /// getSourceRange - The range of the declaration name.
+ SourceRange getSourceRange() const {
+ return SourceRange(getBeginLoc(), getEndLoc());
+ }
+};
+
/// Insertion operator for diagnostics. This allows sending DeclarationName's
/// into a diagnostic with <<.
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
@@ -385,6 +526,12 @@ inline const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
return PD;
}
+inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
+ DeclarationNameInfo DNInfo) {
+ DNInfo.printName(OS);
+ return OS;
+}
+
} // end namespace clang
namespace llvm {
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index ade2b09c80c2..48130becf3b5 100644
--- a/include/clang/AST/Expr.h
+++ b/include/clang/AST/Expr.h
@@ -18,6 +18,7 @@
#include "clang/AST/Stmt.h"
#include "clang/AST/Type.h"
#include "clang/AST/DeclAccessPair.h"
+#include "clang/AST/OperationKinds.h"
#include "clang/AST/ASTVector.h"
#include "clang/AST/UsuallyTinyPtrVector.h"
#include "llvm/ADT/APSInt.h"
@@ -42,7 +43,7 @@ namespace clang {
class TemplateArgumentListInfo;
/// \brief A simple array of base specifiers.
-typedef UsuallyTinyPtrVector<const CXXBaseSpecifier> CXXBaseSpecifierArray;
+typedef llvm::SmallVector<CXXBaseSpecifier*, 4> CXXCastPath;
/// Expr - This represents one expression. Note that Expr's are subclasses of
/// Stmt. This allows an expression to be transparently used any place a Stmt
@@ -61,8 +62,14 @@ protected:
/// (C++ [temp.dep.constexpr]).
bool ValueDependent : 1;
+ /// ValueKind - The value classification of this expression.
+ /// Only actually used by certain subclasses.
+ unsigned ValueKind : 2;
+
+ enum { BitsRemaining = 28 };
+
Expr(StmtClass SC, QualType T, bool TD, bool VD)
- : Stmt(SC), TypeDependent(TD), ValueDependent(VD) {
+ : Stmt(SC), TypeDependent(TD), ValueDependent(VD), ValueKind(0) {
setType(T);
}
@@ -258,7 +265,6 @@ public:
/// function returning an rvalue reference.
/// lvalues and xvalues are collectively referred to as glvalues, while
/// prvalues and xvalues together form rvalues.
- /// If a
Classification Classify(ASTContext &Ctx) const {
return ClassifyImpl(Ctx, 0);
}
@@ -310,7 +316,7 @@ public:
}
/// isConstantInitializer - Returns true if this expression is a constant
/// initializer, which can be emitted at compile-time.
- bool isConstantInitializer(ASTContext &Ctx) const;
+ bool isConstantInitializer(ASTContext &Ctx, bool ForRef) const;
/// EvalResult is a struct with detailed info about an evaluated expression.
struct EvalResult {
@@ -521,10 +527,14 @@ class DeclRefExpr : public Expr {
// (2) the declaration's name was followed by an explicit template
// argument list.
llvm::PointerIntPair<ValueDecl *, 2> DecoratedD;
-
+
// Loc - The location of the declaration name itself.
SourceLocation Loc;
+ /// DNLoc - Provides source/type location info for the
+ /// declaration name embedded in DecoratedD.
+ DeclarationNameLoc DNLoc;
+
/// \brief Retrieve the qualifier that preceded the declaration name, if any.
NameQualifier *getNameQualifier() {
if ((DecoratedD.getInt() & HasQualifierFlag) == 0)
@@ -537,31 +547,17 @@ class DeclRefExpr : public Expr {
const NameQualifier *getNameQualifier() const {
return const_cast<DeclRefExpr *>(this)->getNameQualifier();
}
-
- /// \brief Retrieve the explicit template argument list that followed the
- /// member template name, if any.
- ExplicitTemplateArgumentList *getExplicitTemplateArgumentList() {
- if ((DecoratedD.getInt() & HasExplicitTemplateArgumentListFlag) == 0)
- return 0;
-
- if ((DecoratedD.getInt() & HasQualifierFlag) == 0)
- return reinterpret_cast<ExplicitTemplateArgumentList *>(this + 1);
-
- return reinterpret_cast<ExplicitTemplateArgumentList *>(
- getNameQualifier() + 1);
- }
-
- /// \brief Retrieve the explicit template argument list that followed the
- /// member template name, if any.
- const ExplicitTemplateArgumentList *getExplicitTemplateArgumentList() const {
- return const_cast<DeclRefExpr *>(this)->getExplicitTemplateArgumentList();
- }
-
+
DeclRefExpr(NestedNameSpecifier *Qualifier, SourceRange QualifierRange,
ValueDecl *D, SourceLocation NameLoc,
const TemplateArgumentListInfo *TemplateArgs,
QualType T);
+ DeclRefExpr(NestedNameSpecifier *Qualifier, SourceRange QualifierRange,
+ ValueDecl *D, const DeclarationNameInfo &NameInfo,
+ const TemplateArgumentListInfo *TemplateArgs,
+ QualType T);
+
/// \brief Construct an empty declaration reference expression.
explicit DeclRefExpr(EmptyShell Empty)
: Expr(DeclRefExprClass, Empty) { }
@@ -584,6 +580,14 @@ public:
QualType T,
const TemplateArgumentListInfo *TemplateArgs = 0);
+ static DeclRefExpr *Create(ASTContext &Context,
+ NestedNameSpecifier *Qualifier,
+ SourceRange QualifierRange,
+ ValueDecl *D,
+ const DeclarationNameInfo &NameInfo,
+ QualType T,
+ const TemplateArgumentListInfo *TemplateArgs = 0);
+
/// \brief Construct an empty declaration reference expression.
static DeclRefExpr *CreateEmpty(ASTContext &Context,
bool HasQualifier, unsigned NumTemplateArgs);
@@ -592,6 +596,10 @@ public:
const ValueDecl *getDecl() const { return DecoratedD.getPointer(); }
void setDecl(ValueDecl *NewD) { DecoratedD.setPointer(NewD); }
+ DeclarationNameInfo getNameInfo() const {
+ return DeclarationNameInfo(getDecl()->getDeclName(), Loc, DNLoc);
+ }
+
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
virtual SourceRange getSourceRange() const;
@@ -619,53 +627,77 @@ public:
return getNameQualifier()->NNS;
}
- /// \brief Determines whether this member expression actually had a C++
- /// template argument list explicitly specified, e.g., x.f<int>.
- bool hasExplicitTemplateArgumentList() const {
- return DecoratedD.getInt() & HasExplicitTemplateArgumentListFlag;
+ bool hasExplicitTemplateArgs() const {
+ return (DecoratedD.getInt() & HasExplicitTemplateArgumentListFlag);
+ }
+
+ /// \brief Retrieve the explicit template argument list that followed the
+ /// member template name.
+ ExplicitTemplateArgumentList &getExplicitTemplateArgs() {
+ assert(hasExplicitTemplateArgs());
+
+ if ((DecoratedD.getInt() & HasQualifierFlag) == 0)
+ return *reinterpret_cast<ExplicitTemplateArgumentList *>(this + 1);
+
+ return *reinterpret_cast<ExplicitTemplateArgumentList *>(
+ getNameQualifier() + 1);
+ }
+
+ /// \brief Retrieve the explicit template argument list that followed the
+ /// member template name.
+ const ExplicitTemplateArgumentList &getExplicitTemplateArgs() const {
+ return const_cast<DeclRefExpr *>(this)->getExplicitTemplateArgs();
}
+ /// \brief Retrieves the optional explicit template arguments.
+ /// This points to the same data as getExplicitTemplateArgs(), but
+ /// returns null if there are no explicit template arguments.
+ const ExplicitTemplateArgumentList *getExplicitTemplateArgsOpt() const {
+ if (!hasExplicitTemplateArgs()) return 0;
+ return &getExplicitTemplateArgs();
+ }
+
/// \brief Copies the template arguments (if present) into the given
/// structure.
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const {
- if (hasExplicitTemplateArgumentList())
- getExplicitTemplateArgumentList()->copyInto(List);
+ if (hasExplicitTemplateArgs())
+ getExplicitTemplateArgs().copyInto(List);
}
/// \brief Retrieve the location of the left angle bracket following the
/// member name ('<'), if any.
SourceLocation getLAngleLoc() const {
- if (!hasExplicitTemplateArgumentList())
+ if (!hasExplicitTemplateArgs())
return SourceLocation();
- return getExplicitTemplateArgumentList()->LAngleLoc;
+ return getExplicitTemplateArgs().LAngleLoc;
}
/// \brief Retrieve the template arguments provided as part of this
/// template-id.
const TemplateArgumentLoc *getTemplateArgs() const {
- if (!hasExplicitTemplateArgumentList())
+ if (!hasExplicitTemplateArgs())
return 0;
- return getExplicitTemplateArgumentList()->getTemplateArgs();
+ return getExplicitTemplateArgs().getTemplateArgs();
}
/// \brief Retrieve the number of template arguments provided as part of this
/// template-id.
unsigned getNumTemplateArgs() const {
- if (!hasExplicitTemplateArgumentList())
+ if (!hasExplicitTemplateArgs())
return 0;
- return getExplicitTemplateArgumentList()->NumTemplateArgs;
+ return getExplicitTemplateArgs().NumTemplateArgs;
}
/// \brief Retrieve the location of the right angle bracket following the
/// template arguments ('>').
SourceLocation getRAngleLoc() const {
- if (!hasExplicitTemplateArgumentList())
+ if (!hasExplicitTemplateArgs())
return SourceLocation();
- return getExplicitTemplateArgumentList()->RAngleLoc;
+ return getExplicitTemplateArgs().RAngleLoc;
}
static bool classof(const Stmt *T) {
@@ -677,8 +709,8 @@ public:
virtual child_iterator child_begin();
virtual child_iterator child_end();
- friend class PCHStmtReader;
- friend class PCHStmtWriter;
+ friend class ASTStmtReader;
+ friend class ASTStmtWriter;
};
/// PredefinedExpr - [C99 6.4.2.2] - A predefined identifier such as __func__.
@@ -725,28 +757,84 @@ public:
virtual child_iterator child_end();
};
+/// \brief Used by IntegerLiteral/FloatingLiteral to store the numeric without
+/// leaking memory.
+///
+/// For large floats/integers, APFloat/APInt will allocate memory from the heap
+/// to represent these numbers. Unfortunately, when we use a BumpPtrAllocator
+/// to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with
+/// the APFloat/APInt values will never get freed. APNumericStorage uses
+/// ASTContext's allocator for memory allocation.
+class APNumericStorage {
+ unsigned BitWidth;
+ union {
+ uint64_t VAL; ///< Used to store the <= 64 bits integer value.
+ uint64_t *pVal; ///< Used to store the >64 bits integer value.
+ };
+
+ bool hasAllocation() const { return llvm::APInt::getNumWords(BitWidth) > 1; }
+
+ APNumericStorage(const APNumericStorage&); // do not implement
+ APNumericStorage& operator=(const APNumericStorage&); // do not implement
+
+protected:
+ APNumericStorage() : BitWidth(0), VAL(0) { }
+
+ llvm::APInt getIntValue() const {
+ unsigned NumWords = llvm::APInt::getNumWords(BitWidth);
+ if (NumWords > 1)
+ return llvm::APInt(BitWidth, NumWords, pVal);
+ else
+ return llvm::APInt(BitWidth, VAL);
+ }
+ void setIntValue(ASTContext &C, const llvm::APInt &Val);
+};
+
+class APIntStorage : public APNumericStorage {
+public:
+ llvm::APInt getValue() const { return getIntValue(); }
+ void setValue(ASTContext &C, const llvm::APInt &Val) { setIntValue(C, Val); }
+};
+
+class APFloatStorage : public APNumericStorage {
+public:
+ llvm::APFloat getValue() const { return llvm::APFloat(getIntValue()); }
+ void setValue(ASTContext &C, const llvm::APFloat &Val) {
+ setIntValue(C, Val.bitcastToAPInt());
+ }
+};
+
class IntegerLiteral : public Expr {
- llvm::APInt Value;
+ APIntStorage Num;
SourceLocation Loc;
+
+ /// \brief Construct an empty integer literal.
+ explicit IntegerLiteral(EmptyShell Empty)
+ : Expr(IntegerLiteralClass, Empty) { }
+
public:
// type should be IntTy, LongTy, LongLongTy, UnsignedIntTy, UnsignedLongTy,
// or UnsignedLongLongTy
- IntegerLiteral(const llvm::APInt &V, QualType type, SourceLocation l)
- : Expr(IntegerLiteralClass, type, false, false), Value(V), Loc(l) {
+ IntegerLiteral(ASTContext &C, const llvm::APInt &V,
+ QualType type, SourceLocation l)
+ : Expr(IntegerLiteralClass, type, false, false), Loc(l) {
assert(type->isIntegerType() && "Illegal type in IntegerLiteral");
+ setValue(C, V);
}
- /// \brief Construct an empty integer literal.
- explicit IntegerLiteral(EmptyShell Empty)
- : Expr(IntegerLiteralClass, Empty) { }
+ // type should be IntTy, LongTy, LongLongTy, UnsignedIntTy, UnsignedLongTy,
+ // or UnsignedLongLongTy
+ static IntegerLiteral *Create(ASTContext &C, const llvm::APInt &V,
+ QualType type, SourceLocation l);
+ static IntegerLiteral *Create(ASTContext &C, EmptyShell Empty);
- const llvm::APInt &getValue() const { return Value; }
+ llvm::APInt getValue() const { return Num.getValue(); }
virtual SourceRange getSourceRange() const { return SourceRange(Loc); }
/// \brief Retrieve the location of the literal.
SourceLocation getLocation() const { return Loc; }
- void setValue(const llvm::APInt &Val) { Value = Val; }
+ void setValue(ASTContext &C, const llvm::APInt &Val) { Num.setValue(C, Val); }
void setLocation(SourceLocation Location) { Loc = Location; }
static bool classof(const Stmt *T) {
@@ -795,21 +883,30 @@ public:
};
class FloatingLiteral : public Expr {
- llvm::APFloat Value;
+ APFloatStorage Num;
bool IsExact : 1;
SourceLocation Loc;
-public:
- FloatingLiteral(const llvm::APFloat &V, bool isexact,
+
+ FloatingLiteral(ASTContext &C, const llvm::APFloat &V, bool isexact,
QualType Type, SourceLocation L)
- : Expr(FloatingLiteralClass, Type, false, false), Value(V),
- IsExact(isexact), Loc(L) {}
+ : Expr(FloatingLiteralClass, Type, false, false),
+ IsExact(isexact), Loc(L) {
+ setValue(C, V);
+ }
/// \brief Construct an empty floating-point literal.
explicit FloatingLiteral(EmptyShell Empty)
- : Expr(FloatingLiteralClass, Empty), Value(0.0) { }
+ : Expr(FloatingLiteralClass, Empty), IsExact(false) { }
- const llvm::APFloat &getValue() const { return Value; }
- void setValue(const llvm::APFloat &Val) { Value = Val; }
+public:
+ static FloatingLiteral *Create(ASTContext &C, const llvm::APFloat &V,
+ bool isexact, QualType Type, SourceLocation L);
+ static FloatingLiteral *Create(ASTContext &C, EmptyShell Empty);
+
+ llvm::APFloat getValue() const { return Num.getValue(); }
+ void setValue(ASTContext &C, const llvm::APFloat &Val) {
+ Num.setValue(C, Val);
+ }
bool isExact() const { return IsExact; }
void setExact(bool E) { IsExact = E; }
@@ -889,9 +986,6 @@ class StringLiteral : public Expr {
StringLiteral(QualType Ty) : Expr(StringLiteralClass, Ty, false, false) {}
-protected:
- virtual void DoDestroy(ASTContext &C);
-
public:
/// This is the "fully general" constructor that allows representation of
/// strings formed from multiple concatenated tokens.
@@ -912,8 +1006,7 @@ public:
llvm::StringRef getString() const {
return llvm::StringRef(StrData, ByteLength);
}
- // FIXME: These are deprecated, replace with StringRef.
- const char *getStrData() const { return StrData; }
+
unsigned getByteLength() const { return ByteLength; }
/// \brief Sets the string data to the given string data.
@@ -1009,40 +1102,27 @@ public:
/// applied to a non-complex value, the former returns its operand and the
/// later returns zero in the type of the operand.
///
-/// __builtin_offsetof(type, a.b[10]) is represented as a unary operator whose
-/// subexpression is a compound literal with the various MemberExpr and
-/// ArraySubscriptExpr's applied to it. (This is only used in C)
-///
class UnaryOperator : public Expr {
public:
- // Note that additions to this should also update the StmtVisitor class.
- enum Opcode {
- PostInc, PostDec, // [C99 6.5.2.4] Postfix increment and decrement operators
- PreInc, PreDec, // [C99 6.5.3.1] Prefix increment and decrement operators.
- AddrOf, Deref, // [C99 6.5.3.2] Address and indirection operators.
- Plus, Minus, // [C99 6.5.3.3] Unary arithmetic operators.
- Not, LNot, // [C99 6.5.3.3] Unary arithmetic operators.
- Real, Imag, // "__real expr"/"__imag expr" Extension.
- Extension, // __extension__ marker.
- OffsetOf // __builtin_offsetof
- };
+ typedef UnaryOperatorKind Opcode;
+
private:
- Stmt *Val;
- Opcode Opc;
+ unsigned Opc : 5;
SourceLocation Loc;
+ Stmt *Val;
public:
UnaryOperator(Expr *input, Opcode opc, QualType type, SourceLocation l)
: Expr(UnaryOperatorClass, type,
- input->isTypeDependent() && opc != OffsetOf,
+ input->isTypeDependent() || type->isDependentType(),
input->isValueDependent()),
- Val(input), Opc(opc), Loc(l) {}
+ Opc(opc), Loc(l), Val(input) {}
/// \brief Build an empty unary operator.
explicit UnaryOperator(EmptyShell Empty)
- : Expr(UnaryOperatorClass, Empty), Opc(AddrOf) { }
+ : Expr(UnaryOperatorClass, Empty), Opc(UO_AddrOf) { }
- Opcode getOpcode() const { return Opc; }
+ Opcode getOpcode() const { return static_cast<Opcode>(Opc); }
void setOpcode(Opcode O) { Opc = O; }
Expr *getSubExpr() const { return cast<Expr>(Val); }
@@ -1054,21 +1134,26 @@ public:
/// isPostfix - Return true if this is a postfix operation, like x++.
static bool isPostfix(Opcode Op) {
- return Op == PostInc || Op == PostDec;
+ return Op == UO_PostInc || Op == UO_PostDec;
}
/// isPostfix - Return true if this is a prefix operation, like --x.
static bool isPrefix(Opcode Op) {
- return Op == PreInc || Op == PreDec;
+ return Op == UO_PreInc || Op == UO_PreDec;
}
- bool isPrefix() const { return isPrefix(Opc); }
- bool isPostfix() const { return isPostfix(Opc); }
- bool isIncrementOp() const {return Opc==PreInc || Opc==PostInc; }
- bool isIncrementDecrementOp() const { return Opc>=PostInc && Opc<=PreDec; }
- bool isOffsetOfOp() const { return Opc == OffsetOf; }
- static bool isArithmeticOp(Opcode Op) { return Op >= Plus && Op <= LNot; }
- bool isArithmeticOp() const { return isArithmeticOp(Opc); }
+ bool isPrefix() const { return isPrefix(getOpcode()); }
+ bool isPostfix() const { return isPostfix(getOpcode()); }
+ bool isIncrementOp() const {
+ return Opc == UO_PreInc || Opc == UO_PostInc;
+ }
+ bool isIncrementDecrementOp() const {
+ return Opc <= UO_PreDec;
+ }
+ static bool isArithmeticOp(Opcode Op) {
+ return Op >= UO_Plus && Op <= UO_LNot;
+ }
+ bool isArithmeticOp() const { return isArithmeticOp(getOpcode()); }
/// getOpcodeStr - Turn an Opcode enum value into the punctuation char it
/// corresponds to, e.g. "sizeof" or "[pre]++"
@@ -1310,9 +1395,6 @@ class SizeOfAlignOfExpr : public Expr {
} Argument;
SourceLocation OpLoc, RParenLoc;
-protected:
- virtual void DoDestroy(ASTContext& C);
-
public:
SizeOfAlignOfExpr(bool issizeof, TypeSourceInfo *TInfo,
QualType resultType, SourceLocation op,
@@ -1485,8 +1567,6 @@ protected:
CallExpr(ASTContext& C, StmtClass SC, Expr *fn, Expr **args, unsigned numargs,
QualType t, SourceLocation rparenloc);
- virtual void DoDestroy(ASTContext& C);
-
public:
CallExpr(ASTContext& C, Expr *fn, Expr **args, unsigned numargs, QualType t,
SourceLocation rparenloc);
@@ -1494,8 +1574,6 @@ public:
/// \brief Build an empty call expression.
CallExpr(ASTContext &C, StmtClass SC, EmptyShell Empty);
- ~CallExpr() {}
-
const Expr *getCallee() const { return cast<Expr>(SubExprs[FN]); }
Expr *getCallee() { return cast<Expr>(SubExprs[FN]); }
void setCallee(Expr *F) { SubExprs[FN] = F; }
@@ -1594,6 +1672,10 @@ class MemberExpr : public Expr {
/// MemberLoc - This is the location of the member name.
SourceLocation MemberLoc;
+ /// MemberDNLoc - Provides source/type location info for the
+ /// declaration name embedded in MemberDecl.
+ DeclarationNameLoc MemberDNLoc;
+
/// IsArrow - True if this is "X->F", false if this is "X.F".
bool IsArrow : 1;
@@ -1621,37 +1703,33 @@ class MemberExpr : public Expr {
return const_cast<MemberExpr *>(this)->getMemberQualifier();
}
- /// \brief Retrieve the explicit template argument list that followed the
- /// member template name, if any.
- ExplicitTemplateArgumentList *getExplicitTemplateArgumentList() {
- if (!HasExplicitTemplateArgumentList)
- return 0;
-
- if (!HasQualifierOrFoundDecl)
- return reinterpret_cast<ExplicitTemplateArgumentList *>(this + 1);
-
- return reinterpret_cast<ExplicitTemplateArgumentList *>(
- getMemberQualifier() + 1);
- }
-
- /// \brief Retrieve the explicit template argument list that followed the
- /// member template name, if any.
- const ExplicitTemplateArgumentList *getExplicitTemplateArgumentList() const {
- return const_cast<MemberExpr *>(this)->getExplicitTemplateArgumentList();
+public:
+ MemberExpr(Expr *base, bool isarrow, ValueDecl *memberdecl,
+ const DeclarationNameInfo &NameInfo, QualType ty)
+ : Expr(MemberExprClass, ty,
+ base->isTypeDependent(), base->isValueDependent()),
+ Base(base), MemberDecl(memberdecl), MemberLoc(NameInfo.getLoc()),
+ MemberDNLoc(NameInfo.getInfo()), IsArrow(isarrow),
+ HasQualifierOrFoundDecl(false), HasExplicitTemplateArgumentList(false) {
+ assert(memberdecl->getDeclName() == NameInfo.getName());
}
-public:
+ // NOTE: this constructor should be used only when it is known that
+ // the member name can not provide additional syntactic info
+ // (i.e., source locations for C++ operator names or type source info
+ // for constructors, destructors and conversion oeprators).
MemberExpr(Expr *base, bool isarrow, ValueDecl *memberdecl,
SourceLocation l, QualType ty)
: Expr(MemberExprClass, ty,
base->isTypeDependent(), base->isValueDependent()),
- Base(base), MemberDecl(memberdecl), MemberLoc(l), IsArrow(isarrow),
+ Base(base), MemberDecl(memberdecl), MemberLoc(l), MemberDNLoc(),
+ IsArrow(isarrow),
HasQualifierOrFoundDecl(false), HasExplicitTemplateArgumentList(false) {}
static MemberExpr *Create(ASTContext &C, Expr *base, bool isarrow,
NestedNameSpecifier *qual, SourceRange qualrange,
ValueDecl *memberdecl, DeclAccessPair founddecl,
- SourceLocation l,
+ DeclarationNameInfo MemberNameInfo,
const TemplateArgumentListInfo *targs,
QualType ty);
@@ -1700,15 +1778,42 @@ public:
/// \brief Determines whether this member expression actually had a C++
/// template argument list explicitly specified, e.g., x.f<int>.
- bool hasExplicitTemplateArgumentList() const {
+ bool hasExplicitTemplateArgs() const {
return HasExplicitTemplateArgumentList;
}
/// \brief Copies the template arguments (if present) into the given
/// structure.
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const {
- if (hasExplicitTemplateArgumentList())
- getExplicitTemplateArgumentList()->copyInto(List);
+ if (hasExplicitTemplateArgs())
+ getExplicitTemplateArgs().copyInto(List);
+ }
+
+ /// \brief Retrieve the explicit template argument list that
+ /// follow the member template name. This must only be called on an
+ /// expression with explicit template arguments.
+ ExplicitTemplateArgumentList &getExplicitTemplateArgs() {
+ assert(HasExplicitTemplateArgumentList);
+ if (!HasQualifierOrFoundDecl)
+ return *reinterpret_cast<ExplicitTemplateArgumentList *>(this + 1);
+
+ return *reinterpret_cast<ExplicitTemplateArgumentList *>(
+ getMemberQualifier() + 1);
+ }
+
+ /// \brief Retrieve the explicit template argument list that
+ /// followed the member template name. This must only be called on
+ /// an expression with explicit template arguments.
+ const ExplicitTemplateArgumentList &getExplicitTemplateArgs() const {
+ return const_cast<MemberExpr *>(this)->getExplicitTemplateArgs();
+ }
+
+ /// \brief Retrieves the optional explicit template arguments.
+ /// This points to the same data as getExplicitTemplateArgs(), but
+ /// returns null if there are no explicit template arguments.
+ const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() const {
+ if (!hasExplicitTemplateArgs()) return 0;
+ return &getExplicitTemplateArgs();
}
/// \brief Retrieve the location of the left angle bracket following the
@@ -1717,7 +1822,7 @@ public:
if (!HasExplicitTemplateArgumentList)
return SourceLocation();
- return getExplicitTemplateArgumentList()->LAngleLoc;
+ return getExplicitTemplateArgs().LAngleLoc;
}
/// \brief Retrieve the template arguments provided as part of this
@@ -1726,7 +1831,7 @@ public:
if (!HasExplicitTemplateArgumentList)
return 0;
- return getExplicitTemplateArgumentList()->getTemplateArgs();
+ return getExplicitTemplateArgs().getTemplateArgs();
}
/// \brief Retrieve the number of template arguments provided as part of this
@@ -1735,7 +1840,7 @@ public:
if (!HasExplicitTemplateArgumentList)
return 0;
- return getExplicitTemplateArgumentList()->NumTemplateArgs;
+ return getExplicitTemplateArgs().NumTemplateArgs;
}
/// \brief Retrieve the location of the right angle bracket following the
@@ -1744,7 +1849,13 @@ public:
if (!HasExplicitTemplateArgumentList)
return SourceLocation();
- return getExplicitTemplateArgumentList()->RAngleLoc;
+ return getExplicitTemplateArgs().RAngleLoc;
+ }
+
+ /// \brief Retrieve the member declaration name info.
+ DeclarationNameInfo getMemberNameInfo() const {
+ return DeclarationNameInfo(MemberDecl->getDeclName(),
+ MemberLoc, MemberDNLoc);
}
bool isArrow() const { return IsArrow; }
@@ -1758,9 +1869,8 @@ public:
virtual SourceRange getSourceRange() const {
// If we have an implicit base (like a C++ implicit this),
// make sure not to return its location
- SourceLocation EndLoc = MemberLoc;
- if (HasExplicitTemplateArgumentList)
- EndLoc = getRAngleLoc();
+ SourceLocation EndLoc = (HasExplicitTemplateArgumentList)
+ ? getRAngleLoc() : getMemberNameInfo().getEndLoc();
SourceLocation BaseLoc = getBase()->getLocStart();
if (BaseLoc.isInvalid())
@@ -1843,110 +1953,13 @@ public:
/// classes).
class CastExpr : public Expr {
public:
- /// CastKind - the kind of cast this represents.
- enum CastKind {
- /// CK_Unknown - Unknown cast kind.
- /// FIXME: The goal is to get rid of this and make all casts have a
- /// kind so that the AST client doesn't have to try to figure out what's
- /// going on.
- CK_Unknown,
-
- /// CK_BitCast - Used for reinterpret_cast.
- CK_BitCast,
-
- /// CK_LValueBitCast - Used for reinterpret_cast of expressions to
- /// a reference type.
- CK_LValueBitCast,
-
- /// CK_NoOp - Used for const_cast.
- CK_NoOp,
-
- /// CK_BaseToDerived - Base to derived class casts.
- CK_BaseToDerived,
-
- /// CK_DerivedToBase - Derived to base class casts.
- CK_DerivedToBase,
-
- /// CK_UncheckedDerivedToBase - Derived to base class casts that
- /// assume that the derived pointer is not null.
- CK_UncheckedDerivedToBase,
-
- /// CK_Dynamic - Dynamic cast.
- CK_Dynamic,
-
- /// CK_ToUnion - Cast to union (GCC extension).
- CK_ToUnion,
-
- /// CK_ArrayToPointerDecay - Array to pointer decay.
- CK_ArrayToPointerDecay,
-
- // CK_FunctionToPointerDecay - Function to pointer decay.
- CK_FunctionToPointerDecay,
-
- /// CK_NullToMemberPointer - Null pointer to member pointer.
- CK_NullToMemberPointer,
-
- /// CK_BaseToDerivedMemberPointer - Member pointer in base class to
- /// member pointer in derived class.
- CK_BaseToDerivedMemberPointer,
-
- /// CK_DerivedToBaseMemberPointer - Member pointer in derived class to
- /// member pointer in base class.
- CK_DerivedToBaseMemberPointer,
-
- /// CK_UserDefinedConversion - Conversion using a user defined type
- /// conversion function.
- CK_UserDefinedConversion,
-
- /// CK_ConstructorConversion - Conversion by constructor
- CK_ConstructorConversion,
-
- /// CK_IntegralToPointer - Integral to pointer
- CK_IntegralToPointer,
-
- /// CK_PointerToIntegral - Pointer to integral
- CK_PointerToIntegral,
-
- /// CK_ToVoid - Cast to void.
- CK_ToVoid,
-
- /// CK_VectorSplat - Casting from an integer/floating type to an extended
- /// vector type with the same element type as the src type. Splats the
- /// src expression into the destination expression.
- CK_VectorSplat,
-
- /// CK_IntegralCast - Casting between integral types of different size.
- CK_IntegralCast,
-
- /// CK_IntegralToFloating - Integral to floating point.
- CK_IntegralToFloating,
-
- /// CK_FloatingToIntegral - Floating point to integral.
- CK_FloatingToIntegral,
-
- /// CK_FloatingCast - Casting between floating types of different size.
- CK_FloatingCast,
-
- /// CK_MemberPointerToBoolean - Member pointer to boolean
- CK_MemberPointerToBoolean,
-
- /// CK_AnyPointerToObjCPointerCast - Casting any pointer to objective-c
- /// pointer
- CK_AnyPointerToObjCPointerCast,
- /// CK_AnyPointerToBlockPointerCast - Casting any pointer to block
- /// pointer
- CK_AnyPointerToBlockPointerCast
-
- };
+ typedef clang::CastKind CastKind;
private:
- CastKind Kind;
+ unsigned Kind : 5;
+ unsigned BasePathSize : BitsRemaining - 5;
Stmt *Op;
- /// BasePath - For derived-to-base and base-to-derived casts, the base array
- /// contains the inheritance path.
- CXXBaseSpecifierArray BasePath;
-
void CheckBasePath() const {
#ifndef NDEBUG
switch (getCastKind()) {
@@ -1955,7 +1968,7 @@ private:
case CK_DerivedToBaseMemberPointer:
case CK_BaseToDerived:
case CK_BaseToDerivedMemberPointer:
- assert(!BasePath.empty() && "Cast kind should have a base path!");
+ assert(!path_empty() && "Cast kind should have a base path!");
break;
// These should not have an inheritance path.
@@ -1981,15 +1994,21 @@ private:
case CK_MemberPointerToBoolean:
case CK_AnyPointerToObjCPointerCast:
case CK_AnyPointerToBlockPointerCast:
- assert(BasePath.empty() && "Cast kind should not have a base path!");
+ case CK_ObjCObjectLValueCast:
+ assert(path_empty() && "Cast kind should not have a base path!");
break;
}
#endif
}
+ const CXXBaseSpecifier * const *path_buffer() const {
+ return const_cast<CastExpr*>(this)->path_buffer();
+ }
+ CXXBaseSpecifier **path_buffer();
+
protected:
CastExpr(StmtClass SC, QualType ty, const CastKind kind, Expr *op,
- CXXBaseSpecifierArray BasePath) :
+ unsigned BasePathSize) :
Expr(SC, ty,
// Cast expressions are type-dependent if the type is
// dependent (C++ [temp.dep.expr]p3).
@@ -1997,18 +2016,16 @@ protected:
// Cast expressions are value-dependent if the type is
// dependent or if the subexpression is value-dependent.
ty->isDependentType() || (op && op->isValueDependent())),
- Kind(kind), Op(op), BasePath(BasePath) {
- CheckBasePath();
- }
+ Kind(kind), BasePathSize(BasePathSize), Op(op) {
+ CheckBasePath();
+ }
/// \brief Construct an empty cast.
- CastExpr(StmtClass SC, EmptyShell Empty)
- : Expr(SC, Empty) { }
-
- virtual void DoDestroy(ASTContext &C);
+ CastExpr(StmtClass SC, EmptyShell Empty, unsigned BasePathSize)
+ : Expr(SC, Empty), BasePathSize(BasePathSize) { }
public:
- CastKind getCastKind() const { return Kind; }
+ CastKind getCastKind() const { return static_cast<CastKind>(Kind); }
void setCastKind(CastKind K) { Kind = K; }
const char *getCastKindName() const;
@@ -2024,8 +2041,16 @@ public:
return const_cast<CastExpr *>(this)->getSubExprAsWritten();
}
- const CXXBaseSpecifierArray& getBasePath() const { return BasePath; }
- CXXBaseSpecifierArray& getBasePath() { return BasePath; }
+ typedef CXXBaseSpecifier **path_iterator;
+ typedef const CXXBaseSpecifier * const *path_const_iterator;
+ bool path_empty() const { return BasePathSize == 0; }
+ unsigned path_size() const { return BasePathSize; }
+ path_iterator path_begin() { return path_buffer(); }
+ path_iterator path_end() { return path_buffer() + path_size(); }
+ path_const_iterator path_begin() const { return path_buffer(); }
+ path_const_iterator path_end() const { return path_buffer() + path_size(); }
+
+ void setCastPath(const CXXCastPath &Path);
static bool classof(const Stmt *T) {
return T->getStmtClass() >= firstCastExprConstant &&
@@ -2045,38 +2070,57 @@ public:
///
/// In C, implicit casts always produce rvalues. However, in C++, an
/// implicit cast whose result is being bound to a reference will be
-/// an lvalue. For example:
+/// an lvalue or xvalue. For example:
///
/// @code
/// class Base { };
/// class Derived : public Base { };
+/// Derived &&ref();
/// void f(Derived d) {
-/// Base& b = d; // initializer is an ImplicitCastExpr to an lvalue of type Base
+/// Base& b = d; // initializer is an ImplicitCastExpr
+/// // to an lvalue of type Base
+/// Base&& r = ref(); // initializer is an ImplicitCastExpr
+/// // to an xvalue of type Base
/// }
/// @endcode
class ImplicitCastExpr : public CastExpr {
- /// LvalueCast - Whether this cast produces an lvalue.
- bool LvalueCast;
+private:
+ ImplicitCastExpr(QualType ty, CastKind kind, Expr *op,
+ unsigned BasePathLength, ExprValueKind VK)
+ : CastExpr(ImplicitCastExprClass, ty, kind, op, BasePathLength) {
+ ValueKind = VK;
+ }
+
+ /// \brief Construct an empty implicit cast.
+ explicit ImplicitCastExpr(EmptyShell Shell, unsigned PathSize)
+ : CastExpr(ImplicitCastExprClass, Shell, PathSize) { }
public:
- ImplicitCastExpr(QualType ty, CastKind kind, Expr *op,
- CXXBaseSpecifierArray BasePath, bool Lvalue)
- : CastExpr(ImplicitCastExprClass, ty, kind, op, BasePath),
- LvalueCast(Lvalue) { }
+ enum OnStack_t { OnStack };
+ ImplicitCastExpr(OnStack_t _, QualType ty, CastKind kind, Expr *op,
+ ExprValueKind VK)
+ : CastExpr(ImplicitCastExprClass, ty, kind, op, 0) {
+ ValueKind = VK;
+ }
- /// \brief Construct an empty implicit cast.
- explicit ImplicitCastExpr(EmptyShell Shell)
- : CastExpr(ImplicitCastExprClass, Shell) { }
+ static ImplicitCastExpr *Create(ASTContext &Context, QualType T,
+ CastKind Kind, Expr *Operand,
+ const CXXCastPath *BasePath,
+ ExprValueKind Cat);
+
+ static ImplicitCastExpr *CreateEmpty(ASTContext &Context, unsigned PathSize);
virtual SourceRange getSourceRange() const {
return getSubExpr()->getSourceRange();
}
- /// isLvalueCast - Whether this cast produces an lvalue.
- bool isLvalueCast() const { return LvalueCast; }
+ /// getValueKind - The value kind that this cast produces.
+ ExprValueKind getValueKind() const {
+ return static_cast<ExprValueKind>(ValueKind);
+ }
- /// setLvalueCast - Set whether this cast produces an lvalue.
- void setLvalueCast(bool Lvalue) { LvalueCast = Lvalue; }
+ /// setValueKind - Set the value kind this cast produces.
+ void setValueKind(ExprValueKind Cat) { ValueKind = Cat; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == ImplicitCastExprClass;
@@ -2098,8 +2142,8 @@ public:
/// actual type of the expression as determined by semantic
/// analysis. These types may differ slightly. For example, in C++ one
/// can cast to a reference type, which indicates that the resulting
-/// expression will be an lvalue. The reference type, however, will
-/// not be used as the type of the expression.
+/// expression will be an lvalue or xvalue. The reference type, however,
+/// will not be used as the type of the expression.
class ExplicitCastExpr : public CastExpr {
/// TInfo - Source type info for the (written) type
/// this expression is casting to.
@@ -2107,13 +2151,12 @@ class ExplicitCastExpr : public CastExpr {
protected:
ExplicitCastExpr(StmtClass SC, QualType exprTy, CastKind kind,
- Expr *op, CXXBaseSpecifierArray BasePath,
- TypeSourceInfo *writtenTy)
- : CastExpr(SC, exprTy, kind, op, BasePath), TInfo(writtenTy) {}
+ Expr *op, unsigned PathSize, TypeSourceInfo *writtenTy)
+ : CastExpr(SC, exprTy, kind, op, PathSize), TInfo(writtenTy) {}
/// \brief Construct an empty explicit cast.
- ExplicitCastExpr(StmtClass SC, EmptyShell Shell)
- : CastExpr(SC, Shell) { }
+ ExplicitCastExpr(StmtClass SC, EmptyShell Shell, unsigned PathSize)
+ : CastExpr(SC, Shell, PathSize) { }
public:
/// getTypeInfoAsWritten - Returns the type source info for the type
@@ -2138,16 +2181,24 @@ public:
class CStyleCastExpr : public ExplicitCastExpr {
SourceLocation LPLoc; // the location of the left paren
SourceLocation RPLoc; // the location of the right paren
-public:
+
CStyleCastExpr(QualType exprTy, CastKind kind, Expr *op,
- CXXBaseSpecifierArray BasePath, TypeSourceInfo *writtenTy,
+ unsigned PathSize, TypeSourceInfo *writtenTy,
SourceLocation l, SourceLocation r)
- : ExplicitCastExpr(CStyleCastExprClass, exprTy, kind, op, BasePath,
+ : ExplicitCastExpr(CStyleCastExprClass, exprTy, kind, op, PathSize,
writtenTy), LPLoc(l), RPLoc(r) {}
/// \brief Construct an empty C-style explicit cast.
- explicit CStyleCastExpr(EmptyShell Shell)
- : ExplicitCastExpr(CStyleCastExprClass, Shell) { }
+ explicit CStyleCastExpr(EmptyShell Shell, unsigned PathSize)
+ : ExplicitCastExpr(CStyleCastExprClass, Shell, PathSize) { }
+
+public:
+ static CStyleCastExpr *Create(ASTContext &Context, QualType T, CastKind K,
+ Expr *Op, const CXXCastPath *BasePath,
+ TypeSourceInfo *WrittenTy, SourceLocation L,
+ SourceLocation R);
+
+ static CStyleCastExpr *CreateEmpty(ASTContext &Context, unsigned PathSize);
SourceLocation getLParenLoc() const { return LPLoc; }
void setLParenLoc(SourceLocation L) { LPLoc = L; }
@@ -2184,33 +2235,14 @@ public:
/// be used to express the computation.
class BinaryOperator : public Expr {
public:
- enum Opcode {
- // Operators listed in order of precedence.
- // Note that additions to this should also update the StmtVisitor class.
- PtrMemD, PtrMemI, // [C++ 5.5] Pointer-to-member operators.
- Mul, Div, Rem, // [C99 6.5.5] Multiplicative operators.
- Add, Sub, // [C99 6.5.6] Additive operators.
- Shl, Shr, // [C99 6.5.7] Bitwise shift operators.
- LT, GT, LE, GE, // [C99 6.5.8] Relational operators.
- EQ, NE, // [C99 6.5.9] Equality operators.
- And, // [C99 6.5.10] Bitwise AND operator.
- Xor, // [C99 6.5.11] Bitwise XOR operator.
- Or, // [C99 6.5.12] Bitwise OR operator.
- LAnd, // [C99 6.5.13] Logical AND operator.
- LOr, // [C99 6.5.14] Logical OR operator.
- Assign, MulAssign,// [C99 6.5.16] Assignment operators.
- DivAssign, RemAssign,
- AddAssign, SubAssign,
- ShlAssign, ShrAssign,
- AndAssign, XorAssign,
- OrAssign,
- Comma // [C99 6.5.17] Comma operator.
- };
+ typedef BinaryOperatorKind Opcode;
+
private:
+ unsigned Opc : 6;
+ SourceLocation OpLoc;
+
enum { LHS, RHS, END_EXPR };
Stmt* SubExprs[END_EXPR];
- Opcode Opc;
- SourceLocation OpLoc;
public:
BinaryOperator(Expr *lhs, Expr *rhs, Opcode opc, QualType ResTy,
@@ -2227,12 +2259,12 @@ public:
/// \brief Construct an empty binary operator.
explicit BinaryOperator(EmptyShell Empty)
- : Expr(BinaryOperatorClass, Empty), Opc(Comma) { }
+ : Expr(BinaryOperatorClass, Empty), Opc(BO_Comma) { }
SourceLocation getOperatorLoc() const { return OpLoc; }
void setOperatorLoc(SourceLocation L) { OpLoc = L; }
- Opcode getOpcode() const { return Opc; }
+ Opcode getOpcode() const { return static_cast<Opcode>(Opc); }
void setOpcode(Opcode O) { Opc = O; }
Expr *getLHS() const { return cast<Expr>(SubExprs[LHS]); }
@@ -2248,6 +2280,8 @@ public:
/// corresponds to, e.g. "<<=".
static const char *getOpcodeStr(Opcode Op);
+ const char *getOpcodeStr() const { return getOpcodeStr(getOpcode()); }
+
/// \brief Retrieve the binary opcode that corresponds to the given
/// overloaded operator.
static Opcode getOverloadedOpcode(OverloadedOperatorKind OO);
@@ -2257,30 +2291,34 @@ public:
static OverloadedOperatorKind getOverloadedOperator(Opcode Opc);
/// predicates to categorize the respective opcodes.
- bool isMultiplicativeOp() const { return Opc >= Mul && Opc <= Rem; }
- static bool isAdditiveOp(Opcode Opc) { return Opc == Add || Opc == Sub; }
- bool isAdditiveOp() const { return isAdditiveOp(Opc); }
- static bool isShiftOp(Opcode Opc) { return Opc == Shl || Opc == Shr; }
- bool isShiftOp() const { return isShiftOp(Opc); }
+ bool isMultiplicativeOp() const { return Opc >= BO_Mul && Opc <= BO_Rem; }
+ static bool isAdditiveOp(Opcode Opc) { return Opc == BO_Add || Opc==BO_Sub; }
+ bool isAdditiveOp() const { return isAdditiveOp(getOpcode()); }
+ static bool isShiftOp(Opcode Opc) { return Opc == BO_Shl || Opc == BO_Shr; }
+ bool isShiftOp() const { return isShiftOp(getOpcode()); }
- static bool isBitwiseOp(Opcode Opc) { return Opc >= And && Opc <= Or; }
- bool isBitwiseOp() const { return isBitwiseOp(Opc); }
+ static bool isBitwiseOp(Opcode Opc) { return Opc >= BO_And && Opc <= BO_Or; }
+ bool isBitwiseOp() const { return isBitwiseOp(getOpcode()); }
- static bool isRelationalOp(Opcode Opc) { return Opc >= LT && Opc <= GE; }
- bool isRelationalOp() const { return isRelationalOp(Opc); }
+ static bool isRelationalOp(Opcode Opc) { return Opc >= BO_LT && Opc<=BO_GE; }
+ bool isRelationalOp() const { return isRelationalOp(getOpcode()); }
- static bool isEqualityOp(Opcode Opc) { return Opc == EQ || Opc == NE; }
- bool isEqualityOp() const { return isEqualityOp(Opc); }
+ static bool isEqualityOp(Opcode Opc) { return Opc == BO_EQ || Opc == BO_NE; }
+ bool isEqualityOp() const { return isEqualityOp(getOpcode()); }
- static bool isComparisonOp(Opcode Opc) { return Opc >= LT && Opc <= NE; }
- bool isComparisonOp() const { return isComparisonOp(Opc); }
+ static bool isComparisonOp(Opcode Opc) { return Opc >= BO_LT && Opc<=BO_NE; }
+ bool isComparisonOp() const { return isComparisonOp(getOpcode()); }
- static bool isLogicalOp(Opcode Opc) { return Opc == LAnd || Opc == LOr; }
- bool isLogicalOp() const { return isLogicalOp(Opc); }
+ static bool isLogicalOp(Opcode Opc) { return Opc == BO_LAnd || Opc==BO_LOr; }
+ bool isLogicalOp() const { return isLogicalOp(getOpcode()); }
- bool isAssignmentOp() const { return Opc >= Assign && Opc <= OrAssign; }
- bool isCompoundAssignmentOp() const { return Opc > Assign && Opc <= OrAssign;}
- bool isShiftAssignOp() const { return Opc == ShlAssign || Opc == ShrAssign; }
+ bool isAssignmentOp() const { return Opc >= BO_Assign && Opc <= BO_OrAssign; }
+ bool isCompoundAssignmentOp() const {
+ return Opc > BO_Assign && Opc <= BO_OrAssign;
+ }
+ bool isShiftAssignOp() const {
+ return Opc == BO_ShlAssign || Opc == BO_ShrAssign;
+ }
static bool classof(const Stmt *S) {
return S->getStmtClass() >= firstBinaryOperatorConstant &&
@@ -2304,7 +2342,7 @@ protected:
}
BinaryOperator(StmtClass SC, EmptyShell Empty)
- : Expr(SC, Empty), Opc(MulAssign) { }
+ : Expr(SC, Empty), Opc(BO_MulAssign) { }
};
/// CompoundAssignOperator - For compound assignments (e.g. +=), we keep
@@ -2353,10 +2391,11 @@ public:
class ConditionalOperator : public Expr {
enum { COND, LHS, RHS, END_EXPR };
Stmt* SubExprs[END_EXPR]; // Left/Middle/Right hand sides.
+ Stmt* Save;
SourceLocation QuestionLoc, ColonLoc;
public:
ConditionalOperator(Expr *cond, SourceLocation QLoc, Expr *lhs,
- SourceLocation CLoc, Expr *rhs, QualType t)
+ SourceLocation CLoc, Expr *rhs, Expr *save, QualType t)
: Expr(ConditionalOperatorClass, t,
// FIXME: the type of the conditional operator doesn't
// depend on the type of the conditional, but the standard
@@ -2370,6 +2409,7 @@ public:
SubExprs[COND] = cond;
SubExprs[LHS] = lhs;
SubExprs[RHS] = rhs;
+ Save = save;
}
/// \brief Build an empty conditional operator.
@@ -2382,25 +2422,31 @@ public:
void setCond(Expr *E) { SubExprs[COND] = E; }
// getTrueExpr - Return the subexpression representing the value of the ?:
- // expression if the condition evaluates to true. In most cases this value
- // will be the same as getLHS() except a GCC extension allows the left
- // subexpression to be omitted, and instead of the condition be returned.
- // e.g: x ?: y is shorthand for x ? x : y, except that the expression "x"
- // is only evaluated once.
+ // expression if the condition evaluates to true.
Expr *getTrueExpr() const {
- return cast<Expr>(SubExprs[LHS] ? SubExprs[LHS] : SubExprs[COND]);
+ return cast<Expr>(!Save ? SubExprs[LHS] : SubExprs[COND]);
}
- // getTrueExpr - Return the subexpression representing the value of the ?:
+ // getFalseExpr - Return the subexpression representing the value of the ?:
// expression if the condition evaluates to false. This is the same as getRHS.
Expr *getFalseExpr() const { return cast<Expr>(SubExprs[RHS]); }
-
- Expr *getLHS() const { return cast_or_null<Expr>(SubExprs[LHS]); }
+
+ // getSaveExpr - In most cases this value will be null. Except a GCC extension
+ // allows the left subexpression to be omitted, and instead of that condition
+ // be returned. e.g: x ?: y is shorthand for x ? x : y, except that the
+ // expression "x" is only evaluated once. Under this senario, this function
+ // returns the original, non-converted condition expression for the ?:operator
+ Expr *getSaveExpr() const { return Save? cast<Expr>(Save) : (Expr*)0; }
+
+ Expr *getLHS() const { return Save ? 0 : cast<Expr>(SubExprs[LHS]); }
void setLHS(Expr *E) { SubExprs[LHS] = E; }
Expr *getRHS() const { return cast<Expr>(SubExprs[RHS]); }
void setRHS(Expr *E) { SubExprs[RHS] = E; }
+ Expr *getSAVE() const { return Save? cast<Expr>(Save) : (Expr*)0; }
+ void setSAVE(Expr *E) { Save = E; }
+
SourceLocation getQuestionLoc() const { return QuestionLoc; }
void setQuestionLoc(SourceLocation L) { QuestionLoc = L; }
@@ -2500,23 +2546,27 @@ public:
/// expressions) are compatible. The result of this built-in function can be
/// used in integer constant expressions.
class TypesCompatibleExpr : public Expr {
- QualType Type1;
- QualType Type2;
+ TypeSourceInfo *TInfo1;
+ TypeSourceInfo *TInfo2;
SourceLocation BuiltinLoc, RParenLoc;
public:
TypesCompatibleExpr(QualType ReturnType, SourceLocation BLoc,
- QualType t1, QualType t2, SourceLocation RP) :
+ TypeSourceInfo *tinfo1, TypeSourceInfo *tinfo2,
+ SourceLocation RP) :
Expr(TypesCompatibleExprClass, ReturnType, false, false),
- Type1(t1), Type2(t2), BuiltinLoc(BLoc), RParenLoc(RP) {}
+ TInfo1(tinfo1), TInfo2(tinfo2), BuiltinLoc(BLoc), RParenLoc(RP) {}
/// \brief Build an empty __builtin_type_compatible_p expression.
explicit TypesCompatibleExpr(EmptyShell Empty)
: Expr(TypesCompatibleExprClass, Empty) { }
- QualType getArgType1() const { return Type1; }
- void setArgType1(QualType T) { Type1 = T; }
- QualType getArgType2() const { return Type2; }
- void setArgType2(QualType T) { Type2 = T; }
+ TypeSourceInfo *getArgTInfo1() const { return TInfo1; }
+ void setArgTInfo1(TypeSourceInfo *TInfo) { TInfo1 = TInfo; }
+ TypeSourceInfo *getArgTInfo2() const { return TInfo2; }
+ void setArgTInfo2(TypeSourceInfo *TInfo) { TInfo2 = TInfo; }
+
+ QualType getArgType1() const { return TInfo1->getType(); }
+ QualType getArgType2() const { return TInfo2->getType(); }
SourceLocation getBuiltinLoc() const { return BuiltinLoc; }
void setBuiltinLoc(SourceLocation L) { BuiltinLoc = L; }
@@ -2553,9 +2603,6 @@ class ShuffleVectorExpr : public Expr {
Stmt **SubExprs;
unsigned NumExprs;
-protected:
- virtual void DoDestroy(ASTContext &C);
-
public:
// FIXME: Can a shufflevector be value-dependent? Does type-dependence need
// to be computed differently?
@@ -2588,8 +2635,6 @@ public:
}
static bool classof(const ShuffleVectorExpr *) { return true; }
- ~ShuffleVectorExpr() {}
-
/// getNumSubExprs - Return the size of the SubExprs array. This includes the
/// constant expression, the actual arguments passed in, and the function
/// pointers.
@@ -2716,11 +2761,13 @@ public:
/// VAArgExpr, used for the builtin function __builtin_va_arg.
class VAArgExpr : public Expr {
Stmt *Val;
+ TypeSourceInfo *TInfo;
SourceLocation BuiltinLoc, RParenLoc;
public:
- VAArgExpr(SourceLocation BLoc, Expr* e, QualType t, SourceLocation RPLoc)
+ VAArgExpr(SourceLocation BLoc, Expr* e, TypeSourceInfo *TInfo,
+ SourceLocation RPLoc, QualType t)
: Expr(VAArgExprClass, t, t->isDependentType(), false),
- Val(e),
+ Val(e), TInfo(TInfo),
BuiltinLoc(BLoc),
RParenLoc(RPLoc) { }
@@ -2731,6 +2778,9 @@ public:
Expr *getSubExpr() { return cast<Expr>(Val); }
void setSubExpr(Expr *E) { Val = E; }
+ TypeSourceInfo *getWrittenTypeInfo() const { return TInfo; }
+ void setWrittenTypeInfo(TypeSourceInfo *TI) { TInfo = TI; }
+
SourceLocation getBuiltinLoc() const { return BuiltinLoc; }
void setBuiltinLoc(SourceLocation L) { BuiltinLoc = L; }
@@ -2896,12 +2946,18 @@ public:
virtual child_iterator child_end();
typedef InitExprsTy::iterator iterator;
+ typedef InitExprsTy::const_iterator const_iterator;
typedef InitExprsTy::reverse_iterator reverse_iterator;
+ typedef InitExprsTy::const_reverse_iterator const_reverse_iterator;
iterator begin() { return InitExprs.begin(); }
+ const_iterator begin() const { return InitExprs.begin(); }
iterator end() { return InitExprs.end(); }
+ const_iterator end() const { return InitExprs.end(); }
reverse_iterator rbegin() { return InitExprs.rbegin(); }
+ const_reverse_iterator rbegin() const { return InitExprs.rbegin(); }
reverse_iterator rend() { return InitExprs.rend(); }
+ const_reverse_iterator rend() const { return InitExprs.rend(); }
};
/// @brief Represents a C99 designated initializer expression.
@@ -2961,11 +3017,6 @@ private:
: Expr(DesignatedInitExprClass, EmptyShell()),
NumDesignators(0), Designators(0), NumSubExprs(NumSubExprs) { }
-protected:
- virtual void DoDestroy(ASTContext &C);
-
- void DestroyDesignators(ASTContext &C);
-
public:
/// A field designator, e.g., ".x".
struct FieldDesignator {
@@ -3233,15 +3284,10 @@ class ParenListExpr : public Expr {
unsigned NumExprs;
SourceLocation LParenLoc, RParenLoc;
-protected:
- virtual void DoDestroy(ASTContext& C);
-
public:
ParenListExpr(ASTContext& C, SourceLocation lparenloc, Expr **exprs,
unsigned numexprs, SourceLocation rparenloc);
- ~ParenListExpr() {}
-
/// \brief Build an empty paren list.
explicit ParenListExpr(EmptyShell Empty) : Expr(ParenListExprClass, Empty) { }
@@ -3274,8 +3320,8 @@ public:
virtual child_iterator child_begin();
virtual child_iterator child_end();
- friend class PCHStmtReader;
- friend class PCHStmtWriter;
+ friend class ASTStmtReader;
+ friend class ASTStmtWriter;
};
diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h
index b9553815d8eb..0a9435479d93 100644
--- a/include/clang/AST/ExprCXX.h
+++ b/include/clang/AST/ExprCXX.h
@@ -121,12 +121,12 @@ private:
protected:
CXXNamedCastExpr(StmtClass SC, QualType ty, CastKind kind, Expr *op,
- CXXBaseSpecifierArray BasePath, TypeSourceInfo *writtenTy,
+ unsigned PathSize, TypeSourceInfo *writtenTy,
SourceLocation l)
- : ExplicitCastExpr(SC, ty, kind, op, BasePath, writtenTy), Loc(l) {}
+ : ExplicitCastExpr(SC, ty, kind, op, PathSize, writtenTy), Loc(l) {}
- explicit CXXNamedCastExpr(StmtClass SC, EmptyShell Shell)
- : ExplicitCastExpr(SC, Shell) { }
+ explicit CXXNamedCastExpr(StmtClass SC, EmptyShell Shell, unsigned PathSize)
+ : ExplicitCastExpr(SC, Shell, PathSize) { }
public:
const char *getCastName() const;
@@ -158,14 +158,22 @@ public:
/// This expression node represents a C++ static cast, e.g.,
/// @c static_cast<int>(1.0).
class CXXStaticCastExpr : public CXXNamedCastExpr {
-public:
CXXStaticCastExpr(QualType ty, CastKind kind, Expr *op,
- CXXBaseSpecifierArray BasePath, TypeSourceInfo *writtenTy,
+ unsigned pathSize, TypeSourceInfo *writtenTy,
SourceLocation l)
- : CXXNamedCastExpr(CXXStaticCastExprClass, ty, kind, op, BasePath, writtenTy, l) {}
+ : CXXNamedCastExpr(CXXStaticCastExprClass, ty, kind, op, pathSize,
+ writtenTy, l) {}
- explicit CXXStaticCastExpr(EmptyShell Empty)
- : CXXNamedCastExpr(CXXStaticCastExprClass, Empty) { }
+ explicit CXXStaticCastExpr(EmptyShell Empty, unsigned PathSize)
+ : CXXNamedCastExpr(CXXStaticCastExprClass, Empty, PathSize) { }
+
+public:
+ static CXXStaticCastExpr *Create(ASTContext &Context, QualType T,
+ CastKind K, Expr *Op,
+ const CXXCastPath *Path,
+ TypeSourceInfo *Written, SourceLocation L);
+ static CXXStaticCastExpr *CreateEmpty(ASTContext &Context,
+ unsigned PathSize);
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXStaticCastExprClass;
@@ -180,15 +188,23 @@ public:
/// This expression node represents a dynamic cast, e.g.,
/// @c dynamic_cast<Derived*>(BasePtr).
class CXXDynamicCastExpr : public CXXNamedCastExpr {
-public:
CXXDynamicCastExpr(QualType ty, CastKind kind, Expr *op,
- CXXBaseSpecifierArray BasePath, TypeSourceInfo *writtenTy,
+ unsigned pathSize, TypeSourceInfo *writtenTy,
SourceLocation l)
- : CXXNamedCastExpr(CXXDynamicCastExprClass, ty, kind, op, BasePath,
+ : CXXNamedCastExpr(CXXDynamicCastExprClass, ty, kind, op, pathSize,
writtenTy, l) {}
- explicit CXXDynamicCastExpr(EmptyShell Empty)
- : CXXNamedCastExpr(CXXDynamicCastExprClass, Empty) { }
+ explicit CXXDynamicCastExpr(EmptyShell Empty, unsigned pathSize)
+ : CXXNamedCastExpr(CXXDynamicCastExprClass, Empty, pathSize) { }
+
+public:
+ static CXXDynamicCastExpr *Create(ASTContext &Context, QualType T,
+ CastKind Kind, Expr *Op,
+ const CXXCastPath *Path,
+ TypeSourceInfo *Written, SourceLocation L);
+
+ static CXXDynamicCastExpr *CreateEmpty(ASTContext &Context,
+ unsigned pathSize);
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXDynamicCastExprClass;
@@ -203,15 +219,22 @@ public:
/// This expression node represents a reinterpret cast, e.g.,
/// @c reinterpret_cast<int>(VoidPtr).
class CXXReinterpretCastExpr : public CXXNamedCastExpr {
-public:
CXXReinterpretCastExpr(QualType ty, CastKind kind, Expr *op,
- CXXBaseSpecifierArray BasePath,
+ unsigned pathSize,
TypeSourceInfo *writtenTy, SourceLocation l)
- : CXXNamedCastExpr(CXXReinterpretCastExprClass, ty, kind, op, BasePath,
+ : CXXNamedCastExpr(CXXReinterpretCastExprClass, ty, kind, op, pathSize,
writtenTy, l) {}
- explicit CXXReinterpretCastExpr(EmptyShell Empty)
- : CXXNamedCastExpr(CXXReinterpretCastExprClass, Empty) { }
+ CXXReinterpretCastExpr(EmptyShell Empty, unsigned pathSize)
+ : CXXNamedCastExpr(CXXReinterpretCastExprClass, Empty, pathSize) { }
+
+public:
+ static CXXReinterpretCastExpr *Create(ASTContext &Context, QualType T,
+ CastKind Kind, Expr *Op,
+ const CXXCastPath *Path,
+ TypeSourceInfo *WrittenTy, SourceLocation L);
+ static CXXReinterpretCastExpr *CreateEmpty(ASTContext &Context,
+ unsigned pathSize);
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXReinterpretCastExprClass;
@@ -225,14 +248,18 @@ public:
/// This expression node represents a const cast, e.g.,
/// @c const_cast<char*>(PtrToConstChar).
class CXXConstCastExpr : public CXXNamedCastExpr {
-public:
CXXConstCastExpr(QualType ty, Expr *op, TypeSourceInfo *writtenTy,
SourceLocation l)
: CXXNamedCastExpr(CXXConstCastExprClass, ty, CK_NoOp, op,
- CXXBaseSpecifierArray(), writtenTy, l) {}
+ 0, writtenTy, l) {}
explicit CXXConstCastExpr(EmptyShell Empty)
- : CXXNamedCastExpr(CXXConstCastExprClass, Empty) { }
+ : CXXNamedCastExpr(CXXConstCastExprClass, Empty, 0) { }
+
+public:
+ static CXXConstCastExpr *Create(ASTContext &Context, QualType T, Expr *Op,
+ TypeSourceInfo *WrittenTy, SourceLocation L);
+ static CXXConstCastExpr *CreateEmpty(ASTContext &Context);
static bool classof(const Stmt *T) {
return T->getStmtClass() == CXXConstCastExprClass;
@@ -479,9 +506,6 @@ class CXXDefaultArgExpr : public Expr {
*reinterpret_cast<Expr **>(this + 1) = SubExpr;
}
-protected:
- virtual void DoDestroy(ASTContext &C);
-
public:
CXXDefaultArgExpr(EmptyShell Empty) : Expr(CXXDefaultArgExprClass, Empty) {}
@@ -535,8 +559,8 @@ public:
virtual child_iterator child_begin();
virtual child_iterator child_end();
- friend class PCHStmtReader;
- friend class PCHStmtWriter;
+ friend class ASTStmtReader;
+ friend class ASTStmtWriter;
};
/// CXXTemporary - Represents a C++ temporary.
@@ -546,14 +570,11 @@ class CXXTemporary {
CXXTemporary(const CXXDestructorDecl *destructor)
: Destructor(destructor) { }
- ~CXXTemporary() { }
public:
static CXXTemporary *Create(ASTContext &C,
const CXXDestructorDecl *Destructor);
- void Destroy(ASTContext &Ctx);
-
const CXXDestructorDecl *getDestructor() const { return Destructor; }
};
@@ -579,10 +600,6 @@ class CXXBindTemporaryExpr : public Expr {
CXXBindTemporaryExpr(CXXTemporary *temp, Expr* subexpr)
: Expr(CXXBindTemporaryExprClass, subexpr->getType(), false, false),
Temp(temp), SubExpr(subexpr) { }
- ~CXXBindTemporaryExpr() { }
-
-protected:
- virtual void DoDestroy(ASTContext &C);
public:
CXXBindTemporaryExpr(EmptyShell Empty)
@@ -614,73 +631,6 @@ public:
virtual child_iterator child_end();
};
-/// CXXBindReferenceExpr - Represents binding an expression to a reference.
-/// In the example:
-///
-/// const int &i = 10;
-///
-/// a bind reference expression is inserted to indicate that 10 is bound to
-/// a reference, and that a temporary needs to be created to hold the
-/// value.
-class CXXBindReferenceExpr : public Expr {
- // SubExpr - The expression being bound.
- Stmt *SubExpr;
-
- // ExtendsLifetime - Whether binding this reference extends the lifetime of
- // the expression being bound. FIXME: Add C++ reference.
- bool ExtendsLifetime;
-
- /// RequiresTemporaryCopy - Whether binding the subexpression requires a
- /// temporary copy.
- bool RequiresTemporaryCopy;
-
- CXXBindReferenceExpr(Expr *subexpr, bool ExtendsLifetime,
- bool RequiresTemporaryCopy)
- : Expr(CXXBindReferenceExprClass, subexpr->getType(), false, false),
- SubExpr(subexpr), ExtendsLifetime(ExtendsLifetime),
- RequiresTemporaryCopy(RequiresTemporaryCopy) { }
- ~CXXBindReferenceExpr() { }
-
-protected:
- virtual void DoDestroy(ASTContext &C);
-
-public:
- static CXXBindReferenceExpr *Create(ASTContext &C, Expr *SubExpr,
- bool ExtendsLifetime,
- bool RequiresTemporaryCopy);
-
- explicit CXXBindReferenceExpr(EmptyShell Empty)
- : Expr(CXXBindReferenceExprClass, Empty) { }
-
- const Expr *getSubExpr() const { return cast<Expr>(SubExpr); }
- Expr *getSubExpr() { return cast<Expr>(SubExpr); }
- void setSubExpr(Expr *E) { SubExpr = E; }
-
- virtual SourceRange getSourceRange() const {
- return SubExpr->getSourceRange();
- }
-
- /// requiresTemporaryCopy - Whether binding the subexpression requires a
- /// temporary copy.
- bool requiresTemporaryCopy() const { return RequiresTemporaryCopy; }
-
- // extendsLifetime - Whether binding this reference extends the lifetime of
- // the expression being bound. FIXME: Add C++ reference.
- bool extendsLifetime() const { return ExtendsLifetime; }
-
- // Implement isa/cast/dyncast/etc.
- static bool classof(const Stmt *T) {
- return T->getStmtClass() == CXXBindReferenceExprClass;
- }
- static bool classof(const CXXBindReferenceExpr *) { return true; }
-
- // Iterators
- virtual child_iterator child_begin();
- virtual child_iterator child_end();
-
- friend class PCHStmtReader;
-};
-
/// CXXConstructExpr - Represents a call to a C++ constructor.
class CXXConstructExpr : public Expr {
public:
@@ -707,15 +657,12 @@ protected:
Expr **args, unsigned numargs,
bool ZeroInitialization = false,
ConstructionKind ConstructKind = CK_Complete);
- ~CXXConstructExpr() { }
/// \brief Construct an empty C++ construction expression.
CXXConstructExpr(StmtClass SC, EmptyShell Empty)
: Expr(SC, Empty), Constructor(0), Elidable(0), ZeroInitialization(0),
ConstructKind(0), Args(0), NumArgs(0) { }
- virtual void DoDestroy(ASTContext &C);
-
public:
/// \brief Construct an empty C++ construction expression.
explicit CXXConstructExpr(EmptyShell Empty)
@@ -796,7 +743,7 @@ public:
virtual child_iterator child_begin();
virtual child_iterator child_end();
- friend class PCHStmtReader;
+ friend class ASTStmtReader;
};
/// CXXFunctionalCastExpr - Represents an explicit C++ type conversion
@@ -805,17 +752,27 @@ public:
class CXXFunctionalCastExpr : public ExplicitCastExpr {
SourceLocation TyBeginLoc;
SourceLocation RParenLoc;
-public:
+
CXXFunctionalCastExpr(QualType ty, TypeSourceInfo *writtenTy,
SourceLocation tyBeginLoc, CastKind kind,
- Expr *castExpr, CXXBaseSpecifierArray BasePath,
+ Expr *castExpr, unsigned pathSize,
SourceLocation rParenLoc)
: ExplicitCastExpr(CXXFunctionalCastExprClass, ty, kind, castExpr,
- BasePath, writtenTy),
+ pathSize, writtenTy),
TyBeginLoc(tyBeginLoc), RParenLoc(rParenLoc) {}
- explicit CXXFunctionalCastExpr(EmptyShell Shell)
- : ExplicitCastExpr(CXXFunctionalCastExprClass, Shell) { }
+ explicit CXXFunctionalCastExpr(EmptyShell Shell, unsigned PathSize)
+ : ExplicitCastExpr(CXXFunctionalCastExprClass, Shell, PathSize) { }
+
+public:
+ static CXXFunctionalCastExpr *Create(ASTContext &Context, QualType T,
+ TypeSourceInfo *Written,
+ SourceLocation TyBeginLoc,
+ CastKind Kind, Expr *Op,
+ const CXXCastPath *Path,
+ SourceLocation RPLoc);
+ static CXXFunctionalCastExpr *CreateEmpty(ASTContext &Context,
+ unsigned PathSize);
SourceLocation getTypeBeginLoc() const { return TyBeginLoc; }
void setTypeBeginLoc(SourceLocation L) { TyBeginLoc = L; }
@@ -859,8 +816,6 @@ public:
explicit CXXTemporaryObjectExpr(EmptyShell Empty)
: CXXConstructExpr(CXXTemporaryObjectExprClass, Empty) { }
- ~CXXTemporaryObjectExpr() { }
-
SourceLocation getTypeBeginLoc() const { return TyBeginLoc; }
SourceLocation getRParenLoc() const { return RParenLoc; }
@@ -872,7 +827,7 @@ public:
}
static bool classof(const CXXTemporaryObjectExpr *) { return true; }
- friend class PCHStmtReader;
+ friend class ASTStmtReader;
};
/// CXXScalarValueInitExpr - [C++ 5.2.3p2]
@@ -952,7 +907,7 @@ class CXXNewExpr : public Expr {
SourceLocation StartLoc;
SourceLocation EndLoc;
- friend class PCHStmtReader;
+ friend class ASTStmtReader;
public:
CXXNewExpr(ASTContext &C, bool globalNew, FunctionDecl *operatorNew,
Expr **placementArgs, unsigned numPlaceArgs,
@@ -967,8 +922,6 @@ public:
void AllocateArgsArray(ASTContext &C, bool isArray, unsigned numPlaceArgs,
unsigned numConsArgs);
- virtual void DoDestroy(ASTContext &C);
-
QualType getAllocatedType() const {
assert(getType()->isPointerType());
return getType()->getAs<PointerType>()->getPointeeType();
@@ -1381,7 +1334,7 @@ public:
virtual child_iterator child_begin();
virtual child_iterator child_end();
- friend class PCHStmtReader;
+ friend class ASTStmtReader;
};
/// \brief A reference to an overloaded function set, either an
@@ -1395,7 +1348,7 @@ class OverloadExpr : public Expr {
unsigned NumResults;
/// The common name of these declarations.
- DeclarationName Name;
+ DeclarationNameInfo NameInfo;
/// The scope specifier, if any.
NestedNameSpecifier *Qualifier;
@@ -1403,16 +1356,13 @@ class OverloadExpr : public Expr {
/// The source range of the scope specifier.
SourceRange QualifierRange;
- /// The location of the name.
- SourceLocation NameLoc;
-
protected:
/// True if the name was a template-id.
bool HasExplicitTemplateArgs;
OverloadExpr(StmtClass K, ASTContext &C, QualType T, bool Dependent,
NestedNameSpecifier *Qualifier, SourceRange QRange,
- DeclarationName Name, SourceLocation NameLoc,
+ const DeclarationNameInfo &NameInfo,
bool HasTemplateArgs,
UnresolvedSetIterator Begin, UnresolvedSetIterator End);
@@ -1427,19 +1377,38 @@ public:
UnresolvedSetIterator End,
const TemplateArgumentListInfo *Args);
+ struct FindResult {
+ OverloadExpr *Expression;
+ bool IsAddressOfOperand;
+ bool HasFormOfMemberPointer;
+ };
+
/// Finds the overloaded expression in the given expression of
/// OverloadTy.
///
- /// \return the expression (which must be there) and true if it is
- /// within an address-of operator.
- static llvm::PointerIntPair<OverloadExpr*,1> find(Expr *E) {
+ /// \return the expression (which must be there) and true if it has
+ /// the particular form of a member pointer expression
+ static FindResult find(Expr *E) {
assert(E->getType()->isSpecificBuiltinType(BuiltinType::Overload));
- bool op = false;
+ FindResult Result;
+
E = E->IgnoreParens();
- if (isa<UnaryOperator>(E))
- op = true, E = cast<UnaryOperator>(E)->getSubExpr()->IgnoreParens();
- return llvm::PointerIntPair<OverloadExpr*,1>(cast<OverloadExpr>(E), op);
+ if (isa<UnaryOperator>(E)) {
+ assert(cast<UnaryOperator>(E)->getOpcode() == UO_AddrOf);
+ E = cast<UnaryOperator>(E)->getSubExpr();
+ OverloadExpr *Ovl = cast<OverloadExpr>(E->IgnoreParens());
+
+ Result.HasFormOfMemberPointer = (E == Ovl && Ovl->getQualifier());
+ Result.IsAddressOfOperand = true;
+ Result.Expression = Ovl;
+ } else {
+ Result.HasFormOfMemberPointer = false;
+ Result.IsAddressOfOperand = false;
+ Result.Expression = cast<OverloadExpr>(E);
+ }
+
+ return Result;
}
/// Gets the