From bca07a4524feb4edec581062d631a13116320a24 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 20 Feb 2011 13:06:31 +0000 Subject: Vendor import of clang trunk r126079: http://llvm.org/svn/llvm-project/cfe/trunk@126079 --- CMakeLists.txt | 122 +- Makefile | 18 +- TODO.txt | 2 +- bindings/python/clang/cindex.py | 411 +- bindings/python/tests/cindex/test_diagnostics.py | 25 +- .../python/tests/cindex/test_translation_unit.py | 16 +- clang.xcodeproj/project.pbxproj | 1105 +++-- docs/Block-ABI-Apple.txt | 78 +- docs/InternalsManual.html | 125 +- docs/LanguageExtensions.html | 200 +- docs/Makefile | 4 +- docs/PCHInternals.html | 8 +- docs/UsersManual.html | 79 +- docs/tools/clang.pod | 36 +- examples/PrintFunctionNames/CMakeLists.txt | 7 +- examples/PrintFunctionNames/Makefile | 6 +- examples/PrintFunctionNames/README.txt | 10 +- examples/clang-interpreter/CMakeLists.txt | 6 +- examples/clang-interpreter/Makefile | 2 +- examples/clang-interpreter/main.cpp | 16 +- examples/wpa/CMakeLists.txt | 6 +- examples/wpa/Makefile | 2 +- examples/wpa/clang-wpa.cpp | 60 +- include/clang-c/Index.h | 635 ++- include/clang/AST/ASTConsumer.h | 8 +- include/clang/AST/ASTContext.h | 545 ++- include/clang/AST/ASTDiagnostic.h | 2 +- include/clang/AST/ASTImporter.h | 55 +- include/clang/AST/ASTMutationListener.h | 48 + include/clang/AST/Attr.h | 31 +- include/clang/AST/CXXInheritance.h | 7 +- include/clang/AST/CanonicalType.h | 20 +- include/clang/AST/CharUnits.h | 50 +- include/clang/AST/Decl.h | 581 ++- include/clang/AST/DeclBase.h | 75 +- include/clang/AST/DeclCXX.h | 563 +-- include/clang/AST/DeclFriend.h | 29 +- include/clang/AST/DeclGroup.h | 2 +- include/clang/AST/DeclObjC.h | 119 +- include/clang/AST/DeclTemplate.h | 402 +- include/clang/AST/DeclarationName.h | 10 +- include/clang/AST/EvaluatedExprVisitor.h | 82 + include/clang/AST/Expr.h | 1158 +++-- include/clang/AST/ExprCXX.h | 1061 +++-- include/clang/AST/ExprObjC.h | 386 +- include/clang/AST/ExternalASTSource.h | 48 +- include/clang/AST/FullExpr.h | 88 - include/clang/AST/Mangle.h | 150 + include/clang/AST/NestedNameSpecifier.h | 23 +- include/clang/AST/OperationKinds.h | 201 +- include/clang/AST/ParentMap.h | 10 + include/clang/AST/PrettyPrinter.h | 4 +- include/clang/AST/RecordLayout.h | 169 +- include/clang/AST/RecursiveASTVisitor.h | 325 +- include/clang/AST/Redeclarable.h | 20 +- include/clang/AST/Stmt.h | 371 +- include/clang/AST/StmtCXX.h | 12 +- include/clang/AST/StmtIterator.h | 96 +- include/clang/AST/StmtObjC.h | 39 +- include/clang/AST/TemplateBase.h | 283 +- include/clang/AST/TemplateName.h | 146 +- include/clang/AST/Type.h | 1915 ++++++--- include/clang/AST/TypeLoc.h | 347 +- include/clang/AST/TypeLocBuilder.h | 155 - include/clang/AST/TypeNodes.def | 5 + include/clang/AST/TypeVisitor.h | 9 +- include/clang/Analysis/Analyses/FormatString.h | 13 +- include/clang/Analysis/Analyses/LiveVariables.h | 3 +- .../Analysis/Analyses/UninitializedValuesV2.h | 40 + include/clang/Analysis/AnalysisContext.h | 37 +- include/clang/Analysis/AnalysisDiagnostic.h | 2 +- include/clang/Analysis/CFG.h | 409 +- .../Analysis/DomainSpecific/CocoaConventions.h | 40 + .../clang/Analysis/FlowSensitive/DataflowSolver.h | 18 +- include/clang/Analysis/ProgramPoint.h | 48 +- include/clang/Analysis/Support/BumpVector.h | 29 +- .../Analysis/Visitors/CFGRecStmtDeclVisitor.h | 4 + .../clang/Analysis/Visitors/CFGRecStmtVisitor.h | 5 + include/clang/Analysis/Visitors/CFGStmtVisitor.h | 4 +- include/clang/Basic/ABI.h | 126 + include/clang/Basic/Attr.td | 241 +- include/clang/Basic/AttrKinds.h | 1 + include/clang/Basic/Builtins.def | 291 +- include/clang/Basic/Builtins.h | 23 +- include/clang/Basic/BuiltinsPPC.def | 22 +- include/clang/Basic/BuiltinsX86.def | 15 +- include/clang/Basic/DeclNodes.td | 4 +- include/clang/Basic/Diagnostic.h | 440 +- include/clang/Basic/Diagnostic.td | 2 + include/clang/Basic/DiagnosticASTKinds.td | 29 + include/clang/Basic/DiagnosticCommonKinds.td | 3 + include/clang/Basic/DiagnosticDriverKinds.td | 14 +- include/clang/Basic/DiagnosticFrontendKinds.td | 30 +- include/clang/Basic/DiagnosticGroups.td | 48 +- include/clang/Basic/DiagnosticIDs.h | 212 + include/clang/Basic/DiagnosticLexKinds.td | 14 +- include/clang/Basic/DiagnosticParseKinds.td | 87 +- include/clang/Basic/DiagnosticSemaKinds.td | 720 +++- include/clang/Basic/FileManager.h | 190 +- include/clang/Basic/FileSystemOptions.h | 31 + include/clang/Basic/FileSystemStatCache.h | 101 + include/clang/Basic/IdentifierTable.h | 93 +- include/clang/Basic/LangOptions.h | 90 +- include/clang/Basic/OnDiskHashTable.h | 70 +- include/clang/Basic/OpenCLExtensions.def | 28 + include/clang/Basic/PartialDiagnostic.h | 55 +- include/clang/Basic/SourceLocation.h | 45 +- include/clang/Basic/SourceManager.h | 36 +- include/clang/Basic/Specifiers.h | 17 + include/clang/Basic/StmtNodes.td | 24 +- include/clang/Basic/TargetInfo.h | 35 +- include/clang/Basic/TokenKinds.def | 40 +- include/clang/Basic/TokenKinds.h | 6 + include/clang/Basic/TypeTraits.h | 6 + include/clang/Basic/Version.h | 2 +- include/clang/Basic/Visibility.h | 48 + include/clang/Basic/arm_neon.td | 386 +- include/clang/CMakeLists.txt | 1 + include/clang/Checker/AnalysisConsumer.h | 35 - include/clang/Checker/BugReporter/BugReporter.h | 483 --- include/clang/Checker/BugReporter/BugType.h | 72 - include/clang/Checker/BugReporter/PathDiagnostic.h | 494 --- .../clang/Checker/Checkers/DereferenceChecker.h | 31 - include/clang/Checker/Checkers/LocalCheckers.h | 61 - .../Checker/DomainSpecific/CocoaConventions.h | 39 - include/clang/Checker/FrontendActions.h | 29 - include/clang/Checker/ManagerRegistry.h | 53 - include/clang/Checker/PathDiagnosticClients.h | 32 - .../clang/Checker/PathSensitive/AnalysisManager.h | 202 - .../Checker/PathSensitive/BasicValueFactory.h | 197 - include/clang/Checker/PathSensitive/Checker.h | 308 -- .../clang/Checker/PathSensitive/CheckerHelpers.h | 40 - .../clang/Checker/PathSensitive/CheckerVisitor.def | 37 - .../clang/Checker/PathSensitive/CheckerVisitor.h | 107 - .../Checker/PathSensitive/ConstraintManager.h | 72 - include/clang/Checker/PathSensitive/Environment.h | 102 - .../clang/Checker/PathSensitive/ExplodedGraph.h | 430 -- include/clang/Checker/PathSensitive/GRAuditor.h | 35 - .../clang/Checker/PathSensitive/GRBlockCounter.h | 55 - include/clang/Checker/PathSensitive/GRCoreEngine.h | 531 --- include/clang/Checker/PathSensitive/GRExprEngine.h | 528 --- .../Checker/PathSensitive/GRExprEngineBuilders.h | 76 - .../clang/Checker/PathSensitive/GRSimpleAPICheck.h | 31 - include/clang/Checker/PathSensitive/GRState.h | 760 ---- include/clang/Checker/PathSensitive/GRStateTrait.h | 148 - include/clang/Checker/PathSensitive/GRSubEngine.h | 107 - .../clang/Checker/PathSensitive/GRTransferFuncs.h | 87 - include/clang/Checker/PathSensitive/GRWorkList.h | 79 - include/clang/Checker/PathSensitive/MemRegion.h | 1041 ----- include/clang/Checker/PathSensitive/SVals.h | 503 --- include/clang/Checker/PathSensitive/SValuator.h | 70 - include/clang/Checker/PathSensitive/Store.h | 245 -- .../clang/Checker/PathSensitive/SummaryManager.h | 57 - .../clang/Checker/PathSensitive/SymbolManager.h | 485 --- include/clang/Checker/PathSensitive/ValueManager.h | 216 - include/clang/CodeGen/CodeGenAction.h | 26 +- include/clang/Config/config.h.cmake | 17 + include/clang/Driver/ArgList.h | 2 +- include/clang/Driver/CC1AsOptions.td | 4 + include/clang/Driver/CC1Options.td | 133 +- include/clang/Driver/Driver.h | 22 +- include/clang/Driver/DriverDiagnostic.h | 2 +- include/clang/Driver/HostInfo.h | 2 + include/clang/Driver/OptTable.h | 4 +- include/clang/Driver/Options.td | 76 +- include/clang/Driver/ToolChain.h | 39 +- include/clang/Driver/Types.def | 1 + include/clang/Frontend/ASTConsumers.h | 10 +- include/clang/Frontend/ASTUnit.h | 151 +- include/clang/Frontend/Analyses.def | 40 +- include/clang/Frontend/AnalyzerOptions.h | 15 +- include/clang/Frontend/CodeGenOptions.h | 32 +- include/clang/Frontend/CommandLineSourceLoc.h | 8 +- include/clang/Frontend/CompilerInstance.h | 102 +- include/clang/Frontend/CompilerInvocation.h | 35 +- include/clang/Frontend/DeclXML.def | 5 + include/clang/Frontend/DependencyOutputOptions.h | 10 +- include/clang/Frontend/DiagnosticOptions.h | 4 - include/clang/Frontend/FrontendAction.h | 7 +- include/clang/Frontend/FrontendActions.h | 13 +- include/clang/Frontend/FrontendDiagnostic.h | 2 +- include/clang/Frontend/FrontendOptions.h | 16 +- include/clang/Frontend/HeaderSearchOptions.h | 3 + include/clang/Frontend/LangStandards.def | 5 + include/clang/Frontend/MultiplexConsumer.h | 54 + include/clang/Frontend/PreprocessorOptions.h | 17 +- include/clang/Frontend/PreprocessorOutputOptions.h | 2 - include/clang/Frontend/StmtXML.def | 7 - include/clang/Frontend/TypeXML.def | 10 +- include/clang/Frontend/Utils.h | 12 + include/clang/Frontend/VerifyDiagnosticsClient.h | 4 - include/clang/Lex/CMakeLists.txt | 6 + include/clang/Lex/ExternalPreprocessorSource.h | 3 + include/clang/Lex/HeaderMap.h | 2 +- include/clang/Lex/HeaderSearch.h | 61 +- include/clang/Lex/LexDiagnostic.h | 2 +- include/clang/Lex/Lexer.h | 53 + include/clang/Lex/LiteralSupport.h | 31 +- include/clang/Lex/MacroInfo.h | 13 + include/clang/Lex/Makefile | 13 + include/clang/Lex/PPCallbacks.h | 139 +- include/clang/Lex/PTHManager.h | 6 +- include/clang/Lex/Pragma.h | 31 +- include/clang/Lex/PreprocessingRecord.h | 93 +- include/clang/Lex/Preprocessor.h | 106 +- include/clang/Lex/PreprocessorLexer.h | 12 + include/clang/Lex/Token.h | 42 +- include/clang/Makefile | 2 +- include/clang/Parse/ParseDiagnostic.h | 2 +- include/clang/Parse/Parser.h | 358 +- include/clang/Rewrite/ASTConsumers.h | 2 +- include/clang/Rewrite/FixItRewriter.h | 2 +- include/clang/Sema/AttributeList.h | 108 +- include/clang/Sema/CodeCompleteConsumer.h | 282 +- include/clang/Sema/DeclSpec.h | 328 +- include/clang/Sema/DelayedDiagnostic.h | 41 +- include/clang/Sema/ExternalSemaSource.h | 8 +- include/clang/Sema/Initialization.h | 55 +- include/clang/Sema/Lookup.h | 20 +- include/clang/Sema/Overload.h | 48 +- include/clang/Sema/Ownership.h | 9 +- include/clang/Sema/ParsedTemplate.h | 30 +- include/clang/Sema/Scope.h | 23 +- include/clang/Sema/ScopeInfo.h | 38 +- include/clang/Sema/Sema.h | 1325 ++++-- include/clang/Sema/SemaDiagnostic.h | 2 +- include/clang/Sema/Template.h | 211 +- include/clang/Sema/TemplateDeduction.h | 25 +- include/clang/Serialization/ASTBitCodes.h | 135 +- .../Serialization/ASTDeserializationListener.h | 21 +- include/clang/Serialization/ASTReader.h | 484 ++- .../clang/Serialization/ASTSerializationListener.h | 44 + include/clang/Serialization/ASTWriter.h | 230 +- .../clang/StaticAnalyzer/Checkers/CheckerBase.td | 38 + .../StaticAnalyzer/Checkers/DereferenceChecker.h | 35 + .../clang/StaticAnalyzer/Checkers/LocalCheckers.h | 51 + .../StaticAnalyzer/Core/BugReporter/BugReporter.h | 486 +++ .../StaticAnalyzer/Core/BugReporter/BugType.h | 76 + .../Core/BugReporter/PathDiagnostic.h | 500 +++ include/clang/StaticAnalyzer/Core/CheckerManager.h | 109 + .../clang/StaticAnalyzer/Core/CheckerProvider.h | 54 + include/clang/StaticAnalyzer/Core/CheckerV2.h | 93 + .../StaticAnalyzer/Core/PathDiagnosticClients.h | 42 + .../Core/PathSensitive/AnalysisManager.h | 220 + .../Core/PathSensitive/BasicValueFactory.h | 201 + .../Core/PathSensitive/BlockCounter.h | 59 + .../StaticAnalyzer/Core/PathSensitive/Checker.h | 324 ++ .../Core/PathSensitive/CheckerHelpers.h | 43 + .../Core/PathSensitive/CheckerVisitor.def | 48 + .../Core/PathSensitive/CheckerVisitor.h | 103 + .../Core/PathSensitive/ConstraintManager.h | 76 + .../StaticAnalyzer/Core/PathSensitive/CoreEngine.h | 546 +++ .../Core/PathSensitive/Environment.h | 106 + .../Core/PathSensitive/ExplodedGraph.h | 469 ++ .../StaticAnalyzer/Core/PathSensitive/ExprEngine.h | 550 +++ .../Core/PathSensitive/ExprEngineBuilders.h | 80 + .../StaticAnalyzer/Core/PathSensitive/GRState.h | 793 ++++ .../Core/PathSensitive/GRStateTrait.h | 165 + .../StaticAnalyzer/Core/PathSensitive/MemRegion.h | 1092 +++++ .../Core/PathSensitive/ObjCMessage.h | 210 + .../Core/PathSensitive/SValBuilder.h | 258 ++ .../StaticAnalyzer/Core/PathSensitive/SVals.h | 544 +++ .../StaticAnalyzer/Core/PathSensitive/Store.h | 307 ++ .../StaticAnalyzer/Core/PathSensitive/SubEngine.h | 116 + .../Core/PathSensitive/SummaryManager.h | 61 + .../Core/PathSensitive/SymbolManager.h | 489 +++ .../Core/PathSensitive/TransferFuncs.h | 93 + .../StaticAnalyzer/Core/PathSensitive/WorkList.h | 101 + .../StaticAnalyzer/Frontend/CheckerRegistration.h | 26 + .../StaticAnalyzer/Frontend/FrontendActions.h | 33 + lib/AST/ASTContext.cpp | 1999 +++++---- lib/AST/ASTDiagnostic.cpp | 56 +- lib/AST/ASTImporter.cpp | 1353 +++++- lib/AST/CMakeLists.txt | 9 +- lib/AST/CXXABI.h | 9 + lib/AST/CXXInheritance.cpp | 57 +- lib/AST/Decl.cpp | 927 +++- lib/AST/DeclBase.cpp | 118 +- lib/AST/DeclCXX.cpp | 719 +++- lib/AST/DeclObjC.cpp | 57 +- lib/AST/DeclPrinter.cpp | 83 +- lib/AST/DeclTemplate.cpp | 363 +- lib/AST/DeclarationName.cpp | 31 +- lib/AST/DumpXML.cpp | 1028 +++++ lib/AST/Expr.cpp | 1336 ++++-- lib/AST/ExprCXX.cpp | 835 ++-- lib/AST/ExprClassification.cpp | 194 +- lib/AST/ExprConstant.cpp | 727 +++- lib/AST/FullExpr.cpp | 45 - lib/AST/InheritViz.cpp | 39 +- lib/AST/ItaniumCXXABI.cpp | 21 + lib/AST/ItaniumMangle.cpp | 2705 ++++++++++++ lib/AST/Mangle.cpp | 135 + lib/AST/MicrosoftCXXABI.cpp | 25 +- lib/AST/MicrosoftMangle.cpp | 1188 +++++ lib/AST/NestedNameSpecifier.cpp | 42 +- lib/AST/ParentMap.cpp | 17 +- lib/AST/RecordLayout.cpp | 30 +- lib/AST/RecordLayoutBuilder.cpp | 649 +-- lib/AST/Stmt.cpp | 256 +- lib/AST/StmtDumper.cpp | 172 +- lib/AST/StmtIterator.cpp | 18 +- lib/AST/StmtPrinter.cpp | 155 +- lib/AST/StmtProfile.cpp | 99 +- lib/AST/TemplateBase.cpp | 356 +- lib/AST/TemplateName.cpp | 57 +- lib/AST/Type.cpp | 911 ++-- lib/AST/TypeLoc.cpp | 53 +- lib/AST/TypePrinter.cpp | 521 ++- lib/Analysis/AnalysisContext.cpp | 27 +- lib/Analysis/CFG.cpp | 1816 ++++++-- lib/Analysis/CFGStmtMap.cpp | 19 +- lib/Analysis/CMakeLists.txt | 4 +- lib/Analysis/CocoaConventions.cpp | 180 + lib/Analysis/FormatString.cpp | 4 +- lib/Analysis/LiveVariables.cpp | 12 +- lib/Analysis/PrintfFormatString.cpp | 54 +- lib/Analysis/PseudoConstantAnalysis.cpp | 10 +- lib/Analysis/ReachableCode.cpp | 44 +- lib/Analysis/UninitializedValues.cpp | 23 +- lib/Analysis/UninitializedValuesV2.cpp | 610 +++ lib/Basic/Builtins.cpp | 24 +- lib/Basic/CMakeLists.txt | 8 +- lib/Basic/Diagnostic.cpp | 914 +--- lib/Basic/DiagnosticIDs.cpp | 586 +++ lib/Basic/FileManager.cpp | 464 +- lib/Basic/FileSystemStatCache.cpp | 120 + lib/Basic/IdentifierTable.cpp | 31 +- lib/Basic/Makefile | 8 +- lib/Basic/SourceLocation.cpp | 10 + lib/Basic/SourceManager.cpp | 350 +- lib/Basic/TargetInfo.cpp | 52 +- lib/Basic/Targets.cpp | 409 +- lib/Basic/Version.cpp | 62 +- lib/CMakeLists.txt | 2 +- lib/Checker/AdjustedReturnValueChecker.cpp | 95 - lib/Checker/AggExprVisitor.cpp | 62 - lib/Checker/AnalysisConsumer.cpp | 598 --- lib/Checker/AnalysisManager.cpp | 31 - lib/Checker/ArrayBoundChecker.cpp | 91 - lib/Checker/AttrNonNullChecker.cpp | 113 - lib/Checker/BasicConstraintManager.cpp | 333 -- lib/Checker/BasicObjCFoundationChecks.cpp | 585 --- lib/Checker/BasicObjCFoundationChecks.h | 38 - lib/Checker/BasicStore.cpp | 580 --- lib/Checker/BasicValueFactory.cpp | 289 -- lib/Checker/BugReporter.cpp | 1873 -------- lib/Checker/BugReporterVisitors.cpp | 458 -- lib/Checker/BuiltinFunctionChecker.cpp | 84 - lib/Checker/CFRefCount.cpp | 3521 --------------- lib/Checker/CMakeLists.txt | 84 - lib/Checker/CStringChecker.cpp | 1055 ----- lib/Checker/CallAndMessageChecker.cpp | 346 -- lib/Checker/CastSizeChecker.cpp | 91 - lib/Checker/CastToStructChecker.cpp | 78 - lib/Checker/CheckDeadStores.cpp | 289 -- lib/Checker/CheckObjCDealloc.cpp | 261 -- lib/Checker/CheckObjCInstMethSignature.cpp | 119 - lib/Checker/CheckSecuritySyntaxOnly.cpp | 494 --- lib/Checker/CheckSizeofPointer.cpp | 71 - lib/Checker/Checker.cpp | 35 - lib/Checker/CheckerHelpers.cpp | 80 - lib/Checker/CocoaConventions.cpp | 196 - lib/Checker/DereferenceChecker.cpp | 156 - lib/Checker/DivZeroChecker.cpp | 85 - lib/Checker/Environment.cpp | 228 - lib/Checker/ExplodedGraph.cpp | 281 -- lib/Checker/FixedAddressChecker.cpp | 71 - lib/Checker/FlatStore.cpp | 202 - lib/Checker/FrontendActions.cpp | 21 - lib/Checker/GRBlockCounter.cpp | 85 - lib/Checker/GRCXXExprEngine.cpp | 240 -- lib/Checker/GRCoreEngine.cpp | 770 ---- lib/Checker/GRExprEngine.cpp | 3730 ---------------- lib/Checker/GRExprEngineExperimentalChecks.cpp | 44 - lib/Checker/GRExprEngineExperimentalChecks.h | 30 - lib/Checker/GRExprEngineInternalChecks.h | 52 - lib/Checker/GRState.cpp | 549 --- lib/Checker/HTMLDiagnostics.cpp | 577 --- lib/Checker/IdempotentOperationChecker.cpp | 703 --- lib/Checker/LLVMConventionsChecker.cpp | 312 -- lib/Checker/MacOSXAPIChecker.cpp | 141 - lib/Checker/Makefile | 18 - lib/Checker/MallocChecker.cpp | 736 ---- lib/Checker/ManagerRegistry.cpp | 20 - lib/Checker/MemRegion.cpp | 957 ----- lib/Checker/NSAutoreleasePoolChecker.cpp | 86 - lib/Checker/NSErrorChecker.cpp | 237 - lib/Checker/NoReturnFunctionChecker.cpp | 79 - lib/Checker/OSAtomicChecker.cpp | 202 - lib/Checker/ObjCUnusedIVarsChecker.cpp | 161 - lib/Checker/PathDiagnostic.cpp | 274 -- lib/Checker/PlistDiagnostics.cpp | 471 -- lib/Checker/PointerArithChecker.cpp | 71 - lib/Checker/PointerSubChecker.cpp | 78 - lib/Checker/PthreadLockChecker.cpp | 141 - lib/Checker/RangeConstraintManager.cpp | 439 -- lib/Checker/RegionStore.cpp | 1816 -------- lib/Checker/ReturnPointerRangeChecker.cpp | 97 - lib/Checker/ReturnUndefChecker.cpp | 68 - lib/Checker/SVals.cpp | 354 -- lib/Checker/SValuator.cpp | 157 - lib/Checker/SimpleConstraintManager.cpp | 299 -- lib/Checker/SimpleConstraintManager.h | 89 - lib/Checker/SimpleSValuator.cpp | 891 ---- lib/Checker/StackAddrLeakChecker.cpp | 204 - lib/Checker/Store.cpp | 332 -- lib/Checker/StreamChecker.cpp | 468 -- lib/Checker/SymbolManager.cpp | 342 -- lib/Checker/UndefBranchChecker.cpp | 119 - lib/Checker/UndefCapturedBlockVarChecker.cpp | 101 - lib/Checker/UndefResultChecker.cpp | 86 - lib/Checker/UndefinedArraySubscriptChecker.cpp | 56 - lib/Checker/UndefinedAssignmentChecker.cpp | 93 - lib/Checker/UnixAPIChecker.cpp | 222 - lib/Checker/UnreachableCodeChecker.cpp | 226 - lib/Checker/VLASizeChecker.cpp | 135 - lib/Checker/ValueManager.cpp | 162 - lib/CodeGen/ABIInfo.h | 31 +- lib/CodeGen/BackendUtil.cpp | 42 +- lib/CodeGen/CGBlocks.cpp | 1806 ++++---- lib/CodeGen/CGBlocks.h | 253 +- lib/CodeGen/CGBuiltin.cpp | 680 ++- lib/CodeGen/CGCXX.cpp | 251 +- lib/CodeGen/CGCXX.h | 36 - lib/CodeGen/CGCXXABI.cpp | 174 + lib/CodeGen/CGCXXABI.h | 28 +- lib/CodeGen/CGCall.cpp | 157 +- lib/CodeGen/CGClass.cpp | 188 +- lib/CodeGen/CGCleanup.cpp | 1144 +++++ lib/CodeGen/CGCleanup.h | 560 +++ lib/CodeGen/CGDebugInfo.cpp | 1006 +++-- lib/CodeGen/CGDebugInfo.h | 56 +- lib/CodeGen/CGDecl.cpp | 349 +- lib/CodeGen/CGDeclCXX.cpp | 194 +- lib/CodeGen/CGException.cpp | 442 +- lib/CodeGen/CGException.h | 558 +-- lib/CodeGen/CGExpr.cpp | 662 ++- lib/CodeGen/CGExprAgg.cpp | 480 ++- lib/CodeGen/CGExprCXX.cpp | 488 ++- lib/CodeGen/CGExprComplex.cpp | 293 +- lib/CodeGen/CGExprConstant.cpp | 286 +- lib/CodeGen/CGExprScalar.cpp | 937 ++-- lib/CodeGen/CGObjC.cpp | 675 +-- lib/CodeGen/CGObjCGNU.cpp | 107 +- lib/CodeGen/CGObjCMac.cpp | 252 +- lib/CodeGen/CGObjCRuntime.h | 12 +- lib/CodeGen/CGRTTI.cpp | 276 +- lib/CodeGen/CGRecordLayout.h | 69 +- lib/CodeGen/CGRecordLayoutBuilder.cpp | 613 ++- lib/CodeGen/CGStmt.cpp | 228 +- lib/CodeGen/CGTemporaries.cpp | 70 +- lib/CodeGen/CGVTT.cpp | 88 +- lib/CodeGen/CGVTables.cpp | 262 +- lib/CodeGen/CGVTables.h | 126 +- lib/CodeGen/CGValue.h | 132 +- lib/CodeGen/CMakeLists.txt | 13 +- lib/CodeGen/CodeGenAction.cpp | 64 +- lib/CodeGen/CodeGenFunction.cpp | 899 +--- lib/CodeGen/CodeGenFunction.h | 815 +++- lib/CodeGen/CodeGenModule.cpp | 527 ++- lib/CodeGen/CodeGenModule.h | 168 +- lib/CodeGen/CodeGenTBAA.cpp | 180 + lib/CodeGen/CodeGenTBAA.h | 76 + lib/CodeGen/CodeGenTypes.cpp | 69 +- lib/CodeGen/CodeGenTypes.h | 20 +- lib/CodeGen/GlobalDecl.h | 8 +- lib/CodeGen/ItaniumCXXABI.cpp | 309 +- lib/CodeGen/Mangle.cpp | 2515 ----------- lib/CodeGen/Mangle.h | 177 - lib/CodeGen/MicrosoftCXXABI.cpp | 1178 +---- lib/CodeGen/ModuleBuilder.cpp | 13 + lib/CodeGen/TargetInfo.cpp | 414 +- lib/CodeGen/TargetInfo.h | 9 + lib/Driver/Action.cpp | 2 +- lib/Driver/Arg.cpp | 2 +- lib/Driver/ArgList.cpp | 40 +- lib/Driver/CMakeLists.txt | 2 +- lib/Driver/Compilation.cpp | 20 +- lib/Driver/Driver.cpp | 153 +- lib/Driver/DriverOptions.cpp | 2 +- lib/Driver/HostInfo.cpp | 68 +- lib/Driver/Job.cpp | 2 +- lib/Driver/OptTable.cpp | 5 +- lib/Driver/Option.cpp | 2 +- lib/Driver/Phases.cpp | 2 +- lib/Driver/Tool.cpp | 2 +- lib/Driver/ToolChain.cpp | 55 +- lib/Driver/ToolChains.cpp | 516 ++- lib/Driver/ToolChains.h | 52 +- lib/Driver/Tools.cpp | 1025 ++++- lib/Driver/Tools.h | 45 +- lib/Driver/Types.cpp | 4 +- lib/Frontend/ASTConsumers.cpp | 40 +- lib/Frontend/ASTMerge.cpp | 21 +- lib/Frontend/ASTUnit.cpp | 770 ++-- lib/Frontend/CMakeLists.txt | 13 +- lib/Frontend/CacheTokens.cpp | 46 +- lib/Frontend/CompilerInstance.cpp | 221 +- lib/Frontend/CompilerInvocation.cpp | 334 +- lib/Frontend/DeclXML.cpp | 20 +- lib/Frontend/DependencyFile.cpp | 25 +- lib/Frontend/DocumentXML.cpp | 19 +- lib/Frontend/FrontendAction.cpp | 125 +- lib/Frontend/FrontendActions.cpp | 33 +- lib/Frontend/FrontendOptions.cpp | 1 + lib/Frontend/HeaderIncludeGen.cpp | 113 + lib/Frontend/InitHeaderSearch.cpp | 230 +- lib/Frontend/InitPreprocessor.cpp | 22 +- lib/Frontend/MultiplexConsumer.cpp | 221 + lib/Frontend/PrintPreprocessedOutput.cpp | 114 +- lib/Frontend/StmtXML.cpp | 16 +- lib/Frontend/TextDiagnosticBuffer.cpp | 3 + lib/Frontend/TextDiagnosticPrinter.cpp | 186 +- lib/Frontend/TypeXML.cpp | 6 +- lib/Frontend/VerifyDiagnosticsClient.cpp | 10 +- lib/FrontendTool/CMakeLists.txt | 3 +- lib/FrontendTool/ExecuteCompilerInvocation.cpp | 10 +- lib/Headers/CMakeLists.txt | 47 +- lib/Headers/altivec.h | 2454 +++++++++-- lib/Headers/emmintrin.h | 15 +- lib/Headers/limits.h | 6 +- lib/Headers/mm_malloc.h | 47 +- lib/Headers/mmintrin.h | 84 +- lib/Headers/stdbool.h | 8 +- lib/Headers/stddef.h | 17 +- lib/Headers/xmmintrin.h | 8 +- lib/Index/ASTVisitor.h | 3 +- lib/Index/CMakeLists.txt | 5 +- lib/Index/CallGraph.cpp | 2 +- lib/Lex/CMakeLists.txt | 8 +- lib/Lex/HeaderMap.cpp | 10 +- lib/Lex/HeaderSearch.cpp | 44 +- lib/Lex/Lexer.cpp | 230 +- lib/Lex/LiteralSupport.cpp | 275 +- lib/Lex/MacroInfo.cpp | 3 +- lib/Lex/PPDirectives.cpp | 212 +- lib/Lex/PPExpressions.cpp | 51 +- lib/Lex/PPLexerChange.cpp | 14 +- lib/Lex/PPMacroExpansion.cpp | 152 +- lib/Lex/PTHLexer.cpp | 44 +- lib/Lex/Pragma.cpp | 208 +- lib/Lex/PreprocessingRecord.cpp | 62 +- lib/Lex/Preprocessor.cpp | 227 +- lib/Lex/TokenConcatenation.cpp | 10 +- lib/Lex/TokenLexer.cpp | 11 +- lib/Makefile | 2 +- lib/Parse/CMakeLists.txt | 2 +- lib/Parse/ParseAST.cpp | 24 - lib/Parse/ParseCXXInlineMethods.cpp | 313 +- lib/Parse/ParseDecl.cpp | 681 +-- lib/Parse/ParseDeclCXX.cpp | 524 ++- lib/Parse/ParseExpr.cpp | 527 ++- lib/Parse/ParseExprCXX.cpp | 160 +- lib/Parse/ParseInit.cpp | 15 +- lib/Parse/ParseObjc.cpp | 281 +- lib/Parse/ParsePragma.cpp | 113 +- lib/Parse/ParsePragma.h | 40 +- lib/Parse/ParseStmt.cpp | 326 +- lib/Parse/ParseTemplate.cpp | 97 +- lib/Parse/ParseTentative.cpp | 236 +- lib/Parse/Parser.cpp | 208 +- lib/Parse/RAIIObjectsForParser.h | 16 + lib/Rewrite/CMakeLists.txt | 4 +- lib/Rewrite/FixItRewriter.cpp | 7 +- lib/Rewrite/FrontendActions.cpp | 13 +- lib/Rewrite/HTMLRewrite.cpp | 25 +- lib/Rewrite/RewriteMacros.cpp | 4 +- lib/Rewrite/RewriteObjC.cpp | 873 ++-- lib/Rewrite/RewriteRope.cpp | 6 +- lib/Rewrite/TokenRewriter.cpp | 6 +- lib/Sema/AnalysisBasedWarnings.cpp | 208 +- lib/Sema/AttributeList.cpp | 51 +- lib/Sema/CMakeLists.txt | 3 +- lib/Sema/CodeCompleteConsumer.cpp | 353 +- lib/Sema/DeclSpec.cpp | 114 +- lib/Sema/JumpDiagnostics.cpp | 62 +- lib/Sema/Sema.cpp | 267 +- lib/Sema/SemaAccess.cpp | 95 +- lib/Sema/SemaAttr.cpp | 81 +- lib/Sema/SemaCXXCast.cpp | 496 ++- lib/Sema/SemaCXXScopeSpec.cpp | 30 +- lib/Sema/SemaChecking.cpp | 806 ++-- lib/Sema/SemaCodeComplete.cpp | 3317 +++++++++----- lib/Sema/SemaDecl.cpp | 2813 +++++++----- lib/Sema/SemaDeclAttr.cpp | 1150 +++-- lib/Sema/SemaDeclCXX.cpp | 1969 ++++++--- lib/Sema/SemaDeclObjC.cpp | 354 +- lib/Sema/SemaExceptionSpec.cpp | 37 +- lib/Sema/SemaExpr.cpp | 4525 ++++++++++++++------ lib/Sema/SemaExprCXX.cpp | 1736 ++++++-- lib/Sema/SemaExprObjC.cpp | 378 +- lib/Sema/SemaInit.cpp | 1322 +++--- lib/Sema/SemaLookup.cpp | 1007 +++-- lib/Sema/SemaObjCProperty.cpp | 218 +- lib/Sema/SemaOverload.cpp | 3984 ++++++++++------- lib/Sema/SemaStmt.cpp | 561 ++- lib/Sema/SemaTemplate.cpp | 2333 ++++++---- lib/Sema/SemaTemplateDeduction.cpp | 2648 ++++++++---- lib/Sema/SemaTemplateInstantiate.cpp | 858 +++- lib/Sema/SemaTemplateInstantiateDecl.cpp | 874 ++-- lib/Sema/SemaTemplateVariadic.cpp | 748 ++++ lib/Sema/SemaType.cpp | 1532 +++++-- lib/Sema/TargetAttributesSema.cpp | 55 +- lib/Sema/TreeTransform.h | 3031 ++++++++----- lib/Sema/TypeLocBuilder.h | 180 + lib/Serialization/ASTCommon.cpp | 10 +- lib/Serialization/ASTCommon.h | 8 +- lib/Serialization/ASTReader.cpp | 1848 +++++--- lib/Serialization/ASTReaderDecl.cpp | 849 ++-- lib/Serialization/ASTReaderStmt.cpp | 727 ++-- lib/Serialization/ASTWriter.cpp | 1154 ++++- lib/Serialization/ASTWriterDecl.cpp | 260 +- lib/Serialization/ASTWriterStmt.cpp | 277 +- lib/Serialization/CMakeLists.txt | 3 +- lib/Serialization/GeneratePCH.cpp | 24 +- lib/StaticAnalyzer/CMakeLists.txt | 3 + .../Checkers/AdjustedReturnValueChecker.cpp | 96 + .../Checkers/AnalyzerStatsChecker.cpp | 123 + lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp | 92 + .../Checkers/ArrayBoundCheckerV2.cpp | 277 ++ lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp | 136 + .../Checkers/BasicObjCFoundationChecks.cpp | 521 +++ .../Checkers/BasicObjCFoundationChecks.h | 35 + .../Checkers/BuiltinFunctionChecker.cpp | 83 + lib/StaticAnalyzer/Checkers/CMakeLists.txt | 70 + lib/StaticAnalyzer/Checkers/CStringChecker.cpp | 1053 +++++ .../Checkers/CallAndMessageChecker.cpp | 358 ++ lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp | 91 + .../Checkers/CastToStructChecker.cpp | 84 + lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp | 284 ++ .../Checkers/CheckObjCInstMethSignature.cpp | 140 + .../Checkers/CheckSecuritySyntaxOnly.cpp | 517 +++ lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp | 87 + lib/StaticAnalyzer/Checkers/Checkers.td | 197 + lib/StaticAnalyzer/Checkers/ChrootChecker.cpp | 167 + .../Checkers/ClangSACheckerProvider.cpp | 137 + .../Checkers/ClangSACheckerProvider.h | 29 + lib/StaticAnalyzer/Checkers/ClangSACheckers.h | 34 + lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp | 363 ++ lib/StaticAnalyzer/Checkers/DebugCheckers.cpp | 80 + lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp | 205 + lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp | 86 + lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp | 37 + lib/StaticAnalyzer/Checkers/ExperimentalChecks.h | 31 + lib/StaticAnalyzer/Checkers/ExprEngine.cpp | 3655 ++++++++++++++++ .../Checkers/FixedAddressChecker.cpp | 77 + .../Checkers/IdempotentOperationChecker.cpp | 822 ++++ lib/StaticAnalyzer/Checkers/InternalChecks.h | 51 + .../Checkers/LLVMConventionsChecker.cpp | 311 ++ lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp | 146 + lib/StaticAnalyzer/Checkers/Makefile | 24 + lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 731 ++++ .../Checkers/NSAutoreleasePoolChecker.cpp | 92 + lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp | 238 + .../Checkers/NoReturnFunctionChecker.cpp | 80 + lib/StaticAnalyzer/Checkers/OSAtomicChecker.cpp | 203 + lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp | 100 + .../Checkers/ObjCSelfInitChecker.cpp | 356 ++ .../Checkers/ObjCUnusedIVarsChecker.cpp | 184 + .../Checkers/PointerArithChecker.cpp | 77 + lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp | 84 + lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp | 152 + .../Checkers/ReturnPointerRangeChecker.cpp | 95 + lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp | 69 + .../Checkers/StackAddrLeakChecker.cpp | 210 + lib/StaticAnalyzer/Checkers/StreamChecker.cpp | 470 ++ lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp | 120 + .../Checkers/UndefCapturedBlockVarChecker.cpp | 102 + lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp | 87 + .../Checkers/UndefinedArraySubscriptChecker.cpp | 57 + .../Checkers/UndefinedAssignmentChecker.cpp | 94 + lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp | 282 ++ .../Checkers/UnreachableCodeChecker.cpp | 228 + lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp | 138 + lib/StaticAnalyzer/Core/AggExprVisitor.cpp | 69 + lib/StaticAnalyzer/Core/AnalysisManager.cpp | 32 + lib/StaticAnalyzer/Core/BasicConstraintManager.cpp | 338 ++ lib/StaticAnalyzer/Core/BasicStore.cpp | 604 +++ lib/StaticAnalyzer/Core/BasicValueFactory.cpp | 288 ++ lib/StaticAnalyzer/Core/BlockCounter.cpp | 86 + lib/StaticAnalyzer/Core/BugReporter.cpp | 1896 ++++++++ lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | 457 ++ lib/StaticAnalyzer/Core/CFRefCount.cpp | 3519 +++++++++++++++ lib/StaticAnalyzer/Core/CMakeLists.txt | 41 + lib/StaticAnalyzer/Core/CXXExprEngine.cpp | 322 ++ lib/StaticAnalyzer/Core/Checker.cpp | 35 + lib/StaticAnalyzer/Core/CheckerHelpers.cpp | 80 + lib/StaticAnalyzer/Core/CheckerManager.cpp | 85 + lib/StaticAnalyzer/Core/CoreEngine.cpp | 848 ++++ lib/StaticAnalyzer/Core/Environment.cpp | 234 + lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 392 ++ lib/StaticAnalyzer/Core/FlatStore.cpp | 204 + lib/StaticAnalyzer/Core/GRState.cpp | 606 +++ lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | 581 +++ lib/StaticAnalyzer/Core/Makefile | 17 + lib/StaticAnalyzer/Core/MemRegion.cpp | 988 +++++ lib/StaticAnalyzer/Core/ObjCMessage.cpp | 99 + lib/StaticAnalyzer/Core/PathDiagnostic.cpp | 280 ++ lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | 472 ++ lib/StaticAnalyzer/Core/RangeConstraintManager.cpp | 441 ++ lib/StaticAnalyzer/Core/RegionStore.cpp | 1813 ++++++++ lib/StaticAnalyzer/Core/SValBuilder.cpp | 310 ++ lib/StaticAnalyzer/Core/SVals.cpp | 378 ++ .../Core/SimpleConstraintManager.cpp | 303 ++ lib/StaticAnalyzer/Core/SimpleConstraintManager.h | 93 + lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | 917 ++++ lib/StaticAnalyzer/Core/Store.cpp | 338 ++ lib/StaticAnalyzer/Core/SymbolManager.cpp | 345 ++ lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp | 70 + lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp | 544 +++ lib/StaticAnalyzer/Frontend/AnalysisConsumer.h | 41 + lib/StaticAnalyzer/Frontend/CMakeLists.txt | 20 + .../Frontend/CheckerRegistration.cpp | 50 + lib/StaticAnalyzer/Frontend/FrontendActions.cpp | 22 + lib/StaticAnalyzer/Frontend/Makefile | 19 + lib/StaticAnalyzer/Makefile | 18 + lib/StaticAnalyzer/README.txt | 139 + runtime/CMakeLists.txt | 12 + runtime/Makefile | 16 +- runtime/libcxx/Makefile | 63 + test/ASTMerge/Inputs/category1.m | 23 + test/ASTMerge/Inputs/category2.m | 22 + test/ASTMerge/Inputs/class-template1.cpp | 34 + test/ASTMerge/Inputs/class-template2.cpp | 35 + test/ASTMerge/Inputs/class1.cpp | 7 + test/ASTMerge/Inputs/class2.cpp | 1 + test/ASTMerge/Inputs/interface1.m | 22 + test/ASTMerge/Inputs/interface2.m | 20 + test/ASTMerge/Inputs/property1.m | 19 + test/ASTMerge/Inputs/property2.m | 20 + test/ASTMerge/category.m | 4 +- test/ASTMerge/class-template.cpp | 24 + test/ASTMerge/interface.m | 5 +- test/ASTMerge/property.m | 6 +- test/Analysis/CFNumber.c | 8 +- test/Analysis/MissingDealloc.m | 2 +- test/Analysis/NSString.m | 16 +- test/Analysis/NSWindow.m | 8 +- test/Analysis/ObjCRetSigs.m | 2 +- test/Analysis/PR2978.m | 2 +- test/Analysis/additive-folding.c | 8 +- test/Analysis/analyzer-stats.c | 14 + test/Analysis/array-struct-region.c | 4 +- test/Analysis/array-struct.c | 8 +- test/Analysis/auto-obj-dtors-cfg-output.cpp | 835 ++++ test/Analysis/base-init.cpp | 30 + test/Analysis/blocks.m | 4 +- test/Analysis/bstring.c | 8 +- test/Analysis/chroot.c | 24 + test/Analysis/complex.c | 8 +- test/Analysis/conditional-op-missing-lhs.c | 2 +- test/Analysis/constant-folding.c | 2 +- test/Analysis/cxx-crashes.cpp | 45 + test/Analysis/dead-stores.c | 68 +- test/Analysis/dead-stores.cpp | 28 +- test/Analysis/dead-stores.m | 37 +- test/Analysis/derived-to-base.cpp | 15 + test/Analysis/dtor.cpp | 13 + test/Analysis/dtors-in-dtor-cfg-output.cpp | 60 + test/Analysis/exercise-ps.c | 2 +- test/Analysis/fields.c | 10 + .../Analysis/idempotent-operations-limited-loops.c | 21 + test/Analysis/idempotent-operations.c | 49 +- test/Analysis/idempotent-operations.cpp | 2 +- test/Analysis/idempotent-operations.m | 42 + test/Analysis/initializer.cpp | 14 + test/Analysis/initializers-cfg-output.cpp | 94 + test/Analysis/inline.c | 16 +- test/Analysis/lvalue.cpp | 6 + test/Analysis/malloc.c | 2 +- test/Analysis/method-call.cpp | 25 +- test/Analysis/misc-ps-64.m | 2 +- test/Analysis/misc-ps-region-store.cpp | 81 + test/Analysis/misc-ps-region-store.m | 113 +- test/Analysis/misc-ps.m | 191 +- ...iver-undefined-larger-than-voidptr-ret-region.m | 38 + ...il-receiver-undefined-larger-than-voidptr-ret.m | 32 +- test/Analysis/null-deref-ps.c | 18 +- test/Analysis/operator-calls.cpp | 16 + test/Analysis/out-of-bounds.c | 148 + test/Analysis/outofbound.c | 2 +- test/Analysis/plist-output-alternate.m | 1014 +++++ test/Analysis/plist-output.m | 1 + test/Analysis/properties.m | 145 + test/Analysis/ptr-arith.c | 4 +- test/Analysis/rdar-6442306-1.m | 2 +- test/Analysis/rdar-6540084.m | 2 +- test/Analysis/refcnt_naming.m | 29 +- test/Analysis/reference.cpp | 3 +- test/Analysis/retain-release-gc-only.m | 4 +- test/Analysis/retain-release-region-store.m | 2 +- test/Analysis/retain-release.m | 106 +- test/Analysis/security-syntax-checks-no-emit.c | 2 +- test/Analysis/security-syntax-checks.m | 2 +- test/Analysis/self-init.m | 165 + test/Analysis/sizeofpointer.c | 2 +- test/Analysis/stack-addr-ps.c | 4 +- test/Analysis/stack-addr-ps.cpp | 86 + test/Analysis/stackaddrleak.c | 2 +- test/Analysis/stream.c | 8 +- test/Analysis/string.c | 8 +- test/Analysis/temp-obj-dtors-cfg-output.cpp | 591 +++ test/Analysis/uninit-msg-expr.m | 4 +- test/Analysis/uninit-ps-rdar6145427.m | 2 +- test/Analysis/uninit-vals-ps-region.m | 2 +- test/Analysis/uninit-vals-ps.c | 2 +- test/Analysis/uninit-vals.c | 2 +- test/Analysis/unix-fns.c | 21 +- test/Analysis/unreachable-code-path.c | 26 +- test/Analysis/unused-ivars.m | 14 +- test/CMakeLists.txt | 70 +- .../basic/basic.lookup/basic.lookup.argdep/p4.cpp | 2 +- .../basic/basic.scope/basic.scope.hiding/p2.cpp | 24 + .../CXX/basic/basic.start/basic.start.main/p2h.cpp | 5 + test/CXX/class.access/class.friend/p1.cpp | 41 +- test/CXX/class.access/class.friend/p11.cpp | 19 + test/CXX/class.access/p4.cpp | 62 +- test/CXX/class.access/p6.cpp | 29 + test/CXX/class.derived/class.abstract/p4.cpp | 4 +- test/CXX/class.derived/class.abstract/p5.cpp | 10 +- test/CXX/class.derived/class.member.lookup/p9.cpp | 28 + test/CXX/class.derived/class.virtual/p3-0x.cpp | 53 + test/CXX/class.derived/p8-0x.cpp | 22 + test/CXX/class/class.friend/p1.cpp | 3 +- test/CXX/class/class.mem/p1.cpp | 27 + test/CXX/class/class.mem/p13.cpp | 40 + test/CXX/class/class.mem/p14.cpp | 19 + test/CXX/class/class.mem/p1b.cpp | 46 + test/CXX/class/class.mem/p8-0x-pedantic.cpp | 14 + test/CXX/class/class.mem/p8-0x.cpp | 55 + test/CXX/class/class.nest/p1-cxx0x.cpp | 14 + test/CXX/class/class.nest/p1.cpp | 6 +- test/CXX/class/class.union/p1.cpp | 8 + test/CXX/class/p1-0x.cpp | 10 + test/CXX/class/p2-0x.cpp | 28 + .../namespace.def/namespace.memdef/p3.cpp | 27 +- .../dcl.dcl/basic.namespace/namespace.def/p2.cpp | 24 + .../dcl.dcl/basic.namespace/namespace.udecl/p1.cpp | 1 + .../dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp | 31 + .../dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp | 35 + .../dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp | 73 +- .../dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp | 86 + .../dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7.cpp | 23 + test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-0x.cpp | 164 + .../dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp | 2 +- .../dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp | 24 +- test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp | 20 +- test/CXX/dcl.decl/dcl.init/p6.cpp | 4 +- .../dcl.decl/dcl.meaning/dcl.array/p1-cxx0x.cpp | 1 + test/CXX/dcl.decl/dcl.meaning/dcl.array/p1.cpp | 14 +- test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp | 48 + test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp | 31 + test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp | 5 + test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6-0x.cpp | 28 + test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp | 14 + test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp | 10 + test/CXX/dcl.decl/dcl.meaning/dcl.ref/p6-0x.cpp | 26 + test/CXX/dcl.decl/p4-0x.cpp | 8 + test/CXX/except/except.handle/p16.cpp | 2 +- test/CXX/except/except.spec/p14-ir.cpp | 14 +- test/CXX/expr/expr.cast/p4-0x.cpp | 11 + test/CXX/expr/expr.cast/p4.cpp | 23 + test/CXX/expr/expr.mptr.oper/p5.cpp | 61 + test/CXX/expr/expr.mptr.oper/p6-0x.cpp | 34 + test/CXX/expr/expr.post/expr.const.cast/p1-0x.cpp | 17 + .../CXX/expr/expr.post/expr.dynamic.cast/p3-0x.cpp | 14 + .../expr/expr.post/expr.reinterpret.cast/p1-0x.cpp | 16 + test/CXX/expr/expr.post/expr.static.cast/p3-0x.cpp | 24 + test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp | 29 + test/CXX/expr/expr.unary/expr.delete/p5.cpp | 22 +- test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp | 23 + test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp | 38 + .../CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp | 26 + .../expr/expr.unary/expr.unary.noexcept/sema.cpp | 172 + test/CXX/expr/expr.unary/expr.unary.noexcept/ser.h | 8 + test/CXX/expr/expr.unary/expr.unary.op/p4.cpp | 6 +- test/CXX/expr/expr.unary/expr.unary.op/p6.cpp | 36 + test/CXX/over/over.built/p1.cpp | 16 + test/CXX/over/over.built/p25.cpp | 15 + test/CXX/over/over.load/p2-0x.cpp | 24 + .../over.match.best/over.ics.rank/p3-0x.cpp | 59 + .../CXX/over/over.match/over.match.funcs/p4-0x.cpp | 70 + .../over.over/p2-resolve-single-template-id.cpp | 95 + test/CXX/over/over.over/p2.cpp | 5 +- test/CXX/over/over.over/p4.cpp | 7 +- test/CXX/special/class.copy/p33-0x.cpp | 25 + test/CXX/special/class.copy/p9.cpp | 24 +- test/CXX/special/class.ctor/p4-0x.cpp | 7 + test/CXX/special/class.dtor/p2-0x.cpp | 10 + test/CXX/special/class.inhctor/elsewhere.cpp | 31 + test/CXX/special/class.inhctor/p3.cpp | 30 + test/CXX/special/class.inhctor/p7.cpp | 18 + test/CXX/stmt.stmt/stmt.label/p1.cpp | 25 + test/CXX/stmt.stmt/stmt.select/p3.cpp | 2 +- test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp | 16 +- test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp | 40 + test/CXX/temp/temp.arg/temp.arg.type/p2.cpp | 42 + test/CXX/temp/temp.decls/temp.class.spec/p6.cpp | 21 + test/CXX/temp/temp.decls/temp.class.spec/p8-0x.cpp | 8 + test/CXX/temp/temp.decls/temp.class.spec/p9-0x.cpp | 13 + test/CXX/temp/temp.decls/temp.class.spec/p9.cpp | 26 + .../temp.decls/temp.fct/temp.func.order/p3-0x.cpp | 17 + .../temp.decls/temp.fct/temp.func.order/p3.cpp | 16 + test/CXX/temp/temp.decls/temp.friend/p1.cpp | 39 + test/CXX/temp/temp.decls/temp.friend/p5.cpp | 106 +- test/CXX/temp/temp.decls/temp.friend/p8.cpp | 6 + test/CXX/temp/temp.decls/temp.mem/p3.cpp | 6 + test/CXX/temp/temp.decls/temp.mem/p5.cpp | 6 +- .../temp/temp.decls/temp.variadic/deduction.cpp | 50 + .../temp/temp.decls/temp.variadic/example-bind.cpp | 352 ++ .../temp.decls/temp.variadic/example-function.cpp | 86 + .../temp.decls/temp.variadic/example-tuple.cpp | 260 ++ .../temp/temp.decls/temp.variadic/ext-blocks.cpp | 39 + .../temp.variadic/injected-class-name.cpp | 75 + .../temp.decls/temp.variadic/metafunctions.cpp | 274 ++ .../temp.variadic/multi-level-substitution.cpp | 218 + test/CXX/temp/temp.decls/temp.variadic/p1.cpp | 9 + test/CXX/temp/temp.decls/temp.variadic/p2.cpp | 22 + test/CXX/temp/temp.decls/temp.variadic/p4.cpp | 135 + test/CXX/temp/temp.decls/temp.variadic/p5.cpp | 393 ++ .../temp.variadic/parameter-matching.cpp | 34 +- .../temp.decls/temp.variadic/partial-ordering.cpp | 61 + .../temp/temp.fct.spec/temp.arg.explicit/p3-0x.cpp | 27 + .../temp.arg.explicit/p3-nodeduct.cpp | 2 +- .../temp/temp.fct.spec/temp.arg.explicit/p9-0x.cpp | 68 + .../temp.deduct/temp.deduct.call/p1-0x.cpp | 88 + .../temp.deduct/temp.deduct.call/p3-0x.cpp | 46 + .../temp.deduct/temp.deduct.call/p3.cpp | 22 + .../temp.deduct/temp.deduct.partial/p11.cpp | 31 +- .../temp.deduct/temp.deduct.partial/p12.cpp | 27 + .../temp.deduct/temp.deduct.partial/p9-0x.cpp | 10 + .../temp.deduct/temp.deduct.type/p10-0x.cpp | 4 + .../temp.deduct/temp.deduct.type/p2-0x.cpp | 23 + .../temp.deduct/temp.deduct.type/p21.cpp | 31 + .../temp.deduct/temp.deduct.type/p22.cpp | 14 + .../temp.deduct/temp.deduct.type/p5-0x.cpp | 22 + .../temp.deduct/temp.deduct.type/p8-0x.cpp | 47 + .../temp.deduct/temp.deduct.type/p9-0x.cpp | 55 + test/CXX/temp/temp.param/p1.cpp | 12 +- test/CXX/temp/temp.param/p11-0x.cpp | 61 + test/CXX/temp/temp.param/p15-cxx0x.cpp | 2 + test/CXX/temp/temp.param/p9-0x.cpp | 52 + test/CXX/temp/temp.param/p9.cpp | 4 +- test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp | 239 ++ test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp | 14 +- test/CXX/temp/temp.spec/temp.explicit/p12.cpp | 2 +- test/CodeCompletion/ordinary-name.c | 3 + test/CodeCompletion/ordinary-name.cpp | 2 +- test/CodeCompletion/stdin.c | 7 + test/CodeGen/2008-07-17-no-emit-on-error.c | 1 + test/CodeGen/2008-07-29-override-alias-decl.c | 2 +- test/CodeGen/2010-03-09-DbgInfo.c | 2 +- test/CodeGen/annotate.c | 2 + test/CodeGen/arm-vector-arguments.c | 30 + test/CodeGen/asm-errors.c | 2 +- test/CodeGen/asm-inout.c | 12 + test/CodeGen/asm-variable.c | 59 + test/CodeGen/assign.c | 6 +- test/CodeGen/atomic.c | 130 +- test/CodeGen/attr-naked.c | 9 + test/CodeGen/blocks-1.c | 28 +- test/CodeGen/blocks.c | 7 + test/CodeGen/blocksignature.c | 12 +- test/CodeGen/blockstret.c | 2 +- test/CodeGen/blockwithlocalstatic.c | 19 + test/CodeGen/bool_test.c | 5 + test/CodeGen/builtins-ppc-altivec.c | 1029 ++++- test/CodeGen/builtins-x86.c | 1 + test/CodeGen/char-literal.c | 35 + test/CodeGen/conditional-gnu-ext.c | 24 + test/CodeGen/const-init.c | 2 +- test/CodeGen/darwin-string-literals.c | 12 +- test/CodeGen/debug-info-crash.c | 9 + test/CodeGen/debug-info-line.c | 15 + test/CodeGen/debug-info-var-location.c | 21 + test/CodeGen/designated-initializers.c | 33 + test/CodeGen/enum.c | 3 + test/CodeGen/exceptions.c | 19 + test/CodeGen/exprs.c | 26 +- test/CodeGen/ext-vector-shuffle.c | 17 - test/CodeGen/frame-pointer-elim.c | 29 +- test/CodeGen/func-in-block.c | 2 +- test/CodeGen/illegal-UTF8.m | 4 +- test/CodeGen/imaginary.c | 4 + test/CodeGen/init.c | 69 + test/CodeGen/integer-overflow.c | 7 + test/CodeGen/lineno-dbginfo.c | 2 +- test/CodeGen/mangle.c | 6 +- test/CodeGen/may-alias.c | 21 + test/CodeGen/mcount.c | 4 + test/CodeGen/mms-bitfields.c | 22 + test/CodeGen/mmx-builtins.c | 452 ++ test/CodeGen/mmx-shift-with-immediate.c | 23 + test/CodeGen/ms-anonymous-struct.c | 99 + test/CodeGen/mult-alt-generic.c | 283 ++ test/CodeGen/mult-alt-x86.c | 374 ++ test/CodeGen/no-common.c | 17 +- test/CodeGen/packed-structure.c | 13 + test/CodeGen/palignr.c | 6 +- test/CodeGen/pascal-wchar-string.c | 12 +- test/CodeGen/pointer-arithmetic.c | 3 + test/CodeGen/pointer-signext.c | 32 + test/CodeGen/pragma-weak.c | 2 +- test/CodeGen/predefined-expr.c | 16 +- test/CodeGen/regparm-flag.c | 15 + test/CodeGen/regparm.c | 5 +- test/CodeGen/sizeof-vla.c | 2 +- test/CodeGen/statements.c | 2 +- test/CodeGen/string-literal-short-wstring.c | 43 + test/CodeGen/string-literal.c | 11 +- test/CodeGen/struct-init.c | 13 +- test/CodeGen/struct-passing.c | 20 +- test/CodeGen/switch.c | 17 + test/CodeGen/thread-specifier.c | 10 +- test/CodeGen/transparent-union.c | 25 + test/CodeGen/va_list_test.c | 6 + test/CodeGen/visibility.c | 77 +- test/CodeGen/vla.c | 65 +- test/CodeGen/volatile-1.c | 216 +- test/CodeGen/volatile-2.c | 23 + test/CodeGen/x86_32-arguments-darwin.c | 278 ++ test/CodeGen/x86_32-arguments-linux.c | 51 + test/CodeGen/x86_32-arguments-realign.c | 11 + test/CodeGen/x86_32-arguments.c | 230 - test/CodeGenCXX/PR5050-constructor-conversion.cpp | 2 +- test/CodeGenCXX/PR5863-unreachable-block.cpp | 2 +- test/CodeGenCXX/anonymous-namespaces.cpp | 2 +- .../anonymous-union-member-initializer.cpp | 35 +- test/CodeGenCXX/apple-kext-indirect-call-2.C | 77 + test/CodeGenCXX/apple-kext-indirect-call.C | 14 + .../apple-kext-indirect-virtual-dtor-call.cpp | 19 + test/CodeGenCXX/apple-kext-linkage.C | 25 + test/CodeGenCXX/apple-kext-no-staticinit-section.C | 20 + test/CodeGenCXX/arm.cpp | 79 +- test/CodeGenCXX/array-construction.cpp | 2 +- test/CodeGenCXX/array-operator-delete-call.cpp | 2 +- test/CodeGenCXX/array-value-initialize.cpp | 2 +- test/CodeGenCXX/asm.cpp | 14 + test/CodeGenCXX/attr-used.cpp | 9 + test/CodeGenCXX/attr.cpp | 2 +- test/CodeGenCXX/block-byref-cxx-objc.cpp | 25 + test/CodeGenCXX/blocks.cpp | 57 + test/CodeGenCXX/builtins.cpp | 9 + test/CodeGenCXX/c99-variable-length-array.cpp | 2 +- test/CodeGenCXX/call-arg-zero-temp.cpp | 2 +- test/CodeGenCXX/cast-conversion.cpp | 12 +- test/CodeGenCXX/class-layout.cpp | 24 +- test/CodeGenCXX/const-init.cpp | 12 + test/CodeGenCXX/constructor-attr.cpp | 12 + test/CodeGenCXX/constructor-conversion.cpp | 6 +- test/CodeGenCXX/constructor-convert.cpp | 2 +- test/CodeGenCXX/constructor-default-arg.cpp | 6 +- test/CodeGenCXX/constructor-direct-call.cpp | 60 + test/CodeGenCXX/constructor-for-array-members.cpp | 2 +- test/CodeGenCXX/constructor-init.cpp | 34 +- test/CodeGenCXX/constructors.cpp | 20 +- test/CodeGenCXX/convert-to-fptr.cpp | 4 +- test/CodeGenCXX/copy-constructor-elim-2.cpp | 24 +- test/CodeGenCXX/copy-constructor-synthesis-2.cpp | 2 +- test/CodeGenCXX/copy-constructor-synthesis.cpp | 4 +- test/CodeGenCXX/cxx-block-objects.cpp | 33 + test/CodeGenCXX/debug-info-ctor2.cpp | 15 + test/CodeGenCXX/debug-info-large-constant.cpp | 8 + test/CodeGenCXX/debug-info-member.cpp | 6 + test/CodeGenCXX/debug-info-method.cpp | 6 + test/CodeGenCXX/debug-info-namespace.cpp | 12 + test/CodeGenCXX/debug-info-template.cpp | 15 +- test/CodeGenCXX/decl-ref-init.cpp | 4 +- test/CodeGenCXX/default-arg-temps.cpp | 2 +- test/CodeGenCXX/default-arguments.cpp | 4 +- .../CodeGenCXX/default-constructor-for-members.cpp | 2 +- .../default-constructor-template-member.cpp | 2 +- test/CodeGenCXX/delete-two-arg.cpp | 70 +- test/CodeGenCXX/delete.cpp | 9 +- test/CodeGenCXX/derived-to-base-conv.cpp | 4 +- test/CodeGenCXX/derived-to-base.cpp | 11 + .../derived-to-virtual-base-class-calls-final.cpp | 16 + test/CodeGenCXX/destructors.cpp | 54 +- .../devirtualize-virtual-function-calls-final.cpp | 51 + test/CodeGenCXX/dyncast.cpp | 1 - test/CodeGenCXX/eh.cpp | 88 +- test/CodeGenCXX/empty-classes.cpp | 13 + test/CodeGenCXX/exceptions-no-rtti.cpp | 10 +- test/CodeGenCXX/exceptions.cpp | 303 +- test/CodeGenCXX/friend-redecl.cpp | 18 + test/CodeGenCXX/global-init.cpp | 17 + test/CodeGenCXX/gnu-conditional-scalar-ext.cpp | 62 + test/CodeGenCXX/goto.cpp | 43 + test/CodeGenCXX/implicit-copy-constructor.cpp | 2 +- test/CodeGenCXX/inline-functions.cpp | 32 + test/CodeGenCXX/internal-linkage.cpp | 4 +- test/CodeGenCXX/key-function-vtable.cpp | 13 +- test/CodeGenCXX/mangle-abi-examples.cpp | 27 + test/CodeGenCXX/mangle-local-class-vtables.cpp | 61 + test/CodeGenCXX/mangle-local-classes-nested.cpp | 81 + test/CodeGenCXX/mangle-ms.cpp | 8 +- test/CodeGenCXX/mangle-neon-vectors.cpp | 32 + test/CodeGenCXX/mangle-ref-qualifiers.cpp | 16 + test/CodeGenCXX/mangle-subst-std.cpp | 16 +- test/CodeGenCXX/mangle-template.cpp | 2 +- test/CodeGenCXX/mangle-unnamed.cpp | 21 + test/CodeGenCXX/mangle-variadic-templates.cpp | 67 + test/CodeGenCXX/mangle.cpp | 23 + test/CodeGenCXX/member-functions.cpp | 4 +- test/CodeGenCXX/member-init-assignment.cpp | 2 +- test/CodeGenCXX/member-pointer-type-convert.cpp | 1 + test/CodeGenCXX/member-templates.cpp | 4 +- test/CodeGenCXX/nrvo-noreturn.cc | 17 + test/CodeGenCXX/nrvo.cpp | 15 + test/CodeGenCXX/nullptr.cpp | 9 +- test/CodeGenCXX/pointers-to-data-members.cpp | 59 +- test/CodeGenCXX/pr9130.cpp | 14 + test/CodeGenCXX/pragma-pack.cpp | 14 + test/CodeGenCXX/pragma-visibility.cpp | 4 +- test/CodeGenCXX/predefined-expr.cpp | 106 +- test/CodeGenCXX/ptr-to-member-function.cpp | 4 +- test/CodeGenCXX/rtti-fundamental.cpp | 157 +- test/CodeGenCXX/rtti-linkage.cpp | 102 +- test/CodeGenCXX/rtti-visibility.cpp | 35 + test/CodeGenCXX/rvalue-references.cpp | 85 + .../specialized-static-data-mem-init.cpp | 29 + test/CodeGenCXX/static-data-member.cpp | 70 +- test/CodeGenCXX/static-init.cpp | 2 +- test/CodeGenCXX/stmtexpr.cpp | 75 + test/CodeGenCXX/template-anonymous-types.cpp | 4 +- .../template-dependent-bind-temporary.cpp | 24 + .../template-inner-struct-visibility-hidden.cpp | 24 + test/CodeGenCXX/template-instantiation.cpp | 51 +- test/CodeGenCXX/template-linkage.cpp | 2 +- test/CodeGenCXX/temporaries.cpp | 185 + test/CodeGenCXX/threadsafe-statics-exceptions.cpp | 4 +- test/CodeGenCXX/throw-expressions.cpp | 7 +- test/CodeGenCXX/thunks-available-externally.cpp | 88 + test/CodeGenCXX/thunks.cpp | 63 +- test/CodeGenCXX/value-init.cpp | 15 +- test/CodeGenCXX/variadic-templates.cpp | 12 + test/CodeGenCXX/virt-dtor-gen.cpp | 2 +- test/CodeGenCXX/virt-dtor-key.cpp | 2 +- test/CodeGenCXX/virt-template-vtable.cpp | 8 +- test/CodeGenCXX/virtual-base-destructor-call.cpp | 12 +- test/CodeGenCXX/virtual-bases.cpp | 12 +- test/CodeGenCXX/virtual-destructor-calls.cpp | 6 +- test/CodeGenCXX/visibility-inlines-hidden.cpp | 46 +- test/CodeGenCXX/visibility.cpp | 331 +- test/CodeGenCXX/volatile-1.cpp | 352 ++ test/CodeGenCXX/volatile.cpp | 2 - test/CodeGenCXX/vtable-available-externally.cpp | 171 + test/CodeGenCXX/vtable-debug-info.cpp | 318 ++ test/CodeGenCXX/vtable-key-function.cpp | 2 +- test/CodeGenCXX/vtable-layout.cpp | 2 +- test/CodeGenCXX/vtable-linkage.cpp | 95 +- test/CodeGenCXX/vtable-pointer-initialization.cpp | 10 +- test/CodeGenCXX/vtt-layout.cpp | 8 +- test/CodeGenCXX/warn-padded-packed.cpp | 76 + test/CodeGenObjC/arm-atomic-scalar-setter-getter.m | 13 + test/CodeGenObjC/bitfield-gnu.m | 5 + test/CodeGenObjC/block-6.m | 12 + test/CodeGenObjC/block-var-layout.m | 101 +- test/CodeGenObjC/blocks-1.m | 8 +- test/CodeGenObjC/blocks-2.m | 37 +- test/CodeGenObjC/blocks.m | 56 +- test/CodeGenObjC/constant-string-class.m | 35 + test/CodeGenObjC/debug-info-default-synth-ivar.m | 35 + test/CodeGenObjC/debug-info-fnname.m | 15 + test/CodeGenObjC/debug-info-foreach.m | 13 + test/CodeGenObjC/debug-info-getter-name.m | 50 + test/CodeGenObjC/debug-info-selector.m | 15 + test/CodeGenObjC/debug-info-self.m | 16 + test/CodeGenObjC/debug-info-static-var.m | 23 + test/CodeGenObjC/default-property-synthesis.m | 2 +- test/CodeGenObjC/encode-test-1.m | 36 - test/CodeGenObjC/encode-test.m | 61 +- test/CodeGenObjC/exceptions-nonfragile.m | 17 + test/CodeGenObjC/exceptions.m | 62 +- test/CodeGenObjC/implicit-objc_msgSend.m | 2 +- test/CodeGenObjC/interface-layout-64.m | 4 +- test/CodeGenObjC/ivar-layout-64-bitfields.m | 5 + test/CodeGenObjC/ivar-layout-array0-struct.m | 22 + test/CodeGenObjC/ivar-layout-nonfragile-abi2.m | 4 +- test/CodeGenObjC/ivars.m | 15 + test/CodeGenObjC/local-static-block.m | 57 + test/CodeGenObjC/ns-constant-strings.m | 6 + test/CodeGenObjC/objc-read-weak-byref.m | 4 +- test/CodeGenObjC/objc2-nonfragile-abi-impl.m | 2 +- test/CodeGenObjC/objc2-weak-block-call.m | 13 +- test/CodeGenObjC/predefined-expr.m | 20 +- test/CodeGenObjC/property-ref-cast-to-void.m | 18 + test/CodeGenObjC/property-type-mismatch.m | 17 + test/CodeGenObjC/property.m | 55 +- test/CodeGenObjCXX/block-var-layout.mm | 157 + test/CodeGenObjCXX/blocks.mm | 30 + test/CodeGenObjCXX/encode.mm | 12 + test/CodeGenObjCXX/implicit-copy-constructor.mm | 2 +- .../CodeGenObjCXX/property-derived-to-base-conv.mm | 10 +- test/CodeGenObjCXX/property-dot-copy.mm | 68 + test/CodeGenObjCXX/property-dot-reference.mm | 62 + .../property-object-conditional-exp.mm | 38 + test/CodeGenObjCXX/property-objects.mm | 19 + test/CodeGenObjCXX/refence-assign-write-barrier.mm | 20 + test/CodeGenObjCXX/rtti.mm | 14 +- test/CodeGenObjCXX/write-barrier-global-assign.mm | 29 + test/CodeGenOpenCL/ext-vector-shuffle.cl | 17 + test/CodeGenOpenCL/kernel-metadata.cl | 10 + test/CodeGenOpenCL/single-precision-constant.cl | 7 + test/Coverage/c-language-features.inc | 8 + test/Coverage/cxx-language-features.inc | 6 + test/Coverage/html-diagnostics.c | 5 +- test/Coverage/targets.c | 1 - test/Driver/apple-kext-mkernel.c | 6 + test/Driver/clang_f_opts.c | 6 +- test/Driver/darwin-ld.c | 22 +- test/Driver/darwin-xarch.c | 12 +- test/Driver/dragonfly.c | 1 - test/Driver/emit-llvm.c | 3 - test/Driver/freebsd.c | 6 +- test/Driver/m_and_mm.c | 3 + test/Driver/openbsd.c | 1 - test/Driver/sysroot-flags.c | 28 + test/FixIt/fixit-errors.c | 2 +- test/FixIt/fixit-objc-message.m | 38 + test/FixIt/fixit-objc.m | 32 +- test/FixIt/fixit-unrecoverable.cpp | 3 +- test/FixIt/fixit.c | 7 + test/FixIt/fixit.cpp | 27 + test/FixIt/typo.cpp | 1 + test/FixIt/typo.m | 25 +- test/Headers/arm-neon-header.c | 5 + test/Headers/stdbool.cpp | 14 + test/Headers/x86-intrinsics-headers.c | 10 +- test/Index/Inputs/a.h | 4 + test/Index/Inputs/b.h | 1 + test/Index/Inputs/get-cursor-includes-1.h | 6 + test/Index/Inputs/get-cursor-includes-2.h | 2 + test/Index/TestClassDecl.m | 6 +- test/Index/TestClassForwardDecl.m | 6 +- test/Index/annotate-tokens-cxx0x.cpp | 8 + test/Index/annotate-tokens-include.c | 5 +- test/Index/annotate-tokens-pp.c | 100 +- test/Index/annotate-tokens.c | 23 +- test/Index/annotate-tokens.cpp | 14 +- test/Index/annotate-tokens.m | 235 +- test/Index/blocks.c | 41 +- test/Index/c-index-api-loadTU-test.m | 5 - test/Index/c-index-getCursor-pp.c | 27 +- test/Index/c-index-getCursor-test.m | 10 +- test/Index/c-index-redecls.c | 107 + test/Index/cindex-on-invalid-usrs.m | 7 + test/Index/code-complete-errors.c | 16 - test/Index/code-completion.cpp | 20 +- test/Index/complete-at-directives.m | 14 +- test/Index/complete-at-exprstmt.m | 16 +- test/Index/complete-blocks.m | 37 +- test/Index/complete-ctor-inits.cpp | 26 +- test/Index/complete-declarators.cpp | 32 +- test/Index/complete-declarators.m | 55 +- test/Index/complete-driver-errors.c | 24 + test/Index/complete-enums.c | 23 +- test/Index/complete-exprs.c | 42 +- test/Index/complete-exprs.cpp | 53 + test/Index/complete-exprs.m | 29 + test/Index/complete-hiding.c | 19 +- test/Index/complete-kvc.m | 87 + test/Index/complete-macros.c | 4 +- test/Index/complete-member-access.m | 4 +- test/Index/complete-memfunc-cvquals.cpp | 40 +- test/Index/complete-method-decls.m | 163 +- test/Index/complete-objc-message-id.m | 30 +- test/Index/complete-objc-message.m | 113 +- test/Index/complete-preprocessor.m | 96 +- test/Index/complete-properties.m | 21 +- test/Index/complete-protocols.m | 4 +- test/Index/complete-recovery.m | 16 +- test/Index/complete-super.cpp | 10 +- test/Index/complete-super.m | 44 +- test/Index/complete-synthesized.m | 56 + test/Index/complete-templates.cpp | 2 +- test/Index/complete-type-factors.m | 146 +- test/Index/crash-recovery-code-complete.c | 3 +- test/Index/crash-recovery-reparse.c | 3 +- test/Index/fix-its.c | 18 + test/Index/get-cursor-includes.c | 7 + test/Index/get-cursor.cpp | 63 + test/Index/index-templates.cpp | 76 +- test/Index/load-decls.c | 1 - test/Index/load-exprs.c | 32 +- test/Index/load-namespaces.cpp | 2 +- test/Index/load-stmts.cpp | 99 +- test/Index/local-symbols.m | 2 +- test/Index/nested-binaryoperators.cpp | 1982 +++++++++ test/Index/overrides.cpp | 20 + test/Index/overrides.m | 35 + test/Index/preamble-reparse-chained.c | 10 + test/Index/preamble.c | 6 +- test/Index/print-display-names.cpp | 20 + test/Index/print-typekind.c | 10 +- test/Index/properties-class-extensions.m | 95 +- test/Index/recursive-cxx-member-calls.cpp | 2246 ++++++++++ test/Index/recursive-member-access.c | 532 +++ test/Index/remap-complete.c | 6 +- test/Index/remap-cursor-at.c | 1 - test/Index/remap-load.c | 4 - test/Index/retain-target-options.c | 8 + test/Index/usrs-cxx0x.cpp | 8 + test/Index/usrs.m | 154 +- test/Index/warning-flags.c | 16 + test/Lexer/11-27-2007-FloatLiterals.c | 2 + test/Lexer/c90.c | 5 + test/Lexer/char-escapes.c | 1 + test/Lexer/clang-keywords.cpp | 3 + test/Lexer/constants.c | 8 +- test/Lexer/cxx0x_keyword_as_cxx98.cpp | 3 +- test/Lexer/digraph.c | 2 +- test/Lexer/has_attribute.cpp | 12 + test/Lexer/has_feature_cxx0x.cpp | 58 +- test/Lexer/has_feature_type_traits.cpp | 91 + test/Lexer/ms-extensions.c | 1 + test/Lexer/pragma-message.c | 14 + test/Lexer/pragma-operators.cpp | 20 + test/Lexer/preamble.c | 1 - test/Lexer/rdar-8914293.c | 7 + test/Lexer/rdr-6096838-2.c | 2 +- test/Lexer/rdr-6096838.c | 4 +- test/Lexer/wchar.c | 12 + test/Makefile | 18 +- test/Misc/Inputs/working-directory.h | 1 + test/Misc/diag-aka-types.cpp | 8 +- test/Misc/predefines.c | 2 +- test/Misc/working-directory.c | 5 + test/PCH/Inputs/chain-cxx1.h | 19 - test/PCH/Inputs/chain-cxx2.h | 32 - test/PCH/Inputs/chain-macro-override1.h | 1 + test/PCH/Inputs/chain-macro-override2.h | 1 + test/PCH/Inputs/chain-remap-types1.h | 10 + test/PCH/Inputs/chain-remap-types2.h | 8 + test/PCH/Inputs/chain-selectors1.h | 4 + test/PCH/Inputs/chain-selectors2.h | 4 + test/PCH/Inputs/namespaces.h | 4 + test/PCH/Inputs/typo.h | 6 + test/PCH/Inputs/va_arg.h | 2 + test/PCH/attrs-PR8406.c | 23 + test/PCH/attrs.c | 15 +- test/PCH/attrs.h | 7 - test/PCH/chain-cxx.cpp | 80 +- test/PCH/chain-macro-override.c | 9 +- test/PCH/chain-macro.c | 4 +- test/PCH/chain-remap-types.m | 12 + test/PCH/chain-selectors.m | 16 + test/PCH/check-deserializations.cpp | 20 + test/PCH/cmdline-include.c | 6 + test/PCH/cmdline-include1.h | 1 + test/PCH/cmdline-include2.h | 1 + test/PCH/cuda-kernel-call.cu | 25 + test/PCH/cxx-templates.cpp | 22 +- test/PCH/cxx-templates.h | 58 + test/PCH/cxx-variadic-templates.cpp | 11 + test/PCH/cxx-variadic-templates.h | 18 + test/PCH/cxx_exprs.cpp | 6 +- test/PCH/headersearch.cpp | 44 + test/PCH/missing-file.cpp | 31 + test/PCH/namespaces.cpp | 3 + test/PCH/opencl-extensions.cl | 17 + test/PCH/pragma-diag-section.cpp | 26 + test/PCH/pragma-diag.c | 19 + test/PCH/rdar8852495.c | 25 + test/PCH/reinclude.cpp | 2 + test/PCH/reinclude1.h | 3 + test/PCH/reloc.c | 2 +- test/PCH/types.c | 3 +- test/PCH/typo.m | 6 + test/PCH/va_arg.cpp | 16 + test/Parser/MicrosoftExtensions.c | 28 +- test/Parser/MicrosoftExtensions.cpp | 113 + test/Parser/altivec.c | 10 + test/Parser/asm-constraints-pr7869.c | 2 +- test/Parser/cuda-kernel-call.cu | 9 + test/Parser/cxx-altivec.cpp | 43 +- test/Parser/cxx-class.cpp | 8 +- test/Parser/cxx-decl.cpp | 14 + test/Parser/cxx-in-c.c | 5 + test/Parser/cxx-reference.cpp | 2 +- test/Parser/cxx-stmt.cpp | 2 +- test/Parser/cxx-template-argument.cpp | 3 + test/Parser/cxx-template-decl.cpp | 4 +- test/Parser/cxx-throw.cpp | 2 +- test/Parser/cxx0x-attributes.cpp | 3 +- test/Parser/cxx0x-in-cxx98.cpp | 10 + test/Parser/cxx0x-override-control-keywords.cpp | 28 + test/Parser/encode.m | 4 +- test/Parser/expressions.c | 3 +- test/Parser/for.cpp | 20 + test/Parser/goto-ident.c | 6 - test/Parser/goto.c | 30 + test/Parser/missing-end-2.m | 19 + test/Parser/missing-end-3.m | 10 + test/Parser/objc-forcollection-neg-2.m | 2 +- test/Parser/objc-forcollection-neg.m | 1 + test/Parser/objc-foreach-syntax.m | 3 +- test/Parser/objc-interfaces.m | 2 +- test/Parser/objc-property-syntax.m | 7 +- test/Parser/objc-quirks.m | 8 +- test/Parser/opencl-kernel.cl | 9 + test/Parser/opencl-pragma.cl | 12 + test/Parser/opencl-storage-class.cl | 9 + test/Parser/placeholder-recovery.m | 12 + test/Parser/recovery.c | 6 + test/Parser/switch-recovery.cpp | 24 +- test/Preprocessor/assembler-with-cpp.c | 5 + test/Preprocessor/clang_headers.c | 2 +- test/Preprocessor/has_include.c | 32 +- test/Preprocessor/header_lookup1.c | 4 +- test/Preprocessor/include-directive2.c | 2 +- test/Preprocessor/init.c | 304 +- test/Preprocessor/objc-pp.m | 2 +- test/Preprocessor/pragma-pushpop-macro.c | 8 + test/Preprocessor/pragma_diagnostic_sections.cpp | 80 + test/Preprocessor/pragma_unknown.c | 2 +- test/Preprocessor/predefined-macros.c | 12 + test/Preprocessor/print_line_empty_file.c | 12 + test/Preprocessor/pushable-diagnostics.c | 6 +- test/Preprocessor/stdint.c | 100 - test/Preprocessor/warn-macro-unused.c | 5 + test/Rewriter/blockstruct.m | 17 + test/Rewriter/dllimport-typedef.c | 2 +- test/Rewriter/finally.m | 2 +- test/Rewriter/properties.m | 7 +- test/Rewriter/property-dot-syntax.mm | 46 + test/Rewriter/rewrite-block-pointer.mm | 30 + test/Rewriter/rewrite-captured-nested-bvar.c | 35 + test/Rewriter/rewrite-nested-blocks-2.mm | 18 + test/Rewriter/rewrite-nested-property-in-blocks.mm | 52 + test/Rewriter/rewrite-property-set-cfstring.mm | 21 + test/Rewriter/rewrite-protocol-property.mm | 22 + test/Rewriter/rewrite-protocol-qualified.mm | 18 + test/Rewriter/rewrite-user-defined-accessors.mm | 30 + test/Sema/Inputs/conversion.h | 1 + test/Sema/MicrosoftExtensions.c | 69 + test/Sema/address_spaces.c | 8 +- test/Sema/altivec-init.c | 2 +- test/Sema/arm-neon-types.c | 13 + test/Sema/array-constraint.c | 4 +- test/Sema/asm.c | 28 +- test/Sema/attr-alias.c | 8 + test/Sema/attr-aligned.c | 23 +- test/Sema/attr-deprecated-message.c | 31 + test/Sema/attr-deprecated.c | 13 + test/Sema/attr-malloc.c | 5 +- test/Sema/attr-naked.c | 8 + test/Sema/attr-nodebug.c | 2 +- test/Sema/attr-noinline.c | 2 +- test/Sema/attr-unavailable-message.c | 18 + test/Sema/attr-unused.c | 22 +- test/Sema/attr-used.c | 2 +- test/Sema/attr-weak.c | 7 +- test/Sema/bitfield-promote-int-16bit.c | 25 - test/Sema/bitfield.c | 4 + test/Sema/block-args.c | 6 + test/Sema/block-call.c | 2 +- test/Sema/block-labels.c | 14 +- test/Sema/block-return.c | 11 +- test/Sema/builtin_objc_msgSend.c | 12 + test/Sema/builtins.c | 17 +- test/Sema/cast-to-union.c | 3 +- test/Sema/cast.c | 141 + test/Sema/compare.c | 24 + test/Sema/complex-int.c | 12 + test/Sema/compound-literal.c | 5 +- test/Sema/conditional-expr.c | 13 + test/Sema/const-eval.c | 8 +- test/Sema/const-ptr-int-ptr-cast.c | 2 +- test/Sema/constant-builtins-2.c | 4 + test/Sema/constant-conversion.c | 57 + test/Sema/constructor-attribute.c | 4 +- test/Sema/conversion.c | 45 +- test/Sema/designated-initializers.c | 28 + test/Sema/dllimport-dllexport.c | 8 +- test/Sema/enum.c | 15 + test/Sema/exprs.c | 16 + test/Sema/flexible-array-init.c | 26 +- test/Sema/format-strings.c | 41 +- test/Sema/i-c-e.c | 3 +- test/Sema/if-empty-body.c | 16 - test/Sema/implicit-builtin-decl.c | 7 +- test/Sema/init.c | 3 +- test/Sema/knr-def-call.c | 16 +- test/Sema/neon-vector-types.c | 33 + test/Sema/opencl-init.c | 15 - test/Sema/parentheses.c | 11 + test/Sema/pointer-addition.c | 1 + test/Sema/pragma-unused.c | 40 +- test/Sema/predef.c | 2 +- test/Sema/private-extern.c | 16 +- test/Sema/promote-int-16bit.c | 6 - test/Sema/rdr6094103-unordered-compare-promote.c | 2 +- test/Sema/redefinition.c | 4 + test/Sema/return.c | 15 +- test/Sema/scope-check.c | 35 +- test/Sema/self-comparison.c | 11 + test/Sema/sentinel-attribute.c | 2 +- test/Sema/shift.c | 2 +- test/Sema/short-enums.c | 5 + test/Sema/statements.c | 51 +- test/Sema/stdcall-fastcall.c | 12 +- test/Sema/struct-packed-align.c | 15 + test/Sema/switch.c | 2 +- test/Sema/transparent-union.c | 26 + test/Sema/typedef-retain.c | 12 - test/Sema/typeof-use-deprecated.c | 26 + test/Sema/uninit-variables.c | 262 ++ test/Sema/unused-expr.c | 5 +- test/Sema/varargs-x86-64.c | 2 +- test/Sema/vector-assign.c | 2 +- test/Sema/vector-init.c | 9 + test/Sema/warn-shadow.c | 11 + test/Sema/warn-unreachable.c | 24 +- test/Sema/warn-unused-function.c | 7 + test/Sema/warn-unused-label.c | 11 + test/Sema/warn-unused-value.c | 5 +- test/Sema/warn-write-strings.c | 2 +- test/Sema/x86-attr-force-align-arg-pointer.c | 2 +- test/Sema/x86-builtin-palignr.c | 14 +- test/SemaCUDA/config-type.cu | 3 + test/SemaCUDA/cuda.h | 19 + test/SemaCUDA/kernel-call.cu | 15 + test/SemaCUDA/qualifiers.cu | 8 + test/SemaCXX/MicrosoftExtensions.cpp | 69 +- test/SemaCXX/PR7944.cpp | 12 + test/SemaCXX/PR8012.cpp | 3 + test/SemaCXX/PR8755.cpp | 16 + test/SemaCXX/PR8884.cpp | 12 + test/SemaCXX/__null.cpp | 7 + test/SemaCXX/abstract.cpp | 26 +- .../addr-of-overloaded-function-casting.cpp | 57 + test/SemaCXX/addr-of-overloaded-function.cpp | 61 +- test/SemaCXX/address-of-temporary.cpp | 8 +- test/SemaCXX/alignof-sizeof-reference.cpp | 2 +- test/SemaCXX/altivec.cpp | 24 +- test/SemaCXX/ambig-user-defined-conversions.cpp | 10 +- test/SemaCXX/ambiguous-builtin-unary-operator.cpp | 4 +- test/SemaCXX/anonymous-union.cpp | 20 + test/SemaCXX/array-bounds.cpp | 93 + test/SemaCXX/arrow-operator.cpp | 13 + test/SemaCXX/attr-cxx0x.cpp | 24 +- test/SemaCXX/attr-deprecated.cpp | 43 + test/SemaCXX/attr-format.cpp | 29 +- test/SemaCXX/attr-nonnull.cpp | 29 + test/SemaCXX/attr-weak.cpp | 29 + test/SemaCXX/attr-weakref.cpp | 8 +- test/SemaCXX/block-call.cpp | 52 + test/SemaCXX/borland-extensions.cpp | 27 + test/SemaCXX/builtin-ptrtomember-ambig.cpp | 6 +- test/SemaCXX/builtin_objc_msgSend.cpp | 14 + test/SemaCXX/c99-variable-length-array.cpp | 7 + test/SemaCXX/c99.cpp | 8 +- test/SemaCXX/cast-conversion.cpp | 10 +- test/SemaCXX/class.cpp | 39 +- test/SemaCXX/compare.cpp | 6 + test/SemaCXX/composite-pointer-type.cpp | 4 +- test/SemaCXX/compound-literal.cpp | 14 + test/SemaCXX/condition.cpp | 9 + test/SemaCXX/conditional-expr.cpp | 25 +- test/SemaCXX/const-cast.cpp | 6 +- test/SemaCXX/constructor-initializer.cpp | 35 +- test/SemaCXX/constructor.cpp | 3 +- test/SemaCXX/conversion-function.cpp | 30 +- test/SemaCXX/conversion.cpp | 7 + test/SemaCXX/copy-assignment.cpp | 16 +- test/SemaCXX/copy-initialization.cpp | 10 +- test/SemaCXX/crash-8124080.cpp | 21 - test/SemaCXX/crash-PR7625.cpp | 6 - test/SemaCXX/crashes.cpp | 97 + test/SemaCXX/cstyle-cast.cpp | 2 +- test/SemaCXX/dcl_ambig_res.cpp | 3 + test/SemaCXX/dcl_init_aggr.cpp | 2 +- test/SemaCXX/decl-expr-ambiguity.cpp | 6 +- test/SemaCXX/decl-init-ref.cpp | 6 +- test/SemaCXX/decltype-overloaded-functions.cpp | 4 +- test/SemaCXX/default2.cpp | 3 + test/SemaCXX/delete.cpp | 9 + test/SemaCXX/deleted-function-extension.cpp | 8 + test/SemaCXX/dependent-auto.cpp | 34 + test/SemaCXX/destructor.cpp | 70 +- test/SemaCXX/direct-initializer.cpp | 2 +- test/SemaCXX/elaborated-type-specifier.cpp | 3 +- test/SemaCXX/enum-bitfield.cpp | 18 + test/SemaCXX/enum-scoped.cpp | 98 + test/SemaCXX/enum.cpp | 5 + test/SemaCXX/exceptions.cpp | 6 +- test/SemaCXX/expressions.cpp | 18 + test/SemaCXX/format-attribute.cpp | 8 - test/SemaCXX/friend.cpp | 68 + test/SemaCXX/functional-cast.cpp | 7 +- test/SemaCXX/gnu-case-ranges.cpp | 24 + test/SemaCXX/if-empty-body.cpp | 35 + test/SemaCXX/init-priority-attr.cpp | 6 +- test/SemaCXX/invalid-member-expr.cpp | 8 +- test/SemaCXX/issue547.cpp | 66 + test/SemaCXX/linkage-spec.cpp | 3 + test/SemaCXX/linkage.cpp | 68 + test/SemaCXX/lookup-member.cpp | 13 + test/SemaCXX/member-expr-anonymous-union.cpp | 2 +- test/SemaCXX/member-expr.cpp | 15 + test/SemaCXX/member-operator-expr.cpp | 4 +- test/SemaCXX/member-pointer.cpp | 5 +- test/SemaCXX/nested-name-spec.cpp | 19 + test/SemaCXX/new-delete.cpp | 41 +- test/SemaCXX/no-exceptions.cpp | 14 + test/SemaCXX/non-empty-class-size-zero.cpp | 18 + test/SemaCXX/nullptr-98.cpp | 3 + test/SemaCXX/nullptr.cpp | 47 +- test/SemaCXX/overload-call.cpp | 19 +- test/SemaCXX/overload-member-call.cpp | 12 +- test/SemaCXX/overloaded-builtin-operators-0x.cpp | 11 + test/SemaCXX/overloaded-builtin-operators.cpp | 37 + test/SemaCXX/overloaded-name.cpp | 14 + test/SemaCXX/overloaded-operator.cpp | 10 +- test/SemaCXX/pragma-pack.cpp | 34 + test/SemaCXX/pragma-unused.cpp | 8 + test/SemaCXX/ptrtomember-badcall.cpp | 13 - test/SemaCXX/ptrtomember.cpp | 32 + test/SemaCXX/qualified-id-lookup.cpp | 2 +- test/SemaCXX/redeclared-auto.cpp | 26 + test/SemaCXX/ref-init-ambiguous.cpp | 6 +- test/SemaCXX/references.cpp | 6 +- test/SemaCXX/reinterpret-cast.cpp | 12 +- test/SemaCXX/return-noreturn.cpp | 10 +- test/SemaCXX/return-stack-addr.cpp | 18 + test/SemaCXX/return.cpp | 2 +- test/SemaCXX/rval-references-examples.cpp | 112 + test/SemaCXX/rval-references-xfail.cpp | 14 - test/SemaCXX/rval-references.cpp | 10 +- test/SemaCXX/scope-check.cpp | 4 +- test/SemaCXX/sourceranges.cpp | 27 + test/SemaCXX/static-cast.cpp | 12 +- test/SemaCXX/trailing-return-0x.cpp | 61 + test/SemaCXX/type-convert-construct.cpp | 2 +- test/SemaCXX/type-dependent-exprs.cpp | 11 + test/SemaCXX/type-formatting.cpp | 10 + test/SemaCXX/type-traits-incomplete.cpp | 3 +- test/SemaCXX/type-traits.cpp | 166 +- test/SemaCXX/typeid-ref.cpp | 4 +- test/SemaCXX/undefined-internal.cpp | 86 + test/SemaCXX/uninit-variables.cpp | 51 + test/SemaCXX/uninitialized.cpp | 14 + test/SemaCXX/unreachable-catch-clauses.cpp | 2 +- test/SemaCXX/unreachable-code.cpp | 2 +- test/SemaCXX/unused-with-error.cpp | 8 + test/SemaCXX/using-decl-1.cpp | 23 + test/SemaCXX/using-decl-templates.cpp | 18 + test/SemaCXX/using-directive.cpp | 7 + test/SemaCXX/vector-casts.cpp | 6 +- test/SemaCXX/virtual-override.cpp | 20 +- test/SemaCXX/vtable-instantiation.cc | 20 + test/SemaCXX/warn-assignment-condition.cpp | 29 + test/SemaCXX/warn-enum-compare.cpp | 212 + test/SemaCXX/warn-global-constructors.cpp | 24 +- test/SemaCXX/warn-large-by-value-copy.cpp | 42 + test/SemaCXX/warn-literal-conversion.cpp | 41 + test/SemaCXX/warn-missing-noreturn.cpp | 55 +- test/SemaCXX/warn-overloaded-virtual.cpp | 54 + test/SemaCXX/warn-self-assign.cpp | 47 + test/SemaCXX/warn-shadow.cpp | 28 + test/SemaCXX/warn-unreachable.cpp | 8 +- test/SemaCXX/warn-unused-filescoped.cpp | 24 + test/SemaCXX/warn-unused-variables.cpp | 6 + test/SemaCXX/warn_false_to_pointer.cpp | 1 + test/SemaCXX/writable-strings-deprecated.cpp | 12 + test/SemaObjC/access-property-getter.m | 2 +- test/SemaObjC/attr-deprecated.m | 11 + test/SemaObjC/bad-receiver-1.m | 2 +- test/SemaObjC/block-attr.m | 2 + test/SemaObjC/block-return.m | 13 + test/SemaObjC/builtin_objc_lib_functions.m | 29 + test/SemaObjC/builtin_objc_msgSend.m | 3 + test/SemaObjC/call-super-2.m | 2 +- test/SemaObjC/category-1.m | 22 +- test/SemaObjC/class-conforming-protocol-2.m | 15 +- test/SemaObjC/class-method-lookup.m | 2 +- test/SemaObjC/compare-qualified-class.m | 2 +- test/SemaObjC/compare-qualified-id.m | 5 +- test/SemaObjC/comptypes-10.m | 34 + test/SemaObjC/comptypes-a.m | 7 +- test/SemaObjC/conditional-expr-4.m | 2 +- test/SemaObjC/conflict-nonfragile-abi2.m | 4 +- test/SemaObjC/continuation-class-err.m | 6 +- test/SemaObjC/crash-label.m | 2 +- test/SemaObjC/custom-atomic-property.m | 20 + test/SemaObjC/default-synthesize-1.m | 2 +- test/SemaObjC/default-synthesize.m | 4 +- test/SemaObjC/direct-synthesized-ivar-access.m | 14 + test/SemaObjC/duplicate-ivar-in-class-extension.m | 2 +- test/SemaObjC/duplicate-property-class-extension.m | 15 +- test/SemaObjC/error-missing-getter.m | 19 + test/SemaObjC/error-property-gc-attr.m | 4 +- test/SemaObjC/exprs.m | 10 + test/SemaObjC/format-arg-attribute.m | 6 +- test/SemaObjC/ibaction.m | 2 + test/SemaObjC/iboutletcollection-attr.m | 2 +- test/SemaObjC/incomplete-implementation.m | 26 + test/SemaObjC/ivar-in-class-extension-error.m | 2 +- test/SemaObjC/ivar-in-class-extension.m | 2 +- test/SemaObjC/ivar-in-implementations.m | 2 +- test/SemaObjC/method-arg-decay.m | 5 +- test/SemaObjC/method-arg-qualifier-warning.m | 4 +- test/SemaObjC/method-bad-param.m | 14 + test/SemaObjC/method-conflict-1.m | 83 + test/SemaObjC/method-conflict-2.m | 44 + test/SemaObjC/method-conflict.m | 6 +- test/SemaObjC/method-def-1.m | 2 +- test/SemaObjC/method-in-class-extension-impl.m | 20 + test/SemaObjC/method-lookup-5.m | 10 + test/SemaObjC/method-lookup.m | 2 +- test/SemaObjC/method-prototype-scope.m | 38 + test/SemaObjC/method-sentinel-attr.m | 4 +- test/SemaObjC/method-typecheck-3.m | 22 + test/SemaObjC/method-undef-category-warn-1.m | 12 +- test/SemaObjC/method-undef-extension-warn-1.m | 5 +- test/SemaObjC/method-undefined-warn-1.m | 14 + test/SemaObjC/no-objc-exceptions.m | 13 + test/SemaObjC/nonnull.h | 2 + test/SemaObjC/nonnull.m | 26 +- test/SemaObjC/property-9.m | 11 + test/SemaObjC/property-and-class-extension.m | 2 +- test/SemaObjC/property-and-ivar-use.m | 2 +- test/SemaObjC/property-dot-receiver.m | 22 + test/SemaObjC/property-impl-misuse.m | 20 + test/SemaObjC/property-in-class-extension.m | 37 +- test/SemaObjC/property-missing.m | 12 + test/SemaObjC/property-user-setter.m | 10 +- test/SemaObjC/provisional-ivar-lookup.m | 43 + test/SemaObjC/selector-1.m | 11 +- test/SemaObjC/selector-2.m | 14 + test/SemaObjC/selector-3.m | 29 + test/SemaObjC/self-assign.m | 14 + test/SemaObjC/setter-dotsyntax.m | 19 + test/SemaObjC/special-dep-unavail-warning.m | 47 + test/SemaObjC/super-class-protocol-conformance.m | 2 +- test/SemaObjC/super.m | 2 +- test/SemaObjC/synth-provisional-ivars-1.m | 28 + test/SemaObjC/synth-provisional-ivars.m | 4 +- test/SemaObjC/synthesized-ivar.m | 43 +- test/SemaObjC/undef-protocol-methods-1.m | 21 +- test/SemaObjC/undef-superclass-1.m | 2 +- test/SemaObjC/uninit-variables.m | 27 + test/SemaObjC/warn-deprecated-implementations.m | 45 + test/SemaObjC/warn-implicit-atomic-property.m | 13 + test/SemaObjC/warn-incompatible-builtin-types.m | 2 +- test/SemaObjC/warn-write-strings.m | 2 +- test/SemaObjCXX/blocks.mm | 72 +- test/SemaObjCXX/conversion-ranking.mm | 89 + test/SemaObjCXX/cstyle-cast.mm | 2 +- test/SemaObjCXX/exceptions-fragile.mm | 2 +- test/SemaObjCXX/message.mm | 35 +- test/SemaObjCXX/objc-pointer-conv.mm | 10 +- test/SemaObjCXX/overload.mm | 87 +- test/SemaObjCXX/propert-dot-error.mm | 41 + test/SemaObjCXX/properties.mm | 24 + test/SemaObjCXX/property-synthesis-error.mm | 32 + test/SemaObjCXX/protocol-lookup.mm | 5 + test/SemaObjCXX/reserved-keyword-methods.mm | 42 + test/SemaObjCXX/reserved-keyword-selectors.mm | 35 - test/SemaOpenCL/cond.cl | 5 + test/SemaOpenCL/extension-fp64.cl | 17 + test/SemaOpenCL/init.cl | 15 + test/SemaTemplate/anonymous-union.cpp | 21 + test/SemaTemplate/attributes.cpp | 2 +- test/SemaTemplate/class-template-decl.cpp | 18 + test/SemaTemplate/class-template-id.cpp | 2 +- test/SemaTemplate/class-template-spec.cpp | 2 +- test/SemaTemplate/constructor-template.cpp | 23 +- test/SemaTemplate/current-instantiation.cpp | 16 + test/SemaTemplate/deduction.cpp | 18 +- test/SemaTemplate/default-expr-arguments-2.cpp | 2 +- test/SemaTemplate/default-expr-arguments.cpp | 88 +- test/SemaTemplate/dependent-base-classes.cpp | 4 +- test/SemaTemplate/dependent-expr.cpp | 26 + test/SemaTemplate/dependent-names.cpp | 27 + test/SemaTemplate/elaborated-type-specifier.cpp | 4 + test/SemaTemplate/enum-forward.cpp | 8 + test/SemaTemplate/explicit-instantiation.cpp | 4 + .../explicit-specialization-member.cpp | 6 +- test/SemaTemplate/friend-template.cpp | 11 +- test/SemaTemplate/fun-template-def.cpp | 2 +- .../function-template-specialization.cpp | 5 + test/SemaTemplate/inject-templated-friend-post.cpp | 4 +- test/SemaTemplate/inject-templated-friend.cpp | 2 +- test/SemaTemplate/instantiate-anonymous-union.cpp | 21 + test/SemaTemplate/instantiate-cast.cpp | 8 +- test/SemaTemplate/instantiate-complete.cpp | 24 +- .../instantiate-default-assignment-operator.cpp | 2 +- test/SemaTemplate/instantiate-expr-4.cpp | 8 +- test/SemaTemplate/instantiate-field.cpp | 12 + test/SemaTemplate/instantiate-function-1.cpp | 2 +- test/SemaTemplate/instantiate-local-class.cpp | 15 + test/SemaTemplate/instantiate-member-expr.cpp | 25 +- test/SemaTemplate/instantiate-member-pointers.cpp | 2 +- test/SemaTemplate/instantiate-member-template.cpp | 12 + .../instantiate-non-type-template-parameter.cpp | 19 + test/SemaTemplate/instantiate-static-var.cpp | 4 +- .../instantiate-template-template-parm.cpp | 51 + test/SemaTemplate/instantiate-try-catch.cpp | 2 +- test/SemaTemplate/instantiate-using-decl.cpp | 19 + test/SemaTemplate/instantiation-default-1.cpp | 2 +- test/SemaTemplate/member-access-ambig.cpp | 35 + test/SemaTemplate/member-access-expr.cpp | 15 + test/SemaTemplate/temp_arg_nontype.cpp | 28 +- test/SemaTemplate/temp_class_spec_neg.cpp | 2 +- test/SemaTemplate/typename-specifier-4.cpp | 37 + test/SemaTemplate/variadic-class-template-1.cpp | 4 - test/SemaTemplate/variadic-class-template-2.cpp | 19 - test/SemaTemplate/variadic-parse.cpp | 6 - test/SemaTemplate/variadic-unsupported.cpp | 5 - test/Unit/lit.cfg | 86 + test/Unit/lit.site.cfg.in | 26 + test/lit.cfg | 20 +- test/lit.site.cfg.in | 1 + tools/Makefile | 2 +- tools/c-index-test/CMakeLists.txt | 19 +- tools/c-index-test/Makefile | 2 +- tools/c-index-test/c-index-test.c | 293 +- tools/driver/CMakeLists.txt | 34 +- tools/driver/Makefile | 14 +- tools/driver/cc1_main.cpp | 10 +- tools/driver/cc1as_main.cpp | 47 +- tools/driver/clang_symlink.cmake | 20 + tools/driver/driver.cpp | 56 +- tools/libclang/CIndex.cpp | 2955 ++++++++----- tools/libclang/CIndexCXX.cpp | 5 +- tools/libclang/CIndexCodeCompletion.cpp | 525 +-- tools/libclang/CIndexDiagnostic.cpp | 174 +- tools/libclang/CIndexDiagnostic.h | 20 - tools/libclang/CIndexInclusionStack.cpp | 5 +- tools/libclang/CIndexUSRs.cpp | 187 +- tools/libclang/CIndexer.cpp | 66 +- tools/libclang/CIndexer.h | 46 +- tools/libclang/CMakeLists.txt | 10 +- tools/libclang/CXCursor.cpp | 233 +- tools/libclang/CXCursor.h | 94 +- tools/libclang/CXString.cpp | 130 + tools/libclang/CXString.h | 53 + tools/libclang/CXTranslationUnit.h | 24 + tools/libclang/CXType.cpp | 196 +- tools/libclang/CXType.h | 2 +- tools/libclang/Makefile | 2 +- tools/libclang/libclang.darwin.exports | 27 +- tools/libclang/libclang.exports | 27 +- tools/scan-build/ccc-analyzer | 119 +- tools/scan-build/scan-build | 206 +- unittests/Basic/FileManagerTest.cpp | 222 + unittests/Basic/Makefile | 15 + unittests/CMakeLists.txt | 59 + unittests/Frontend/FrontendActionTest.cpp | 74 + unittests/Frontend/Makefile | 19 + unittests/Makefile | 28 + utils/ABITest/ABITestGen.py | 45 +- utils/ABITest/TypeGen.py | 9 + utils/clang-completion-mode.el | 4 +- www/OpenProjects.html | 41 +- www/analyzer/annotations.html | 155 +- www/analyzer/filing_bugs.html | 2 +- www/analyzer/index.html | 8 +- www/analyzer/installation.html | 2 +- www/analyzer/latest_checker.html.incl | 2 +- www/analyzer/release_notes.html | 48 + www/analyzer/xcode.html | 14 +- www/builtins.py | 160 + www/compatibility.html | 350 +- www/cxx_status.html | 505 ++- www/favicon.ico | Bin 0 -> 1150 bytes www/features.html | 2 +- www/get_started.html | 29 +- www/hacking.html | 34 +- www/index.html | 9 +- www/menu.html.incl | 3 +- www/related.html | 55 + www/robots.txt | 2 + 1876 files changed, 165693 insertions(+), 83495 deletions(-) create mode 100644 include/clang/AST/ASTMutationListener.h create mode 100644 include/clang/AST/EvaluatedExprVisitor.h delete mode 100644 include/clang/AST/FullExpr.h create mode 100644 include/clang/AST/Mangle.h delete mode 100644 include/clang/AST/TypeLocBuilder.h create mode 100644 include/clang/Analysis/Analyses/UninitializedValuesV2.h create mode 100644 include/clang/Analysis/DomainSpecific/CocoaConventions.h create mode 100644 include/clang/Basic/ABI.h create mode 100644 include/clang/Basic/DiagnosticIDs.h create mode 100644 include/clang/Basic/FileSystemOptions.h create mode 100644 include/clang/Basic/FileSystemStatCache.h create mode 100644 include/clang/Basic/OpenCLExtensions.def create mode 100644 include/clang/Basic/Visibility.h delete mode 100644 include/clang/Checker/AnalysisConsumer.h delete mode 100644 include/clang/Checker/BugReporter/BugReporter.h delete mode 100644 include/clang/Checker/BugReporter/BugType.h delete mode 100644 include/clang/Checker/BugReporter/PathDiagnostic.h delete mode 100644 include/clang/Checker/Checkers/DereferenceChecker.h delete mode 100644 include/clang/Checker/Checkers/LocalCheckers.h delete mode 100644 include/clang/Checker/DomainSpecific/CocoaConventions.h delete mode 100644 include/clang/Checker/FrontendActions.h delete mode 100644 include/clang/Checker/ManagerRegistry.h delete mode 100644 include/clang/Checker/PathDiagnosticClients.h delete mode 100644 include/clang/Checker/PathSensitive/AnalysisManager.h delete mode 100644 include/clang/Checker/PathSensitive/BasicValueFactory.h delete mode 100644 include/clang/Checker/PathSensitive/Checker.h delete mode 100644 include/clang/Checker/PathSensitive/CheckerHelpers.h delete mode 100644 include/clang/Checker/PathSensitive/CheckerVisitor.def delete mode 100644 include/clang/Checker/PathSensitive/CheckerVisitor.h delete mode 100644 include/clang/Checker/PathSensitive/ConstraintManager.h delete mode 100644 include/clang/Checker/PathSensitive/Environment.h delete mode 100644 include/clang/Checker/PathSensitive/ExplodedGraph.h delete mode 100644 include/clang/Checker/PathSensitive/GRAuditor.h delete mode 100644 include/clang/Checker/PathSensitive/GRBlockCounter.h delete mode 100644 include/clang/Checker/PathSensitive/GRCoreEngine.h delete mode 100644 include/clang/Checker/PathSensitive/GRExprEngine.h delete mode 100644 include/clang/Checker/PathSensitive/GRExprEngineBuilders.h delete mode 100644 include/clang/Checker/PathSensitive/GRSimpleAPICheck.h delete mode 100644 include/clang/Checker/PathSensitive/GRState.h delete mode 100644 include/clang/Checker/PathSensitive/GRStateTrait.h delete mode 100644 include/clang/Checker/PathSensitive/GRSubEngine.h delete mode 100644 include/clang/Checker/PathSensitive/GRTransferFuncs.h delete mode 100644 include/clang/Checker/PathSensitive/GRWorkList.h delete mode 100644 include/clang/Checker/PathSensitive/MemRegion.h delete mode 100644 include/clang/Checker/PathSensitive/SVals.h delete mode 100644 include/clang/Checker/PathSensitive/SValuator.h delete mode 100644 include/clang/Checker/PathSensitive/Store.h delete mode 100644 include/clang/Checker/PathSensitive/SummaryManager.h delete mode 100644 include/clang/Checker/PathSensitive/SymbolManager.h delete mode 100644 include/clang/Checker/PathSensitive/ValueManager.h create mode 100644 include/clang/Config/config.h.cmake create mode 100644 include/clang/Frontend/MultiplexConsumer.h create mode 100644 include/clang/Lex/CMakeLists.txt create mode 100644 include/clang/Lex/Makefile create mode 100644 include/clang/Serialization/ASTSerializationListener.h create mode 100644 include/clang/StaticAnalyzer/Checkers/CheckerBase.td create mode 100644 include/clang/StaticAnalyzer/Checkers/DereferenceChecker.h create mode 100644 include/clang/StaticAnalyzer/Checkers/LocalCheckers.h create mode 100644 include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h create mode 100644 include/clang/StaticAnalyzer/Core/BugReporter/BugType.h create mode 100644 include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h create mode 100644 include/clang/StaticAnalyzer/Core/CheckerManager.h create mode 100644 include/clang/StaticAnalyzer/Core/CheckerProvider.h create mode 100644 include/clang/StaticAnalyzer/Core/CheckerV2.h create mode 100644 include/clang/StaticAnalyzer/Core/PathDiagnosticClients.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/Checker.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/CheckerVisitor.def create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/CheckerVisitor.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/Store.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/SummaryManager.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/TransferFuncs.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h create mode 100644 include/clang/StaticAnalyzer/Frontend/CheckerRegistration.h create mode 100644 include/clang/StaticAnalyzer/Frontend/FrontendActions.h create mode 100644 lib/AST/DumpXML.cpp delete mode 100644 lib/AST/FullExpr.cpp create mode 100644 lib/AST/ItaniumMangle.cpp create mode 100644 lib/AST/Mangle.cpp create mode 100644 lib/AST/MicrosoftMangle.cpp create mode 100644 lib/Analysis/CocoaConventions.cpp create mode 100644 lib/Analysis/UninitializedValuesV2.cpp create mode 100644 lib/Basic/DiagnosticIDs.cpp create mode 100644 lib/Basic/FileSystemStatCache.cpp delete mode 100644 lib/Checker/AdjustedReturnValueChecker.cpp delete mode 100644 lib/Checker/AggExprVisitor.cpp delete mode 100644 lib/Checker/AnalysisConsumer.cpp delete mode 100644 lib/Checker/AnalysisManager.cpp delete mode 100644 lib/Checker/ArrayBoundChecker.cpp delete mode 100644 lib/Checker/AttrNonNullChecker.cpp delete mode 100644 lib/Checker/BasicConstraintManager.cpp delete mode 100644 lib/Checker/BasicObjCFoundationChecks.cpp delete mode 100644 lib/Checker/BasicObjCFoundationChecks.h delete mode 100644 lib/Checker/BasicStore.cpp delete mode 100644 lib/Checker/BasicValueFactory.cpp delete mode 100644 lib/Checker/BugReporter.cpp delete mode 100644 lib/Checker/BugReporterVisitors.cpp delete mode 100644 lib/Checker/BuiltinFunctionChecker.cpp delete mode 100644 lib/Checker/CFRefCount.cpp delete mode 100644 lib/Checker/CMakeLists.txt delete mode 100644 lib/Checker/CStringChecker.cpp delete mode 100644 lib/Checker/CallAndMessageChecker.cpp delete mode 100644 lib/Checker/CastSizeChecker.cpp delete mode 100644 lib/Checker/CastToStructChecker.cpp delete mode 100644 lib/Checker/CheckDeadStores.cpp delete mode 100644 lib/Checker/CheckObjCDealloc.cpp delete mode 100644 lib/Checker/CheckObjCInstMethSignature.cpp delete mode 100644 lib/Checker/CheckSecuritySyntaxOnly.cpp delete mode 100644 lib/Checker/CheckSizeofPointer.cpp delete mode 100644 lib/Checker/Checker.cpp delete mode 100644 lib/Checker/CheckerHelpers.cpp delete mode 100644 lib/Checker/CocoaConventions.cpp delete mode 100644 lib/Checker/DereferenceChecker.cpp delete mode 100644 lib/Checker/DivZeroChecker.cpp delete mode 100644 lib/Checker/Environment.cpp delete mode 100644 lib/Checker/ExplodedGraph.cpp delete mode 100644 lib/Checker/FixedAddressChecker.cpp delete mode 100644 lib/Checker/FlatStore.cpp delete mode 100644 lib/Checker/FrontendActions.cpp delete mode 100644 lib/Checker/GRBlockCounter.cpp delete mode 100644 lib/Checker/GRCXXExprEngine.cpp delete mode 100644 lib/Checker/GRCoreEngine.cpp delete mode 100644 lib/Checker/GRExprEngine.cpp delete mode 100644 lib/Checker/GRExprEngineExperimentalChecks.cpp delete mode 100644 lib/Checker/GRExprEngineExperimentalChecks.h delete mode 100644 lib/Checker/GRExprEngineInternalChecks.h delete mode 100644 lib/Checker/GRState.cpp delete mode 100644 lib/Checker/HTMLDiagnostics.cpp delete mode 100644 lib/Checker/IdempotentOperationChecker.cpp delete mode 100644 lib/Checker/LLVMConventionsChecker.cpp delete mode 100644 lib/Checker/MacOSXAPIChecker.cpp delete mode 100644 lib/Checker/Makefile delete mode 100644 lib/Checker/MallocChecker.cpp delete mode 100644 lib/Checker/ManagerRegistry.cpp delete mode 100644 lib/Checker/MemRegion.cpp delete mode 100644 lib/Checker/NSAutoreleasePoolChecker.cpp delete mode 100644 lib/Checker/NSErrorChecker.cpp delete mode 100644 lib/Checker/NoReturnFunctionChecker.cpp delete mode 100644 lib/Checker/OSAtomicChecker.cpp delete mode 100644 lib/Checker/ObjCUnusedIVarsChecker.cpp delete mode 100644 lib/Checker/PathDiagnostic.cpp delete mode 100644 lib/Checker/PlistDiagnostics.cpp delete mode 100644 lib/Checker/PointerArithChecker.cpp delete mode 100644 lib/Checker/PointerSubChecker.cpp delete mode 100644 lib/Checker/PthreadLockChecker.cpp delete mode 100644 lib/Checker/RangeConstraintManager.cpp delete mode 100644 lib/Checker/RegionStore.cpp delete mode 100644 lib/Checker/ReturnPointerRangeChecker.cpp delete mode 100644 lib/Checker/ReturnUndefChecker.cpp delete mode 100644 lib/Checker/SVals.cpp delete mode 100644 lib/Checker/SValuator.cpp delete mode 100644 lib/Checker/SimpleConstraintManager.cpp delete mode 100644 lib/Checker/SimpleConstraintManager.h delete mode 100644 lib/Checker/SimpleSValuator.cpp delete mode 100644 lib/Checker/StackAddrLeakChecker.cpp delete mode 100644 lib/Checker/Store.cpp delete mode 100644 lib/Checker/StreamChecker.cpp delete mode 100644 lib/Checker/SymbolManager.cpp delete mode 100644 lib/Checker/UndefBranchChecker.cpp delete mode 100644 lib/Checker/UndefCapturedBlockVarChecker.cpp delete mode 100644 lib/Checker/UndefResultChecker.cpp delete mode 100644 lib/Checker/UndefinedArraySubscriptChecker.cpp delete mode 100644 lib/Checker/UndefinedAssignmentChecker.cpp delete mode 100644 lib/Checker/UnixAPIChecker.cpp delete mode 100644 lib/Checker/UnreachableCodeChecker.cpp delete mode 100644 lib/Checker/VLASizeChecker.cpp delete mode 100644 lib/Checker/ValueManager.cpp delete mode 100644 lib/CodeGen/CGCXX.h create mode 100644 lib/CodeGen/CGCXXABI.cpp create mode 100644 lib/CodeGen/CGCleanup.cpp create mode 100644 lib/CodeGen/CGCleanup.h create mode 100644 lib/CodeGen/CodeGenTBAA.cpp create mode 100644 lib/CodeGen/CodeGenTBAA.h delete mode 100644 lib/CodeGen/Mangle.cpp delete mode 100644 lib/CodeGen/Mangle.h create mode 100644 lib/Frontend/HeaderIncludeGen.cpp create mode 100644 lib/Frontend/MultiplexConsumer.cpp create mode 100644 lib/Sema/SemaTemplateVariadic.cpp create mode 100644 lib/Sema/TypeLocBuilder.h create mode 100644 lib/StaticAnalyzer/CMakeLists.txt create mode 100644 lib/StaticAnalyzer/Checkers/AdjustedReturnValueChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp create mode 100644 lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp create mode 100644 lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.h create mode 100644 lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/CMakeLists.txt create mode 100644 lib/StaticAnalyzer/Checkers/CStringChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp create mode 100644 lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp create mode 100644 lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp create mode 100644 lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp create mode 100644 lib/StaticAnalyzer/Checkers/Checkers.td create mode 100644 lib/StaticAnalyzer/Checkers/ChrootChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ClangSACheckerProvider.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ClangSACheckerProvider.h create mode 100644 lib/StaticAnalyzer/Checkers/ClangSACheckers.h create mode 100644 lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/DebugCheckers.cpp create mode 100644 lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ExperimentalChecks.h create mode 100644 lib/StaticAnalyzer/Checkers/ExprEngine.cpp create mode 100644 lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/InternalChecks.h create mode 100644 lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/Makefile create mode 100644 lib/StaticAnalyzer/Checkers/MallocChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/OSAtomicChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/StackAddrLeakChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/StreamChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp create mode 100644 lib/StaticAnalyzer/Core/AggExprVisitor.cpp create mode 100644 lib/StaticAnalyzer/Core/AnalysisManager.cpp create mode 100644 lib/StaticAnalyzer/Core/BasicConstraintManager.cpp create mode 100644 lib/StaticAnalyzer/Core/BasicStore.cpp create mode 100644 lib/StaticAnalyzer/Core/BasicValueFactory.cpp create mode 100644 lib/StaticAnalyzer/Core/BlockCounter.cpp create mode 100644 lib/StaticAnalyzer/Core/BugReporter.cpp create mode 100644 lib/StaticAnalyzer/Core/BugReporterVisitors.cpp create mode 100644 lib/StaticAnalyzer/Core/CFRefCount.cpp create mode 100644 lib/StaticAnalyzer/Core/CMakeLists.txt create mode 100644 lib/StaticAnalyzer/Core/CXXExprEngine.cpp create mode 100644 lib/StaticAnalyzer/Core/Checker.cpp create mode 100644 lib/StaticAnalyzer/Core/CheckerHelpers.cpp create mode 100644 lib/StaticAnalyzer/Core/CheckerManager.cpp create mode 100644 lib/StaticAnalyzer/Core/CoreEngine.cpp create mode 100644 lib/StaticAnalyzer/Core/Environment.cpp create mode 100644 lib/StaticAnalyzer/Core/ExplodedGraph.cpp create mode 100644 lib/StaticAnalyzer/Core/FlatStore.cpp create mode 100644 lib/StaticAnalyzer/Core/GRState.cpp create mode 100644 lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp create mode 100644 lib/StaticAnalyzer/Core/Makefile create mode 100644 lib/StaticAnalyzer/Core/MemRegion.cpp create mode 100644 lib/StaticAnalyzer/Core/ObjCMessage.cpp create mode 100644 lib/StaticAnalyzer/Core/PathDiagnostic.cpp create mode 100644 lib/StaticAnalyzer/Core/PlistDiagnostics.cpp create mode 100644 lib/StaticAnalyzer/Core/RangeConstraintManager.cpp create mode 100644 lib/StaticAnalyzer/Core/RegionStore.cpp create mode 100644 lib/StaticAnalyzer/Core/SValBuilder.cpp create mode 100644 lib/StaticAnalyzer/Core/SVals.cpp create mode 100644 lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp create mode 100644 lib/StaticAnalyzer/Core/SimpleConstraintManager.h create mode 100644 lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp create mode 100644 lib/StaticAnalyzer/Core/Store.cpp create mode 100644 lib/StaticAnalyzer/Core/SymbolManager.cpp create mode 100644 lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp create mode 100644 lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp create mode 100644 lib/StaticAnalyzer/Frontend/AnalysisConsumer.h create mode 100644 lib/StaticAnalyzer/Frontend/CMakeLists.txt create mode 100644 lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp create mode 100644 lib/StaticAnalyzer/Frontend/FrontendActions.cpp create mode 100644 lib/StaticAnalyzer/Frontend/Makefile create mode 100644 lib/StaticAnalyzer/Makefile create mode 100644 lib/StaticAnalyzer/README.txt create mode 100644 runtime/CMakeLists.txt create mode 100644 runtime/libcxx/Makefile create mode 100644 test/ASTMerge/Inputs/class-template1.cpp create mode 100644 test/ASTMerge/Inputs/class-template2.cpp create mode 100644 test/ASTMerge/class-template.cpp create mode 100644 test/Analysis/analyzer-stats.c create mode 100644 test/Analysis/auto-obj-dtors-cfg-output.cpp create mode 100644 test/Analysis/base-init.cpp create mode 100644 test/Analysis/chroot.c create mode 100644 test/Analysis/cxx-crashes.cpp create mode 100644 test/Analysis/derived-to-base.cpp create mode 100644 test/Analysis/dtor.cpp create mode 100644 test/Analysis/dtors-in-dtor-cfg-output.cpp create mode 100644 test/Analysis/idempotent-operations-limited-loops.c create mode 100644 test/Analysis/idempotent-operations.m create mode 100644 test/Analysis/initializer.cpp create mode 100644 test/Analysis/initializers-cfg-output.cpp create mode 100644 test/Analysis/lvalue.cpp create mode 100644 test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret-region.m create mode 100644 test/Analysis/operator-calls.cpp create mode 100644 test/Analysis/out-of-bounds.c create mode 100644 test/Analysis/plist-output-alternate.m create mode 100644 test/Analysis/properties.m create mode 100644 test/Analysis/self-init.m create mode 100644 test/Analysis/temp-obj-dtors-cfg-output.cpp create mode 100644 test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp create mode 100644 test/CXX/basic/basic.start/basic.start.main/p2h.cpp create mode 100644 test/CXX/class.access/class.friend/p11.cpp create mode 100644 test/CXX/class.derived/class.member.lookup/p9.cpp create mode 100644 test/CXX/class.derived/class.virtual/p3-0x.cpp create mode 100644 test/CXX/class.derived/p8-0x.cpp create mode 100644 test/CXX/class/class.mem/p13.cpp create mode 100644 test/CXX/class/class.mem/p14.cpp create mode 100644 test/CXX/class/class.mem/p1b.cpp create mode 100644 test/CXX/class/class.mem/p8-0x-pedantic.cpp create mode 100644 test/CXX/class/class.mem/p8-0x.cpp create mode 100644 test/CXX/class/class.nest/p1-cxx0x.cpp create mode 100644 test/CXX/class/p1-0x.cpp create mode 100644 test/CXX/class/p2-0x.cpp create mode 100644 test/CXX/dcl.dcl/basic.namespace/namespace.def/p2.cpp create mode 100644 test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp create mode 100644 test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp create mode 100644 test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7.cpp create mode 100644 test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-0x.cpp create mode 100644 test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp create mode 100644 test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp create mode 100644 test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp create mode 100644 test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6-0x.cpp create mode 100644 test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp create mode 100644 test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp create mode 100644 test/CXX/dcl.decl/dcl.meaning/dcl.ref/p6-0x.cpp create mode 100644 test/CXX/dcl.decl/p4-0x.cpp create mode 100644 test/CXX/expr/expr.cast/p4-0x.cpp create mode 100644 test/CXX/expr/expr.cast/p4.cpp create mode 100644 test/CXX/expr/expr.mptr.oper/p5.cpp create mode 100644 test/CXX/expr/expr.mptr.oper/p6-0x.cpp create mode 100644 test/CXX/expr/expr.post/expr.const.cast/p1-0x.cpp create mode 100644 test/CXX/expr/expr.post/expr.dynamic.cast/p3-0x.cpp create mode 100644 test/CXX/expr/expr.post/expr.reinterpret.cast/p1-0x.cpp create mode 100644 test/CXX/expr/expr.post/expr.static.cast/p3-0x.cpp create mode 100644 test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp create mode 100644 test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp create mode 100644 test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp create mode 100644 test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp create mode 100644 test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp create mode 100644 test/CXX/expr/expr.unary/expr.unary.noexcept/ser.h create mode 100644 test/CXX/expr/expr.unary/expr.unary.op/p6.cpp create mode 100644 test/CXX/over/over.built/p1.cpp create mode 100644 test/CXX/over/over.built/p25.cpp create mode 100644 test/CXX/over/over.load/p2-0x.cpp create mode 100644 test/CXX/over/over.match/over.match.best/over.ics.rank/p3-0x.cpp create mode 100644 test/CXX/over/over.match/over.match.funcs/p4-0x.cpp create mode 100644 test/CXX/over/over.over/p2-resolve-single-template-id.cpp create mode 100644 test/CXX/special/class.copy/p33-0x.cpp create mode 100644 test/CXX/special/class.ctor/p4-0x.cpp create mode 100644 test/CXX/special/class.dtor/p2-0x.cpp create mode 100644 test/CXX/special/class.inhctor/elsewhere.cpp create mode 100644 test/CXX/special/class.inhctor/p3.cpp create mode 100644 test/CXX/special/class.inhctor/p7.cpp create mode 100644 test/CXX/stmt.stmt/stmt.label/p1.cpp create mode 100644 test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp create mode 100644 test/CXX/temp/temp.arg/temp.arg.type/p2.cpp create mode 100644 test/CXX/temp/temp.decls/temp.class.spec/p8-0x.cpp create mode 100644 test/CXX/temp/temp.decls/temp.class.spec/p9-0x.cpp create mode 100644 test/CXX/temp/temp.decls/temp.class.spec/p9.cpp create mode 100644 test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3-0x.cpp create mode 100644 test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3.cpp create mode 100644 test/CXX/temp/temp.decls/temp.friend/p8.cpp create mode 100644 test/CXX/temp/temp.decls/temp.mem/p3.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/deduction.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/example-bind.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/example-function.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/example-tuple.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/ext-blocks.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/injected-class-name.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/metafunctions.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/p1.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/p2.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/p4.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/p5.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/partial-ordering.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3-0x.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.arg.explicit/p9-0x.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p1-0x.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3-0x.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.partial/p12.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.partial/p9-0x.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p10-0x.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p2-0x.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p21.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p22.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p8-0x.cpp create mode 100644 test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p9-0x.cpp create mode 100644 test/CXX/temp/temp.param/p11-0x.cpp create mode 100644 test/CXX/temp/temp.param/p9-0x.cpp create mode 100644 test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp create mode 100644 test/CodeCompletion/stdin.c create mode 100644 test/CodeGen/arm-vector-arguments.c create mode 100644 test/CodeGen/asm-variable.c create mode 100644 test/CodeGen/attr-naked.c create mode 100644 test/CodeGen/blockwithlocalstatic.c create mode 100644 test/CodeGen/bool_test.c create mode 100644 test/CodeGen/char-literal.c create mode 100644 test/CodeGen/debug-info-line.c create mode 100644 test/CodeGen/debug-info-var-location.c create mode 100644 test/CodeGen/exceptions.c delete mode 100644 test/CodeGen/ext-vector-shuffle.c create mode 100644 test/CodeGen/imaginary.c create mode 100644 test/CodeGen/may-alias.c create mode 100644 test/CodeGen/mcount.c create mode 100644 test/CodeGen/mms-bitfields.c create mode 100644 test/CodeGen/mmx-builtins.c create mode 100644 test/CodeGen/mmx-shift-with-immediate.c create mode 100644 test/CodeGen/ms-anonymous-struct.c create mode 100644 test/CodeGen/mult-alt-generic.c create mode 100644 test/CodeGen/mult-alt-x86.c create mode 100644 test/CodeGen/pointer-signext.c create mode 100644 test/CodeGen/regparm-flag.c create mode 100644 test/CodeGen/string-literal-short-wstring.c create mode 100644 test/CodeGen/transparent-union.c create mode 100644 test/CodeGen/va_list_test.c create mode 100644 test/CodeGen/volatile-2.c create mode 100644 test/CodeGen/x86_32-arguments-darwin.c create mode 100644 test/CodeGen/x86_32-arguments-linux.c create mode 100644 test/CodeGen/x86_32-arguments-realign.c delete mode 100644 test/CodeGen/x86_32-arguments.c create mode 100644 test/CodeGenCXX/apple-kext-indirect-call-2.C create mode 100644 test/CodeGenCXX/apple-kext-indirect-call.C create mode 100644 test/CodeGenCXX/apple-kext-indirect-virtual-dtor-call.cpp create mode 100644 test/CodeGenCXX/apple-kext-linkage.C create mode 100644 test/CodeGenCXX/apple-kext-no-staticinit-section.C create mode 100644 test/CodeGenCXX/asm.cpp create mode 100644 test/CodeGenCXX/attr-used.cpp create mode 100644 test/CodeGenCXX/block-byref-cxx-objc.cpp create mode 100644 test/CodeGenCXX/blocks.cpp create mode 100644 test/CodeGenCXX/builtins.cpp create mode 100644 test/CodeGenCXX/constructor-attr.cpp create mode 100644 test/CodeGenCXX/constructor-direct-call.cpp create mode 100644 test/CodeGenCXX/cxx-block-objects.cpp create mode 100644 test/CodeGenCXX/debug-info-ctor2.cpp create mode 100644 test/CodeGenCXX/debug-info-large-constant.cpp create mode 100644 test/CodeGenCXX/debug-info-member.cpp create mode 100644 test/CodeGenCXX/debug-info-method.cpp create mode 100644 test/CodeGenCXX/debug-info-namespace.cpp create mode 100644 test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp create mode 100644 test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp create mode 100644 test/CodeGenCXX/friend-redecl.cpp create mode 100644 test/CodeGenCXX/gnu-conditional-scalar-ext.cpp create mode 100644 test/CodeGenCXX/goto.cpp create mode 100644 test/CodeGenCXX/mangle-abi-examples.cpp create mode 100644 test/CodeGenCXX/mangle-local-class-vtables.cpp create mode 100644 test/CodeGenCXX/mangle-local-classes-nested.cpp create mode 100644 test/CodeGenCXX/mangle-neon-vectors.cpp create mode 100644 test/CodeGenCXX/mangle-ref-qualifiers.cpp create mode 100644 test/CodeGenCXX/mangle-variadic-templates.cpp create mode 100644 test/CodeGenCXX/nrvo-noreturn.cc create mode 100644 test/CodeGenCXX/pr9130.cpp create mode 100644 test/CodeGenCXX/pragma-pack.cpp create mode 100644 test/CodeGenCXX/rtti-visibility.cpp create mode 100644 test/CodeGenCXX/rvalue-references.cpp create mode 100644 test/CodeGenCXX/specialized-static-data-mem-init.cpp create mode 100644 test/CodeGenCXX/stmtexpr.cpp create mode 100644 test/CodeGenCXX/template-dependent-bind-temporary.cpp create mode 100644 test/CodeGenCXX/template-inner-struct-visibility-hidden.cpp create mode 100644 test/CodeGenCXX/thunks-available-externally.cpp create mode 100644 test/CodeGenCXX/variadic-templates.cpp create mode 100644 test/CodeGenCXX/volatile-1.cpp create mode 100644 test/CodeGenCXX/vtable-available-externally.cpp create mode 100644 test/CodeGenCXX/vtable-debug-info.cpp create mode 100644 test/CodeGenCXX/warn-padded-packed.cpp create mode 100644 test/CodeGenObjC/arm-atomic-scalar-setter-getter.m create mode 100644 test/CodeGenObjC/bitfield-gnu.m create mode 100644 test/CodeGenObjC/block-6.m create mode 100644 test/CodeGenObjC/constant-string-class.m create mode 100644 test/CodeGenObjC/debug-info-default-synth-ivar.m create mode 100644 test/CodeGenObjC/debug-info-fnname.m create mode 100644 test/CodeGenObjC/debug-info-foreach.m create mode 100644 test/CodeGenObjC/debug-info-getter-name.m create mode 100644 test/CodeGenObjC/debug-info-selector.m create mode 100644 test/CodeGenObjC/debug-info-self.m create mode 100644 test/CodeGenObjC/debug-info-static-var.m delete mode 100644 test/CodeGenObjC/encode-test-1.m create mode 100644 test/CodeGenObjC/exceptions-nonfragile.m create mode 100644 test/CodeGenObjC/ivar-layout-array0-struct.m create mode 100644 test/CodeGenObjC/local-static-block.m create mode 100644 test/CodeGenObjC/property-ref-cast-to-void.m create mode 100644 test/CodeGenObjC/property-type-mismatch.m create mode 100644 test/CodeGenObjCXX/block-var-layout.mm create mode 100644 test/CodeGenObjCXX/blocks.mm create mode 100644 test/CodeGenObjCXX/property-dot-copy.mm create mode 100644 test/CodeGenObjCXX/property-dot-reference.mm create mode 100644 test/CodeGenObjCXX/property-object-conditional-exp.mm create mode 100644 test/CodeGenObjCXX/refence-assign-write-barrier.mm create mode 100644 test/CodeGenObjCXX/write-barrier-global-assign.mm create mode 100644 test/CodeGenOpenCL/ext-vector-shuffle.cl create mode 100644 test/CodeGenOpenCL/kernel-metadata.cl create mode 100644 test/CodeGenOpenCL/single-precision-constant.cl create mode 100644 test/Driver/apple-kext-mkernel.c create mode 100644 test/Driver/m_and_mm.c create mode 100644 test/Driver/sysroot-flags.c create mode 100644 test/FixIt/fixit-objc-message.m create mode 100644 test/Headers/arm-neon-header.c create mode 100644 test/Headers/stdbool.cpp create mode 100644 test/Index/Inputs/a.h create mode 100644 test/Index/Inputs/b.h create mode 100644 test/Index/Inputs/get-cursor-includes-1.h create mode 100644 test/Index/Inputs/get-cursor-includes-2.h create mode 100644 test/Index/annotate-tokens-cxx0x.cpp create mode 100644 test/Index/c-index-redecls.c create mode 100644 test/Index/cindex-on-invalid-usrs.m delete mode 100644 test/Index/code-complete-errors.c create mode 100644 test/Index/complete-driver-errors.c create mode 100644 test/Index/complete-exprs.cpp create mode 100644 test/Index/complete-exprs.m create mode 100644 test/Index/complete-kvc.m create mode 100644 test/Index/complete-synthesized.m create mode 100644 test/Index/fix-its.c create mode 100644 test/Index/get-cursor-includes.c create mode 100644 test/Index/get-cursor.cpp create mode 100644 test/Index/nested-binaryoperators.cpp create mode 100644 test/Index/overrides.cpp create mode 100644 test/Index/overrides.m create mode 100644 test/Index/preamble-reparse-chained.c create mode 100644 test/Index/print-display-names.cpp create mode 100644 test/Index/recursive-cxx-member-calls.cpp create mode 100644 test/Index/recursive-member-access.c create mode 100644 test/Index/retain-target-options.c create mode 100644 test/Index/usrs-cxx0x.cpp create mode 100644 test/Index/warning-flags.c create mode 100644 test/Lexer/clang-keywords.cpp create mode 100644 test/Lexer/has_attribute.cpp create mode 100644 test/Lexer/has_feature_type_traits.cpp create mode 100644 test/Lexer/pragma-message.c create mode 100644 test/Lexer/pragma-operators.cpp create mode 100644 test/Lexer/rdar-8914293.c create mode 100644 test/Lexer/wchar.c create mode 100644 test/Misc/Inputs/working-directory.h create mode 100644 test/Misc/working-directory.c delete mode 100644 test/PCH/Inputs/chain-cxx1.h delete mode 100644 test/PCH/Inputs/chain-cxx2.h create mode 100644 test/PCH/Inputs/chain-remap-types1.h create mode 100644 test/PCH/Inputs/chain-remap-types2.h create mode 100644 test/PCH/Inputs/typo.h create mode 100644 test/PCH/Inputs/va_arg.h create mode 100644 test/PCH/attrs-PR8406.c delete mode 100644 test/PCH/attrs.h create mode 100644 test/PCH/chain-remap-types.m create mode 100644 test/PCH/check-deserializations.cpp create mode 100644 test/PCH/cmdline-include.c create mode 100644 test/PCH/cmdline-include1.h create mode 100644 test/PCH/cmdline-include2.h create mode 100644 test/PCH/cuda-kernel-call.cu create mode 100644 test/PCH/cxx-variadic-templates.cpp create mode 100644 test/PCH/cxx-variadic-templates.h create mode 100644 test/PCH/headersearch.cpp create mode 100644 test/PCH/missing-file.cpp create mode 100644 test/PCH/opencl-extensions.cl create mode 100644 test/PCH/pragma-diag-section.cpp create mode 100644 test/PCH/pragma-diag.c create mode 100644 test/PCH/rdar8852495.c create mode 100644 test/PCH/typo.m create mode 100644 test/PCH/va_arg.cpp create mode 100644 test/Parser/MicrosoftExtensions.cpp create mode 100644 test/Parser/cuda-kernel-call.cu create mode 100644 test/Parser/cxx-in-c.c create mode 100644 test/Parser/cxx0x-in-cxx98.cpp create mode 100644 test/Parser/cxx0x-override-control-keywords.cpp create mode 100644 test/Parser/for.cpp delete mode 100644 test/Parser/goto-ident.c create mode 100644 test/Parser/goto.c create mode 100644 test/Parser/missing-end-2.m create mode 100644 test/Parser/missing-end-3.m create mode 100644 test/Parser/opencl-kernel.cl create mode 100644 test/Parser/opencl-pragma.cl create mode 100644 test/Parser/opencl-storage-class.cl create mode 100644 test/Parser/placeholder-recovery.m create mode 100644 test/Preprocessor/pragma_diagnostic_sections.cpp create mode 100644 test/Preprocessor/predefined-macros.c create mode 100644 test/Preprocessor/print_line_empty_file.c create mode 100644 test/Preprocessor/warn-macro-unused.c create mode 100644 test/Rewriter/blockstruct.m create mode 100644 test/Rewriter/property-dot-syntax.mm create mode 100644 test/Rewriter/rewrite-captured-nested-bvar.c create mode 100644 test/Rewriter/rewrite-nested-blocks-2.mm create mode 100755 test/Rewriter/rewrite-nested-property-in-blocks.mm create mode 100644 test/Rewriter/rewrite-property-set-cfstring.mm create mode 100644 test/Rewriter/rewrite-protocol-property.mm create mode 100644 test/Rewriter/rewrite-user-defined-accessors.mm create mode 100644 test/Sema/MicrosoftExtensions.c create mode 100644 test/Sema/arm-neon-types.c create mode 100644 test/Sema/attr-alias.c create mode 100644 test/Sema/attr-deprecated-message.c create mode 100644 test/Sema/attr-naked.c create mode 100644 test/Sema/attr-unavailable-message.c delete mode 100644 test/Sema/bitfield-promote-int-16bit.c create mode 100644 test/Sema/builtin_objc_msgSend.c create mode 100644 test/Sema/constant-conversion.c delete mode 100644 test/Sema/if-empty-body.c create mode 100644 test/Sema/neon-vector-types.c delete mode 100644 test/Sema/opencl-init.c delete mode 100644 test/Sema/promote-int-16bit.c create mode 100644 test/Sema/short-enums.c create mode 100644 test/Sema/typeof-use-deprecated.c create mode 100644 test/Sema/uninit-variables.c create mode 100644 test/Sema/warn-unused-label.c create mode 100644 test/SemaCUDA/config-type.cu create mode 100644 test/SemaCUDA/cuda.h create mode 100644 test/SemaCUDA/kernel-call.cu create mode 100644 test/SemaCUDA/qualifiers.cu create mode 100644 test/SemaCXX/PR7944.cpp create mode 100644 test/SemaCXX/PR8012.cpp create mode 100644 test/SemaCXX/PR8755.cpp create mode 100644 test/SemaCXX/PR8884.cpp create mode 100644 test/SemaCXX/addr-of-overloaded-function-casting.cpp create mode 100644 test/SemaCXX/array-bounds.cpp create mode 100644 test/SemaCXX/attr-nonnull.cpp create mode 100644 test/SemaCXX/attr-weak.cpp create mode 100644 test/SemaCXX/block-call.cpp create mode 100644 test/SemaCXX/builtin_objc_msgSend.cpp create mode 100644 test/SemaCXX/compound-literal.cpp delete mode 100644 test/SemaCXX/crash-8124080.cpp delete mode 100644 test/SemaCXX/crash-PR7625.cpp create mode 100644 test/SemaCXX/crashes.cpp create mode 100644 test/SemaCXX/delete.cpp create mode 100644 test/SemaCXX/deleted-function-extension.cpp create mode 100644 test/SemaCXX/dependent-auto.cpp create mode 100644 test/SemaCXX/enum-bitfield.cpp create mode 100644 test/SemaCXX/enum-scoped.cpp delete mode 100644 test/SemaCXX/format-attribute.cpp create mode 100644 test/SemaCXX/gnu-case-ranges.cpp create mode 100644 test/SemaCXX/if-empty-body.cpp create mode 100644 test/SemaCXX/issue547.cpp create mode 100644 test/SemaCXX/linkage.cpp create mode 100644 test/SemaCXX/lookup-member.cpp create mode 100644 test/SemaCXX/non-empty-class-size-zero.cpp create mode 100644 test/SemaCXX/nullptr-98.cpp create mode 100644 test/SemaCXX/overloaded-builtin-operators-0x.cpp create mode 100644 test/SemaCXX/overloaded-name.cpp create mode 100644 test/SemaCXX/pragma-pack.cpp create mode 100644 test/SemaCXX/pragma-unused.cpp delete mode 100644 test/SemaCXX/ptrtomember-badcall.cpp create mode 100644 test/SemaCXX/ptrtomember.cpp create mode 100644 test/SemaCXX/redeclared-auto.cpp create mode 100644 test/SemaCXX/rval-references-examples.cpp delete mode 100644 test/SemaCXX/rval-references-xfail.cpp create mode 100644 test/SemaCXX/sourceranges.cpp create mode 100644 test/SemaCXX/trailing-return-0x.cpp create mode 100644 test/SemaCXX/type-formatting.cpp create mode 100644 test/SemaCXX/undefined-internal.cpp create mode 100644 test/SemaCXX/uninit-variables.cpp create mode 100644 test/SemaCXX/uninitialized.cpp create mode 100644 test/SemaCXX/unused-with-error.cpp create mode 100644 test/SemaCXX/vtable-instantiation.cc create mode 100644 test/SemaCXX/warn-enum-compare.cpp create mode 100644 test/SemaCXX/warn-large-by-value-copy.cpp create mode 100644 test/SemaCXX/warn-literal-conversion.cpp create mode 100644 test/SemaCXX/warn-overloaded-virtual.cpp create mode 100644 test/SemaCXX/warn-self-assign.cpp create mode 100644 test/SemaCXX/writable-strings-deprecated.cpp create mode 100644 test/SemaObjC/block-return.m create mode 100644 test/SemaObjC/builtin_objc_lib_functions.m create mode 100644 test/SemaObjC/builtin_objc_msgSend.m create mode 100644 test/SemaObjC/comptypes-10.m create mode 100644 test/SemaObjC/custom-atomic-property.m create mode 100644 test/SemaObjC/direct-synthesized-ivar-access.m create mode 100644 test/SemaObjC/error-missing-getter.m create mode 100644 test/SemaObjC/incomplete-implementation.m create mode 100644 test/SemaObjC/method-conflict-1.m create mode 100644 test/SemaObjC/method-conflict-2.m create mode 100644 test/SemaObjC/method-in-class-extension-impl.m create mode 100644 test/SemaObjC/method-lookup-5.m create mode 100644 test/SemaObjC/method-prototype-scope.m create mode 100644 test/SemaObjC/method-typecheck-3.m create mode 100644 test/SemaObjC/no-objc-exceptions.m create mode 100644 test/SemaObjC/nonnull.h create mode 100644 test/SemaObjC/property-dot-receiver.m create mode 100644 test/SemaObjC/provisional-ivar-lookup.m create mode 100644 test/SemaObjC/selector-2.m create mode 100644 test/SemaObjC/selector-3.m create mode 100644 test/SemaObjC/self-assign.m create mode 100644 test/SemaObjC/setter-dotsyntax.m create mode 100644 test/SemaObjC/special-dep-unavail-warning.m create mode 100644 test/SemaObjC/synth-provisional-ivars-1.m create mode 100644 test/SemaObjC/uninit-variables.m create mode 100644 test/SemaObjC/warn-deprecated-implementations.m create mode 100644 test/SemaObjC/warn-implicit-atomic-property.m create mode 100644 test/SemaObjCXX/conversion-ranking.mm create mode 100644 test/SemaObjCXX/propert-dot-error.mm create mode 100644 test/SemaObjCXX/properties.mm create mode 100644 test/SemaObjCXX/property-synthesis-error.mm create mode 100644 test/SemaObjCXX/reserved-keyword-methods.mm delete mode 100644 test/SemaObjCXX/reserved-keyword-selectors.mm create mode 100644 test/SemaOpenCL/cond.cl create mode 100644 test/SemaOpenCL/extension-fp64.cl create mode 100644 test/SemaOpenCL/init.cl create mode 100644 test/SemaTemplate/enum-forward.cpp create mode 100644 test/SemaTemplate/member-access-ambig.cpp delete mode 100644 test/SemaTemplate/variadic-class-template-1.cpp delete mode 100644 test/SemaTemplate/variadic-class-template-2.cpp delete mode 100644 test/SemaTemplate/variadic-parse.cpp delete mode 100644 test/SemaTemplate/variadic-unsupported.cpp create mode 100644 test/Unit/lit.cfg create mode 100644 test/Unit/lit.site.cfg.in create mode 100644 tools/driver/clang_symlink.cmake create mode 100644 tools/libclang/CXString.cpp create mode 100644 tools/libclang/CXString.h create mode 100644 tools/libclang/CXTranslationUnit.h create mode 100644 unittests/Basic/FileManagerTest.cpp create mode 100644 unittests/Basic/Makefile create mode 100644 unittests/CMakeLists.txt create mode 100644 unittests/Frontend/FrontendActionTest.cpp create mode 100644 unittests/Frontend/Makefile create mode 100644 unittests/Makefile create mode 100644 www/analyzer/release_notes.html create mode 100755 www/builtins.py create mode 100644 www/favicon.ico create mode 100644 www/related.html create mode 100644 www/robots.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ba2a622d4e1c..0d923b91e1236 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,67 @@ -# Clang version information +# If we are not building as a part of LLVM, build Clang as an +# standalone project, using LLVM as an external library: +if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) + project(Clang) + cmake_minimum_required(VERSION 2.8) + + set(CLANG_PATH_TO_LLVM_SOURCE "" CACHE PATH + "Path to LLVM source code. Not necessary if using an installed LLVM.") + set(CLANG_PATH_TO_LLVM_BUILD "" CACHE PATH + "Path to the directory where LLVM was built or installed.") + + if( CLANG_PATH_TO_LLVM_SOURCE ) + if( NOT EXISTS "${CLANG_PATH_TO_LLVM_SOURCE}/cmake/config-ix.cmake" ) + message(FATAL_ERROR "Please set CLANG_PATH_TO_LLVM_SOURCE to the root directory of LLVM source code.") + else() + get_filename_component(LLVM_MAIN_SRC_DIR ${CLANG_PATH_TO_LLVM_SOURCE} + ABSOLUTE) + list(APPEND CMAKE_MODULE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules") + endif() + endif() + + if( NOT EXISTS "${CLANG_PATH_TO_LLVM_BUILD}/bin/tblgen${CMAKE_EXECUTABLE_SUFFIX}" ) + message(FATAL_ERROR "Please set CLANG_PATH_TO_LLVM_BUILD to a directory containing a LLVM build.") + endif() + + list(APPEND CMAKE_MODULE_PATH "${CLANG_PATH_TO_LLVM_BUILD}/share/llvm/cmake") + + get_filename_component(PATH_TO_LLVM_BUILD ${CLANG_PATH_TO_LLVM_BUILD} + ABSOLUTE) + + include(AddLLVM) + include(TableGen) + include("${CLANG_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVM.cmake") + include(HandleLLVMOptions) + + set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") + + set(LLVM_MAIN_INCLUDE_DIR "${LLVM_MAIN_SRC_DIR}/include") + set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR}) + + set(CMAKE_INCLUDE_CURRENT_DIR ON) + include_directories("${PATH_TO_LLVM_BUILD}/include" "${LLVM_MAIN_INCLUDE_DIR}") + if( NOT PATH_TO_LLVM_BUILD STREQUAL LLVM_MAIN_SRC_DIR ) + include_directories("${LLVM_MAIN_INCLUDE_DIR}") + endif() + link_directories("${PATH_TO_LLVM_BUILD}/lib") + + set(LLVM_TABLEGEN_EXE "${PATH_TO_LLVM_BUILD}/bin/tblgen") + + set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) + set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib ) + set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib ) + + add_definitions( -D__STDC_LIMIT_MACROS ) + add_definitions( -D__STDC_CONSTANT_MACROS ) + + set( CLANG_BUILT_STANDALONE 1 ) +endif() + +set(CLANG_RESOURCE_DIR "" CACHE STRING + "Relative directory from the Clang binary to its resource files.") + +set(C_INCLUDE_DIRS "" CACHE STRING + "Colon separated list of directories clang will search for headers.") set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) @@ -24,7 +87,7 @@ if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR ) endif() # Compute the Clang version from the LLVM version. -string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION +string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION ${PACKAGE_VERSION}) message(STATUS "Clang version: ${CLANG_VERSION}") @@ -47,23 +110,26 @@ configure_file( # Add appropriate flags for GCC if (CMAKE_COMPILER_IS_GNUCXX) - # FIXME: Turn off exceptions, RTTI: - # -fno-exceptions -fno-rtti - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings") endif () if (APPLE) set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-flat_namespace -Wl,-undefined -Wl,suppress") endif () +configure_file( + ${CLANG_SOURCE_DIR}/include/clang/Config/config.h.cmake + ${CLANG_BINARY_DIR}/include/clang/Config/config.h) + macro(add_clang_library name) - set(srcs ${ARGN}) + llvm_process_sources(srcs ${ARGN}) if(MSVC_IDE OR XCODE) - file( GLOB_RECURSE headers *.h *.td *.def) - set(srcs ${srcs} ${headers}) string( REGEX MATCHALL "/[^/]+" split_path ${CMAKE_CURRENT_SOURCE_DIR}) list( GET split_path -1 dir) - file( GLOB_RECURSE headers + file( GLOB_RECURSE headers + ../../../include/clang/StaticAnalyzer${dir}/*.h + ../../../include/clang/StaticAnalyzer${dir}/*.td + ../../../include/clang/StaticAnalyzer${dir}/*.def ../../include/clang${dir}/*.h ../../include/clang${dir}/*.td ../../include/clang${dir}/*.def) @@ -88,10 +154,15 @@ macro(add_clang_library name) if( LLVM_LINK_COMPONENTS ) llvm_config(${name} ${LLVM_LINK_COMPONENTS}) endif( LLVM_LINK_COMPONENTS ) - get_system_libs(llvm_system_libs) - if( llvm_system_libs ) - target_link_libraries(${name} ${llvm_system_libs}) - endif( llvm_system_libs ) + if (LLVM_COMMON_LIBS) + target_link_libraries(${name} ${LLVM_COMMON_LIBS}) + endif() + if( NOT MINGW ) + get_system_libs(llvm_system_libs) + if( llvm_system_libs ) + target_link_libraries(${name} ${llvm_system_libs}) + endif() + endif() add_dependencies(${name} ClangDiagnosticCommon) if(MSVC) get_target_property(cflag ${name} COMPILE_FLAGS) @@ -107,12 +178,7 @@ macro(add_clang_library name) endmacro(add_clang_library) macro(add_clang_executable name) - set(srcs ${ARGN}) - if(MSVC_IDE) - file( GLOB_RECURSE headers *.h *.td *.def) - set(srcs ${srcs} ${headers}) - endif(MSVC_IDE) - add_llvm_executable( ${name} ${srcs} ) + add_llvm_executable( ${name} ${ARGN} ) endmacro(add_clang_executable) include_directories( @@ -136,7 +202,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ PATTERN "*.inc" ) -add_definitions( -D_GNU_SOURCE ) +add_definitions( -D_GNU_SOURCE -DHAVE_CLANG_CONFIG_H ) option(CLANG_BUILD_EXAMPLES "Build CLANG example programs." OFF) if(CLANG_BUILD_EXAMPLES) @@ -146,7 +212,23 @@ endif () add_subdirectory(include) add_subdirectory(lib) add_subdirectory(tools) +add_subdirectory(runtime) # TODO: docs. +if( LLVM_INCLUDE_TESTS ) add_subdirectory(test) +endif() +# FIXME: unittests require gtest. +if( NOT CLANG_BUILT_STANDALONE ) + add_subdirectory(unittests) +endif() + +# Workaround for MSVS10 to avoid the Dialog Hell +# FIXME: This could be removed with future version of CMake. +if( CLANG_BUILT_STANDALONE AND MSVC_VERSION EQUAL 1600 ) + set(CLANG_SLN_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/Clang.sln") + if( EXISTS "${CLANG_SLN_FILENAME}" ) + file(APPEND "${CLANG_SLN_FILENAME}" "\n# This should be regenerated!\n") + endif() +endif() diff --git a/Makefile b/Makefile index f871c25274ed4..1216dadd297ee 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ ifndef CLANG_LEVEL IS_TOP_LEVEL := 1 CLANG_LEVEL := . -DIRS := include lib tools runtime docs +DIRS := include lib tools runtime docs unittests PARALLEL_DIRS := @@ -37,6 +37,10 @@ LEVEL := $(CLANG_LEVEL)/../.. # Include LLVM common makefile. include $(LEVEL)/Makefile.common +ifneq ($(ENABLE_DOCS),1) + DIRS := $(filter-out docs, $(DIRS)) +endif + # Set common Clang build flags. CPP.Flags += -I$(PROJ_SRC_DIR)/$(CLANG_LEVEL)/include -I$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include ifdef CLANG_VENDOR @@ -44,7 +48,7 @@ CPP.Flags += -DCLANG_VENDOR='"$(CLANG_VENDOR) "' endif # Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't -# work with it enabled with GCC), Clang/llvm-gc don't support it yet, and newer +# work with it enabled with GCC), Clang/llvm-gcc don't support it yet, and newer # GCC's have false positive warnings with it on Linux (which prove a pain to # fix). For example: # http://gcc.gnu.org/PR41874 @@ -60,10 +64,12 @@ ifeq ($(IS_TOP_LEVEL),1) ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) $(RecursiveTargets):: - $(Verb) if [ ! -f test/Makefile ]; then \ - $(MKDIR) test; \ - $(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \ - fi + $(Verb) for dir in test unittests; do \ + if [ ! -f $${dir}/Makefile ]; then \ + $(MKDIR) $${dir}; \ + $(CP) $(PROJ_SRC_DIR)/$${dir}/Makefile $${dir}/Makefile; \ + fi \ + done endif test:: diff --git a/TODO.txt b/TODO.txt index c63b1b33d6d6d..8c27515ae74a9 100644 --- a/TODO.txt +++ b/TODO.txt @@ -2,7 +2,6 @@ // Minor random things that can be improved //===---------------------------------------------------------------------===// - Warn about "X && 0x1000" saying that the user may mean "X & 0x1000". We should do this for any immediate except zero, so long as it doesn't come from a macro expansion. Likewise for ||. @@ -73,3 +72,4 @@ Options to support: -fpreprocessed mode. -nostdinc++ -imultilib + diff --git a/bindings/python/clang/cindex.py b/bindings/python/clang/cindex.py index f0f81b5d6948c..08ad80234e09c 100644 --- a/bindings/python/clang/cindex.py +++ b/bindings/python/clang/cindex.py @@ -191,19 +191,19 @@ class Diagnostic(object): self.ptr = ptr def __del__(self): - _clang_disposeDiagnostic(self.ptr) + _clang_disposeDiagnostic(self) @property def severity(self): - return _clang_getDiagnosticSeverity(self.ptr) + return _clang_getDiagnosticSeverity(self) @property def location(self): - return _clang_getDiagnosticLocation(self.ptr) + return _clang_getDiagnosticLocation(self) @property def spelling(self): - return _clang_getDiagnosticSpelling(self.ptr) + return _clang_getDiagnosticSpelling(self) @property def ranges(self): @@ -215,9 +215,11 @@ class Diagnostic(object): return int(_clang_getDiagnosticNumRanges(self.diag)) def __getitem__(self, key): + if (key >= len(self)): + raise IndexError return _clang_getDiagnosticRange(self.diag, key) - return RangeIterator(self.ptr) + return RangeIterator(self) @property def fixits(self): @@ -236,12 +238,15 @@ class Diagnostic(object): return FixIt(range, value) - return FixItIterator(self.ptr) + return FixItIterator(self) def __repr__(self): return "" % ( self.severity, self.location, self.spelling) + def from_param(self): + return self.ptr + class FixIt(object): """ A FixIt represents a transformation to be applied to the source to @@ -397,6 +402,51 @@ CursorKind.OBJC_CATEGORY_IMPL_DECL = CursorKind(19) # A typedef. CursorKind.TYPEDEF_DECL = CursorKind(20) +# A C++ class method. +CursorKind.CXX_METHOD = CursorKind(21) + +# A C++ namespace. +CursorKind.NAMESPACE = CursorKind(22) + +# A linkage specification, e.g. 'extern "C"'. +CursorKind.LINKAGE_SPEC = CursorKind(23) + +# A C++ constructor. +CursorKind.CONSTRUCTOR = CursorKind(24) + +# A C++ destructor. +CursorKind.DESTRUCTOR = CursorKind(25) + +# A C++ conversion function. +CursorKind.CONVERSION_FUNCTION = CursorKind(26) + +# A C++ template type parameter +CursorKind.TEMPLATE_TYPE_PARAMETER = CursorKind(27) + +# A C++ non-type template paramater. +CursorKind.TEMPLATE_NON_TYPE_PARAMETER = CursorKind(28) + +# A C++ template template parameter. +CursorKind.TEMPLATE_TEMPLATE_PARAMTER = CursorKind(29) + +# A C++ function template. +CursorKind.FUNCTION_TEMPLATE = CursorKind(30) + +# A C++ class template. +CursorKind.CLASS_TEMPLATE = CursorKind(31) + +# A C++ class template partial specialization. +CursorKind.CLASS_TEMPLATE_PARTIAL_SPECIALIZATION = CursorKind(32) + +# A C++ namespace alias declaration. +CursorKind.NAMESPACE_ALIAS = CursorKind(33) + +# A C++ using directive +CursorKind.USING_DIRECTIVE = CursorKind(34) + +# A C++ using declaration +CursorKind.USING_DECLARATION = CursorKind(35) + ### # Reference Kinds @@ -415,6 +465,25 @@ CursorKind.OBJC_CLASS_REF = CursorKind(42) # while the type of the variable "size" is referenced. The cursor # referenced by the type of size is the typedef for size_type. CursorKind.TYPE_REF = CursorKind(43) +CursorKind.CXX_BASE_SPECIFIER = CursorKind(44) + +# A reference to a class template, function template, template +# template parameter, or class template partial specialization. +CursorKind.TEMPLATE_REF = CursorKind(45) + +# A reference to a namespace or namepsace alias. +CursorKind.NAMESPACE_REF = CursorKind(46) + +# A reference to a member of a struct, union, or class that occurs in +# some non-expression context, e.g., a designated initializer. +CursorKind.MEMBER_REF = CursorKind(47) + +# A reference to a labeled statement. +CursorKind.LABEL_REF = CursorKind(48) + +# A reference toa a set of overloaded functions or function templates +# that has not yet been resolved to a specific function or function template. +CursorKind.OVERLOADED_DECL_REF = CursorKind(49) ### # Invalid/Error Kinds @@ -422,6 +491,7 @@ CursorKind.TYPE_REF = CursorKind(43) CursorKind.INVALID_FILE = CursorKind(70) CursorKind.NO_DECL_FOUND = CursorKind(71) CursorKind.NOT_IMPLEMENTED = CursorKind(72) +CursorKind.INVALID_CODE = CursorKind(73) ### # Expression Kinds @@ -447,6 +517,9 @@ CursorKind.CALL_EXPR = CursorKind(103) # An expression that sends a message to an Objective-C object or class. CursorKind.OBJC_MESSAGE_EXPR = CursorKind(104) +# An expression that represents a block literal. +CursorKind.BLOCK_EXPR = CursorKind(105) + # A statement whose specific kind is not exposed via this interface. # # Unexposed statements have the same operations as any other kind of statement; @@ -454,6 +527,10 @@ CursorKind.OBJC_MESSAGE_EXPR = CursorKind(104) # the specific kind of the statement is not reported. CursorKind.UNEXPOSED_STMT = CursorKind(200) +# A labelled statement in a function. +CursorKind.LABEL_STMT = CursorKind(201) + + ### # Other Kinds @@ -463,6 +540,23 @@ CursorKind.UNEXPOSED_STMT = CursorKind(200) # traversing the contents of a translation unit. CursorKind.TRANSLATION_UNIT = CursorKind(300) +### +# Attributes + +# An attribute whoe specific kind is note exposed via this interface +CursorKind.UNEXPOSED_ATTR = CursorKind(400) + +CursorKind.IB_ACTION_ATTR = CursorKind(401) +CursorKind.IB_OUTLET_ATTR = CursorKind(402) +CursorKind.IB_OUTLET_COLLECTION_ATTR = CursorKind(403) + +### +# Preprocessing +CursorKind.PREPROCESSING_DIRECTIVE = CursorKind(500) +CursorKind.MACRO_DEFINITION = CursorKind(501) +CursorKind.MACRO_INSTANTIATION = CursorKind(502) +CursorKind.INCLUSION_DIRECTIVE = CursorKind(503) + ### Cursors ### class Cursor(Structure): @@ -592,40 +686,209 @@ _clang_getDiagnostic.argtypes = [c_object_p, c_uint] _clang_getDiagnostic.restype = c_object_p _clang_disposeDiagnostic = lib.clang_disposeDiagnostic -_clang_disposeDiagnostic.argtypes = [c_object_p] +_clang_disposeDiagnostic.argtypes = [Diagnostic] _clang_getDiagnosticSeverity = lib.clang_getDiagnosticSeverity -_clang_getDiagnosticSeverity.argtypes = [c_object_p] +_clang_getDiagnosticSeverity.argtypes = [Diagnostic] _clang_getDiagnosticSeverity.restype = c_int _clang_getDiagnosticLocation = lib.clang_getDiagnosticLocation -_clang_getDiagnosticLocation.argtypes = [c_object_p] +_clang_getDiagnosticLocation.argtypes = [Diagnostic] _clang_getDiagnosticLocation.restype = SourceLocation _clang_getDiagnosticSpelling = lib.clang_getDiagnosticSpelling -_clang_getDiagnosticSpelling.argtypes = [c_object_p] +_clang_getDiagnosticSpelling.argtypes = [Diagnostic] _clang_getDiagnosticSpelling.restype = _CXString _clang_getDiagnosticSpelling.errcheck = _CXString.from_result _clang_getDiagnosticNumRanges = lib.clang_getDiagnosticNumRanges -_clang_getDiagnosticNumRanges.argtypes = [c_object_p] +_clang_getDiagnosticNumRanges.argtypes = [Diagnostic] _clang_getDiagnosticNumRanges.restype = c_uint _clang_getDiagnosticRange = lib.clang_getDiagnosticRange -_clang_getDiagnosticRange.argtypes = [c_object_p, c_uint] +_clang_getDiagnosticRange.argtypes = [Diagnostic, c_uint] _clang_getDiagnosticRange.restype = SourceRange _clang_getDiagnosticNumFixIts = lib.clang_getDiagnosticNumFixIts -_clang_getDiagnosticNumFixIts.argtypes = [c_object_p] +_clang_getDiagnosticNumFixIts.argtypes = [Diagnostic] _clang_getDiagnosticNumFixIts.restype = c_uint _clang_getDiagnosticFixIt = lib.clang_getDiagnosticFixIt -_clang_getDiagnosticFixIt.argtypes = [c_object_p, c_uint, POINTER(SourceRange)] +_clang_getDiagnosticFixIt.argtypes = [Diagnostic, c_uint, POINTER(SourceRange)] _clang_getDiagnosticFixIt.restype = _CXString _clang_getDiagnosticFixIt.errcheck = _CXString.from_result ### +class CompletionChunk: + class Kind: + def __init__(self, name): + self.name = name + + def __str__(self): + return self.name + + def __repr__(self): + return "" % self + + def __init__(self, completionString, key): + self.cs = completionString + self.key = key + + def __repr__(self): + return "{'" + self.spelling + "', " + str(self.kind) + "}" + + @property + def spelling(self): + return _clang_getCompletionChunkText(self.cs, self.key).spelling + + @property + def kind(self): + res = _clang_getCompletionChunkKind(self.cs, self.key) + return completionChunkKindMap[res] + + @property + def string(self): + res = _clang_getCompletionChunkCompletionString(self.cs, self.key) + + if (res): + return CompletionString(res) + else: + None + + def isKindOptional(self): + return self.kind == completionChunkKindMap[0] + + def isKindTypedText(self): + return self.kind == completionChunkKindMap[1] + + def isKindPlaceHolder(self): + return self.kind == completionChunkKindMap[3] + + def isKindInformative(self): + return self.kind == completionChunkKindMap[4] + + def isKindResultType(self): + return self.kind == completionChunkKindMap[15] + +completionChunkKindMap = { + 0: CompletionChunk.Kind("Optional"), + 1: CompletionChunk.Kind("TypedText"), + 2: CompletionChunk.Kind("Text"), + 3: CompletionChunk.Kind("Placeholder"), + 4: CompletionChunk.Kind("Informative"), + 5: CompletionChunk.Kind("CurrentParameter"), + 6: CompletionChunk.Kind("LeftParen"), + 7: CompletionChunk.Kind("RightParen"), + 8: CompletionChunk.Kind("LeftBracket"), + 9: CompletionChunk.Kind("RightBracket"), + 10: CompletionChunk.Kind("LeftBrace"), + 11: CompletionChunk.Kind("RightBrace"), + 12: CompletionChunk.Kind("LeftAngle"), + 13: CompletionChunk.Kind("RightAngle"), + 14: CompletionChunk.Kind("Comma"), + 15: CompletionChunk.Kind("ResultType"), + 16: CompletionChunk.Kind("Colon"), + 17: CompletionChunk.Kind("SemiColon"), + 18: CompletionChunk.Kind("Equal"), + 19: CompletionChunk.Kind("HorizontalSpace"), + 20: CompletionChunk.Kind("VerticalSpace")} + +class CompletionString(ClangObject): + class Availability: + def __init__(self, name): + self.name = name + + def __str__(self): + return self.name + + def __repr__(self): + return "" % self + + def __len__(self): + return _clang_getNumCompletionChunks(self.obj) + + def __getitem__(self, key): + if len(self) <= key: + raise IndexError + return CompletionChunk(self.obj, key) + + @property + def priority(self): + return _clang_getCompletionPriority(self.obj) + + @property + def availability(self): + res = _clang_getCompletionAvailability(self.obj) + return availabilityKinds[res] + + def __repr__(self): + return " | ".join([str(a) for a in self]) \ + + " || Priority: " + str(self.priority) \ + + " || Availability: " + str(self.availability) + +availabilityKinds = { + 0: CompletionChunk.Kind("Available"), + 1: CompletionChunk.Kind("Deprecated"), + 2: CompletionChunk.Kind("NotAvailable")} + +class CodeCompletionResult(Structure): + _fields_ = [('cursorKind', c_int), ('completionString', c_object_p)] + + def __repr__(self): + return str(CompletionString(self.completionString)) + + @property + def kind(self): + return CursorKind.from_id(self.cursorKind) + + @property + def string(self): + return CompletionString(self.completionString) + +class CCRStructure(Structure): + _fields_ = [('results', POINTER(CodeCompletionResult)), + ('numResults', c_int)] + + def __len__(self): + return self.numResults + + def __getitem__(self, key): + if len(self) <= key: + raise IndexError + + return self.results[key] + +class CodeCompletionResults(ClangObject): + def __init__(self, ptr): + assert isinstance(ptr, POINTER(CCRStructure)) and ptr + self.ptr = self._as_parameter_ = ptr + + def from_param(self): + return self._as_parameter_ + + def __del__(self): + CodeCompletionResults_dispose(self) + + @property + def results(self): + return self.ptr.contents + + @property + def diagnostics(self): + class DiagnosticsItr: + def __init__(self, ccr): + self.ccr= ccr + + def __len__(self): + return int(_clang_codeCompleteGetNumDiagnostics(self.ccr)) + + def __getitem__(self, key): + return _clang_codeCompleteGetDiagnostic(self.ccr, key) + + return DiagnosticsItr(self) + + class Index(ClangObject): """ The Index type provides the primary interface to the Clang CIndex library, @@ -650,7 +913,7 @@ class Index(ClangObject): ptr = TranslationUnit_read(self, path) return TranslationUnit(ptr) if ptr else None - def parse(self, path, args = [], unsaved_files = []): + def parse(self, path, args = [], unsaved_files = [], options = 0): """ Load the translation unit from the given source code file by running clang and generating the AST before loading. Additional command line @@ -678,8 +941,9 @@ class Index(ClangObject): unsaved_files_array[i].name = name unsaved_files_array[i].contents = value unsaved_files_array[i].length = len(value) - ptr = TranslationUnit_parse(self, path, len(args), arg_array, - len(unsaved_files), unsaved_files_array) + ptr = TranslationUnit_parse(self, path, arg_array, len(args), + unsaved_files_array, len(unsaved_files), + options) return TranslationUnit(ptr) if ptr else None @@ -744,6 +1008,63 @@ class TranslationUnit(ClangObject): return DiagIterator(self) + def reparse(self, unsaved_files = [], options = 0): + """ + Reparse an already parsed translation unit. + + In-memory contents for files can be provided by passing a list of pairs + as unsaved_files, the first items should be the filenames to be mapped + and the second should be the contents to be substituted for the + file. The contents may be passed as strings or file objects. + """ + unsaved_files_array = 0 + if len(unsaved_files): + unsaved_files_array = (_CXUnsavedFile * len(unsaved_files))() + for i,(name,value) in enumerate(unsaved_files): + if not isinstance(value, str): + # FIXME: It would be great to support an efficient version + # of this, one day. + value = value.read() + print value + if not isinstance(value, str): + raise TypeError,'Unexpected unsaved file contents.' + unsaved_files_array[i].name = name + unsaved_files_array[i].contents = value + unsaved_files_array[i].length = len(value) + ptr = TranslationUnit_reparse(self, len(unsaved_files), + unsaved_files_array, + options) + def codeComplete(self, path, line, column, unsaved_files = [], options = 0): + """ + Code complete in this translation unit. + + In-memory contents for files can be provided by passing a list of pairs + as unsaved_files, the first items should be the filenames to be mapped + and the second should be the contents to be substituted for the + file. The contents may be passed as strings or file objects. + """ + unsaved_files_array = 0 + if len(unsaved_files): + unsaved_files_array = (_CXUnsavedFile * len(unsaved_files))() + for i,(name,value) in enumerate(unsaved_files): + if not isinstance(value, str): + # FIXME: It would be great to support an efficient version + # of this, one day. + value = value.read() + print value + if not isinstance(value, str): + raise TypeError,'Unexpected unsaved file contents.' + unsaved_files_array[i].name = name + unsaved_files_array[i].contents = value + unsaved_files_array[i].length = len(value) + ptr = TranslationUnit_codeComplete(self, path, + line, column, + unsaved_files_array, + len(unsaved_files), + options) + return CodeCompletionResults(ptr) if ptr else None + + class File(ClangObject): """ The File class represents a particular source file that is part of a @@ -893,11 +1214,20 @@ TranslationUnit_read = lib.clang_createTranslationUnit TranslationUnit_read.argtypes = [Index, c_char_p] TranslationUnit_read.restype = c_object_p -TranslationUnit_parse = lib.clang_createTranslationUnitFromSourceFile -TranslationUnit_parse.argtypes = [Index, c_char_p, c_int, c_void_p, - c_int, c_void_p] +TranslationUnit_parse = lib.clang_parseTranslationUnit +TranslationUnit_parse.argtypes = [Index, c_char_p, c_void_p, + c_int, c_void_p, c_int, c_int] TranslationUnit_parse.restype = c_object_p +TranslationUnit_reparse = lib.clang_reparseTranslationUnit +TranslationUnit_reparse.argtypes = [TranslationUnit, c_int, c_void_p, c_int] +TranslationUnit_reparse.restype = c_int + +TranslationUnit_codeComplete = lib.clang_codeCompleteAt +TranslationUnit_codeComplete.argtypes = [TranslationUnit, c_char_p, c_int, + c_int, c_void_p, c_int, c_int] +TranslationUnit_codeComplete.restype = POINTER(CCRStructure) + TranslationUnit_cursor = lib.clang_getTranslationUnitCursor TranslationUnit_cursor.argtypes = [TranslationUnit] TranslationUnit_cursor.restype = Cursor @@ -929,7 +1259,46 @@ File_time = lib.clang_getFileTime File_time.argtypes = [File] File_time.restype = c_uint +# Code completion + +CodeCompletionResults_dispose = lib.clang_disposeCodeCompleteResults +CodeCompletionResults_dispose.argtypes = [CodeCompletionResults] + +_clang_codeCompleteGetNumDiagnostics = lib.clang_codeCompleteGetNumDiagnostics +_clang_codeCompleteGetNumDiagnostics.argtypes = [CodeCompletionResults] +_clang_codeCompleteGetNumDiagnostics.restype = c_int + +_clang_codeCompleteGetDiagnostic = lib.clang_codeCompleteGetDiagnostic +_clang_codeCompleteGetDiagnostic.argtypes = [CodeCompletionResults, c_int] +_clang_codeCompleteGetDiagnostic.restype = Diagnostic + +_clang_getCompletionChunkText = lib.clang_getCompletionChunkText +_clang_getCompletionChunkText.argtypes = [c_void_p, c_int] +_clang_getCompletionChunkText.restype = _CXString + +_clang_getCompletionChunkKind = lib.clang_getCompletionChunkKind +_clang_getCompletionChunkKind.argtypes = [c_void_p, c_int] +_clang_getCompletionChunkKind.restype = c_int + +_clang_getCompletionChunkCompletionString = lib.clang_getCompletionChunkCompletionString +_clang_getCompletionChunkCompletionString.argtypes = [c_void_p, c_int] +_clang_getCompletionChunkCompletionString.restype = c_object_p + +_clang_getNumCompletionChunks = lib.clang_getNumCompletionChunks +_clang_getNumCompletionChunks.argtypes = [c_void_p] +_clang_getNumCompletionChunks.restype = c_int + +_clang_getCompletionAvailability = lib.clang_getCompletionAvailability +_clang_getCompletionAvailability.argtypes = [c_void_p] +_clang_getCompletionAvailability.restype = c_int + +_clang_getCompletionPriority = lib.clang_getCompletionPriority +_clang_getCompletionPriority.argtypes = [c_void_p] +_clang_getCompletionPriority.restype = c_int + + ### __all__ = ['Index', 'TranslationUnit', 'Cursor', 'CursorKind', - 'Diagnostic', 'FixIt', 'SourceRange', 'SourceLocation', 'File'] + 'Diagnostic', 'FixIt', 'CodeCompletionResults', 'SourceRange', + 'SourceLocation', 'File'] diff --git a/bindings/python/tests/cindex/test_diagnostics.py b/bindings/python/tests/cindex/test_diagnostics.py index 85187652917b5..c1ff0e38baada 100644 --- a/bindings/python/tests/cindex/test_diagnostics.py +++ b/bindings/python/tests/cindex/test_diagnostics.py @@ -3,8 +3,6 @@ from clang.cindex import * def tu_from_source(source): index = Index.create() tu = index.parse('INPUT.c', unsaved_files = [('INPUT.c', source)]) - # FIXME: Remove the need for this. - tu.index = index return tu # FIXME: We need support for invalid translation units to test better. @@ -46,3 +44,26 @@ def test_diagnostic_fixit(): assert tu.diagnostics[0].fixits[0].range.end.line == 1 assert tu.diagnostics[0].fixits[0].range.end.column == 30 assert tu.diagnostics[0].fixits[0].value == '.f0 = ' + +def test_diagnostic_range(): + index = Index.create() + tu = tu_from_source("""void f() { int i = "a" + 1; }""") + assert len(tu.diagnostics) == 1 + assert tu.diagnostics[0].severity == Diagnostic.Warning + assert tu.diagnostics[0].location.line == 1 + assert tu.diagnostics[0].location.column == 16 + assert tu.diagnostics[0].spelling.startswith('incompatible pointer to') + assert len(tu.diagnostics[0].fixits) == 0 + assert len(tu.diagnostics[0].ranges) == 1 + assert tu.diagnostics[0].ranges[0].start.line == 1 + assert tu.diagnostics[0].ranges[0].start.column == 20 + assert tu.diagnostics[0].ranges[0].end.line == 1 + assert tu.diagnostics[0].ranges[0].end.column == 27 + try: + tu.diagnostics[0].ranges[1].start.line + except IndexError: + assert True + else: + assert False + + diff --git a/bindings/python/tests/cindex/test_translation_unit.py b/bindings/python/tests/cindex/test_translation_unit.py index 3c05c3f06af44..f130db6aeb068 100644 --- a/bindings/python/tests/cindex/test_translation_unit.py +++ b/bindings/python/tests/cindex/test_translation_unit.py @@ -25,16 +25,24 @@ def test_parse_arguments(): assert spellings[-2] == 'hello' assert spellings[-1] == 'hi' +def test_reparse_arguments(): + path = os.path.join(kInputsDir, 'parse_arguments.c') + index = Index.create() + tu = index.parse(path, ['-DDECL_ONE=hello', '-DDECL_TWO=hi']) + tu.reparse() + spellings = [c.spelling for c in tu.cursor.get_children()] + assert spellings[-2] == 'hello' + assert spellings[-1] == 'hi' + def test_unsaved_files(): index = Index.create() - # FIXME: Why can't we just use "fake.h" here (instead of /tmp/fake.h)? - tu = index.parse('fake.c', unsaved_files = [ + tu = index.parse('fake.c', ['-I./'], unsaved_files = [ ('fake.c', """ -#include "/tmp/fake.h" +#include "fake.h" int x; int SOME_DEFINE; """), - ('/tmp/fake.h', """ + ('./fake.h', """ #define SOME_DEFINE y """) ]) diff --git a/clang.xcodeproj/project.pbxproj b/clang.xcodeproj/project.pbxproj index 2a256450887b2..8356aac544aed 100644 --- a/clang.xcodeproj/project.pbxproj +++ b/clang.xcodeproj/project.pbxproj @@ -19,6 +19,7 @@ 1A2A54C50FD1DD1C00F4CE45 /* Warnings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */; }; 1A30A9E90B93A4C800201A91 /* ExprCXX.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1A30A9E80B93A4C800201A91 /* ExprCXX.h */; }; 1A376A2D0D4AED9B002A1C52 /* CGExprConstant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A376A2C0D4AED9B002A1C52 /* CGExprConstant.cpp */; }; + 1A3D2C4E12A2CD3D0088C44A /* CGCXXABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3D2C4D12A2CD3D0088C44A /* CGCXXABI.cpp */; }; 1A471AB50F437BC500753CE8 /* CGBlocks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A471AB40F437BC500753CE8 /* CGBlocks.cpp */; }; 1A4C41BF105B4C0B0047B5E7 /* CGClass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A4C41BE105B4C0B0047B5E7 /* CGClass.cpp */; }; 1A5D5E580E5E81010023C059 /* CGCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5D5E570E5E81010023C059 /* CGCXX.cpp */; }; @@ -77,6 +78,96 @@ 1ABD23F71182449800A48E65 /* Type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D31182449800A48E65 /* Type.cpp */; }; 1ABD23F81182449800A48E65 /* TypeLoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D41182449800A48E65 /* TypeLoc.cpp */; }; 1ABD23F91182449800A48E65 /* TypePrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D51182449800A48E65 /* TypePrinter.cpp */; }; + 1AC1A67D12999D8E006FBC77 /* AnalysisContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A67212999D8E006FBC77 /* AnalysisContext.cpp */; }; + 1AC1A67E12999D8E006FBC77 /* CFG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A67312999D8E006FBC77 /* CFG.cpp */; }; + 1AC1A67F12999D8E006FBC77 /* CFGStmtMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A67412999D8E006FBC77 /* CFGStmtMap.cpp */; }; + 1AC1A68012999D8E006FBC77 /* FormatString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A67512999D8E006FBC77 /* FormatString.cpp */; }; + 1AC1A68112999D8E006FBC77 /* LiveVariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A67712999D8E006FBC77 /* LiveVariables.cpp */; }; + 1AC1A68212999D8E006FBC77 /* PrintfFormatString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A67812999D8E006FBC77 /* PrintfFormatString.cpp */; }; + 1AC1A68312999D8E006FBC77 /* PseudoConstantAnalysis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A67912999D8E006FBC77 /* PseudoConstantAnalysis.cpp */; }; + 1AC1A68412999D8E006FBC77 /* ReachableCode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A67A12999D8E006FBC77 /* ReachableCode.cpp */; }; + 1AC1A68512999D8E006FBC77 /* ScanfFormatString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A67B12999D8E006FBC77 /* ScanfFormatString.cpp */; }; + 1AC1A68612999D8E006FBC77 /* UninitializedValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A67C12999D8E006FBC77 /* UninitializedValues.cpp */; }; + 1AC1A9EF1299A287006FBC77 /* AdjustedReturnValueChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6881299A284006FBC77 /* AdjustedReturnValueChecker.cpp */; }; + 1AC1A9F01299A287006FBC77 /* AggExprVisitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6891299A284006FBC77 /* AggExprVisitor.cpp */; }; + 1AC1A9F11299A287006FBC77 /* AnalysisConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A68A1299A284006FBC77 /* AnalysisConsumer.cpp */; }; + 1AC1A9F21299A287006FBC77 /* AnalysisManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A68B1299A284006FBC77 /* AnalysisManager.cpp */; }; + 1AC1A9F31299A287006FBC77 /* AnalyzerStatsChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A68C1299A284006FBC77 /* AnalyzerStatsChecker.cpp */; }; + 1AC1A9F41299A287006FBC77 /* ArrayBoundChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A68D1299A284006FBC77 /* ArrayBoundChecker.cpp */; }; + 1AC1A9F51299A287006FBC77 /* AttrNonNullChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A68E1299A284006FBC77 /* AttrNonNullChecker.cpp */; }; + 1AC1A9F61299A287006FBC77 /* BasicConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A68F1299A284006FBC77 /* BasicConstraintManager.cpp */; }; + 1AC1A9F71299A287006FBC77 /* BasicObjCFoundationChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6901299A284006FBC77 /* BasicObjCFoundationChecks.cpp */; }; + 1AC1A9F81299A287006FBC77 /* BasicStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6921299A284006FBC77 /* BasicStore.cpp */; }; + 1AC1A9F91299A287006FBC77 /* BasicValueFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6931299A284006FBC77 /* BasicValueFactory.cpp */; }; + 1AC1A9FA1299A287006FBC77 /* BugReporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6941299A284006FBC77 /* BugReporter.cpp */; }; + 1AC1A9FB1299A287006FBC77 /* BugReporterVisitors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6951299A284006FBC77 /* BugReporterVisitors.cpp */; }; + 1AC1A9FC1299A287006FBC77 /* BuiltinFunctionChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6961299A284006FBC77 /* BuiltinFunctionChecker.cpp */; }; + 1AC1A9FD1299A287006FBC77 /* CallAndMessageChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6971299A284006FBC77 /* CallAndMessageChecker.cpp */; }; + 1AC1A9FE1299A287006FBC77 /* CastSizeChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6981299A284006FBC77 /* CastSizeChecker.cpp */; }; + 1AC1A9FF1299A287006FBC77 /* CastToStructChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6991299A284006FBC77 /* CastToStructChecker.cpp */; }; + 1AC1AA001299A287006FBC77 /* CFRefCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A69A1299A284006FBC77 /* CFRefCount.cpp */; }; + 1AC1AA011299A287006FBC77 /* CheckDeadStores.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A69B1299A284006FBC77 /* CheckDeadStores.cpp */; }; + 1AC1AA021299A287006FBC77 /* Checker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A69C1299A284006FBC77 /* Checker.cpp */; }; + 1AC1AA031299A287006FBC77 /* CheckerHelpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A69D1299A284006FBC77 /* CheckerHelpers.cpp */; }; + 1AC1AA041299A287006FBC77 /* CheckObjCDealloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A69E1299A284006FBC77 /* CheckObjCDealloc.cpp */; }; + 1AC1AA051299A287006FBC77 /* CheckObjCInstMethSignature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A69F1299A284006FBC77 /* CheckObjCInstMethSignature.cpp */; }; + 1AC1AA061299A287006FBC77 /* CheckSecuritySyntaxOnly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6A01299A284006FBC77 /* CheckSecuritySyntaxOnly.cpp */; }; + 1AC1AA071299A287006FBC77 /* CheckSizeofPointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6A11299A284006FBC77 /* CheckSizeofPointer.cpp */; }; + 1AC1AA081299A287006FBC77 /* ChrootChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6A21299A284006FBC77 /* ChrootChecker.cpp */; }; + 1AC1AA091299A287006FBC77 /* CocoaConventions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6A41299A284006FBC77 /* CocoaConventions.cpp */; }; + 1AC1AA0A1299A287006FBC77 /* CStringChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A6A51299A284006FBC77 /* CStringChecker.cpp */; }; + 1AC1AB3D1299A287006FBC77 /* DereferenceChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7DC1299A285006FBC77 /* DereferenceChecker.cpp */; }; + 1AC1AB3E1299A287006FBC77 /* DivZeroChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7DD1299A285006FBC77 /* DivZeroChecker.cpp */; }; + 1AC1AB3F1299A287006FBC77 /* Environment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7DE1299A285006FBC77 /* Environment.cpp */; }; + 1AC1AB401299A287006FBC77 /* ExplodedGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7DF1299A285006FBC77 /* ExplodedGraph.cpp */; }; + 1AC1AB411299A287006FBC77 /* FixedAddressChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7E01299A285006FBC77 /* FixedAddressChecker.cpp */; }; + 1AC1AB421299A287006FBC77 /* FlatStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7E11299A285006FBC77 /* FlatStore.cpp */; }; + 1AC1AB431299A287006FBC77 /* FrontendActions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7E21299A285006FBC77 /* FrontendActions.cpp */; }; + 1AC1AB441299A287006FBC77 /* GRBlockCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7E31299A285006FBC77 /* GRBlockCounter.cpp */; }; + 1AC1AB451299A287006FBC77 /* GRCoreEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7E41299A285006FBC77 /* GRCoreEngine.cpp */; }; + 1AC1AB461299A287006FBC77 /* GRCXXExprEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7E51299A285006FBC77 /* GRCXXExprEngine.cpp */; }; + 1AC1AB471299A287006FBC77 /* GRExprEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7E61299A285006FBC77 /* GRExprEngine.cpp */; }; + 1AC1AB481299A287006FBC77 /* GRExprEngineExperimentalChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7E71299A285006FBC77 /* GRExprEngineExperimentalChecks.cpp */; }; + 1AC1AB491299A287006FBC77 /* GRState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7EA1299A285006FBC77 /* GRState.cpp */; }; + 1AC1AB4A1299A287006FBC77 /* HTMLDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7EB1299A285006FBC77 /* HTMLDiagnostics.cpp */; }; + 1AC1AB4B1299A287006FBC77 /* IdempotentOperationChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7EC1299A285006FBC77 /* IdempotentOperationChecker.cpp */; }; + 1AC1AB4C1299A287006FBC77 /* LLVMConventionsChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7ED1299A285006FBC77 /* LLVMConventionsChecker.cpp */; }; + 1AC1AB4D1299A287006FBC77 /* MacOSXAPIChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7EE1299A285006FBC77 /* MacOSXAPIChecker.cpp */; }; + 1AC1AB4F1299A287006FBC77 /* MallocChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7F01299A285006FBC77 /* MallocChecker.cpp */; }; + 1AC1AB501299A287006FBC77 /* ManagerRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7F11299A285006FBC77 /* ManagerRegistry.cpp */; }; + 1AC1AB511299A287006FBC77 /* MemRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7F21299A285006FBC77 /* MemRegion.cpp */; }; + 1AC1AB521299A287006FBC77 /* NoReturnFunctionChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7F31299A285006FBC77 /* NoReturnFunctionChecker.cpp */; }; + 1AC1AB531299A287006FBC77 /* NSAutoreleasePoolChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7F41299A285006FBC77 /* NSAutoreleasePoolChecker.cpp */; }; + 1AC1AB541299A287006FBC77 /* NSErrorChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7F51299A285006FBC77 /* NSErrorChecker.cpp */; }; + 1AC1AB551299A287006FBC77 /* ObjCAtSyncChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7F61299A285006FBC77 /* ObjCAtSyncChecker.cpp */; }; + 1AC1AB561299A287006FBC77 /* ObjCUnusedIVarsChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7F71299A285006FBC77 /* ObjCUnusedIVarsChecker.cpp */; }; + 1AC1AB571299A287006FBC77 /* OSAtomicChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7F81299A285006FBC77 /* OSAtomicChecker.cpp */; }; + 1AC1AB581299A287006FBC77 /* PathDiagnostic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7F91299A285006FBC77 /* PathDiagnostic.cpp */; }; + 1AC1AB591299A287006FBC77 /* PlistDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7FA1299A285006FBC77 /* PlistDiagnostics.cpp */; }; + 1AC1AB5A1299A287006FBC77 /* PointerArithChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7FB1299A285006FBC77 /* PointerArithChecker.cpp */; }; + 1AC1AB5B1299A287006FBC77 /* PointerSubChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7FC1299A285006FBC77 /* PointerSubChecker.cpp */; }; + 1AC1AB5C1299A287006FBC77 /* PthreadLockChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7FD1299A285006FBC77 /* PthreadLockChecker.cpp */; }; + 1AC1AB5D1299A287006FBC77 /* RangeConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A7FE1299A285006FBC77 /* RangeConstraintManager.cpp */; }; + 1AC1AB5E1299A287006FBC77 /* RegionStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A8001299A285006FBC77 /* RegionStore.cpp */; }; + 1AC1AD331299A287006FBC77 /* ReturnPointerRangeChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9DB1299A287006FBC77 /* ReturnPointerRangeChecker.cpp */; }; + 1AC1AD341299A287006FBC77 /* ReturnUndefChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9DC1299A287006FBC77 /* ReturnUndefChecker.cpp */; }; + 1AC1AD351299A287006FBC77 /* SimpleConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9DD1299A287006FBC77 /* SimpleConstraintManager.cpp */; }; + 1AC1AD361299A287006FBC77 /* SimpleSValuator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9DF1299A287006FBC77 /* SimpleSValuator.cpp */; }; + 1AC1AD371299A287006FBC77 /* StackAddrLeakChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9E01299A287006FBC77 /* StackAddrLeakChecker.cpp */; }; + 1AC1AD381299A287006FBC77 /* Store.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9E11299A287006FBC77 /* Store.cpp */; }; + 1AC1AD391299A287006FBC77 /* StreamChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9E21299A287006FBC77 /* StreamChecker.cpp */; }; + 1AC1AD3A1299A287006FBC77 /* SVals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9E31299A287006FBC77 /* SVals.cpp */; }; + 1AC1AD3B1299A287006FBC77 /* SValuator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9E41299A287006FBC77 /* SValuator.cpp */; }; + 1AC1AD3C1299A287006FBC77 /* SymbolManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9E51299A287006FBC77 /* SymbolManager.cpp */; }; + 1AC1AD3D1299A287006FBC77 /* UndefBranchChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9E61299A287006FBC77 /* UndefBranchChecker.cpp */; }; + 1AC1AD3E1299A287006FBC77 /* UndefCapturedBlockVarChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9E71299A287006FBC77 /* UndefCapturedBlockVarChecker.cpp */; }; + 1AC1AD3F1299A287006FBC77 /* UndefinedArraySubscriptChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9E81299A287006FBC77 /* UndefinedArraySubscriptChecker.cpp */; }; + 1AC1AD401299A287006FBC77 /* UndefinedAssignmentChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9E91299A287006FBC77 /* UndefinedAssignmentChecker.cpp */; }; + 1AC1AD411299A287006FBC77 /* UndefResultChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9EA1299A287006FBC77 /* UndefResultChecker.cpp */; }; + 1AC1AD421299A287006FBC77 /* UnixAPIChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9EB1299A287006FBC77 /* UnixAPIChecker.cpp */; }; + 1AC1AD431299A287006FBC77 /* UnreachableCodeChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9EC1299A287006FBC77 /* UnreachableCodeChecker.cpp */; }; + 1AC1AD441299A287006FBC77 /* ValueManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9ED1299A287006FBC77 /* ValueManager.cpp */; }; + 1AC1AD451299A287006FBC77 /* VLASizeChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1A9EE1299A287006FBC77 /* VLASizeChecker.cpp */; }; 1ACB57E41105820D0047B991 /* CompilerInstance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */; }; 1ACB57E51105820D0047B991 /* CompilerInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */; }; 1ACB57E61105820D0047B991 /* DeclXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DD1105820D0047B991 /* DeclXML.cpp */; }; @@ -90,56 +181,32 @@ 1AF1B50F109A4FB800AFAFAC /* CGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */; }; 1AFDD8721161085D00AE030A /* ASTMerge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFDD8701161085D00AE030A /* ASTMerge.cpp */; }; 1AFF8AE31012BFC900D248DA /* CGRecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */; }; - 3507E4C20E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */; }; 352246E80F5C6BE000D0D279 /* InitHeaderSearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E20F5C6BE000D0D279 /* InitHeaderSearch.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 */; }; 3534A01D0E129849002709B2 /* ParseCXXInlineMethods.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3534A01C0E129849002709B2 /* ParseCXXInlineMethods.cpp */; }; - 3536456B0E23EBF7009C6509 /* Environment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3536456A0E23EBF7009C6509 /* Environment.cpp */; }; 3537AA0E0ECD08A4008F7CDC /* PreprocessorLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3537AA0D0ECD08A4008F7CDC /* PreprocessorLexer.cpp */; }; 353959D50EE5F88A00E82461 /* ParseTemplate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 353959D40EE5F88A00E82461 /* ParseTemplate.cpp */; }; 35475B200E79973F0000BFE4 /* CGCall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35475B1F0E79973F0000BFE4 /* CGCall.cpp */; }; - 355106860E9A8507006A4E44 /* MemRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 355106850E9A8507006A4E44 /* MemRegion.cpp */; }; 3551068C0E9A8546006A4E44 /* ParsePragma.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3551068A0E9A8546006A4E44 /* ParsePragma.cpp */; }; 3551068D0E9A8546006A4E44 /* ParseTentative.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3551068B0E9A8546006A4E44 /* ParseTentative.cpp */; }; 3552E7550E520D80003A8CA5 /* PPCaching.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3552E7540E520D80003A8CA5 /* PPCaching.cpp */; }; 3552E7590E520DD7003A8CA5 /* CGObjCMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3552E7580E520DD7003A8CA5 /* CGObjCMac.cpp */; }; - 35544B880F5C7FD700D92AA9 /* RangeConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35544B850F5C7FD700D92AA9 /* RangeConstraintManager.cpp */; }; - 35544B890F5C7FD700D92AA9 /* SimpleConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35544B860F5C7FD700D92AA9 /* SimpleConstraintManager.cpp */; }; 35544B8C0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */; }; 35585DC00EAFBC4500D0A97A /* SemaOverload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35585DBE0EAFBC4500D0A97A /* SemaOverload.cpp */; }; - 3558F76D0E267C8300A5B0DF /* BasicStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3558F76C0E267C8300A5B0DF /* BasicStore.cpp */; }; - 356EF9B50C8F7DDF006650F5 /* LiveVariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 356EF9B40C8F7DDF006650F5 /* LiveVariables.cpp */; }; 35707EFE0CD0F5CC000B2204 /* SourceLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35707EFD0CD0F5CC000B2204 /* SourceLocation.cpp */; }; 357EA27D0F2526F300439B60 /* SemaLookup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 357EA27C0F2526F300439B60 /* SemaLookup.cpp */; }; - 35862B0D0E3628CB0009F542 /* CheckDeadStores.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35862B0C0E3628CB0009F542 /* CheckDeadStores.cpp */; }; - 35862B120E3629850009F542 /* GRExprEngineInternalChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35862B110E3629850009F542 /* GRExprEngineInternalChecks.cpp */; }; - 358CFBB80E65AB04002A8E19 /* BasicConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 358CFBB70E65AB04002A8E19 /* BasicConstraintManager.cpp */; }; - 358F51520E529AA4007F2102 /* GRState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 358F51510E529AA4007F2102 /* GRState.cpp */; }; 3591853F0EFB1088000039AF /* SemaTemplate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3591853E0EFB1088000039AF /* SemaTemplate.cpp */; }; - 3593790A0DA48ABA0043B19C /* BugReporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 359379090DA48ABA0043B19C /* BugReporter.cpp */; }; - 3595AFB80E1C8D62004CDF09 /* CheckObjCDealloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3595AFB70E1C8D62004CDF09 /* CheckObjCDealloc.cpp */; }; 3599299B0DE2425300A8A33E /* SemaInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3599299A0DE2425300A8A33E /* SemaInit.cpp */; }; - 35A057E20EAE2D950069249F /* RegionStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35A057E00EAE2D950069249F /* RegionStore.cpp */; }; - 35A057E30EAE2D950069249F /* SVals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35A057E10EAE2D950069249F /* SVals.cpp */; }; 35A3E7020DD3874400757F74 /* CGDebugInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35A3E7000DD3874400757F74 /* CGDebugInfo.cpp */; }; - 35A8FCF90D9B4B2A001C2F97 /* PathDiagnostic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35A8FCF80D9B4B29001C2F97 /* PathDiagnostic.cpp */; }; - 35BAC1E80E82C5B7003FB76F /* CheckNSError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35BAC1E70E82C5B7003FB76F /* CheckNSError.cpp */; }; - 35D55B270D81D8C60092E734 /* BasicValueFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35D55B240D81D8C60092E734 /* BasicValueFactory.cpp */; }; - 35D55B280D81D8C60092E734 /* CFRefCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35D55B250D81D8C60092E734 /* CFRefCount.cpp */; }; 35E194690ECB82FB00F21733 /* SemaCXXScopeSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35E194670ECB82FB00F21733 /* SemaCXXScopeSpec.cpp */; }; 35E1946A0ECB82FB00F21733 /* SemaCXXCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35E194680ECB82FB00F21733 /* SemaCXXCast.cpp */; }; 35E1946D0ECB83C100F21733 /* PTHLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35E1946C0ECB83C100F21733 /* PTHLexer.cpp */; }; 35EF67700DAD1D2C00B19414 /* SemaDeclCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35EF676F0DAD1D2C00B19414 /* SemaDeclCXX.cpp */; }; - 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 */; }; @@ -160,13 +227,97 @@ 90FD6D83103C3D49005F5B73 /* Program.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90FD6D77103C3D49005F5B73 /* Program.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 */; }; + BB5C372912A5057500259F53 /* DumpXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB5C372812A5057500259F53 /* DumpXML.cpp */; }; + BBA5AB7E1309C2FA000B38F1 /* AdjustedReturnValueChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB141309C2FA000B38F1 /* AdjustedReturnValueChecker.cpp */; }; + BBA5AB7F1309C2FA000B38F1 /* AnalyzerStatsChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB151309C2FA000B38F1 /* AnalyzerStatsChecker.cpp */; }; + BBA5AB801309C2FA000B38F1 /* ArrayBoundChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB161309C2FA000B38F1 /* ArrayBoundChecker.cpp */; }; + BBA5AB811309C2FA000B38F1 /* ArrayBoundCheckerV2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB171309C2FA000B38F1 /* ArrayBoundCheckerV2.cpp */; }; + BBA5AB821309C2FA000B38F1 /* AttrNonNullChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB181309C2FA000B38F1 /* AttrNonNullChecker.cpp */; }; + BBA5AB831309C2FA000B38F1 /* BasicObjCFoundationChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB191309C2FA000B38F1 /* BasicObjCFoundationChecks.cpp */; }; + BBA5AB841309C2FA000B38F1 /* BuiltinFunctionChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB1B1309C2FA000B38F1 /* BuiltinFunctionChecker.cpp */; }; + BBA5AB851309C2FA000B38F1 /* CallAndMessageChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB1C1309C2FA000B38F1 /* CallAndMessageChecker.cpp */; }; + BBA5AB861309C2FA000B38F1 /* CastSizeChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB1D1309C2FA000B38F1 /* CastSizeChecker.cpp */; }; + BBA5AB871309C2FA000B38F1 /* CastToStructChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB1E1309C2FA000B38F1 /* CastToStructChecker.cpp */; }; + BBA5AB881309C2FA000B38F1 /* CheckObjCDealloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB201309C2FA000B38F1 /* CheckObjCDealloc.cpp */; }; + BBA5AB891309C2FA000B38F1 /* CheckObjCInstMethSignature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB211309C2FA000B38F1 /* CheckObjCInstMethSignature.cpp */; }; + BBA5AB8A1309C2FA000B38F1 /* CheckSecuritySyntaxOnly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB221309C2FA000B38F1 /* CheckSecuritySyntaxOnly.cpp */; }; + BBA5AB8B1309C2FA000B38F1 /* CheckSizeofPointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB231309C2FA000B38F1 /* CheckSizeofPointer.cpp */; }; + BBA5AB8C1309C2FA000B38F1 /* ChrootChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB241309C2FA000B38F1 /* ChrootChecker.cpp */; }; + BBA5AB8D1309C2FA000B38F1 /* ClangSACheckerProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB251309C2FA000B38F1 /* ClangSACheckerProvider.cpp */; }; + BBA5AB8E1309C2FA000B38F1 /* CStringChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB291309C2FA000B38F1 /* CStringChecker.cpp */; }; + BBA5AB8F1309C2FA000B38F1 /* DeadStoresChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB2A1309C2FA000B38F1 /* DeadStoresChecker.cpp */; }; + BBA5AB901309C2FA000B38F1 /* DereferenceChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB2B1309C2FA000B38F1 /* DereferenceChecker.cpp */; }; + BBA5AB911309C2FA000B38F1 /* DivZeroChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB2C1309C2FA000B38F1 /* DivZeroChecker.cpp */; }; + BBA5AB921309C2FA000B38F1 /* ExperimentalChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB2D1309C2FA000B38F1 /* ExperimentalChecks.cpp */; }; + BBA5AB931309C2FA000B38F1 /* ExprEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB2F1309C2FA000B38F1 /* ExprEngine.cpp */; }; + BBA5AB941309C2FA000B38F1 /* FixedAddressChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB301309C2FA000B38F1 /* FixedAddressChecker.cpp */; }; + BBA5AB951309C2FA000B38F1 /* IdempotentOperationChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB311309C2FA000B38F1 /* IdempotentOperationChecker.cpp */; }; + BBA5AB961309C2FA000B38F1 /* LLVMConventionsChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB331309C2FA000B38F1 /* LLVMConventionsChecker.cpp */; }; + BBA5AB971309C2FA000B38F1 /* MacOSXAPIChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB341309C2FA000B38F1 /* MacOSXAPIChecker.cpp */; }; + BBA5AB991309C2FA000B38F1 /* MallocChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB361309C2FA000B38F1 /* MallocChecker.cpp */; }; + BBA5AB9A1309C2FA000B38F1 /* NoReturnFunctionChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB371309C2FA000B38F1 /* NoReturnFunctionChecker.cpp */; }; + BBA5AB9B1309C2FA000B38F1 /* NSAutoreleasePoolChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB381309C2FA000B38F1 /* NSAutoreleasePoolChecker.cpp */; }; + BBA5AB9C1309C2FA000B38F1 /* NSErrorChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB3A1309C2FA000B38F1 /* NSErrorChecker.cpp */; }; + BBA5AB9D1309C2FA000B38F1 /* ObjCAtSyncChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB3B1309C2FA000B38F1 /* ObjCAtSyncChecker.cpp */; }; + BBA5AB9E1309C2FA000B38F1 /* ObjCSelfInitChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB3D1309C2FA000B38F1 /* ObjCSelfInitChecker.cpp */; }; + BBA5AB9F1309C2FA000B38F1 /* ObjCUnusedIVarsChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB3F1309C2FA000B38F1 /* ObjCUnusedIVarsChecker.cpp */; }; + BBA5ABA01309C2FA000B38F1 /* OSAtomicChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB401309C2FA000B38F1 /* OSAtomicChecker.cpp */; }; + BBA5ABA11309C2FA000B38F1 /* PointerArithChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB411309C2FA000B38F1 /* PointerArithChecker.cpp */; }; + BBA5ABA21309C2FA000B38F1 /* PointerSubChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB421309C2FA000B38F1 /* PointerSubChecker.cpp */; }; + BBA5ABA31309C2FA000B38F1 /* PthreadLockChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB431309C2FA000B38F1 /* PthreadLockChecker.cpp */; }; + BBA5ABA41309C2FA000B38F1 /* ReturnPointerRangeChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB441309C2FA000B38F1 /* ReturnPointerRangeChecker.cpp */; }; + BBA5ABA51309C2FA000B38F1 /* ReturnUndefChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB451309C2FA000B38F1 /* ReturnUndefChecker.cpp */; }; + BBA5ABA61309C2FA000B38F1 /* StackAddrLeakChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB461309C2FA000B38F1 /* StackAddrLeakChecker.cpp */; }; + BBA5ABA71309C2FA000B38F1 /* StreamChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB471309C2FA000B38F1 /* StreamChecker.cpp */; }; + BBA5ABA81309C2FA000B38F1 /* UndefBranchChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB481309C2FA000B38F1 /* UndefBranchChecker.cpp */; }; + BBA5ABA91309C2FA000B38F1 /* UndefCapturedBlockVarChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB491309C2FA000B38F1 /* UndefCapturedBlockVarChecker.cpp */; }; + BBA5ABAA1309C2FA000B38F1 /* UndefinedArraySubscriptChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB4A1309C2FA000B38F1 /* UndefinedArraySubscriptChecker.cpp */; }; + BBA5ABAB1309C2FA000B38F1 /* UndefinedAssignmentChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB4B1309C2FA000B38F1 /* UndefinedAssignmentChecker.cpp */; }; + BBA5ABAC1309C2FA000B38F1 /* UndefResultChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB4C1309C2FA000B38F1 /* UndefResultChecker.cpp */; }; + BBA5ABAD1309C2FA000B38F1 /* UnixAPIChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB4D1309C2FA000B38F1 /* UnixAPIChecker.cpp */; }; + BBA5ABAE1309C2FA000B38F1 /* UnreachableCodeChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB4E1309C2FA000B38F1 /* UnreachableCodeChecker.cpp */; }; + BBA5ABAF1309C2FA000B38F1 /* VLASizeChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB4F1309C2FA000B38F1 /* VLASizeChecker.cpp */; }; + BBA5ABB01309C2FA000B38F1 /* AggExprVisitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB521309C2FA000B38F1 /* AggExprVisitor.cpp */; }; + BBA5ABB11309C2FA000B38F1 /* AnalysisManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB531309C2FA000B38F1 /* AnalysisManager.cpp */; }; + BBA5ABB21309C2FA000B38F1 /* BasicConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB541309C2FA000B38F1 /* BasicConstraintManager.cpp */; }; + BBA5ABB31309C2FA000B38F1 /* BasicStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB551309C2FA000B38F1 /* BasicStore.cpp */; }; + BBA5ABB41309C2FA000B38F1 /* BasicValueFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB561309C2FA000B38F1 /* BasicValueFactory.cpp */; }; + BBA5ABB51309C2FA000B38F1 /* BlockCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB571309C2FA000B38F1 /* BlockCounter.cpp */; }; + BBA5ABB61309C2FA000B38F1 /* BugReporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB581309C2FA000B38F1 /* BugReporter.cpp */; }; + BBA5ABB71309C2FA000B38F1 /* BugReporterVisitors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB591309C2FA000B38F1 /* BugReporterVisitors.cpp */; }; + BBA5ABB81309C2FA000B38F1 /* CFRefCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB5A1309C2FA000B38F1 /* CFRefCount.cpp */; }; + BBA5ABB91309C2FA000B38F1 /* Checker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB5B1309C2FA000B38F1 /* Checker.cpp */; }; + BBA5ABBA1309C2FA000B38F1 /* CheckerHelpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB5C1309C2FA000B38F1 /* CheckerHelpers.cpp */; }; + BBA5ABBB1309C2FA000B38F1 /* CheckerManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB5D1309C2FA000B38F1 /* CheckerManager.cpp */; }; + BBA5ABBC1309C2FA000B38F1 /* CoreEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB5F1309C2FA000B38F1 /* CoreEngine.cpp */; }; + BBA5ABBD1309C2FA000B38F1 /* CXXExprEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB601309C2FA000B38F1 /* CXXExprEngine.cpp */; }; + BBA5ABBE1309C2FA000B38F1 /* Environment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB611309C2FA000B38F1 /* Environment.cpp */; }; + BBA5ABBF1309C2FA000B38F1 /* ExplodedGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB621309C2FA000B38F1 /* ExplodedGraph.cpp */; }; + BBA5ABC01309C2FA000B38F1 /* FlatStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB631309C2FA000B38F1 /* FlatStore.cpp */; }; + BBA5ABC11309C2FA000B38F1 /* GRState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB641309C2FA000B38F1 /* GRState.cpp */; }; + BBA5ABC21309C2FA000B38F1 /* HTMLDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB651309C2FA000B38F1 /* HTMLDiagnostics.cpp */; }; + BBA5ABC41309C2FA000B38F1 /* MemRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB671309C2FA000B38F1 /* MemRegion.cpp */; }; + BBA5ABC51309C2FA000B38F1 /* ObjCMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB681309C2FA000B38F1 /* ObjCMessage.cpp */; }; + BBA5ABC61309C2FA000B38F1 /* PathDiagnostic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB691309C2FA000B38F1 /* PathDiagnostic.cpp */; }; + BBA5ABC71309C2FA000B38F1 /* PlistDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB6A1309C2FA000B38F1 /* PlistDiagnostics.cpp */; }; + BBA5ABC81309C2FA000B38F1 /* RangeConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB6B1309C2FA000B38F1 /* RangeConstraintManager.cpp */; }; + BBA5ABC91309C2FA000B38F1 /* RegionStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB6C1309C2FA000B38F1 /* RegionStore.cpp */; }; + BBA5ABCA1309C2FA000B38F1 /* SimpleConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB6D1309C2FA000B38F1 /* SimpleConstraintManager.cpp */; }; + BBA5ABCB1309C2FA000B38F1 /* SimpleSValBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB6F1309C2FA000B38F1 /* SimpleSValBuilder.cpp */; }; + BBA5ABCC1309C2FA000B38F1 /* Store.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB701309C2FA000B38F1 /* Store.cpp */; }; + BBA5ABCD1309C2FA000B38F1 /* SValBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB711309C2FA000B38F1 /* SValBuilder.cpp */; }; + BBA5ABCE1309C2FA000B38F1 /* SVals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB721309C2FA000B38F1 /* SVals.cpp */; }; + BBA5ABCF1309C2FA000B38F1 /* SymbolManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB731309C2FA000B38F1 /* SymbolManager.cpp */; }; + BBA5ABD01309C2FA000B38F1 /* TextPathDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB741309C2FA000B38F1 /* TextPathDiagnostics.cpp */; }; + BBA5ABD11309C2FA000B38F1 /* AnalysisConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB761309C2FA000B38F1 /* AnalysisConsumer.cpp */; }; + BBA5ABD21309C2FA000B38F1 /* CheckerRegistration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB781309C2FA000B38F1 /* CheckerRegistration.cpp */; }; + BBA5ABD31309C2FA000B38F1 /* FrontendActions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BBA5AB7A1309C2FA000B38F1 /* FrontendActions.cpp */; }; BDF87CF70FD746F300BBF872 /* SemaTemplateDeduction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */; }; BF89C3E211595818001C2D68 /* AnalysisBasedWarnings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */; }; BF89C3E91159594A001C2D68 /* SemaObjCProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF89C3E81159594A001C2D68 /* SemaObjCProperty.cpp */; }; 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 */; }; @@ -180,34 +331,11 @@ 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 */; }; - BFE2F6AE11DA955A0007EDC0 /* FixItRewriter.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68011DA955A0007EDC0 /* FixItRewriter.o */; }; - BFE2F6AF11DA955A0007EDC0 /* FrontendActions.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68111DA955A0007EDC0 /* FrontendActions.d */; }; - BFE2F6B011DA955A0007EDC0 /* FrontendActions.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68211DA955A0007EDC0 /* FrontendActions.o */; }; - BFE2F6B111DA955A0007EDC0 /* HTMLPrint.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68311DA955A0007EDC0 /* HTMLPrint.d */; }; - BFE2F6B211DA955A0007EDC0 /* HTMLPrint.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F68411DA955A0007EDC0 /* HTMLPrint.o */; }; - 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 */; }; - BFE2F6B711DA955A0007EDC0 /* RewriteObjC.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */; }; - BFE2F6B911DA955A0007EDC0 /* Rewriter.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F68B11DA955A0007EDC0 /* Rewriter.d */; }; - 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 */; }; BFE2F6C211DA955A0007EDC0 /* FixItRewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69411DA955A0007EDC0 /* FixItRewriter.cpp */; }; BFE2F6C311DA955A0007EDC0 /* FrontendActions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69511DA955A0007EDC0 /* FrontendActions.cpp */; }; BFE2F6C411DA955A0007EDC0 /* HTMLPrint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69611DA955A0007EDC0 /* HTMLPrint.cpp */; }; BFE2F6C511DA955A0007EDC0 /* HTMLRewrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69711DA955A0007EDC0 /* HTMLRewrite.cpp */; }; - BFE2F6C611DA955A0007EDC0 /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69811DA955A0007EDC0 /* Makefile */; }; - BFE2F6C711DA955A0007EDC0 /* DeltaTree.d in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F69B11DA955A0007EDC0 /* DeltaTree.d */; }; - BFE2F6C811DA955A0007EDC0 /* DeltaTree.o in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2F69C11DA955A0007EDC0 /* DeltaTree.o */; }; - 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 */; }; - 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 */; }; BFE2F6D211DA955A0007EDC0 /* RewriteObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A611DA955A0007EDC0 /* RewriteObjC.cpp */; }; BFE2F6D311DA955A0007EDC0 /* Rewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFE2F6A711DA955A0007EDC0 /* Rewriter.cpp */; }; @@ -239,20 +367,12 @@ DE38CD500D794D0100A273B6 /* CGObjCGNU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE38CD4F0D794D0100A273B6 /* CGObjCGNU.cpp */; }; DE3986F00CB8D4B300223765 /* IdentifierTable.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3986EF0CB8D4B300223765 /* IdentifierTable.h */; }; DE3986F40CB8D50C00223765 /* IdentifierTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3986F30CB8D50C00223765 /* IdentifierTable.cpp */; }; - DE4121350D7F1C1C0080F80A /* SymbolManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121270D7F1C1C0080F80A /* SymbolManager.cpp */; }; - DE4121360D7F1C1C0080F80A /* ExplodedGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121280D7F1C1C0080F80A /* ExplodedGraph.cpp */; }; - DE4121370D7F1C1C0080F80A /* UninitializedValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121290D7F1C1C0080F80A /* UninitializedValues.cpp */; }; - DE4121380D7F1C1C0080F80A /* GRCoreEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE41212A0D7F1C1C0080F80A /* GRCoreEngine.cpp */; }; - DE41213C0D7F1C1C0080F80A /* GRSimpleVals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE41212F0D7F1C1C0080F80A /* GRSimpleVals.cpp */; }; - DE41213D0D7F1C1C0080F80A /* GRBlockCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121300D7F1C1C0080F80A /* GRBlockCounter.cpp */; }; - DE41213E0D7F1C1C0080F80A /* GRExprEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121310D7F1C1C0080F80A /* GRExprEngine.cpp */; }; DE4264FC0C113592005A861D /* CGDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4264FB0C113592005A861D /* CGDecl.cpp */; }; DE46BF280AE0A82D00CC047C /* TargetInfo.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE46BF270AE0A82D00CC047C /* TargetInfo.h */; }; DE4772FA0C10EAE5002239E8 /* CGStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4772F90C10EAE5002239E8 /* CGStmt.cpp */; }; DE4772FC0C10EAEC002239E8 /* CGExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4772FB0C10EAEC002239E8 /* CGExpr.cpp */; }; DE47999C0D2EBE1A00706D2D /* SemaExprObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE47999B0D2EBE1A00706D2D /* SemaExprObjC.cpp */; }; DE4DC7A30EA1C33E00069E5A /* TokenRewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4DC7A20EA1C33E00069E5A /* TokenRewriter.cpp */; }; - DE67E70B0C020EC500F66BC5 /* SemaType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E70A0C020EC500F66BC5 /* SemaType.cpp */; }; DE67E70D0C020ECA00F66BC5 /* SemaStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E70C0C020ECA00F66BC5 /* SemaStmt.cpp */; }; DE67E70F0C020ECF00F66BC5 /* SemaExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */; }; DE67E7110C020ED400F66BC5 /* SemaExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */; }; @@ -412,6 +532,7 @@ 1A30A9E80B93A4C800201A91 /* ExprCXX.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExprCXX.h; path = clang/AST/ExprCXX.h; sourceTree = ""; tabWidth = 2; }; 1A31B27210ACE6DA009E0C8B /* GlobalDecl.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = GlobalDecl.h; path = lib/CodeGen/GlobalDecl.h; sourceTree = ""; tabWidth = 2; }; 1A376A2C0D4AED9B002A1C52 /* CGExprConstant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGExprConstant.cpp; path = lib/CodeGen/CGExprConstant.cpp; sourceTree = ""; tabWidth = 2; }; + 1A3D2C4D12A2CD3D0088C44A /* CGCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CGCXXABI.cpp; path = lib/CodeGen/CGCXXABI.cpp; sourceTree = ""; }; 1A471AB40F437BC500753CE8 /* CGBlocks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGBlocks.cpp; path = lib/CodeGen/CGBlocks.cpp; sourceTree = ""; tabWidth = 2; }; 1A4C41BE105B4C0B0047B5E7 /* CGClass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGClass.cpp; path = lib/CodeGen/CGClass.cpp; sourceTree = ""; tabWidth = 2; }; 1A535EDB107BC47B000C3AE7 /* CanonicalType.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CanonicalType.h; path = clang/AST/CanonicalType.h; sourceTree = ""; tabWidth = 2; }; @@ -493,6 +614,101 @@ 1ABD23D31182449800A48E65 /* Type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = Type.cpp; sourceTree = ""; tabWidth = 2; }; 1ABD23D41182449800A48E65 /* TypeLoc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = TypeLoc.cpp; sourceTree = ""; tabWidth = 2; }; 1ABD23D51182449800A48E65 /* TypePrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = TypePrinter.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67212999D8E006FBC77 /* AnalysisContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = AnalysisContext.cpp; path = lib/Analysis/AnalysisContext.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67312999D8E006FBC77 /* CFG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CFG.cpp; path = lib/Analysis/CFG.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67412999D8E006FBC77 /* CFGStmtMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CFGStmtMap.cpp; path = lib/Analysis/CFGStmtMap.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67512999D8E006FBC77 /* FormatString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = FormatString.cpp; path = lib/Analysis/FormatString.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67612999D8E006FBC77 /* FormatStringParsing.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = FormatStringParsing.h; path = lib/Analysis/FormatStringParsing.h; sourceTree = ""; tabWidth = 2; }; + 1AC1A67712999D8E006FBC77 /* LiveVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = LiveVariables.cpp; path = lib/Analysis/LiveVariables.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67812999D8E006FBC77 /* PrintfFormatString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = PrintfFormatString.cpp; path = lib/Analysis/PrintfFormatString.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67912999D8E006FBC77 /* PseudoConstantAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = PseudoConstantAnalysis.cpp; path = lib/Analysis/PseudoConstantAnalysis.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67A12999D8E006FBC77 /* ReachableCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ReachableCode.cpp; path = lib/Analysis/ReachableCode.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67B12999D8E006FBC77 /* ScanfFormatString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ScanfFormatString.cpp; path = lib/Analysis/ScanfFormatString.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A67C12999D8E006FBC77 /* UninitializedValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = UninitializedValues.cpp; path = lib/Analysis/UninitializedValues.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6881299A284006FBC77 /* AdjustedReturnValueChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = AdjustedReturnValueChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6891299A284006FBC77 /* AggExprVisitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = AggExprVisitor.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A68A1299A284006FBC77 /* AnalysisConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = AnalysisConsumer.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A68B1299A284006FBC77 /* AnalysisManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = AnalysisManager.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A68C1299A284006FBC77 /* AnalyzerStatsChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = AnalyzerStatsChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A68D1299A284006FBC77 /* ArrayBoundChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayBoundChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A68E1299A284006FBC77 /* AttrNonNullChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = AttrNonNullChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A68F1299A284006FBC77 /* BasicConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BasicConstraintManager.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6901299A284006FBC77 /* BasicObjCFoundationChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BasicObjCFoundationChecks.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6911299A284006FBC77 /* BasicObjCFoundationChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = BasicObjCFoundationChecks.h; sourceTree = ""; tabWidth = 2; }; + 1AC1A6921299A284006FBC77 /* BasicStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BasicStore.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6931299A284006FBC77 /* BasicValueFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BasicValueFactory.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6941299A284006FBC77 /* BugReporter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BugReporter.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6951299A284006FBC77 /* BugReporterVisitors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BugReporterVisitors.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6961299A284006FBC77 /* BuiltinFunctionChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = BuiltinFunctionChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6971299A284006FBC77 /* CallAndMessageChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CallAndMessageChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6981299A284006FBC77 /* CastSizeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CastSizeChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6991299A284006FBC77 /* CastToStructChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CastToStructChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A69A1299A284006FBC77 /* CFRefCount.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CFRefCount.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A69B1299A284006FBC77 /* CheckDeadStores.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CheckDeadStores.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A69C1299A284006FBC77 /* Checker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = Checker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A69D1299A284006FBC77 /* CheckerHelpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CheckerHelpers.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A69E1299A284006FBC77 /* CheckObjCDealloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CheckObjCDealloc.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A69F1299A284006FBC77 /* CheckObjCInstMethSignature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CheckObjCInstMethSignature.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6A01299A284006FBC77 /* CheckSecuritySyntaxOnly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CheckSecuritySyntaxOnly.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6A11299A284006FBC77 /* CheckSizeofPointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CheckSizeofPointer.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6A21299A284006FBC77 /* ChrootChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ChrootChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6A41299A284006FBC77 /* CocoaConventions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CocoaConventions.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A6A51299A284006FBC77 /* CStringChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = CStringChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7DC1299A285006FBC77 /* DereferenceChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = DereferenceChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7DD1299A285006FBC77 /* DivZeroChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = DivZeroChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7DE1299A285006FBC77 /* Environment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = Environment.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7DF1299A285006FBC77 /* ExplodedGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ExplodedGraph.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E01299A285006FBC77 /* FixedAddressChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = FixedAddressChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E11299A285006FBC77 /* FlatStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = FlatStore.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E21299A285006FBC77 /* FrontendActions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = FrontendActions.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E31299A285006FBC77 /* GRBlockCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = GRBlockCounter.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E41299A285006FBC77 /* GRCoreEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = GRCoreEngine.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E51299A285006FBC77 /* GRCXXExprEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = GRCXXExprEngine.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E61299A285006FBC77 /* GRExprEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = GRExprEngine.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E71299A285006FBC77 /* GRExprEngineExperimentalChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = GRExprEngineExperimentalChecks.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E81299A285006FBC77 /* GRExprEngineExperimentalChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = GRExprEngineExperimentalChecks.h; sourceTree = ""; tabWidth = 2; }; + 1AC1A7E91299A285006FBC77 /* GRExprEngineInternalChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = GRExprEngineInternalChecks.h; sourceTree = ""; tabWidth = 2; }; + 1AC1A7EA1299A285006FBC77 /* GRState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = GRState.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7EB1299A285006FBC77 /* HTMLDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLDiagnostics.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7EC1299A285006FBC77 /* IdempotentOperationChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = IdempotentOperationChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7ED1299A285006FBC77 /* LLVMConventionsChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMConventionsChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7EE1299A285006FBC77 /* MacOSXAPIChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = MacOSXAPIChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F01299A285006FBC77 /* MallocChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = MallocChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F11299A285006FBC77 /* ManagerRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ManagerRegistry.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F21299A285006FBC77 /* MemRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = MemRegion.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F31299A285006FBC77 /* NoReturnFunctionChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = NoReturnFunctionChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F41299A285006FBC77 /* NSAutoreleasePoolChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = NSAutoreleasePoolChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F51299A285006FBC77 /* NSErrorChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = NSErrorChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F61299A285006FBC77 /* ObjCAtSyncChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ObjCAtSyncChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F71299A285006FBC77 /* ObjCUnusedIVarsChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ObjCUnusedIVarsChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F81299A285006FBC77 /* OSAtomicChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = OSAtomicChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7F91299A285006FBC77 /* PathDiagnostic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = PathDiagnostic.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7FA1299A285006FBC77 /* PlistDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = PlistDiagnostics.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7FB1299A285006FBC77 /* PointerArithChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = PointerArithChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7FC1299A285006FBC77 /* PointerSubChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = PointerSubChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7FD1299A285006FBC77 /* PthreadLockChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = PthreadLockChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A7FE1299A285006FBC77 /* RangeConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = RangeConstraintManager.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A8001299A285006FBC77 /* RegionStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = RegionStore.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9DB1299A287006FBC77 /* ReturnPointerRangeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ReturnPointerRangeChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9DC1299A287006FBC77 /* ReturnUndefChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ReturnUndefChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9DD1299A287006FBC77 /* SimpleConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleConstraintManager.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9DE1299A287006FBC77 /* SimpleConstraintManager.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = SimpleConstraintManager.h; sourceTree = ""; tabWidth = 2; }; + 1AC1A9DF1299A287006FBC77 /* SimpleSValuator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleSValuator.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E01299A287006FBC77 /* StackAddrLeakChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = StackAddrLeakChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E11299A287006FBC77 /* Store.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = Store.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E21299A287006FBC77 /* StreamChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = StreamChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E31299A287006FBC77 /* SVals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SVals.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E41299A287006FBC77 /* SValuator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SValuator.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E51299A287006FBC77 /* SymbolManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolManager.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E61299A287006FBC77 /* UndefBranchChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UndefBranchChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E71299A287006FBC77 /* UndefCapturedBlockVarChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UndefCapturedBlockVarChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E81299A287006FBC77 /* UndefinedArraySubscriptChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UndefinedArraySubscriptChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9E91299A287006FBC77 /* UndefinedAssignmentChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UndefinedAssignmentChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9EA1299A287006FBC77 /* UndefResultChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UndefResultChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9EB1299A287006FBC77 /* UnixAPIChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UnixAPIChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9EC1299A287006FBC77 /* UnreachableCodeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UnreachableCodeChecker.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9ED1299A287006FBC77 /* ValueManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ValueManager.cpp; sourceTree = ""; tabWidth = 2; }; + 1AC1A9EE1299A287006FBC77 /* VLASizeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = VLASizeChecker.cpp; sourceTree = ""; tabWidth = 2; }; 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerInstance.cpp; path = lib/Frontend/CompilerInstance.cpp; sourceTree = ""; }; 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerInvocation.cpp; path = lib/Frontend/CompilerInvocation.cpp; sourceTree = ""; }; 1ACB57DD1105820D0047B991 /* DeclXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeclXML.cpp; path = lib/Frontend/DeclXML.cpp; sourceTree = ""; }; @@ -504,10 +720,12 @@ 1ACB57E31105820D0047B991 /* VerifyDiagnosticsClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VerifyDiagnosticsClient.cpp; path = lib/Frontend/VerifyDiagnosticsClient.cpp; sourceTree = ""; }; 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateInstantiateDecl.cpp; path = lib/Sema/SemaTemplateInstantiateDecl.cpp; sourceTree = ""; tabWidth = 2; }; 1AE4EE3B103B89CA00888A23 /* TreeTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TreeTransform.h; path = lib/Sema/TreeTransform.h; sourceTree = ""; tabWidth = 2; }; + 1AECEFAF12DE387800F1D539 /* AnalysisContext.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = AnalysisContext.h; path = clang/Analysis/AnalysisContext.h; sourceTree = ""; tabWidth = 2; }; + 1AECEFB012DE387800F1D539 /* CFG.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CFG.h; path = clang/Analysis/CFG.h; sourceTree = ""; tabWidth = 2; }; + 1AECEFB112DE387800F1D539 /* CFGStmtMap.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CFGStmtMap.h; path = clang/Analysis/CFGStmtMap.h; sourceTree = ""; tabWidth = 2; }; 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGException.cpp; path = lib/CodeGen/CGException.cpp; sourceTree = ""; tabWidth = 2; }; 1AFDD8701161085D00AE030A /* ASTMerge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTMerge.cpp; path = lib/Frontend/ASTMerge.cpp; sourceTree = ""; }; 1AFF8AE11012BFC900D248DA /* CGRecordLayoutBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGRecordLayoutBuilder.cpp; path = lib/CodeGen/CGRecordLayoutBuilder.cpp; sourceTree = ""; tabWidth = 2; }; - 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckObjCInstMethSignature.cpp; path = lib/Analysis/CheckObjCInstMethSignature.cpp; sourceTree = ""; }; 352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitHeaderSearch.cpp; path = lib/Frontend/InitHeaderSearch.cpp; sourceTree = ""; }; 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextDiagnosticBuffer.cpp; path = lib/Frontend/TextDiagnosticBuffer.cpp; sourceTree = ""; }; 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextDiagnosticPrinter.cpp; path = lib/Frontend/TextDiagnosticPrinter.cpp; sourceTree = ""; }; @@ -517,7 +735,6 @@ 352C19DE0CA321C80045DB98 /* CFGStmtVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFGStmtVisitor.h; path = clang/Analysis/Visitors/CFGStmtVisitor.h; sourceTree = ""; }; 352C19DF0CA321C80045DB98 /* CFGVarDeclVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFGVarDeclVisitor.h; path = clang/Analysis/Visitors/CFGVarDeclVisitor.h; sourceTree = ""; }; 3534A01C0E129849002709B2 /* ParseCXXInlineMethods.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseCXXInlineMethods.cpp; path = lib/Parse/ParseCXXInlineMethods.cpp; sourceTree = ""; tabWidth = 2; }; - 3536456A0E23EBF7009C6509 /* Environment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Environment.cpp; path = lib/Analysis/Environment.cpp; sourceTree = ""; }; 3536457C0E2406B0009C6509 /* Environment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Environment.h; path = clang/Analysis/PathSensitive/Environment.h; sourceTree = ""; }; 3537AA0C0ECD088F008F7CDC /* BlkExprDeclBitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlkExprDeclBitVector.h; path = clang/Analysis/Support/BlkExprDeclBitVector.h; sourceTree = ""; }; 3537AA0D0ECD08A4008F7CDC /* PreprocessorLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreprocessorLexer.cpp; sourceTree = ""; }; @@ -527,7 +744,6 @@ 35475B1F0E79973F0000BFE4 /* CGCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGCall.cpp; path = lib/CodeGen/CGCall.cpp; sourceTree = ""; tabWidth = 2; }; 35475B220E7997680000BFE4 /* CGCall.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGCall.h; path = lib/CodeGen/CGCall.h; sourceTree = ""; tabWidth = 2; }; 35475B230E7997680000BFE4 /* CGValue.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGValue.h; path = lib/CodeGen/CGValue.h; sourceTree = ""; tabWidth = 2; }; - 355106850E9A8507006A4E44 /* MemRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MemRegion.cpp; path = lib/Analysis/MemRegion.cpp; sourceTree = ""; }; 355106880E9A851B006A4E44 /* MemRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemRegion.h; path = clang/Analysis/PathSensitive/MemRegion.h; sourceTree = ""; }; 3551068A0E9A8546006A4E44 /* ParsePragma.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParsePragma.cpp; path = lib/Parse/ParsePragma.cpp; sourceTree = ""; tabWidth = 2; }; 3551068B0E9A8546006A4E44 /* ParseTentative.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseTentative.cpp; path = lib/Parse/ParseTentative.cpp; sourceTree = ""; tabWidth = 2; }; @@ -535,48 +751,28 @@ 3552E7540E520D80003A8CA5 /* PPCaching.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCaching.cpp; sourceTree = ""; }; 3552E7580E520DD7003A8CA5 /* CGObjCMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGObjCMac.cpp; path = lib/CodeGen/CGObjCMac.cpp; sourceTree = ""; tabWidth = 2; }; 3553EB9A0E5F7089007D7359 /* GRStateTrait.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRStateTrait.h; path = clang/Analysis/PathSensitive/GRStateTrait.h; sourceTree = ""; }; - 35544B850F5C7FD700D92AA9 /* RangeConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RangeConstraintManager.cpp; path = lib/Analysis/RangeConstraintManager.cpp; sourceTree = ""; }; - 35544B860F5C7FD700D92AA9 /* SimpleConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SimpleConstraintManager.cpp; path = lib/Analysis/SimpleConstraintManager.cpp; sourceTree = ""; }; - 35544B870F5C7FD700D92AA9 /* SimpleConstraintManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SimpleConstraintManager.h; path = lib/Analysis/SimpleConstraintManager.h; sourceTree = ""; }; 35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateInstantiate.cpp; path = lib/Sema/SemaTemplateInstantiate.cpp; sourceTree = ""; tabWidth = 2; }; 35585DBE0EAFBC4500D0A97A /* SemaOverload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaOverload.cpp; path = lib/Sema/SemaOverload.cpp; sourceTree = ""; tabWidth = 2; }; - 3558F76C0E267C8300A5B0DF /* BasicStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicStore.cpp; path = lib/Analysis/BasicStore.cpp; sourceTree = ""; }; 3558F76F0E267C9A00A5B0DF /* Store.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Store.h; path = clang/Analysis/PathSensitive/Store.h; sourceTree = ""; }; - 355CF6820C90A8B600A08AA3 /* LocalCheckers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LocalCheckers.h; path = clang/Analysis/LocalCheckers.h; sourceTree = ""; }; - 356B89760D9BFDC100CBEBE9 /* BasicObjCFoundationChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BasicObjCFoundationChecks.h; path = lib/Analysis/BasicObjCFoundationChecks.h; sourceTree = ""; }; - 356EF9B40C8F7DDF006650F5 /* LiveVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LiveVariables.cpp; path = lib/Analysis/LiveVariables.cpp; sourceTree = ""; }; 35707EFD0CD0F5CC000B2204 /* SourceLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SourceLocation.cpp; sourceTree = ""; tabWidth = 2; }; 357EA27C0F2526F300439B60 /* SemaLookup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaLookup.cpp; path = lib/Sema/SemaLookup.cpp; sourceTree = ""; tabWidth = 2; }; 35847BE30CC7DB9000C40FFF /* StmtIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtIterator.h; path = clang/AST/StmtIterator.h; sourceTree = ""; tabWidth = 2; }; - 35862B0C0E3628CB0009F542 /* CheckDeadStores.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckDeadStores.cpp; path = lib/Analysis/CheckDeadStores.cpp; sourceTree = ""; }; - 35862B110E3629850009F542 /* GRExprEngineInternalChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRExprEngineInternalChecks.cpp; path = lib/Analysis/GRExprEngineInternalChecks.cpp; sourceTree = ""; }; - 358CFBB70E65AB04002A8E19 /* BasicConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicConstraintManager.cpp; path = lib/Analysis/BasicConstraintManager.cpp; sourceTree = ""; }; 358D23090E8BEB850003DDCC /* DeclGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclGroup.h; path = clang/AST/DeclGroup.h; sourceTree = ""; tabWidth = 2; }; 358F514F0E529A87007F2102 /* GRState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRState.h; path = clang/Analysis/PathSensitive/GRState.h; sourceTree = ""; }; - 358F51510E529AA4007F2102 /* GRState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRState.cpp; path = lib/Analysis/GRState.cpp; sourceTree = ""; }; 3591853E0EFB1088000039AF /* SemaTemplate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplate.cpp; path = lib/Sema/SemaTemplate.cpp; sourceTree = ""; tabWidth = 2; }; 359378FF0DA486490043B19C /* BugReporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BugReporter.h; path = clang/Analysis/PathSensitive/BugReporter.h; sourceTree = ""; }; - 359379090DA48ABA0043B19C /* BugReporter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BugReporter.cpp; path = lib/Analysis/BugReporter.cpp; sourceTree = ""; }; - 3595AFB70E1C8D62004CDF09 /* CheckObjCDealloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckObjCDealloc.cpp; path = lib/Analysis/CheckObjCDealloc.cpp; sourceTree = ""; }; 3598EBEB0EDE23EF0070CA16 /* PTHManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTHManager.h; sourceTree = ""; }; 3599299A0DE2425300A8A33E /* SemaInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaInit.cpp; path = lib/Sema/SemaInit.cpp; sourceTree = ""; tabWidth = 2; }; 35A057D20EAE2D2B0069249F /* SVals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SVals.h; path = clang/Analysis/PathSensitive/SVals.h; sourceTree = ""; }; - 35A057E00EAE2D950069249F /* RegionStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegionStore.cpp; path = lib/Analysis/RegionStore.cpp; sourceTree = ""; }; - 35A057E10EAE2D950069249F /* SVals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SVals.cpp; path = lib/Analysis/SVals.cpp; sourceTree = ""; }; 35A3E7000DD3874400757F74 /* CGDebugInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGDebugInfo.cpp; path = lib/CodeGen/CGDebugInfo.cpp; sourceTree = ""; tabWidth = 2; wrapsLines = 1; }; 35A3E7010DD3874400757F74 /* CGDebugInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGDebugInfo.h; path = lib/CodeGen/CGDebugInfo.h; sourceTree = ""; tabWidth = 2; }; - 35A8FCF60D9B4ADD001C2F97 /* ProgramPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProgramPoint.h; path = clang/Analysis/ProgramPoint.h; sourceTree = ""; }; - 35A8FCF70D9B4ADD001C2F97 /* PathDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PathDiagnostic.h; path = clang/Analysis/PathDiagnostic.h; sourceTree = ""; }; - 35A8FCF80D9B4B29001C2F97 /* PathDiagnostic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathDiagnostic.cpp; path = lib/Analysis/PathDiagnostic.cpp; sourceTree = ""; }; + 35A8FCF60D9B4ADD001C2F97 /* ProgramPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ProgramPoint.h; path = clang/Analysis/ProgramPoint.h; sourceTree = ""; tabWidth = 2; }; 35B820740ECB811A0020BEC0 /* PreprocessorLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreprocessorLexer.h; sourceTree = ""; }; - 35BAC1E70E82C5B7003FB76F /* CheckNSError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckNSError.cpp; path = lib/Analysis/CheckNSError.cpp; sourceTree = ""; }; 35BFBD2B0C9EDE1E006CB644 /* ASTConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ASTConsumer.h; path = clang/AST/ASTConsumer.h; sourceTree = ""; tabWidth = 2; }; 35CEA05A0DF9E82700A41296 /* ExprObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExprObjC.h; path = clang/AST/ExprObjC.h; sourceTree = ""; tabWidth = 2; }; 35CFFE010CA1CBDD00E6F2BE /* StmtGraphTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtGraphTraits.h; path = clang/AST/StmtGraphTraits.h; sourceTree = ""; tabWidth = 2; }; 35D1DDD10CA9C6D50096E967 /* DataflowSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataflowSolver.h; path = clang/Analysis/FlowSensitive/DataflowSolver.h; sourceTree = ""; }; 35D1DDD20CA9C6D50096E967 /* DataflowValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataflowValues.h; path = clang/Analysis/FlowSensitive/DataflowValues.h; sourceTree = ""; }; - 35D55B240D81D8C60092E734 /* BasicValueFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicValueFactory.cpp; path = lib/Analysis/BasicValueFactory.cpp; sourceTree = ""; }; - 35D55B250D81D8C60092E734 /* CFRefCount.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFRefCount.cpp; path = lib/Analysis/CFRefCount.cpp; sourceTree = ""; }; 35D55B290D81D8E50092E734 /* BasicValueFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BasicValueFactory.h; path = clang/Analysis/PathSensitive/BasicValueFactory.h; sourceTree = ""; }; 35E194670ECB82FB00F21733 /* SemaCXXScopeSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaCXXScopeSpec.cpp; path = lib/Sema/SemaCXXScopeSpec.cpp; sourceTree = ""; tabWidth = 2; }; 35E194680ECB82FB00F21733 /* SemaCXXCast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaCXXCast.cpp; path = lib/Sema/SemaCXXCast.cpp; sourceTree = ""; tabWidth = 2; }; @@ -584,13 +780,10 @@ 35EE48AD0E0C4CB200715C54 /* DeclCXX.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclCXX.h; path = clang/AST/DeclCXX.h; sourceTree = ""; tabWidth = 2; }; 35EE48AE0E0C4CB200715C54 /* ParentMap.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ParentMap.h; path = clang/AST/ParentMap.h; sourceTree = ""; tabWidth = 2; }; 35EF676F0DAD1D2C00B19414 /* SemaDeclCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDeclCXX.cpp; path = lib/Sema/SemaDeclCXX.cpp; sourceTree = ""; tabWidth = 2; }; - 35EFEFB50DB67ED60020783D /* GRTransferFuncs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRTransferFuncs.cpp; path = lib/Analysis/GRTransferFuncs.cpp; sourceTree = ""; }; 35F1ACE60E66166C001F4532 /* ConstraintManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConstraintManager.h; path = clang/Analysis/PathSensitive/ConstraintManager.h; sourceTree = ""; }; - 35F2A01D0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckObjCUnusedIVars.cpp; path = lib/Analysis/CheckObjCUnusedIVars.cpp; sourceTree = ""; }; 35F2BE7B0DAC2963006E7668 /* HTMLRewrite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLRewrite.h; path = clang/Rewrite/HTMLRewrite.h; sourceTree = ""; }; 35F8D0CA0D9B7E8200D91C5E /* GRSimpleAPICheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRSimpleAPICheck.h; path = clang/Analysis/PathSensitive/GRSimpleAPICheck.h; sourceTree = ""; }; 35F8D0CB0D9B7E8200D91C5E /* GRAuditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRAuditor.h; path = clang/Analysis/PathSensitive/GRAuditor.h; sourceTree = ""; }; - 35F8D0D50D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicObjCFoundationChecks.cpp; path = lib/Analysis/BasicObjCFoundationChecks.cpp; sourceTree = ""; }; 35F9B1550D1C6B2E00DDFDAE /* LiveVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LiveVariables.h; path = clang/Analysis/Analyses/LiveVariables.h; sourceTree = ""; }; 35F9B1560D1C6B2E00DDFDAE /* UninitializedValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UninitializedValues.h; path = clang/Analysis/Analyses/UninitializedValues.h; sourceTree = ""; }; 574F4C25121B4EF000AEAC20 /* ASTWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTWriter.h; path = clang/Serialization/ASTWriter.h; sourceTree = ""; }; @@ -599,9 +792,6 @@ 57AA924F121C8B9400B4AA6C /* ASTReaderStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTReaderStmt.cpp; sourceTree = ""; }; 57E15B21121C8D2B0051C2CC /* ASTDeserializationListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTDeserializationListener.h; path = clang/Serialization/ASTDeserializationListener.h; sourceTree = ""; }; 57E15B22121C8D2B0051C2CC /* ASTReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTReader.h; path = clang/Serialization/ASTReader.h; sourceTree = ""; }; - 57EB5661121B034300ECA335 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; - 57EB5662121B034300ECA335 /* GeneratePCH.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeneratePCH.cpp; sourceTree = ""; }; - 57EB5663121B034300ECA335 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; 57F6660F121B4DE600DCE3B7 /* ASTWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTWriter.cpp; sourceTree = ""; }; 57F66610121B4DE600DCE3B7 /* ASTWriterDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTWriterDecl.cpp; sourceTree = ""; }; 57F66611121B4DE600DCE3B7 /* ASTWriterStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTWriterStmt.cpp; sourceTree = ""; }; @@ -665,6 +855,99 @@ 90FD6D90103C3D80005F5B73 /* TypeXML.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TypeXML.def; path = clang/Frontend/TypeXML.def; sourceTree = ""; }; 90FD6D91103C3D80005F5B73 /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Utils.h; path = clang/Frontend/Utils.h; sourceTree = ""; }; 90FD6DB5103D977E005F5B73 /* index-test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "index-test.cpp"; path = "tools/index-test/index-test.cpp"; sourceTree = ""; }; + BB5C372812A5057500259F53 /* DumpXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DumpXML.cpp; path = /Volumes/Data/llvm/tools/clang/lib/AST/DumpXML.cpp; sourceTree = ""; }; + BBA5AB141309C2FA000B38F1 /* AdjustedReturnValueChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AdjustedReturnValueChecker.cpp; sourceTree = ""; }; + BBA5AB151309C2FA000B38F1 /* AnalyzerStatsChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnalyzerStatsChecker.cpp; sourceTree = ""; }; + BBA5AB161309C2FA000B38F1 /* ArrayBoundChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayBoundChecker.cpp; sourceTree = ""; }; + BBA5AB171309C2FA000B38F1 /* ArrayBoundCheckerV2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayBoundCheckerV2.cpp; sourceTree = ""; }; + BBA5AB181309C2FA000B38F1 /* AttrNonNullChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AttrNonNullChecker.cpp; sourceTree = ""; }; + BBA5AB191309C2FA000B38F1 /* BasicObjCFoundationChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicObjCFoundationChecks.cpp; sourceTree = ""; }; + BBA5AB1A1309C2FA000B38F1 /* BasicObjCFoundationChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BasicObjCFoundationChecks.h; sourceTree = ""; }; + BBA5AB1B1309C2FA000B38F1 /* BuiltinFunctionChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BuiltinFunctionChecker.cpp; sourceTree = ""; }; + BBA5AB1C1309C2FA000B38F1 /* CallAndMessageChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallAndMessageChecker.cpp; sourceTree = ""; }; + BBA5AB1D1309C2FA000B38F1 /* CastSizeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CastSizeChecker.cpp; sourceTree = ""; }; + BBA5AB1E1309C2FA000B38F1 /* CastToStructChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CastToStructChecker.cpp; sourceTree = ""; }; + BBA5AB1F1309C2FA000B38F1 /* Checkers.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Checkers.td; sourceTree = ""; }; + BBA5AB201309C2FA000B38F1 /* CheckObjCDealloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckObjCDealloc.cpp; sourceTree = ""; }; + BBA5AB211309C2FA000B38F1 /* CheckObjCInstMethSignature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckObjCInstMethSignature.cpp; sourceTree = ""; }; + BBA5AB221309C2FA000B38F1 /* CheckSecuritySyntaxOnly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckSecuritySyntaxOnly.cpp; sourceTree = ""; }; + BBA5AB231309C2FA000B38F1 /* CheckSizeofPointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckSizeofPointer.cpp; sourceTree = ""; }; + BBA5AB241309C2FA000B38F1 /* ChrootChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChrootChecker.cpp; sourceTree = ""; }; + BBA5AB251309C2FA000B38F1 /* ClangSACheckerProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClangSACheckerProvider.cpp; sourceTree = ""; }; + BBA5AB261309C2FA000B38F1 /* ClangSACheckerProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClangSACheckerProvider.h; sourceTree = ""; }; + BBA5AB271309C2FA000B38F1 /* ClangSACheckers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClangSACheckers.h; sourceTree = ""; }; + BBA5AB291309C2FA000B38F1 /* CStringChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CStringChecker.cpp; sourceTree = ""; }; + BBA5AB2A1309C2FA000B38F1 /* DeadStoresChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeadStoresChecker.cpp; sourceTree = ""; }; + BBA5AB2B1309C2FA000B38F1 /* DereferenceChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DereferenceChecker.cpp; sourceTree = ""; }; + BBA5AB2C1309C2FA000B38F1 /* DivZeroChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DivZeroChecker.cpp; sourceTree = ""; }; + BBA5AB2D1309C2FA000B38F1 /* ExperimentalChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExperimentalChecks.cpp; sourceTree = ""; }; + BBA5AB2E1309C2FA000B38F1 /* ExperimentalChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExperimentalChecks.h; sourceTree = ""; }; + BBA5AB2F1309C2FA000B38F1 /* ExprEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExprEngine.cpp; sourceTree = ""; }; + BBA5AB301309C2FA000B38F1 /* FixedAddressChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FixedAddressChecker.cpp; sourceTree = ""; }; + BBA5AB311309C2FA000B38F1 /* IdempotentOperationChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IdempotentOperationChecker.cpp; sourceTree = ""; }; + BBA5AB321309C2FA000B38F1 /* InternalChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InternalChecks.h; sourceTree = ""; }; + BBA5AB331309C2FA000B38F1 /* LLVMConventionsChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMConventionsChecker.cpp; sourceTree = ""; }; + BBA5AB341309C2FA000B38F1 /* MacOSXAPIChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MacOSXAPIChecker.cpp; sourceTree = ""; }; + BBA5AB361309C2FA000B38F1 /* MallocChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MallocChecker.cpp; sourceTree = ""; }; + BBA5AB371309C2FA000B38F1 /* NoReturnFunctionChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NoReturnFunctionChecker.cpp; sourceTree = ""; }; + BBA5AB381309C2FA000B38F1 /* NSAutoreleasePoolChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NSAutoreleasePoolChecker.cpp; sourceTree = ""; }; + BBA5AB3A1309C2FA000B38F1 /* NSErrorChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NSErrorChecker.cpp; sourceTree = ""; }; + BBA5AB3B1309C2FA000B38F1 /* ObjCAtSyncChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjCAtSyncChecker.cpp; sourceTree = ""; }; + BBA5AB3D1309C2FA000B38F1 /* ObjCSelfInitChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjCSelfInitChecker.cpp; sourceTree = ""; }; + BBA5AB3F1309C2FA000B38F1 /* ObjCUnusedIVarsChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjCUnusedIVarsChecker.cpp; sourceTree = ""; }; + BBA5AB401309C2FA000B38F1 /* OSAtomicChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OSAtomicChecker.cpp; sourceTree = ""; }; + BBA5AB411309C2FA000B38F1 /* PointerArithChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PointerArithChecker.cpp; sourceTree = ""; }; + BBA5AB421309C2FA000B38F1 /* PointerSubChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PointerSubChecker.cpp; sourceTree = ""; }; + BBA5AB431309C2FA000B38F1 /* PthreadLockChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PthreadLockChecker.cpp; sourceTree = ""; }; + BBA5AB441309C2FA000B38F1 /* ReturnPointerRangeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReturnPointerRangeChecker.cpp; sourceTree = ""; }; + BBA5AB451309C2FA000B38F1 /* ReturnUndefChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReturnUndefChecker.cpp; sourceTree = ""; }; + BBA5AB461309C2FA000B38F1 /* StackAddrLeakChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StackAddrLeakChecker.cpp; sourceTree = ""; }; + BBA5AB471309C2FA000B38F1 /* StreamChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StreamChecker.cpp; sourceTree = ""; }; + BBA5AB481309C2FA000B38F1 /* UndefBranchChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UndefBranchChecker.cpp; sourceTree = ""; }; + BBA5AB491309C2FA000B38F1 /* UndefCapturedBlockVarChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UndefCapturedBlockVarChecker.cpp; sourceTree = ""; }; + BBA5AB4A1309C2FA000B38F1 /* UndefinedArraySubscriptChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UndefinedArraySubscriptChecker.cpp; sourceTree = ""; }; + BBA5AB4B1309C2FA000B38F1 /* UndefinedAssignmentChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UndefinedAssignmentChecker.cpp; sourceTree = ""; }; + BBA5AB4C1309C2FA000B38F1 /* UndefResultChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UndefResultChecker.cpp; sourceTree = ""; }; + BBA5AB4D1309C2FA000B38F1 /* UnixAPIChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnixAPIChecker.cpp; sourceTree = ""; }; + BBA5AB4E1309C2FA000B38F1 /* UnreachableCodeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnreachableCodeChecker.cpp; sourceTree = ""; }; + BBA5AB4F1309C2FA000B38F1 /* VLASizeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VLASizeChecker.cpp; sourceTree = ""; }; + BBA5AB521309C2FA000B38F1 /* AggExprVisitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AggExprVisitor.cpp; sourceTree = ""; }; + BBA5AB531309C2FA000B38F1 /* AnalysisManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnalysisManager.cpp; sourceTree = ""; }; + BBA5AB541309C2FA000B38F1 /* BasicConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicConstraintManager.cpp; sourceTree = ""; }; + BBA5AB551309C2FA000B38F1 /* BasicStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicStore.cpp; sourceTree = ""; }; + BBA5AB561309C2FA000B38F1 /* BasicValueFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicValueFactory.cpp; sourceTree = ""; }; + BBA5AB571309C2FA000B38F1 /* BlockCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlockCounter.cpp; sourceTree = ""; }; + BBA5AB581309C2FA000B38F1 /* BugReporter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BugReporter.cpp; sourceTree = ""; }; + BBA5AB591309C2FA000B38F1 /* BugReporterVisitors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BugReporterVisitors.cpp; sourceTree = ""; }; + BBA5AB5A1309C2FA000B38F1 /* CFRefCount.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CFRefCount.cpp; sourceTree = ""; }; + BBA5AB5B1309C2FA000B38F1 /* Checker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Checker.cpp; sourceTree = ""; }; + BBA5AB5C1309C2FA000B38F1 /* CheckerHelpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckerHelpers.cpp; sourceTree = ""; }; + BBA5AB5D1309C2FA000B38F1 /* CheckerManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckerManager.cpp; sourceTree = ""; }; + BBA5AB5F1309C2FA000B38F1 /* CoreEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoreEngine.cpp; sourceTree = ""; }; + BBA5AB601309C2FA000B38F1 /* CXXExprEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CXXExprEngine.cpp; sourceTree = ""; }; + BBA5AB611309C2FA000B38F1 /* Environment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Environment.cpp; sourceTree = ""; }; + BBA5AB621309C2FA000B38F1 /* ExplodedGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExplodedGraph.cpp; sourceTree = ""; }; + BBA5AB631309C2FA000B38F1 /* FlatStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FlatStore.cpp; sourceTree = ""; }; + BBA5AB641309C2FA000B38F1 /* GRState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GRState.cpp; sourceTree = ""; }; + BBA5AB651309C2FA000B38F1 /* HTMLDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLDiagnostics.cpp; sourceTree = ""; }; + BBA5AB671309C2FA000B38F1 /* MemRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemRegion.cpp; sourceTree = ""; }; + BBA5AB681309C2FA000B38F1 /* ObjCMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjCMessage.cpp; sourceTree = ""; }; + BBA5AB691309C2FA000B38F1 /* PathDiagnostic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathDiagnostic.cpp; sourceTree = ""; }; + BBA5AB6A1309C2FA000B38F1 /* PlistDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlistDiagnostics.cpp; sourceTree = ""; }; + BBA5AB6B1309C2FA000B38F1 /* RangeConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RangeConstraintManager.cpp; sourceTree = ""; }; + BBA5AB6C1309C2FA000B38F1 /* RegionStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegionStore.cpp; sourceTree = ""; }; + BBA5AB6D1309C2FA000B38F1 /* SimpleConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleConstraintManager.cpp; sourceTree = ""; }; + BBA5AB6E1309C2FA000B38F1 /* SimpleConstraintManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleConstraintManager.h; sourceTree = ""; }; + BBA5AB6F1309C2FA000B38F1 /* SimpleSValBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleSValBuilder.cpp; sourceTree = ""; }; + BBA5AB701309C2FA000B38F1 /* Store.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Store.cpp; sourceTree = ""; }; + BBA5AB711309C2FA000B38F1 /* SValBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SValBuilder.cpp; sourceTree = ""; }; + BBA5AB721309C2FA000B38F1 /* SVals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVals.cpp; sourceTree = ""; }; + BBA5AB731309C2FA000B38F1 /* SymbolManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolManager.cpp; sourceTree = ""; }; + BBA5AB741309C2FA000B38F1 /* TextPathDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextPathDiagnostics.cpp; sourceTree = ""; }; + BBA5AB761309C2FA000B38F1 /* AnalysisConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnalysisConsumer.cpp; sourceTree = ""; }; + BBA5AB771309C2FA000B38F1 /* AnalysisConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnalysisConsumer.h; sourceTree = ""; }; + BBA5AB781309C2FA000B38F1 /* CheckerRegistration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckerRegistration.cpp; sourceTree = ""; }; + BBA5AB7A1309C2FA000B38F1 /* FrontendActions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrontendActions.cpp; sourceTree = ""; }; BD59A948121496B9003A5A02 /* AnalysisBasedWarnings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisBasedWarnings.h; path = clang/Sema/AnalysisBasedWarnings.h; sourceTree = ""; }; BD59A949121496B9003A5A02 /* CodeCompleteConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodeCompleteConsumer.h; path = clang/Sema/CodeCompleteConsumer.h; sourceTree = ""; }; BD59A94A121496B9003A5A02 /* CXXFieldCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CXXFieldCollector.h; path = clang/Sema/CXXFieldCollector.h; sourceTree = ""; }; @@ -742,14 +1025,13 @@ BF9FEDF51225E5D5003A8B71 /* MacroBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroBuilder.h; sourceTree = ""; }; BF9FEDF61225E5FB003A8B71 /* Version.inc.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Version.inc.in; sourceTree = ""; }; BF9FEDF71225E613003A8B71 /* DiagnosticCategories.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DiagnosticCategories.td; sourceTree = ""; }; - BF9FEDF81225E67B003A8B71 /* Action.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Action.cpp; path = lib/Sema/Action.cpp; sourceTree = ""; }; BF9FEDFA1225E6A9003A8B71 /* AttributeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AttributeList.cpp; path = lib/Sema/AttributeList.cpp; sourceTree = ""; }; BF9FEDFC1225E6C6003A8B71 /* DeclSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeclSpec.cpp; path = lib/Sema/DeclSpec.cpp; sourceTree = ""; }; BF9FEDFE1225E6DD003A8B71 /* TargetAttributesSema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetAttributesSema.cpp; path = lib/Sema/TargetAttributesSema.cpp; sourceTree = ""; }; - BF9FEE001225E718003A8B71 /* CXXABI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CXXABI.h; sourceTree = ""; }; - BF9FEE011225E73F003A8B71 /* ExprClassification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExprClassification.cpp; sourceTree = ""; }; - BF9FEE031225E759003A8B71 /* ItaniumCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ItaniumCXXABI.cpp; sourceTree = ""; }; - BF9FEE051225E770003A8B71 /* MicrosoftCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MicrosoftCXXABI.cpp; sourceTree = ""; }; + BF9FEE001225E718003A8B71 /* CXXABI.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = CXXABI.h; sourceTree = ""; tabWidth = 2; }; + BF9FEE011225E73F003A8B71 /* ExprClassification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ExprClassification.cpp; sourceTree = ""; tabWidth = 2; }; + BF9FEE031225E759003A8B71 /* ItaniumCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = ItaniumCXXABI.cpp; sourceTree = ""; tabWidth = 2; }; + BF9FEE051225E770003A8B71 /* MicrosoftCXXABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = MicrosoftCXXABI.cpp; sourceTree = ""; tabWidth = 2; }; BF9FEE2B1225E7EA003A8B71 /* BackendUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BackendUtil.cpp; path = lib/CodeGen/BackendUtil.cpp; sourceTree = ""; }; BF9FEE2D1225E80F003A8B71 /* CGCXXABI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGCXXABI.h; path = lib/CodeGen/CGCXXABI.h; sourceTree = ""; }; BF9FEE2E1225E82D003A8B71 /* CGException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGException.h; path = lib/CodeGen/CGException.h; sourceTree = ""; }; @@ -763,37 +1045,11 @@ BF9FEE511226FE9F003A8B71 /* ParseAST.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParseAST.cpp; path = lib/Parse/ParseAST.cpp; sourceTree = ""; }; BF9FEE531226FEC1003A8B71 /* RAIIObjectsForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAIIObjectsForParser.h; path = lib/Parse/RAIIObjectsForParser.h; sourceTree = ""; }; BF9FEEF1122D8068003A8B71 /* PreprocessingRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreprocessingRecord.cpp; sourceTree = ""; }; - BFE2F67A11DA95590007EDC0 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; - BFE2F67C11DA95590007EDC0 /* .dir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .dir; sourceTree = ""; }; - BFE2F67D11DA95590007EDC0 /* DeltaTree.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = DeltaTree.d; sourceTree = ""; }; - BFE2F67E11DA955A0007EDC0 /* DeltaTree.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = DeltaTree.o; sourceTree = ""; }; - BFE2F67F11DA955A0007EDC0 /* FixItRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = FixItRewriter.d; sourceTree = ""; }; - BFE2F68011DA955A0007EDC0 /* FixItRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = FixItRewriter.o; sourceTree = ""; }; - BFE2F68111DA955A0007EDC0 /* FrontendActions.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = FrontendActions.d; sourceTree = ""; }; - BFE2F68211DA955A0007EDC0 /* FrontendActions.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = FrontendActions.o; sourceTree = ""; }; - BFE2F68311DA955A0007EDC0 /* HTMLPrint.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLPrint.d; sourceTree = ""; }; - BFE2F68411DA955A0007EDC0 /* HTMLPrint.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLPrint.o; sourceTree = ""; }; - BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLRewrite.d; sourceTree = ""; }; - BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLRewrite.o; sourceTree = ""; }; - BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteMacros.d; sourceTree = ""; }; - BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = RewriteObjC.d; sourceTree = ""; }; - BFE2F68B11DA955A0007EDC0 /* Rewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = Rewriter.d; sourceTree = ""; }; - BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = TokenRewriter.d; sourceTree = ""; }; - BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = TokenRewriter.o; sourceTree = ""; }; BFE2F69311DA955A0007EDC0 /* DeltaTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeltaTree.cpp; sourceTree = ""; }; BFE2F69411DA955A0007EDC0 /* FixItRewriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FixItRewriter.cpp; sourceTree = ""; }; BFE2F69511DA955A0007EDC0 /* FrontendActions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrontendActions.cpp; sourceTree = ""; }; BFE2F69611DA955A0007EDC0 /* HTMLPrint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPrint.cpp; sourceTree = ""; }; BFE2F69711DA955A0007EDC0 /* HTMLRewrite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLRewrite.cpp; sourceTree = ""; }; - BFE2F69811DA955A0007EDC0 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; - BFE2F69A11DA955A0007EDC0 /* .dir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .dir; sourceTree = ""; }; - BFE2F69B11DA955A0007EDC0 /* DeltaTree.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = DeltaTree.d; sourceTree = ""; }; - BFE2F69C11DA955A0007EDC0 /* DeltaTree.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = DeltaTree.o; sourceTree = ""; }; - BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = HTMLRewrite.d; sourceTree = ""; }; - BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = HTMLRewrite.o; sourceTree = ""; }; - BFE2F69F11DA955A0007EDC0 /* Rewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = Rewriter.d; sourceTree = ""; }; - BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = TokenRewriter.d; sourceTree = ""; }; - BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = TokenRewriter.o; sourceTree = ""; }; BFE2F6A511DA955A0007EDC0 /* RewriteMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RewriteMacros.cpp; sourceTree = ""; }; BFE2F6A611DA955A0007EDC0 /* RewriteObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RewriteObjC.cpp; sourceTree = ""; }; BFE2F6A711DA955A0007EDC0 /* Rewriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Rewriter.cpp; sourceTree = ""; }; @@ -838,14 +1094,6 @@ DE4121210D7F1BBE0080F80A /* GRExprEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRExprEngine.h; path = clang/Analysis/PathSensitive/GRExprEngine.h; sourceTree = ""; }; DE4121220D7F1BBE0080F80A /* GRTransferFuncs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRTransferFuncs.h; path = clang/Analysis/PathSensitive/GRTransferFuncs.h; sourceTree = ""; }; DE4121230D7F1BBE0080F80A /* GRCoreEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRCoreEngine.h; path = clang/Analysis/PathSensitive/GRCoreEngine.h; sourceTree = ""; }; - DE4121270D7F1C1C0080F80A /* SymbolManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolManager.cpp; path = lib/Analysis/SymbolManager.cpp; sourceTree = ""; }; - DE4121280D7F1C1C0080F80A /* ExplodedGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExplodedGraph.cpp; path = lib/Analysis/ExplodedGraph.cpp; sourceTree = ""; }; - DE4121290D7F1C1C0080F80A /* UninitializedValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UninitializedValues.cpp; path = lib/Analysis/UninitializedValues.cpp; sourceTree = ""; }; - DE41212A0D7F1C1C0080F80A /* GRCoreEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRCoreEngine.cpp; path = lib/Analysis/GRCoreEngine.cpp; sourceTree = ""; }; - DE41212C0D7F1C1C0080F80A /* GRSimpleVals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRSimpleVals.h; path = lib/Analysis/GRSimpleVals.h; sourceTree = ""; }; - DE41212F0D7F1C1C0080F80A /* GRSimpleVals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRSimpleVals.cpp; path = lib/Analysis/GRSimpleVals.cpp; sourceTree = ""; }; - DE4121300D7F1C1C0080F80A /* GRBlockCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRBlockCounter.cpp; path = lib/Analysis/GRBlockCounter.cpp; sourceTree = ""; }; - DE4121310D7F1C1C0080F80A /* GRExprEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRExprEngine.cpp; path = lib/Analysis/GRExprEngine.cpp; sourceTree = ""; }; DE4264FB0C113592005A861D /* CGDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGDecl.cpp; path = lib/CodeGen/CGDecl.cpp; sourceTree = ""; tabWidth = 2; }; DE46BF270AE0A82D00CC047C /* TargetInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = TargetInfo.h; sourceTree = ""; tabWidth = 2; }; DE4772F90C10EAE5002239E8 /* CGStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGStmt.cpp; path = lib/CodeGen/CGStmt.cpp; sourceTree = ""; tabWidth = 2; }; @@ -855,7 +1103,6 @@ DE4DC7A20EA1C33E00069E5A /* TokenRewriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TokenRewriter.cpp; path = lib/Rewrite/TokenRewriter.cpp; sourceTree = ""; }; DE53370B0CE2D96F00D9A028 /* RewriteRope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RewriteRope.h; path = clang/Rewrite/RewriteRope.h; sourceTree = ""; }; DE613EF30E0E148D00B05B79 /* APValue.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = APValue.h; path = clang/AST/APValue.h; sourceTree = ""; tabWidth = 2; }; - DE67E70A0C020EC500F66BC5 /* SemaType.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaType.cpp; path = lib/Sema/SemaType.cpp; sourceTree = ""; tabWidth = 2; }; DE67E70C0C020ECA00F66BC5 /* SemaStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaStmt.cpp; path = lib/Sema/SemaStmt.cpp; sourceTree = ""; tabWidth = 2; }; DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExprCXX.cpp; path = lib/Sema/SemaExprCXX.cpp; sourceTree = ""; tabWidth = 2; }; DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaExpr.cpp; path = lib/Sema/SemaExpr.cpp; sourceTree = ""; tabWidth = 2; }; @@ -970,7 +1217,7 @@ DEF165230F8D46980098507F /* Phases.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Phases.h; path = clang/Driver/Phases.h; sourceTree = ""; }; DEF165240F8D46980098507F /* DriverDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DriverDiagnostic.h; path = clang/Driver/DriverDiagnostic.h; sourceTree = ""; }; DEF169220F9645960098507F /* FrontendDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendDiagnostic.h; path = clang/Frontend/FrontendDiagnostic.h; sourceTree = ""; }; - DEF1692C0F9645BF0098507F /* AnalysisDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisDiagnostic.h; path = clang/Analysis/AnalysisDiagnostic.h; sourceTree = ""; }; + DEF1692C0F9645BF0098507F /* AnalysisDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = AnalysisDiagnostic.h; path = clang/Analysis/AnalysisDiagnostic.h; sourceTree = ""; tabWidth = 2; }; DEF16BE40FA13A5B0098507F /* TypeNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; name = TypeNodes.def; path = clang/AST/TypeNodes.def; sourceTree = ""; tabWidth = 2; }; DEF16BE50FA13A650098507F /* TypeOrdering.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TypeOrdering.h; path = clang/AST/TypeOrdering.h; sourceTree = ""; tabWidth = 2; }; DEF2E95E0C5FBD74000C4259 /* InternalsManual.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; name = InternalsManual.html; path = docs/InternalsManual.html; sourceTree = ""; }; @@ -988,15 +1235,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - BFE2F6AC11DA955A0007EDC0 /* DeltaTree.o in Frameworks */, - BFE2F6AE11DA955A0007EDC0 /* FixItRewriter.o in Frameworks */, - BFE2F6B011DA955A0007EDC0 /* FrontendActions.o in Frameworks */, - BFE2F6B211DA955A0007EDC0 /* HTMLPrint.o in Frameworks */, - BFE2F6B411DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */, - BFE2F6C011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */, - BFE2F6C811DA955A0007EDC0 /* DeltaTree.o in Frameworks */, - BFE2F6CA11DA955A0007EDC0 /* HTMLRewrite.o in Frameworks */, - BFE2F6D011DA955A0007EDC0 /* TokenRewriter.o in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1018,6 +1256,7 @@ 08FB7795FE84155DC02AAC07 /* Libraries */ = { isa = PBXGroup; children = ( + BBA5AB121309C2FA000B38F1 /* StaticAnalyzer */, 57EB5660121B034300ECA335 /* Serialization */, BFE2F67911DA95590007EDC0 /* Rewrite */, 90FD6D6C103C3D2D005F5B73 /* Index */, @@ -1028,6 +1267,7 @@ DE67E7070C020EAB00F66BC5 /* Sema */, DE927FCC0C0557CD00231DA4 /* CodeGen */, 356EF9B30C8F7DCA006650F5 /* Analysis */, + 1AC1A6871299A284006FBC77 /* Checker */, DEF7D9F50C9C8B0C0001F598 /* Rewrite */, 352246E00F5C6BC000D0D279 /* Frontend */, DEDFE6470F7B3B560035BD10 /* Driver */, @@ -1043,55 +1283,96 @@ name = Products; sourceTree = ""; }; - 3507E4C30E27FE3800FB7B57 /* Checks */ = { + 1AC1A6871299A284006FBC77 /* Checker */ = { isa = PBXGroup; children = ( - 35BAC1E70E82C5B7003FB76F /* CheckNSError.cpp */, - 356B89760D9BFDC100CBEBE9 /* BasicObjCFoundationChecks.h */, - 35F8D0D50D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp */, - 35862B0C0E3628CB0009F542 /* CheckDeadStores.cpp */, - 3595AFB70E1C8D62004CDF09 /* CheckObjCDealloc.cpp */, - 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */, - 35F2A01D0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp */, - DE4121290D7F1C1C0080F80A /* UninitializedValues.cpp */, + 1AC1A6881299A284006FBC77 /* AdjustedReturnValueChecker.cpp */, + 1AC1A6891299A284006FBC77 /* AggExprVisitor.cpp */, + 1AC1A68A1299A284006FBC77 /* AnalysisConsumer.cpp */, + 1AC1A68B1299A284006FBC77 /* AnalysisManager.cpp */, + 1AC1A68C1299A284006FBC77 /* AnalyzerStatsChecker.cpp */, + 1AC1A68D1299A284006FBC77 /* ArrayBoundChecker.cpp */, + 1AC1A68E1299A284006FBC77 /* AttrNonNullChecker.cpp */, + 1AC1A68F1299A284006FBC77 /* BasicConstraintManager.cpp */, + 1AC1A6901299A284006FBC77 /* BasicObjCFoundationChecks.cpp */, + 1AC1A6911299A284006FBC77 /* BasicObjCFoundationChecks.h */, + 1AC1A6921299A284006FBC77 /* BasicStore.cpp */, + 1AC1A6931299A284006FBC77 /* BasicValueFactory.cpp */, + 1AC1A6941299A284006FBC77 /* BugReporter.cpp */, + 1AC1A6951299A284006FBC77 /* BugReporterVisitors.cpp */, + 1AC1A6961299A284006FBC77 /* BuiltinFunctionChecker.cpp */, + 1AC1A6971299A284006FBC77 /* CallAndMessageChecker.cpp */, + 1AC1A6981299A284006FBC77 /* CastSizeChecker.cpp */, + 1AC1A6991299A284006FBC77 /* CastToStructChecker.cpp */, + 1AC1A69A1299A284006FBC77 /* CFRefCount.cpp */, + 1AC1A69B1299A284006FBC77 /* CheckDeadStores.cpp */, + 1AC1A69C1299A284006FBC77 /* Checker.cpp */, + 1AC1A69D1299A284006FBC77 /* CheckerHelpers.cpp */, + 1AC1A69E1299A284006FBC77 /* CheckObjCDealloc.cpp */, + 1AC1A69F1299A284006FBC77 /* CheckObjCInstMethSignature.cpp */, + 1AC1A6A01299A284006FBC77 /* CheckSecuritySyntaxOnly.cpp */, + 1AC1A6A11299A284006FBC77 /* CheckSizeofPointer.cpp */, + 1AC1A6A21299A284006FBC77 /* ChrootChecker.cpp */, + 1AC1A6A41299A284006FBC77 /* CocoaConventions.cpp */, + 1AC1A6A51299A284006FBC77 /* CStringChecker.cpp */, + 1AC1A7DC1299A285006FBC77 /* DereferenceChecker.cpp */, + 1AC1A7DD1299A285006FBC77 /* DivZeroChecker.cpp */, + 1AC1A7DE1299A285006FBC77 /* Environment.cpp */, + 1AC1A7DF1299A285006FBC77 /* ExplodedGraph.cpp */, + 1AC1A7E01299A285006FBC77 /* FixedAddressChecker.cpp */, + 1AC1A7E11299A285006FBC77 /* FlatStore.cpp */, + 1AC1A7E21299A285006FBC77 /* FrontendActions.cpp */, + 1AC1A7E31299A285006FBC77 /* GRBlockCounter.cpp */, + 1AC1A7E41299A285006FBC77 /* GRCoreEngine.cpp */, + 1AC1A7E51299A285006FBC77 /* GRCXXExprEngine.cpp */, + 1AC1A7E61299A285006FBC77 /* GRExprEngine.cpp */, + 1AC1A7E71299A285006FBC77 /* GRExprEngineExperimentalChecks.cpp */, + 1AC1A7E81299A285006FBC77 /* GRExprEngineExperimentalChecks.h */, + 1AC1A7E91299A285006FBC77 /* GRExprEngineInternalChecks.h */, + 1AC1A7EA1299A285006FBC77 /* GRState.cpp */, + 1AC1A7EB1299A285006FBC77 /* HTMLDiagnostics.cpp */, + 1AC1A7EC1299A285006FBC77 /* IdempotentOperationChecker.cpp */, + 1AC1A7ED1299A285006FBC77 /* LLVMConventionsChecker.cpp */, + 1AC1A7EE1299A285006FBC77 /* MacOSXAPIChecker.cpp */, + 1AC1A7F01299A285006FBC77 /* MallocChecker.cpp */, + 1AC1A7F11299A285006FBC77 /* ManagerRegistry.cpp */, + 1AC1A7F21299A285006FBC77 /* MemRegion.cpp */, + 1AC1A7F31299A285006FBC77 /* NoReturnFunctionChecker.cpp */, + 1AC1A7F41299A285006FBC77 /* NSAutoreleasePoolChecker.cpp */, + 1AC1A7F51299A285006FBC77 /* NSErrorChecker.cpp */, + 1AC1A7F61299A285006FBC77 /* ObjCAtSyncChecker.cpp */, + 1AC1A7F71299A285006FBC77 /* ObjCUnusedIVarsChecker.cpp */, + 1AC1A7F81299A285006FBC77 /* OSAtomicChecker.cpp */, + 1AC1A7F91299A285006FBC77 /* PathDiagnostic.cpp */, + 1AC1A7FA1299A285006FBC77 /* PlistDiagnostics.cpp */, + 1AC1A7FB1299A285006FBC77 /* PointerArithChecker.cpp */, + 1AC1A7FC1299A285006FBC77 /* PointerSubChecker.cpp */, + 1AC1A7FD1299A285006FBC77 /* PthreadLockChecker.cpp */, + 1AC1A7FE1299A285006FBC77 /* RangeConstraintManager.cpp */, + 1AC1A8001299A285006FBC77 /* RegionStore.cpp */, + 1AC1A9DB1299A287006FBC77 /* ReturnPointerRangeChecker.cpp */, + 1AC1A9DC1299A287006FBC77 /* ReturnUndefChecker.cpp */, + 1AC1A9DD1299A287006FBC77 /* SimpleConstraintManager.cpp */, + 1AC1A9DE1299A287006FBC77 /* SimpleConstraintManager.h */, + 1AC1A9DF1299A287006FBC77 /* SimpleSValuator.cpp */, + 1AC1A9E01299A287006FBC77 /* StackAddrLeakChecker.cpp */, + 1AC1A9E11299A287006FBC77 /* Store.cpp */, + 1AC1A9E21299A287006FBC77 /* StreamChecker.cpp */, + 1AC1A9E31299A287006FBC77 /* SVals.cpp */, + 1AC1A9E41299A287006FBC77 /* SValuator.cpp */, + 1AC1A9E51299A287006FBC77 /* SymbolManager.cpp */, + 1AC1A9E61299A287006FBC77 /* UndefBranchChecker.cpp */, + 1AC1A9E71299A287006FBC77 /* UndefCapturedBlockVarChecker.cpp */, + 1AC1A9E81299A287006FBC77 /* UndefinedArraySubscriptChecker.cpp */, + 1AC1A9E91299A287006FBC77 /* UndefinedAssignmentChecker.cpp */, + 1AC1A9EA1299A287006FBC77 /* UndefResultChecker.cpp */, + 1AC1A9EB1299A287006FBC77 /* UnixAPIChecker.cpp */, + 1AC1A9EC1299A287006FBC77 /* UnreachableCodeChecker.cpp */, + 1AC1A9ED1299A287006FBC77 /* ValueManager.cpp */, + 1AC1A9EE1299A287006FBC77 /* VLASizeChecker.cpp */, ); - name = Checks; - sourceTree = ""; - }; - 3507E4C60E27FE5500FB7B57 /* Core */ = { - isa = PBXGroup; - children = ( - 35A057E10EAE2D950069249F /* SVals.cpp */, - 355106850E9A8507006A4E44 /* MemRegion.cpp */, - 35D55B240D81D8C60092E734 /* BasicValueFactory.cpp */, - 3536456A0E23EBF7009C6509 /* Environment.cpp */, - DE4121280D7F1C1C0080F80A /* ExplodedGraph.cpp */, - DE4121300D7F1C1C0080F80A /* GRBlockCounter.cpp */, - DE41212A0D7F1C1C0080F80A /* GRCoreEngine.cpp */, - DE4121310D7F1C1C0080F80A /* GRExprEngine.cpp */, - 35862B110E3629850009F542 /* GRExprEngineInternalChecks.cpp */, - 358F51510E529AA4007F2102 /* GRState.cpp */, - 35EFEFB50DB67ED60020783D /* GRTransferFuncs.cpp */, - DE4121270D7F1C1C0080F80A /* SymbolManager.cpp */, - ); - name = Core; - sourceTree = ""; - }; - 3507E4C90E27FE9000FB7B57 /* Bug Reporting */ = { - isa = PBXGroup; - children = ( - 35A8FCF80D9B4B29001C2F97 /* PathDiagnostic.cpp */, - 359379090DA48ABA0043B19C /* BugReporter.cpp */, - ); - name = "Bug Reporting"; - sourceTree = ""; - }; - 3507E4CC0E27FEB900FB7B57 /* Flow-Sensitive Analyses */ = { - isa = PBXGroup; - children = ( - 356EF9B40C8F7DDF006650F5 /* LiveVariables.cpp */, - ); - name = "Flow-Sensitive Analyses"; + name = Checker; + path = lib/Checker; sourceTree = ""; }; 352246E00F5C6BC000D0D279 /* Frontend */ = { @@ -1102,6 +1383,7 @@ 9012911C1048068D0083456D /* ASTUnit.cpp */, 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */, 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */, + DE4DC7A20EA1C33E00069E5A /* TokenRewriter.cpp */, 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */, 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */, 1ACB57DD1105820D0047B991 /* DeclXML.cpp */, @@ -1136,44 +1418,14 @@ name = Visitors; sourceTree = ""; }; - 35544B820F5C7F6600D92AA9 /* StoreManagers */ = { - isa = PBXGroup; - children = ( - 35A057E00EAE2D950069249F /* RegionStore.cpp */, - 3558F76C0E267C8300A5B0DF /* BasicStore.cpp */, - ); - name = StoreManagers; - sourceTree = ""; - }; - 35544B830F5C7F8900D92AA9 /* ConstraintManagers */ = { - isa = PBXGroup; - children = ( - 35544B870F5C7FD700D92AA9 /* SimpleConstraintManager.h */, - 35544B860F5C7FD700D92AA9 /* SimpleConstraintManager.cpp */, - 358CFBB70E65AB04002A8E19 /* BasicConstraintManager.cpp */, - 35544B850F5C7FD700D92AA9 /* RangeConstraintManager.cpp */, - ); - name = ConstraintManagers; - sourceTree = ""; - }; - 35544B840F5C7F9D00D92AA9 /* Path-Sensitive */ = { - isa = PBXGroup; - children = ( - 3507E4C60E27FE5500FB7B57 /* Core */, - 35544B820F5C7F6600D92AA9 /* StoreManagers */, - 35862B130E3629BC0009F542 /* Transfer Function Analyses */, - 35544B830F5C7F8900D92AA9 /* ConstraintManagers */, - ); - name = "Path-Sensitive"; - sourceTree = ""; - }; 356EF9AF0C8F7DA4006650F5 /* Analysis */ = { isa = PBXGroup; children = ( + 1AECEFAF12DE387800F1D539 /* AnalysisContext.h */, + 1AECEFB012DE387800F1D539 /* CFG.h */, + 1AECEFB112DE387800F1D539 /* CFGStmtMap.h */, DEF1692C0F9645BF0098507F /* AnalysisDiagnostic.h */, 35A8FCF60D9B4ADD001C2F97 /* ProgramPoint.h */, - 35A8FCF70D9B4ADD001C2F97 /* PathDiagnostic.h */, - 355CF6820C90A8B600A08AA3 /* LocalCheckers.h */, 35F9B1540D1C6AFC00DDFDAE /* Analyses */, 35D1DDCF0CA9C6BE0096E967 /* FlowSensitive */, DE4121130D7F1B980080F80A /* PathSensitive */, @@ -1186,25 +1438,21 @@ 356EF9B30C8F7DCA006650F5 /* Analysis */ = { isa = PBXGroup; children = ( - DE67E70A0C020EC500F66BC5 /* SemaType.cpp */, - 35544B840F5C7F9D00D92AA9 /* Path-Sensitive */, - 3507E4CC0E27FEB900FB7B57 /* Flow-Sensitive Analyses */, - 3507E4C30E27FE3800FB7B57 /* Checks */, - 3507E4C90E27FE9000FB7B57 /* Bug Reporting */, + 1AC1A67212999D8E006FBC77 /* AnalysisContext.cpp */, + 1AC1A67312999D8E006FBC77 /* CFG.cpp */, + 1AC1A67412999D8E006FBC77 /* CFGStmtMap.cpp */, + 1AC1A67512999D8E006FBC77 /* FormatString.cpp */, + 1AC1A67612999D8E006FBC77 /* FormatStringParsing.h */, + 1AC1A67712999D8E006FBC77 /* LiveVariables.cpp */, + 1AC1A67812999D8E006FBC77 /* PrintfFormatString.cpp */, + 1AC1A67912999D8E006FBC77 /* PseudoConstantAnalysis.cpp */, + 1AC1A67A12999D8E006FBC77 /* ReachableCode.cpp */, + 1AC1A67B12999D8E006FBC77 /* ScanfFormatString.cpp */, + 1AC1A67C12999D8E006FBC77 /* UninitializedValues.cpp */, ); name = Analysis; sourceTree = ""; }; - 35862B130E3629BC0009F542 /* Transfer Function Analyses */ = { - isa = PBXGroup; - children = ( - 35D55B250D81D8C60092E734 /* CFRefCount.cpp */, - DE41212F0D7F1C1C0080F80A /* GRSimpleVals.cpp */, - DE41212C0D7F1C1C0080F80A /* GRSimpleVals.h */, - ); - name = "Transfer Function Analyses"; - sourceTree = ""; - }; 35D1DDCF0CA9C6BE0096E967 /* FlowSensitive */ = { isa = PBXGroup; children = ( @@ -1251,9 +1499,6 @@ 57F6660F121B4DE600DCE3B7 /* ASTWriter.cpp */, 57F66610121B4DE600DCE3B7 /* ASTWriterDecl.cpp */, 57F66611121B4DE600DCE3B7 /* ASTWriterStmt.cpp */, - 57EB5661121B034300ECA335 /* CMakeLists.txt */, - 57EB5662121B034300ECA335 /* GeneratePCH.cpp */, - 57EB5663121B034300ECA335 /* Makefile */, ); name = Serialization; path = lib/Serialization; @@ -1339,18 +1584,138 @@ name = "index-test"; sourceTree = ""; }; + BBA5AB121309C2FA000B38F1 /* StaticAnalyzer */ = { + isa = PBXGroup; + children = ( + BBA5AB131309C2FA000B38F1 /* Checkers */, + BBA5AB511309C2FA000B38F1 /* Core */, + BBA5AB751309C2FA000B38F1 /* Frontend */, + ); + name = StaticAnalyzer; + path = lib/StaticAnalyzer; + sourceTree = ""; + }; + BBA5AB131309C2FA000B38F1 /* Checkers */ = { + isa = PBXGroup; + children = ( + BBA5AB141309C2FA000B38F1 /* AdjustedReturnValueChecker.cpp */, + BBA5AB151309C2FA000B38F1 /* AnalyzerStatsChecker.cpp */, + BBA5AB161309C2FA000B38F1 /* ArrayBoundChecker.cpp */, + BBA5AB171309C2FA000B38F1 /* ArrayBoundCheckerV2.cpp */, + BBA5AB181309C2FA000B38F1 /* AttrNonNullChecker.cpp */, + BBA5AB191309C2FA000B38F1 /* BasicObjCFoundationChecks.cpp */, + BBA5AB1A1309C2FA000B38F1 /* BasicObjCFoundationChecks.h */, + BBA5AB1B1309C2FA000B38F1 /* BuiltinFunctionChecker.cpp */, + BBA5AB1C1309C2FA000B38F1 /* CallAndMessageChecker.cpp */, + BBA5AB1D1309C2FA000B38F1 /* CastSizeChecker.cpp */, + BBA5AB1E1309C2FA000B38F1 /* CastToStructChecker.cpp */, + BBA5AB1F1309C2FA000B38F1 /* Checkers.td */, + BBA5AB201309C2FA000B38F1 /* CheckObjCDealloc.cpp */, + BBA5AB211309C2FA000B38F1 /* CheckObjCInstMethSignature.cpp */, + BBA5AB221309C2FA000B38F1 /* CheckSecuritySyntaxOnly.cpp */, + BBA5AB231309C2FA000B38F1 /* CheckSizeofPointer.cpp */, + BBA5AB241309C2FA000B38F1 /* ChrootChecker.cpp */, + BBA5AB251309C2FA000B38F1 /* ClangSACheckerProvider.cpp */, + BBA5AB261309C2FA000B38F1 /* ClangSACheckerProvider.h */, + BBA5AB271309C2FA000B38F1 /* ClangSACheckers.h */, + BBA5AB291309C2FA000B38F1 /* CStringChecker.cpp */, + BBA5AB2A1309C2FA000B38F1 /* DeadStoresChecker.cpp */, + BBA5AB2B1309C2FA000B38F1 /* DereferenceChecker.cpp */, + BBA5AB2C1309C2FA000B38F1 /* DivZeroChecker.cpp */, + BBA5AB2D1309C2FA000B38F1 /* ExperimentalChecks.cpp */, + BBA5AB2E1309C2FA000B38F1 /* ExperimentalChecks.h */, + BBA5AB2F1309C2FA000B38F1 /* ExprEngine.cpp */, + BBA5AB301309C2FA000B38F1 /* FixedAddressChecker.cpp */, + BBA5AB311309C2FA000B38F1 /* IdempotentOperationChecker.cpp */, + BBA5AB321309C2FA000B38F1 /* InternalChecks.h */, + BBA5AB331309C2FA000B38F1 /* LLVMConventionsChecker.cpp */, + BBA5AB341309C2FA000B38F1 /* MacOSXAPIChecker.cpp */, + BBA5AB361309C2FA000B38F1 /* MallocChecker.cpp */, + BBA5AB371309C2FA000B38F1 /* NoReturnFunctionChecker.cpp */, + BBA5AB381309C2FA000B38F1 /* NSAutoreleasePoolChecker.cpp */, + BBA5AB3A1309C2FA000B38F1 /* NSErrorChecker.cpp */, + BBA5AB3B1309C2FA000B38F1 /* ObjCAtSyncChecker.cpp */, + BBA5AB3D1309C2FA000B38F1 /* ObjCSelfInitChecker.cpp */, + BBA5AB3F1309C2FA000B38F1 /* ObjCUnusedIVarsChecker.cpp */, + BBA5AB401309C2FA000B38F1 /* OSAtomicChecker.cpp */, + BBA5AB411309C2FA000B38F1 /* PointerArithChecker.cpp */, + BBA5AB421309C2FA000B38F1 /* PointerSubChecker.cpp */, + BBA5AB431309C2FA000B38F1 /* PthreadLockChecker.cpp */, + BBA5AB441309C2FA000B38F1 /* ReturnPointerRangeChecker.cpp */, + BBA5AB451309C2FA000B38F1 /* ReturnUndefChecker.cpp */, + BBA5AB461309C2FA000B38F1 /* StackAddrLeakChecker.cpp */, + BBA5AB471309C2FA000B38F1 /* StreamChecker.cpp */, + BBA5AB481309C2FA000B38F1 /* UndefBranchChecker.cpp */, + BBA5AB491309C2FA000B38F1 /* UndefCapturedBlockVarChecker.cpp */, + BBA5AB4A1309C2FA000B38F1 /* UndefinedArraySubscriptChecker.cpp */, + BBA5AB4B1309C2FA000B38F1 /* UndefinedAssignmentChecker.cpp */, + BBA5AB4C1309C2FA000B38F1 /* UndefResultChecker.cpp */, + BBA5AB4D1309C2FA000B38F1 /* UnixAPIChecker.cpp */, + BBA5AB4E1309C2FA000B38F1 /* UnreachableCodeChecker.cpp */, + BBA5AB4F1309C2FA000B38F1 /* VLASizeChecker.cpp */, + ); + path = Checkers; + sourceTree = ""; + }; + BBA5AB511309C2FA000B38F1 /* Core */ = { + isa = PBXGroup; + children = ( + BBA5AB521309C2FA000B38F1 /* AggExprVisitor.cpp */, + BBA5AB531309C2FA000B38F1 /* AnalysisManager.cpp */, + BBA5AB541309C2FA000B38F1 /* BasicConstraintManager.cpp */, + BBA5AB551309C2FA000B38F1 /* BasicStore.cpp */, + BBA5AB561309C2FA000B38F1 /* BasicValueFactory.cpp */, + BBA5AB571309C2FA000B38F1 /* BlockCounter.cpp */, + BBA5AB581309C2FA000B38F1 /* BugReporter.cpp */, + BBA5AB591309C2FA000B38F1 /* BugReporterVisitors.cpp */, + BBA5AB5A1309C2FA000B38F1 /* CFRefCount.cpp */, + BBA5AB5B1309C2FA000B38F1 /* Checker.cpp */, + BBA5AB5C1309C2FA000B38F1 /* CheckerHelpers.cpp */, + BBA5AB5D1309C2FA000B38F1 /* CheckerManager.cpp */, + BBA5AB5F1309C2FA000B38F1 /* CoreEngine.cpp */, + BBA5AB601309C2FA000B38F1 /* CXXExprEngine.cpp */, + BBA5AB611309C2FA000B38F1 /* Environment.cpp */, + BBA5AB621309C2FA000B38F1 /* ExplodedGraph.cpp */, + BBA5AB631309C2FA000B38F1 /* FlatStore.cpp */, + BBA5AB641309C2FA000B38F1 /* GRState.cpp */, + BBA5AB651309C2FA000B38F1 /* HTMLDiagnostics.cpp */, + BBA5AB671309C2FA000B38F1 /* MemRegion.cpp */, + BBA5AB681309C2FA000B38F1 /* ObjCMessage.cpp */, + BBA5AB691309C2FA000B38F1 /* PathDiagnostic.cpp */, + BBA5AB6A1309C2FA000B38F1 /* PlistDiagnostics.cpp */, + BBA5AB6B1309C2FA000B38F1 /* RangeConstraintManager.cpp */, + BBA5AB6C1309C2FA000B38F1 /* RegionStore.cpp */, + BBA5AB6D1309C2FA000B38F1 /* SimpleConstraintManager.cpp */, + BBA5AB6E1309C2FA000B38F1 /* SimpleConstraintManager.h */, + BBA5AB6F1309C2FA000B38F1 /* SimpleSValBuilder.cpp */, + BBA5AB701309C2FA000B38F1 /* Store.cpp */, + BBA5AB711309C2FA000B38F1 /* SValBuilder.cpp */, + BBA5AB721309C2FA000B38F1 /* SVals.cpp */, + BBA5AB731309C2FA000B38F1 /* SymbolManager.cpp */, + BBA5AB741309C2FA000B38F1 /* TextPathDiagnostics.cpp */, + ); + path = Core; + sourceTree = ""; + }; + BBA5AB751309C2FA000B38F1 /* Frontend */ = { + isa = PBXGroup; + children = ( + BBA5AB761309C2FA000B38F1 /* AnalysisConsumer.cpp */, + BBA5AB771309C2FA000B38F1 /* AnalysisConsumer.h */, + BBA5AB781309C2FA000B38F1 /* CheckerRegistration.cpp */, + BBA5AB7A1309C2FA000B38F1 /* FrontendActions.cpp */, + ); + path = Frontend; + sourceTree = ""; + }; BFE2F67911DA95590007EDC0 /* Rewrite */ = { isa = PBXGroup; children = ( - BFE2F67A11DA95590007EDC0 /* CMakeLists.txt */, - BFE2F67B11DA95590007EDC0 /* Debug */, BFE2F69311DA955A0007EDC0 /* DeltaTree.cpp */, BFE2F69411DA955A0007EDC0 /* FixItRewriter.cpp */, BFE2F69511DA955A0007EDC0 /* FrontendActions.cpp */, BFE2F69611DA955A0007EDC0 /* HTMLPrint.cpp */, BFE2F69711DA955A0007EDC0 /* HTMLRewrite.cpp */, - BFE2F69811DA955A0007EDC0 /* Makefile */, - BFE2F69911DA955A0007EDC0 /* Release-Asserts */, BFE2F6A511DA955A0007EDC0 /* RewriteMacros.cpp */, BFE2F6A611DA955A0007EDC0 /* RewriteObjC.cpp */, BFE2F6A711DA955A0007EDC0 /* Rewriter.cpp */, @@ -1362,44 +1727,6 @@ path = lib/Rewrite; sourceTree = ""; }; - BFE2F67B11DA95590007EDC0 /* Debug */ = { - isa = PBXGroup; - children = ( - BFE2F67C11DA95590007EDC0 /* .dir */, - BFE2F67D11DA95590007EDC0 /* DeltaTree.d */, - BFE2F67E11DA955A0007EDC0 /* DeltaTree.o */, - BFE2F67F11DA955A0007EDC0 /* FixItRewriter.d */, - BFE2F68011DA955A0007EDC0 /* FixItRewriter.o */, - BFE2F68111DA955A0007EDC0 /* FrontendActions.d */, - BFE2F68211DA955A0007EDC0 /* FrontendActions.o */, - BFE2F68311DA955A0007EDC0 /* HTMLPrint.d */, - BFE2F68411DA955A0007EDC0 /* HTMLPrint.o */, - BFE2F68511DA955A0007EDC0 /* HTMLRewrite.d */, - BFE2F68611DA955A0007EDC0 /* HTMLRewrite.o */, - BFE2F68711DA955A0007EDC0 /* RewriteMacros.d */, - BFE2F68911DA955A0007EDC0 /* RewriteObjC.d */, - BFE2F68B11DA955A0007EDC0 /* Rewriter.d */, - BFE2F69111DA955A0007EDC0 /* TokenRewriter.d */, - BFE2F69211DA955A0007EDC0 /* TokenRewriter.o */, - ); - path = Debug; - sourceTree = ""; - }; - BFE2F69911DA955A0007EDC0 /* Release-Asserts */ = { - isa = PBXGroup; - children = ( - BFE2F69A11DA955A0007EDC0 /* .dir */, - BFE2F69B11DA955A0007EDC0 /* DeltaTree.d */, - BFE2F69C11DA955A0007EDC0 /* DeltaTree.o */, - BFE2F69D11DA955A0007EDC0 /* HTMLRewrite.d */, - BFE2F69E11DA955A0007EDC0 /* HTMLRewrite.o */, - BFE2F69F11DA955A0007EDC0 /* Rewriter.d */, - BFE2F6A311DA955A0007EDC0 /* TokenRewriter.d */, - BFE2F6A411DA955A0007EDC0 /* TokenRewriter.o */, - ); - path = "Release-Asserts"; - sourceTree = ""; - }; C6859E8C029090F304C91782 /* Documentation */ = { isa = PBXGroup; children = ( @@ -1474,7 +1801,6 @@ BF9FEDFE1225E6DD003A8B71 /* TargetAttributesSema.cpp */, BF9FEDFC1225E6C6003A8B71 /* DeclSpec.cpp */, BF9FEDFA1225E6A9003A8B71 /* AttributeList.cpp */, - BF9FEDF81225E67B003A8B71 /* Action.cpp */, BF89C3E111595818001C2D68 /* AnalysisBasedWarnings.cpp */, 1A6B6CD110693FC900BB4A8F /* CodeCompleteConsumer.cpp */, 352712500DAFE54700C76352 /* IdentifierResolver.cpp */, @@ -1551,6 +1877,7 @@ BF9FEE301225E86C003A8B71 /* CodeGenAction.cpp */, BF9FEE2F1225E854003A8B71 /* CGRecordLayout.h */, BF9FEE2E1225E82D003A8B71 /* CGException.h */, + 1A3D2C4D12A2CD3D0088C44A /* CGCXXABI.cpp */, BF9FEE2D1225E80F003A8B71 /* CGCXXABI.h */, BF9FEE2B1225E7EA003A8B71 /* BackendUtil.cpp */, 1A2193CB0F45EEB700C0713D /* ABIInfo.h */, @@ -1695,6 +2022,7 @@ 1ABD23BE1182449800A48E65 /* DeclObjC.cpp */, 1ABD23BF1182449800A48E65 /* DeclPrinter.cpp */, 1ABD23C01182449800A48E65 /* DeclTemplate.cpp */, + BB5C372812A5057500259F53 /* DumpXML.cpp */, 1ABD23C11182449800A48E65 /* Expr.cpp */, 1ABD23C21182449800A48E65 /* ExprConstant.cpp */, 1ABD23C31182449800A48E65 /* ExprCXX.cpp */, @@ -2006,7 +2334,6 @@ 72D16C1E0D9975C400E6DA4A /* HTMLRewrite.cpp */, DEF7D9F80C9C8B1D0001F598 /* Rewriter.cpp */, DECAB0CF0DB3C84200E13CCB /* RewriteRope.cpp */, - DE4DC7A20EA1C33E00069E5A /* TokenRewriter.cpp */, ); name = Rewrite; sourceTree = ""; @@ -2039,6 +2366,7 @@ isa = PBXProject; buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */; compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, @@ -2079,7 +2407,6 @@ DE34600F0AFDCCCE00DBC861 /* ParseDecl.cpp in Sources */, DE3460130AFDCCDA00DBC861 /* ParseExpr.cpp in Sources */, 1A869AA80BA21ABA008DA07A /* LiteralSupport.cpp in Sources */, - DE67E70B0C020EC500F66BC5 /* SemaType.cpp in Sources */, DE67E70D0C020ECA00F66BC5 /* SemaStmt.cpp in Sources */, DE67E70F0C020ECF00F66BC5 /* SemaExprCXX.cpp in Sources */, DE67E7110C020ED400F66BC5 /* SemaExpr.cpp in Sources */, @@ -2100,7 +2427,6 @@ 1A7342480C7B57D500122F56 /* CGObjC.cpp in Sources */, DE2252700C7E82D000D370A5 /* CGExprScalar.cpp in Sources */, DE2255FC0C8004E600D370A5 /* ParseDeclCXX.cpp in Sources */, - 356EF9B50C8F7DDF006650F5 /* LiveVariables.cpp in Sources */, DEF7D9F90C9C8B1D0001F598 /* Rewriter.cpp in Sources */, DE3986F40CB8D50C00223765 /* IdentifierTable.cpp in Sources */, 35707EFE0CD0F5CC000B2204 /* SourceLocation.cpp in Sources */, @@ -2110,53 +2436,27 @@ 03F50AC60D416EAA00B9CF60 /* Targets.cpp in Sources */, 1A376A2D0D4AED9B002A1C52 /* CGExprConstant.cpp in Sources */, DE38CD500D794D0100A273B6 /* CGObjCGNU.cpp in Sources */, - DE4121350D7F1C1C0080F80A /* SymbolManager.cpp in Sources */, - DE4121360D7F1C1C0080F80A /* ExplodedGraph.cpp in Sources */, - DE4121370D7F1C1C0080F80A /* UninitializedValues.cpp in Sources */, - DE4121380D7F1C1C0080F80A /* GRCoreEngine.cpp in Sources */, - DE41213C0D7F1C1C0080F80A /* GRSimpleVals.cpp in Sources */, - DE41213D0D7F1C1C0080F80A /* GRBlockCounter.cpp in Sources */, - DE41213E0D7F1C1C0080F80A /* GRExprEngine.cpp in Sources */, - 35D55B270D81D8C60092E734 /* BasicValueFactory.cpp in Sources */, - 35D55B280D81D8C60092E734 /* CFRefCount.cpp in Sources */, DE85CD810D8380B10070E26E /* TokenLexer.cpp in Sources */, DE85CDA30D8383B20070E26E /* MacroArgs.cpp in Sources */, DE85CDAC0D838C120070E26E /* PPMacroExpansion.cpp in Sources */, DE85CDB00D838C390070E26E /* PPDirectives.cpp in Sources */, DE85CDB60D839BAE0070E26E /* PPLexerChange.cpp in Sources */, 72D16C1F0D9975C400E6DA4A /* HTMLRewrite.cpp in Sources */, - 35A8FCF90D9B4B2A001C2F97 /* PathDiagnostic.cpp in Sources */, - 35F8D0D60D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp in Sources */, - 3593790A0DA48ABA0043B19C /* BugReporter.cpp in Sources */, 35EF67700DAD1D2C00B19414 /* SemaDeclCXX.cpp in Sources */, 352712510DAFE54700C76352 /* IdentifierResolver.cpp in Sources */, DEFFECA70DB1546600B4E7C3 /* DeltaTree.cpp in Sources */, DECAB0D00DB3C84200E13CCB /* RewriteRope.cpp in Sources */, - 35EFEFB60DB67ED60020783D /* GRTransferFuncs.cpp in Sources */, 35A3E7020DD3874400757F74 /* CGDebugInfo.cpp in Sources */, 3599299B0DE2425300A8A33E /* SemaInit.cpp in Sources */, 3534A01D0E129849002709B2 /* ParseCXXInlineMethods.cpp in Sources */, DE22BCF20E14197E0094DC60 /* SemaDeclAttr.cpp in Sources */, - 3595AFB80E1C8D62004CDF09 /* CheckObjCDealloc.cpp in Sources */, - 3536456B0E23EBF7009C6509 /* Environment.cpp in Sources */, - 3558F76D0E267C8300A5B0DF /* BasicStore.cpp in Sources */, - 3507E4C20E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp in Sources */, - 35862B0D0E3628CB0009F542 /* CheckDeadStores.cpp in Sources */, - 35862B120E3629850009F542 /* GRExprEngineInternalChecks.cpp in Sources */, - 35F2A01E0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp in Sources */, 3552E7550E520D80003A8CA5 /* PPCaching.cpp in Sources */, 3552E7590E520DD7003A8CA5 /* CGObjCMac.cpp in Sources */, - 358F51520E529AA4007F2102 /* GRState.cpp in Sources */, 1A5D5E580E5E81010023C059 /* CGCXX.cpp in Sources */, - 358CFBB80E65AB04002A8E19 /* BasicConstraintManager.cpp in Sources */, 35475B200E79973F0000BFE4 /* CGCall.cpp in Sources */, - 35BAC1E80E82C5B7003FB76F /* CheckNSError.cpp in Sources */, - 355106860E9A8507006A4E44 /* MemRegion.cpp in Sources */, 3551068C0E9A8546006A4E44 /* ParsePragma.cpp in Sources */, 3551068D0E9A8546006A4E44 /* ParseTentative.cpp in Sources */, DE4DC7A30EA1C33E00069E5A /* TokenRewriter.cpp in Sources */, - 35A057E20EAE2D950069249F /* RegionStore.cpp in Sources */, - 35A057E30EAE2D950069249F /* SVals.cpp in Sources */, 35585DC00EAFBC4500D0A97A /* SemaOverload.cpp in Sources */, 35E194690ECB82FB00F21733 /* SemaCXXScopeSpec.cpp in Sources */, 35E1946A0ECB82FB00F21733 /* SemaCXXCast.cpp in Sources */, @@ -2172,8 +2472,6 @@ 352246E80F5C6BE000D0D279 /* InitHeaderSearch.cpp in Sources */, 352246EB0F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp in Sources */, 352246EC0F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp in Sources */, - 35544B880F5C7FD700D92AA9 /* RangeConstraintManager.cpp in Sources */, - 35544B890F5C7FD700D92AA9 /* SimpleConstraintManager.cpp in Sources */, 35544B8C0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp in Sources */, 1ADF47AF0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp in Sources */, DEDFE6460F7B3B4E0035BD10 /* driver.cpp in Sources */, @@ -2289,40 +2587,23 @@ 1ABD23F71182449800A48E65 /* Type.cpp in Sources */, 1ABD23F81182449800A48E65 /* TypeLoc.cpp in Sources */, 1ABD23F91182449800A48E65 /* TypePrinter.cpp in Sources */, - BFE2F6AB11DA955A0007EDC0 /* DeltaTree.d in Sources */, - BFE2F6AD11DA955A0007EDC0 /* FixItRewriter.d in Sources */, - BFE2F6AF11DA955A0007EDC0 /* FrontendActions.d in Sources */, - BFE2F6B111DA955A0007EDC0 /* HTMLPrint.d in Sources */, - BFE2F6B311DA955A0007EDC0 /* HTMLRewrite.d in Sources */, - BFE2F6B511DA955A0007EDC0 /* RewriteMacros.d in Sources */, - BFE2F6B711DA955A0007EDC0 /* RewriteObjC.d in Sources */, - BFE2F6B911DA955A0007EDC0 /* Rewriter.d in Sources */, - BFE2F6BF11DA955A0007EDC0 /* TokenRewriter.d in Sources */, BFE2F6C111DA955A0007EDC0 /* DeltaTree.cpp in Sources */, BFE2F6C211DA955A0007EDC0 /* FixItRewriter.cpp in Sources */, BFE2F6C311DA955A0007EDC0 /* FrontendActions.cpp in Sources */, BFE2F6C411DA955A0007EDC0 /* HTMLPrint.cpp in Sources */, BFE2F6C511DA955A0007EDC0 /* HTMLRewrite.cpp in Sources */, - BFE2F6C611DA955A0007EDC0 /* Makefile in Sources */, - BFE2F6C711DA955A0007EDC0 /* DeltaTree.d in Sources */, - BFE2F6C911DA955A0007EDC0 /* HTMLRewrite.d in Sources */, - BFE2F6CB11DA955A0007EDC0 /* Rewriter.d in Sources */, - BFE2F6CF11DA955A0007EDC0 /* TokenRewriter.d in Sources */, BFE2F6D111DA955A0007EDC0 /* RewriteMacros.cpp in Sources */, BFE2F6D211DA955A0007EDC0 /* RewriteObjC.cpp in Sources */, BFE2F6D311DA955A0007EDC0 /* Rewriter.cpp in Sources */, 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 */, @@ -2336,6 +2617,182 @@ BF9FEE381225E925003A8B71 /* BoostConAction.cpp in Sources */, BF9FEE521226FE9F003A8B71 /* ParseAST.cpp in Sources */, BF9FEEF2122D8068003A8B71 /* PreprocessingRecord.cpp in Sources */, + 1AC1A67D12999D8E006FBC77 /* AnalysisContext.cpp in Sources */, + 1AC1A67E12999D8E006FBC77 /* CFG.cpp in Sources */, + 1AC1A67F12999D8E006FBC77 /* CFGStmtMap.cpp in Sources */, + 1AC1A68012999D8E006FBC77 /* FormatString.cpp in Sources */, + 1AC1A68112999D8E006FBC77 /* LiveVariables.cpp in Sources */, + 1AC1A68212999D8E006FBC77 /* PrintfFormatString.cpp in Sources */, + 1AC1A68312999D8E006FBC77 /* PseudoConstantAnalysis.cpp in Sources */, + 1AC1A68412999D8E006FBC77 /* ReachableCode.cpp in Sources */, + 1AC1A68512999D8E006FBC77 /* ScanfFormatString.cpp in Sources */, + 1AC1A68612999D8E006FBC77 /* UninitializedValues.cpp in Sources */, + 1AC1A9EF1299A287006FBC77 /* AdjustedReturnValueChecker.cpp in Sources */, + 1AC1A9F01299A287006FBC77 /* AggExprVisitor.cpp in Sources */, + 1AC1A9F11299A287006FBC77 /* AnalysisConsumer.cpp in Sources */, + 1AC1A9F21299A287006FBC77 /* AnalysisManager.cpp in Sources */, + 1AC1A9F31299A287006FBC77 /* AnalyzerStatsChecker.cpp in Sources */, + 1AC1A9F41299A287006FBC77 /* ArrayBoundChecker.cpp in Sources */, + 1AC1A9F51299A287006FBC77 /* AttrNonNullChecker.cpp in Sources */, + 1AC1A9F61299A287006FBC77 /* BasicConstraintManager.cpp in Sources */, + 1AC1A9F71299A287006FBC77 /* BasicObjCFoundationChecks.cpp in Sources */, + 1AC1A9F81299A287006FBC77 /* BasicStore.cpp in Sources */, + 1AC1A9F91299A287006FBC77 /* BasicValueFactory.cpp in Sources */, + 1AC1A9FA1299A287006FBC77 /* BugReporter.cpp in Sources */, + 1AC1A9FB1299A287006FBC77 /* BugReporterVisitors.cpp in Sources */, + 1AC1A9FC1299A287006FBC77 /* BuiltinFunctionChecker.cpp in Sources */, + 1AC1A9FD1299A287006FBC77 /* CallAndMessageChecker.cpp in Sources */, + 1AC1A9FE1299A287006FBC77 /* CastSizeChecker.cpp in Sources */, + 1AC1A9FF1299A287006FBC77 /* CastToStructChecker.cpp in Sources */, + 1AC1AA001299A287006FBC77 /* CFRefCount.cpp in Sources */, + 1AC1AA011299A287006FBC77 /* CheckDeadStores.cpp in Sources */, + 1AC1AA021299A287006FBC77 /* Checker.cpp in Sources */, + 1AC1AA031299A287006FBC77 /* CheckerHelpers.cpp in Sources */, + 1AC1AA041299A287006FBC77 /* CheckObjCDealloc.cpp in Sources */, + 1AC1AA051299A287006FBC77 /* CheckObjCInstMethSignature.cpp in Sources */, + 1AC1AA061299A287006FBC77 /* CheckSecuritySyntaxOnly.cpp in Sources */, + 1AC1AA071299A287006FBC77 /* CheckSizeofPointer.cpp in Sources */, + 1AC1AA081299A287006FBC77 /* ChrootChecker.cpp in Sources */, + 1AC1AA091299A287006FBC77 /* CocoaConventions.cpp in Sources */, + 1AC1AA0A1299A287006FBC77 /* CStringChecker.cpp in Sources */, + 1AC1AB3D1299A287006FBC77 /* DereferenceChecker.cpp in Sources */, + 1AC1AB3E1299A287006FBC77 /* DivZeroChecker.cpp in Sources */, + 1AC1AB3F1299A287006FBC77 /* Environment.cpp in Sources */, + 1AC1AB401299A287006FBC77 /* ExplodedGraph.cpp in Sources */, + 1AC1AB411299A287006FBC77 /* FixedAddressChecker.cpp in Sources */, + 1AC1AB421299A287006FBC77 /* FlatStore.cpp in Sources */, + 1AC1AB431299A287006FBC77 /* FrontendActions.cpp in Sources */, + 1AC1AB441299A287006FBC77 /* GRBlockCounter.cpp in Sources */, + 1AC1AB451299A287006FBC77 /* GRCoreEngine.cpp in Sources */, + 1AC1AB461299A287006FBC77 /* GRCXXExprEngine.cpp in Sources */, + 1AC1AB471299A287006FBC77 /* GRExprEngine.cpp in Sources */, + 1AC1AB481299A287006FBC77 /* GRExprEngineExperimentalChecks.cpp in Sources */, + 1AC1AB491299A287006FBC77 /* GRState.cpp in Sources */, + 1AC1AB4A1299A287006FBC77 /* HTMLDiagnostics.cpp in Sources */, + 1AC1AB4B1299A287006FBC77 /* IdempotentOperationChecker.cpp in Sources */, + 1AC1AB4C1299A287006FBC77 /* LLVMConventionsChecker.cpp in Sources */, + 1AC1AB4D1299A287006FBC77 /* MacOSXAPIChecker.cpp in Sources */, + 1AC1AB4F1299A287006FBC77 /* MallocChecker.cpp in Sources */, + 1AC1AB501299A287006FBC77 /* ManagerRegistry.cpp in Sources */, + 1AC1AB511299A287006FBC77 /* MemRegion.cpp in Sources */, + 1AC1AB521299A287006FBC77 /* NoReturnFunctionChecker.cpp in Sources */, + 1AC1AB531299A287006FBC77 /* NSAutoreleasePoolChecker.cpp in Sources */, + 1AC1AB541299A287006FBC77 /* NSErrorChecker.cpp in Sources */, + 1AC1AB551299A287006FBC77 /* ObjCAtSyncChecker.cpp in Sources */, + 1AC1AB561299A287006FBC77 /* ObjCUnusedIVarsChecker.cpp in Sources */, + 1AC1AB571299A287006FBC77 /* OSAtomicChecker.cpp in Sources */, + 1AC1AB581299A287006FBC77 /* PathDiagnostic.cpp in Sources */, + 1AC1AB591299A287006FBC77 /* PlistDiagnostics.cpp in Sources */, + 1AC1AB5A1299A287006FBC77 /* PointerArithChecker.cpp in Sources */, + 1AC1AB5B1299A287006FBC77 /* PointerSubChecker.cpp in Sources */, + 1AC1AB5C1299A287006FBC77 /* PthreadLockChecker.cpp in Sources */, + 1AC1AB5D1299A287006FBC77 /* RangeConstraintManager.cpp in Sources */, + 1AC1AB5E1299A287006FBC77 /* RegionStore.cpp in Sources */, + 1AC1AD331299A287006FBC77 /* ReturnPointerRangeChecker.cpp in Sources */, + 1AC1AD341299A287006FBC77 /* ReturnUndefChecker.cpp in Sources */, + 1AC1AD351299A287006FBC77 /* SimpleConstraintManager.cpp in Sources */, + 1AC1AD361299A287006FBC77 /* SimpleSValuator.cpp in Sources */, + 1AC1AD371299A287006FBC77 /* StackAddrLeakChecker.cpp in Sources */, + 1AC1AD381299A287006FBC77 /* Store.cpp in Sources */, + 1AC1AD391299A287006FBC77 /* StreamChecker.cpp in Sources */, + 1AC1AD3A1299A287006FBC77 /* SVals.cpp in Sources */, + 1AC1AD3B1299A287006FBC77 /* SValuator.cpp in Sources */, + 1AC1AD3C1299A287006FBC77 /* SymbolManager.cpp in Sources */, + 1AC1AD3D1299A287006FBC77 /* UndefBranchChecker.cpp in Sources */, + 1AC1AD3E1299A287006FBC77 /* UndefCapturedBlockVarChecker.cpp in Sources */, + 1AC1AD3F1299A287006FBC77 /* UndefinedArraySubscriptChecker.cpp in Sources */, + 1AC1AD401299A287006FBC77 /* UndefinedAssignmentChecker.cpp in Sources */, + 1AC1AD411299A287006FBC77 /* UndefResultChecker.cpp in Sources */, + 1AC1AD421299A287006FBC77 /* UnixAPIChecker.cpp in Sources */, + 1AC1AD431299A287006FBC77 /* UnreachableCodeChecker.cpp in Sources */, + 1AC1AD441299A287006FBC77 /* ValueManager.cpp in Sources */, + 1AC1AD451299A287006FBC77 /* VLASizeChecker.cpp in Sources */, + 1A3D2C4E12A2CD3D0088C44A /* CGCXXABI.cpp in Sources */, + BB5C372912A5057500259F53 /* DumpXML.cpp in Sources */, + BBA5AB7E1309C2FA000B38F1 /* AdjustedReturnValueChecker.cpp in Sources */, + BBA5AB7F1309C2FA000B38F1 /* AnalyzerStatsChecker.cpp in Sources */, + BBA5AB801309C2FA000B38F1 /* ArrayBoundChecker.cpp in Sources */, + BBA5AB811309C2FA000B38F1 /* ArrayBoundCheckerV2.cpp in Sources */, + BBA5AB821309C2FA000B38F1 /* AttrNonNullChecker.cpp in Sources */, + BBA5AB831309C2FA000B38F1 /* BasicObjCFoundationChecks.cpp in Sources */, + BBA5AB841309C2FA000B38F1 /* BuiltinFunctionChecker.cpp in Sources */, + BBA5AB851309C2FA000B38F1 /* CallAndMessageChecker.cpp in Sources */, + BBA5AB861309C2FA000B38F1 /* CastSizeChecker.cpp in Sources */, + BBA5AB871309C2FA000B38F1 /* CastToStructChecker.cpp in Sources */, + BBA5AB881309C2FA000B38F1 /* CheckObjCDealloc.cpp in Sources */, + BBA5AB891309C2FA000B38F1 /* CheckObjCInstMethSignature.cpp in Sources */, + BBA5AB8A1309C2FA000B38F1 /* CheckSecuritySyntaxOnly.cpp in Sources */, + BBA5AB8B1309C2FA000B38F1 /* CheckSizeofPointer.cpp in Sources */, + BBA5AB8C1309C2FA000B38F1 /* ChrootChecker.cpp in Sources */, + BBA5AB8D1309C2FA000B38F1 /* ClangSACheckerProvider.cpp in Sources */, + BBA5AB8E1309C2FA000B38F1 /* CStringChecker.cpp in Sources */, + BBA5AB8F1309C2FA000B38F1 /* DeadStoresChecker.cpp in Sources */, + BBA5AB901309C2FA000B38F1 /* DereferenceChecker.cpp in Sources */, + BBA5AB911309C2FA000B38F1 /* DivZeroChecker.cpp in Sources */, + BBA5AB921309C2FA000B38F1 /* ExperimentalChecks.cpp in Sources */, + BBA5AB931309C2FA000B38F1 /* ExprEngine.cpp in Sources */, + BBA5AB941309C2FA000B38F1 /* FixedAddressChecker.cpp in Sources */, + BBA5AB951309C2FA000B38F1 /* IdempotentOperationChecker.cpp in Sources */, + BBA5AB961309C2FA000B38F1 /* LLVMConventionsChecker.cpp in Sources */, + BBA5AB971309C2FA000B38F1 /* MacOSXAPIChecker.cpp in Sources */, + BBA5AB991309C2FA000B38F1 /* MallocChecker.cpp in Sources */, + BBA5AB9A1309C2FA000B38F1 /* NoReturnFunctionChecker.cpp in Sources */, + BBA5AB9B1309C2FA000B38F1 /* NSAutoreleasePoolChecker.cpp in Sources */, + BBA5AB9C1309C2FA000B38F1 /* NSErrorChecker.cpp in Sources */, + BBA5AB9D1309C2FA000B38F1 /* ObjCAtSyncChecker.cpp in Sources */, + BBA5AB9E1309C2FA000B38F1 /* ObjCSelfInitChecker.cpp in Sources */, + BBA5AB9F1309C2FA000B38F1 /* ObjCUnusedIVarsChecker.cpp in Sources */, + BBA5ABA01309C2FA000B38F1 /* OSAtomicChecker.cpp in Sources */, + BBA5ABA11309C2FA000B38F1 /* PointerArithChecker.cpp in Sources */, + BBA5ABA21309C2FA000B38F1 /* PointerSubChecker.cpp in Sources */, + BBA5ABA31309C2FA000B38F1 /* PthreadLockChecker.cpp in Sources */, + BBA5ABA41309C2FA000B38F1 /* ReturnPointerRangeChecker.cpp in Sources */, + BBA5ABA51309C2FA000B38F1 /* ReturnUndefChecker.cpp in Sources */, + BBA5ABA61309C2FA000B38F1 /* StackAddrLeakChecker.cpp in Sources */, + BBA5ABA71309C2FA000B38F1 /* StreamChecker.cpp in Sources */, + BBA5ABA81309C2FA000B38F1 /* UndefBranchChecker.cpp in Sources */, + BBA5ABA91309C2FA000B38F1 /* UndefCapturedBlockVarChecker.cpp in Sources */, + BBA5ABAA1309C2FA000B38F1 /* UndefinedArraySubscriptChecker.cpp in Sources */, + BBA5ABAB1309C2FA000B38F1 /* UndefinedAssignmentChecker.cpp in Sources */, + BBA5ABAC1309C2FA000B38F1 /* UndefResultChecker.cpp in Sources */, + BBA5ABAD1309C2FA000B38F1 /* UnixAPIChecker.cpp in Sources */, + BBA5ABAE1309C2FA000B38F1 /* UnreachableCodeChecker.cpp in Sources */, + BBA5ABAF1309C2FA000B38F1 /* VLASizeChecker.cpp in Sources */, + BBA5ABB01309C2FA000B38F1 /* AggExprVisitor.cpp in Sources */, + BBA5ABB11309C2FA000B38F1 /* AnalysisManager.cpp in Sources */, + BBA5ABB21309C2FA000B38F1 /* BasicConstraintManager.cpp in Sources */, + BBA5ABB31309C2FA000B38F1 /* BasicStore.cpp in Sources */, + BBA5ABB41309C2FA000B38F1 /* BasicValueFactory.cpp in Sources */, + BBA5ABB51309C2FA000B38F1 /* BlockCounter.cpp in Sources */, + BBA5ABB61309C2FA000B38F1 /* BugReporter.cpp in Sources */, + BBA5ABB71309C2FA000B38F1 /* BugReporterVisitors.cpp in Sources */, + BBA5ABB81309C2FA000B38F1 /* CFRefCount.cpp in Sources */, + BBA5ABB91309C2FA000B38F1 /* Checker.cpp in Sources */, + BBA5ABBA1309C2FA000B38F1 /* CheckerHelpers.cpp in Sources */, + BBA5ABBB1309C2FA000B38F1 /* CheckerManager.cpp in Sources */, + BBA5ABBC1309C2FA000B38F1 /* CoreEngine.cpp in Sources */, + BBA5ABBD1309C2FA000B38F1 /* CXXExprEngine.cpp in Sources */, + BBA5ABBE1309C2FA000B38F1 /* Environment.cpp in Sources */, + BBA5ABBF1309C2FA000B38F1 /* ExplodedGraph.cpp in Sources */, + BBA5ABC01309C2FA000B38F1 /* FlatStore.cpp in Sources */, + BBA5ABC11309C2FA000B38F1 /* GRState.cpp in Sources */, + BBA5ABC21309C2FA000B38F1 /* HTMLDiagnostics.cpp in Sources */, + BBA5ABC41309C2FA000B38F1 /* MemRegion.cpp in Sources */, + BBA5ABC51309C2FA000B38F1 /* ObjCMessage.cpp in Sources */, + BBA5ABC61309C2FA000B38F1 /* PathDiagnostic.cpp in Sources */, + BBA5ABC71309C2FA000B38F1 /* PlistDiagnostics.cpp in Sources */, + BBA5ABC81309C2FA000B38F1 /* RangeConstraintManager.cpp in Sources */, + BBA5ABC91309C2FA000B38F1 /* RegionStore.cpp in Sources */, + BBA5ABCA1309C2FA000B38F1 /* SimpleConstraintManager.cpp in Sources */, + BBA5ABCB1309C2FA000B38F1 /* SimpleSValBuilder.cpp in Sources */, + BBA5ABCC1309C2FA000B38F1 /* Store.cpp in Sources */, + BBA5ABCD1309C2FA000B38F1 /* SValBuilder.cpp in Sources */, + BBA5ABCE1309C2FA000B38F1 /* SVals.cpp in Sources */, + BBA5ABCF1309C2FA000B38F1 /* SymbolManager.cpp in Sources */, + BBA5ABD01309C2FA000B38F1 /* TextPathDiagnostics.cpp in Sources */, + BBA5ABD11309C2FA000B38F1 /* AnalysisConsumer.cpp in Sources */, + BBA5ABD21309C2FA000B38F1 /* CheckerRegistration.cpp in Sources */, + BBA5ABD31309C2FA000B38F1 /* FrontendActions.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/docs/Block-ABI-Apple.txt b/docs/Block-ABI-Apple.txt index dd1203605333b..4a97aa9bd65e2 100644 --- a/docs/Block-ABI-Apple.txt +++ b/docs/Block-ABI-Apple.txt @@ -67,19 +67,21 @@ enum { BLOCK_HAS_COPY_DISPOSE = (1 << 25), BLOCK_HAS_CTOR = (1 << 26), // helpers have C++ code BLOCK_IS_GLOBAL = (1 << 28), - BLOCK_HAS_STRET = (1 << 29), + BLOCK_HAS_STRET = (1 << 29), // IFF BLOCK_HAS_SIGNATURE BLOCK_HAS_SIGNATURE = (1 << 30), }; -In 10.6.ABI the (1<<29) was unconditionally set and ignored by the runtime - it was a transitional marker that did not get deleted after the transition. This bit is now paired with (1<<30), and represented as the pair (3<<30), for the following combinations of valid bit settings, and their meanings. +In 10.6.ABI the (1<<29) was usually set and was always ignored by the runtime - it had been a transitional marker that did not get deleted after the transition. This bit is now paired with (1<<30), and represented as the pair (3<<30), for the following combinations of valid bit settings, and their meanings. switch (flags & (3<<29)) { - case (0<<29): , error + case (0<<29): 10.6.ABI, no signature field available case (1<<29): 10.6.ABI, no signature field available case (2<<29): ABI.2010.3.16, regular calling convention, presence of signature field case (3<<29): ABI.2010.3.16, stret calling convention, presence of signature field, } +The signature field is not always populated. + The following discussions are presented as 10.6.ABI otherwise. Block literals may occur within functions where the structure is created in stack local memory. They may also appear as initialization expressions for Block variables of global or static local variables. @@ -348,7 +350,7 @@ void _block_byref_dispose_helper(struct _block_byref_voidBlock *param) { and struct _block_byref_voidBlock voidBlock = {( .forwarding=&voidBlock, .flags=(1<<25), .size=sizeof(struct _block_byref_voidBlock *), .byref_keep=_block_byref_keep_helper, .byref_dispose=_block_byref_dispose_helper, - .captured_voidBlock=blockA }; + .captured_voidBlock=blockA )}; voidBlock.forwarding->captured_voidBlock = blockB; @@ -422,7 +424,9 @@ A __block variable that is also marked __attribute__((NSObject)) should have byr 2.3.5 __block escapes -Because Blocks referencing __block variables may have Block_copy() performed upon them the underlying storage for the variables may move to the heap. In Objective-C Garbage Collection Only compilation environments the heap used is the garbage collected one and no further action is required. Otherwise the compiler must issue a call to potentially release any heap storage for __block variables at all escapes or terminations of their scope. +Because Blocks referencing __block variables may have Block_copy() performed upon them the underlying storage for the variables may move to the heap. In Objective-C Garbage Collection Only compilation environments the heap used is the garbage collected one and no further action is required. Otherwise the compiler must issue a call to potentially release any heap storage for __block variables at all escapes or terminations of their scope. The call should be: + + _Block_object_dispose(&_block_byref_xxx, BLOCK_FIELD_IS_BYREF); 2.3.6 Nesting @@ -537,9 +541,9 @@ and within the compound statement: 4.0 C++ Support -Within a block stack based C++ objects are copied as const copies using the const copy constructor. It is an error if a stack based C++ object is used within a block if it does not have a const copy constructor. In addition both copy and destroy helper routines must be synthesized for the block to support the Block_copy() operation, and the flags work marked with the (1<<26) bit in addition to the (1<<25) bit. The copy helper should call the constructor using appropriate offsets of the variable within the supplied stack based block source and heap based destination for all const constructed copies, and similarly should call the destructor in the destroy routine. +Within a block stack based C++ objects are copied into const copies using the copy constructor. It is an error if a stack based C++ object is used within a block if it does not have a copy constructor. In addition both copy and destroy helper routines must be synthesized for the block to support the Block_copy() operation, and the flags work marked with the (1<<26) bit in addition to the (1<<25) bit. The copy helper should call the constructor using appropriate offsets of the variable within the supplied stack based block source and heap based destination for all const constructed copies, and similarly should call the destructor in the destroy routine. -As an example, suppose a C++ class FOO existed with a const copy constructor. Within a code block a stack version of a FOO object is declared and used within a Block literal expression: +As an example, suppose a C++ class FOO existed with a copy constructor. Within a code block a stack version of a FOO object is declared and used within a Block literal expression: { FOO foo; @@ -562,11 +566,11 @@ void __block_invoke_10(struct __block_literal_10 *_block) { } void __block_literal_10(struct __block_literal_10 *dst, struct __block_literal_10 *src) { - comp_ctor(&dst->foo, &src->foo); + FOO_ctor(&dst->foo, &src->foo); } void __block_dispose_10(struct __block_literal_10 *src) { - comp_dtor(&src->foo); + FOO_dtor(&src->foo); } static struct __block_descriptor_10 { @@ -594,9 +598,33 @@ and the code would be: } -C++ objects stored in __block storage start out on the stack in a block_byref data structure as do other variables. Such objects (if not const objects) must support a regular copy constructor. The block_byref data structure will have copy and destroy helper routines synthesized by the compiler. The copy helper will have code created to perform the copy constructor based on the initial stack block_byref data structure, and will also set the (1<<26) bit in addition to the (1<<25) bit. The destroy helper will have code to do the destructor on the object stored within the supplied block_byref heap data structure. +C++ objects stored in __block storage start out on the stack in a block_byref data structure as do other variables. Such objects (if not const objects) must support a regular copy constructor. The block_byref data structure will have copy and destroy helper routines synthesized by the compiler. The copy helper will have code created to perform the copy constructor based on the initial stack block_byref data structure, and will also set the (1<<26) bit in addition to the (1<<25) bit. The destroy helper will have code to do the destructor on the object stored within the supplied block_byref heap data structure. For example, + + __block FOO blockStorageFoo; + +requires the normal constructor for the embedded blockStorageFoo object + + FOO_ctor(& _block_byref_blockStorageFoo->blockStorageFoo); + +and at scope termination the destructor: + + FOO_dtor(& _block_byref_blockStorageFoo->blockStorageFoo); + +Note that the forwarding indirection is NOT used. + +The compiler would need to generate (if used from a block literal) the following copy/dispose helpers: + +void _block_byref_obj_keep(struct _block_byref_blockStorageFoo *dst, struct _block_byref_blockStorageFoo *src) { + FOO_ctor(&dst->blockStorageFoo, &src->blockStorageFoo); +} + +void _block_byref_obj_dispose(struct _block_byref_blockStorageFoo *src) { + FOO_dtor(&src->blockStorageFoo); +} + +for the appropriately named constructor and destructor for the class/struct FOO. -To support member variable and function access the compiler will synthesize a const pointer to a block version of the this pointer. +To support member variable and function access the compiler will synthesize a const pointer to a block version of the "this" pointer. 5.0 Runtime Helper Functions @@ -640,31 +668,3 @@ void _Block_object_assign(void *destAddr, const void *object, const int flags); */ void _Block_object_dispose(const void *object, const int flags); -The following functions have been used and will continue to be supported until new compiler support is complete. - -// Obsolete functions. -// Copy helper callback for copying a block imported into a Block -// Called by copy_helper helper functions synthesized by the compiler. -// The address in the destination block of an imported Block is provided as the first argument -// and the value of the existing imported Block is the second. -// Use: _Block_object_assign(dest, src, BLOCK_FIELD_IS_BLOCK {| BLOCK_FIELD_IS_WEAK}); -void _Block_copy_assign(struct Block_basic **dest, const struct Block_basic *src, const int flags); - -// Destroy helper callback for releasing Blocks imported into a Block -// Called by dispose_helper helper functions synthesized by the compiler. -// The value of the imported Block variable is passed back. -// Use: _Block_object_dispose(src, BLOCK_FIELD_IS_BLOCK {| BLOCK_FIELD_IS_WEAK}); -void _Block_destroy(const struct Block_basic *src, const int flags); - -// Byref data block copy helper callback -// Called by block copy helpers when copying __block structures -// Use: _Block_object_assign(dest, src, BLOCK_FIELD_IS_BYREF {| BLOCK_FIELD_IS_WEAK}); -void _Block_byref_assign_copy(struct Block_byref **destp, struct Block_byref *src); - -// Byref data block release helper callback -// Called by block release helpers when releasing a Block -// Called at escape points in scope where __block variables live (under non-GC-only conditions) -// Use: _Block_object_dispose(src, BLOCK_FIELD_IS_BYREF {| BLOCK_FIELD_IS_WEAK}); -void §(struct Block_byref *shared_struct); - - diff --git a/docs/InternalsManual.html b/docs/InternalsManual.html index 6df26db8cfebc..813015ecf659b 100644 --- a/docs/InternalsManual.html +++ b/docs/InternalsManual.html @@ -25,6 +25,7 @@ td {
  • The Diagnostics Subsystem
  • The SourceLocation and SourceManager classes
  • +
  • SourceRange and CharSourceRange
  • The Driver Library @@ -68,6 +69,11 @@ td {
  • The Index Library
  • +
  • Howto guides + +
  • @@ -145,15 +151,14 @@ diagnostic :).

    pieces, this section describes them and talks about best practices when adding a new diagnostic.

    - -

    The Diagnostic*Kinds.def files

    - + +

    The Diagnostic*Kinds.td files

    +

    Diagnostics are created by adding an entry to one of the -clang/Basic/Diagnostic*Kinds.def files, depending on what library will -be using it. This file encodes the unique ID of the -diagnostic (as an enum, the first argument), the severity of the diagnostic -(second argument) and the English translation + format string.

    +clang/Basic/Diagnostic*Kinds.td files, depending on what library will +be using it. From this file, tblgen generates the unique ID of the diagnostic, +the severity of the diagnostic and the English translation + format string.

    There is little sanity with the naming of the unique ID's right now. Some start with err_, warn_, ext_ to encode the severity into the name. Since the @@ -237,7 +242,7 @@ are some simple format strings:

    • Keep the string short. It should ideally fit in the 80 column limit of the - DiagnosticKinds.def file. This avoids the diagnostic wrapping when + DiagnosticKinds.td file. This avoids the diagnostic wrapping when printed, and forces you to think about the important point you are conveying with the diagnostic.
    • Take advantage of location information. The user will be able to see the @@ -252,7 +257,7 @@ are some simple format strings:

      Diagnostics should never take random English strings as arguments: you shouldn't use "you have a problem with %0" and pass in things like "your argument" or "your return value" as arguments. Doing -this prevents translating the Clang diagnostics to +this prevents translating the Clang diagnostics to other languages (because they'll get random English words in their otherwise localized diagnostic). The exceptions to this are C/C++ language keywords (e.g. auto, const, mutable, etc) and C/C++ operators (/=). Note @@ -367,10 +372,10 @@ of repetitive diagnostics and/or have an idea for a useful formatter, please bring it up on the cfe-dev mailing list.

      -

      Producing the Diagnostic

      +

      Producing the Diagnostic

      -

      Now that you've created the diagnostic in the DiagnosticKinds.def file, you +

      Now that you've created the diagnostic in the DiagnosticKinds.td file, you need to write the code that detects the condition in question and emits the new diagnostic. Various components of Clang (e.g. the preprocessor, Sema, etc) provide a helper function named "Diag". It creates a diagnostic and @@ -388,7 +393,7 @@ it.

      This shows that use of the Diag method: they take a location (a SourceLocation object) and a diagnostic enum value -(which matches the name from DiagnosticKinds.def). If the diagnostic takes +(which matches the name from DiagnosticKinds.td). If the diagnostic takes arguments, they are specified with the << operator: the first argument becomes %0, the second becomes %1, etc. The diagnostic interface allows you to specify arguments of many different types, including int and @@ -545,6 +550,30 @@ die. The reason for this is that the notion of the 'spelling' of a Token in Clang depends on being able to find the original input characters for the token. This concept maps directly to the "spelling location" for the token.

      + + +

      SourceRange and CharSourceRange

      + + + +

      Clang represents most source ranges by [first, last], where first and last +each point to the beginning of their respective tokens. For example +consider the SourceRange of the following statement:

      +
      +x = foo + bar;
      +^first    ^last
      +
      + +

      To map from this representation to a character-based +representation, the 'last' location needs to be adjusted to point to +(or past) the end of that token with either +Lexer::MeasureTokenLength() or +Lexer::getLocForEndOfToken(). For the rare cases +where character-level source ranges information is needed we use +the CharSourceRange class.

      + +

      The Driver Library

      @@ -1682,10 +1711,82 @@ interacts with constant evaluation:

      floating-point literal.
    • __builtin_abs,copysign,..: These are constant folded as general constant expressions.
    • +
    • __builtin_strlen and strlen: These are constant folded as integer constant expressions if the argument is a string literal.
    + +

    How to change Clang

    + + + +

    How to add an attribute

    + +

    To add an attribute, you'll have to add it to the list of attributes, add it +to the parsing phase, and look for it in the AST scan. +r124217 +has a good example of adding a warning attribute.

    + +

    (Beware that this hasn't been reviewed/fixed by the people who designed the +attributes system yet.)

    + +

    include/clang/Basic/Attr.td

    + +

    Each attribute gets a def inheriting from Attr or one of +its subclasses. InheritableAttr means that the attribute also applies +to subsequent declarations of the same name.

    + +

    Spellings lists the strings that can appear in +__attribute__((here)) or [[here]]. All such strings +will be synonymous. If you want to allow the [[]] C++0x +syntax, you have to define a list of Namespaces, which will +let users write [[namespace:spelling]]. Using the empty +string for a namespace will allow users to write just the spelling +with no ":".

    + +

    Subjects restricts what kinds of AST node to which this attribute +can appertain (roughly, attach).

    + +

    Args names the arguments the attribute takes, in order. If +Args is [StringArgument<"Arg1">, IntArgument<"Arg2">] +then __attribute__((myattribute("Hello", 3))) will be a valid use.

    + +

    Boilerplate

    + +

    Add an element to the AttributeList::Kind enum in include/clang/Sema/AttributeList.h +named AT_lower_with_underscores. That is, a CamelCased +AttributeName in Attr.td name should become +AT_attribute_name.

    + +

    Add a case to the StringSwitch in AttributeList::getKind() +in lib/Sema/AttributeList.cpp +for each spelling of your attribute. Less common attributes should come toward +the end of that list.

    + +

    Write a new HandleYourAttr() function in lib/Sema/SemaDeclAttr.cpp, +and add a case to the switch in ProcessNonInheritableDeclAttr() or +ProcessInheritableDeclAttr() forwarding to it.

    + +

    If your attribute causes extra warnings to fire, define a DiagGroup +in include/clang/Basic/DiagnosticGroups.td +named after the attribute's Spelling with "_"s replaced by "-"s. If +you're only defining one diagnostic, you can skip DiagnosticGroups.td +and use InGroup<DiagGroup<"your-attribute">> directly in DiagnosticSemaKinds.td

    + +

    The meat of your attribute

    + +

    Find an appropriate place in Clang to do whatever your attribute needs to do. +Check for the attribute's presence using Decl::getAttr<YourAttr>().

    + +

    Update the Clang Language Extensions +document to describe your new attribute.

    diff --git a/docs/LanguageExtensions.html b/docs/LanguageExtensions.html index 75a4608993e9e..8f412c63653b3 100644 --- a/docs/LanguageExtensions.html +++ b/docs/LanguageExtensions.html @@ -23,6 +23,8 @@ td {
  • Include File Checking Macros
  • Builtin Macros
  • Vectors and Extended Vectors
  • +
  • Messages on deprecated and unavailable attributes
  • +
  • Attributes on enumerators
  • Checks for Standard Language Features
  • Target-Specific Extensions
      @@ -132,6 +138,30 @@ can be used like this:

      The feature tag is described along with the language feature below.

      + +

      __has_attribute

      + + +

      This function-like macro takes a single identifier argument that is the name +of an attribute. It evaluates to 1 if the attribute is supported or 0 if not. It +can be used like this:

      + +
      +
      +#ifndef __has_attribute         // Optional of course.
      +  #define __has_attribute(x) 0  // Compatibility with non-clang compilers.
      +#endif
      +
      +...
      +#if __has_attribute(always_inline)
      +#define ALWAYS_INLINE __attribute__((always_inline))
      +#else
      +#define ALWAYS_INLINE
      +#endif
      +...
      +
      +
      +

      Include File Checking Macros

      @@ -259,12 +289,60 @@ float4 foo(float2 a, float2 b) { c.yw = b; return c; } +

      Query for this feature with __has_feature(attribute_ext_vector_type).

      See also __builtin_shufflevector.

      + +

      Messages on deprecated and unavailable Attributes

      + + +

      An optional string message can be added to the deprecated +and unavailable attributes. For example:

      + +
      +
      void explode(void) __attribute__((deprecated("extremely unsafe, use 'combust' instead!!!")));
      +
      + +

      If the deprecated or unavailable declaration is used, the message +will be incorporated into the appropriate diagnostic:

      + +
      +
      harmless.c:4:3: warning: 'explode' is deprecated: extremely unsafe, use 'combust' instead!!! [-Wdeprecated-declarations]
      +  explode();
      +  ^
      +
      + +

      Query for this feature +with __has_feature(attribute_deprecated_with_message) +and __has_feature(attribute_unavailable_with_message).

      + + +

      Attributes on Enumerators

      + + +

      Clang allows attributes to be written on individual enumerators. +This allows enumerators to be deprecated, made unavailable, etc. The +attribute must appear after the enumerator name and before any +initializer, like so:

      + +
      +
      enum OperationMode {
      +  OM_Invalid,
      +  OM_Normal,
      +  OM_Terrified __attribute__((deprecated)),
      +  OM_AbortOnError __attribute__((deprecated)) = 4
      +};
      +
      + +

      Attributes on the enum declaration do not apply to +individual enumerators.

      + +

      Query for this feature with __has_feature(enumerator_attributes).

      +

      Checks for Standard Language Features

      @@ -304,16 +382,15 @@ not yet implemented will be noted.

      Use __has_feature(cxx_attributes) to determine if support for attribute parsing with C++0x's square bracket notation is enabled.

      +

      C++0x default template arguments in function templates

      + +

      Use __has_feature(cxx_default_function_template_args) to determine if support for default template arguments in function templates is enabled.

      +

      C++0x deleted functions

      Use __has_feature(cxx_deleted_functions) to determine if support for deleted function definitions (with = delete) is enabled.

      -

      C++ TR concepts

      - -

      Use __has_feature(cxx_concepts) to determine if support for -concepts is enabled. clang does not currently implement this feature.

      -

      C++0x lambdas

      Use __has_feature(cxx_lambdas) to determine if support for @@ -325,11 +402,13 @@ lambdas is enabled. clang does not currently implement this feature.

      nullptr is enabled. clang does not yet fully implement this feature.

      +

      C++0x reference-qualified functions

      +

      Use __has_feature(cxx_reference_qualified_functions) to determine if support for reference-qualified functions (e.g., member functions with & or && applied to *this) is enabled.

      +

      C++0x rvalue references

      Use __has_feature(cxx_rvalue_references) to determine if support for -rvalue references is enabled. clang does not yet fully implement this -feature.

      +rvalue references is enabled.

      C++0x static_assert()

      @@ -340,19 +419,69 @@ compile-time assertions using static_assert is enabled.

      Use __has_feature(cxx_auto_type) to determine C++0x type inference is supported using the auto specifier. If this is disabled, -auto will instead be a storage class specifier, as in C or C++98.

      +auto will instead be a storage class specifier, as in C or C++98. +Clang does not currently implement this feature.

      C++0x variadic templates

      Use __has_feature(cxx_variadic_templates) 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.

      +for variadic templates is enabled.

      C++0x inline namespaces

      Use __has_feature(cxx_inline_namespaces) to determine if support for inline namespaces is enabled.

      +

      C++0x trailing return type

      + +

      Use __has_feature(cxx_trailing_return) to determine if support for +the alternate function declaration syntax with trailing return type is enabled.

      + +

      C++0x strongly typed enumerations

      + +

      Use __has_feature(cxx_strong_enums) to determine if support for +strongly typed, scoped enumerations is enabled.

      + + +

      Checks for Type Traits

      + + +

      Clang supports the GNU C++ type traits and a subset of the Microsoft Visual C++ Type traits. For each supported type trait __X, __has_feature(X) indicates the presence of the type trait. For example: +

      +
      +#if __has_feature(is_convertible_to)
      +template<typename From, typename To>
      +struct is_convertible_to {
      +  static const bool value = __is_convertible_to(From, To);
      +};
      +#else
      +// Emulate type trait
      +#endif
      +
      +
      + +

      The following type traits are supported by Clang:

      +
        +
      • __has_nothrow_assign (GNU, Microsoft)
      • +
      • __has_nothrow_copy (GNU, Microsoft)
      • +
      • __has_nothrow_constructor (GNU, Microsoft)
      • +
      • __has_trivial_assign (GNU, Microsoft)
      • +
      • __has_trivial_copy (GNU, Microsoft)
      • +
      • __has_trivial_constructor (GNU, Microsoft)
      • +
      • __has_trivial_destructor (GNU, Microsoft)
      • +
      • __has_virtual_destructor (GNU, Microsoft)
      • +
      • __is_abstract (GNU, Microsoft)
      • +
      • __is_base_of (GNU, Microsoft)
      • +
      • __is_class (GNU, Microsoft)
      • +
      • __is_convertible_to (Microsoft)
      • +
      • __is_empty (GNU, Microsoft)
      • +
      • __is_enum (GNU, Microsoft)
      • +
      • __is_pod (GNU, Microsoft)
      • +
      • __is_polymorphic (GNU, Microsoft)
      • +
      • __is_union (GNU, Microsoft)
      • +
      • __is_literal(type): Determines whether the given type is a literal type
      • +
      +

      Blocks

      @@ -445,7 +574,7 @@ void honeypot(...) __attribute__((overloadable, unavailable)); // calling me their names mangled according to the same rules as C++ function names. For example, the three tgsin functions in our motivating example get the mangled names _Z5tgsinf, -_Z5tgsind, and Z5tgsine, respectively. There are two +_Z5tgsind, and _Z5tgsine, respectively. There are two caveats to this use of name mangling:

        @@ -660,6 +789,51 @@ placed at the end of function prototypes:

        Query for this feature with __has_feature(attribute_analyzer_noreturn).

        +

        Objective-C retaining behavior attributes

        + +

        In Objective-C, functions and methods are generally assumed to take +and return objects with +0 retain counts, with some exceptions for +special methods like +alloc and init. However, +there are exceptions, and so Clang provides attributes to allow these +exceptions to be documented, which helps the analyzer find leaks (and +ignore non-leaks).

        + +

        Usage: The ns_returns_retained, ns_returns_not_retained, +ns_returns_autoreleased, cf_returns_retained, +and cf_returns_not_retained attributes can be placed on +methods and functions that return Objective-C or CoreFoundation +objects. They are commonly placed at the end of a function prototype +or method declaration:

        + +
        +  id foo() __attribute__((ns_returns_retained));
        +
        +  - (NSString*) bar: (int) x __attribute__((ns_returns_retained));
        +
        + +

        The *_returns_retained attributes specify that the +returned object has a +1 retain count. +The *_returns_not_retained attributes specify that the return +object has a +0 retain count, even if the normal convention for its +selector would be +1. ns_returns_autoreleased specifies that the +returned object is +0, but is guaranteed to live at least as long as the +next flush of an autorelease pool.

        + +

        Usage: The ns_consumed and cf_consumed +attributes can be placed on an parameter declaration; they specify +that the argument is expected to have a +1 retain count, which will be +balanced in some way by the function or method. +The ns_consumes_self attribute can only be placed on an +Objective-C method; it specifies that the method expects +its self parameter to have a +1 retain count, which it will +balance in some way.

        + +
        +  void foo(__attribute__((ns_consumed)) NSString *string);
        +
        +  - (void) bar __attribute__((ns_consumes_self));
        +  - (void) baz: (id) __attribute__((ns_consumed)) x;
        +
        diff --git a/docs/Makefile b/docs/Makefile index 053b263d27dc7..f82d8208fd94c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -59,7 +59,7 @@ $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/html.tar $(Verb) cd $(PROJ_SRC_DIR) && \ $(TAR) cf $(PROJ_OBJ_DIR)/html.tar *.html - $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/html.tar + $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/html.tar install-doxygen: doxygen $(Echo) Installing doxygen documentation @@ -82,7 +82,7 @@ $(PROJ_OBJ_DIR)/doxygen.tar.gz: $(DOXYFILES) $(PROJ_OBJ_DIR)/doxygen.cfg $(Echo) Packaging doxygen documentation $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/doxygen.tar $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/doxygen.tar doxygen - $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/doxygen.tar + $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/doxygen.tar $(Verb) $(CP) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_OBJ_DIR)/doxygen/html/ userloc: $(LLVM_SRC_ROOT)/docs/userloc.html diff --git a/docs/PCHInternals.html b/docs/PCHInternals.html index 109d5ed025580..d46ae5ceec1ff 100644 --- a/docs/PCHInternals.html +++ b/docs/PCHInternals.html @@ -391,23 +391,23 @@ precompiled header, which contains the serialized representation of that statement or expression. Each substatement or subexpression within an expression is stored as a separate record (which keeps most records to a fixed size). Within the precompiled header, the -subexpressions of an expression are stored prior to the expression +subexpressions of an expression are stored, in reverse order, prior to the expression that owns those expression, using a form of Reverse Polish Notation. For example, an expression 3 - 4 + 5 would be represented as follows:

        - + + -
        IntegerLiteral(3)
        IntegerLiteral(5)
        IntegerLiteral(4)
        IntegerLiteral(3)
        BinaryOperator(-)
        IntegerLiteral(5)
        BinaryOperator(+)
        STOP

        When reading this representation, Clang evaluates each expression -record it encounters, builds the appropriate abstract synax tree node, +record it encounters, builds the appropriate abstract syntax tree node, and then pushes that expression on to a stack. When a record contains N subexpressions--BinaryOperator has two of them--those expressions are popped from the top of the stack. The special STOP diff --git a/docs/UsersManual.html b/docs/UsersManual.html index 75241610a32d4..82c4fa27321ee 100644 --- a/docs/UsersManual.html +++ b/docs/UsersManual.html @@ -248,32 +248,29 @@ when this is enabled, Clang will print something like:

        ^ // - -

        When this is disabled, Clang will just print:

        - -
        -  test.c:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
        -  #endif bad
        -         ^
        -         //
        -
        - -
        -f[no-]color-diagnostics:
        This option, which defaults to on when a color-capable terminal is detected, controls whether or not Clang prints diagnostics in color. When this option is enabled, Clang will use colors to highlight specific parts of the diagnostic, e.g., - +
        +  test.c:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
        +  #endif bad
        +         ^
        +         //
        +
        + +

        When this is disabled, Clang will just print:

        +
        -
        -
        ' +
        -f[no-]diagnostics-show-option: Enable [-Woption] information in diagnostic line.
        @@ -565,7 +562,7 @@ example code will tell Clang or GCC to ignore the -Wall warnings:

        #pragma GCC diagnostic ignored "-Wall" -

        In addition to all of the functionality of provided by GCC's pragma, Clang +

        In addition to all of the functionality provided by GCC's pragma, Clang also allows you to push and pop the current warning state. This is particularly useful when writing a header file that will be compiled by other people, because you don't know what warning flags they build with.

        @@ -604,7 +601,7 @@ by the user via changes to the source code. This can be done in two ways: attributes (e.g., __attribute__((nonnull)))) 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 +attributes, additional ones have been added to Clang to specifically support the static analyzer. Detailed information on these annotations can be found in the analyzer's documentation. @@ -623,7 +620,7 @@ selectively exclude code the analyzer examines. Here is an example: 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 annotations).
      @@ -642,7 +639,7 @@ Precompiled header files, which represent one of many ways to implement this optimization, are literally files that represent an on-disk cache that contains the vital information necessary to reduce some of the work needed to process a corresponding header file. While details of precompiled -headers vary between compilers, precompiled headers have been shown to be a +headers vary between compilers, precompiled headers have been shown to be highly effective at speeding up program compilation on systems with very large system headers (e.g., Mac OS/X).

      @@ -742,11 +739,11 @@ likely to affect PCH files that reference a large number of headers.

      on runtime code generation to check for undefined behavior.
      This option, which defaults to off, controls whether or not Clang -adds runtime checks for undefined runtime behavior. If the check fails, +adds runtime checks for undefined runtime behavior. If a check fails, __builtin_trap() is used to indicate failure. The checks are:

      -

    • Subscripting where the static type of one operand is variable +
    • Subscripting where the static type of one operand is a variable which is decayed from an array type and the other operand is greater than the size of the array or less than zero.
    • Shift operators where the amount shifted is greater or equal to the @@ -761,7 +758,7 @@ The checks are:
      -fno-assume-sane-operator-new: Don't assume that the C++'s new operator is sane.
      This option tells the compiler to do not assume that C++'s global new -operator will always return a pointer that do not +operator will always return a pointer that does not alias any other pointer when the function returns.
      @@ -828,10 +825,6 @@ c94 mode (FIXME: And __STDC_VERSION__ should be defined!).

      extensions are not implemented yet:

        -
      • clang does not support __label__ -(bug 3429). This is -a relatively small feature, so it is likely to be implemented relatively -soon.
      • clang does not support #pragma weak (bug 3679). Due to @@ -887,9 +880,11 @@ bug-reporting guidelines somewhere?).

        • clang does not support the gcc extension that allows variable-length arrays -in structures. This is for a few of reasons: one, it is tricky +in structures. This is for a few reasons: one, it is tricky to implement, two, the extension is completely undocumented, and three, the -extension appears to be rarely used.
        • +extension appears to be rarely used. Note that clang does support +flexible array members (arrays with a zero or unspecified size at the end of +a structure).
        • clang does not support duplicate definitions of a function where one is inline. This complicates clients of the AST which normally can expect there is @@ -922,6 +917,12 @@ support is incomplete; enabling Microsoft extensions will silently drop certain constructs (including __declspec and Microsoft-style asm statements).

          +
        • clang allows setting _MSC_VER with -fmsc-version=. It defaults to 1300 which +is the same as Visual C/C++ 2003. Any number is supported and can greatly affect +what Windows SDK and c++stdlib headers clang can compile. This option will be +removed when clang supports the full set of MS extensions required for these +headers.
        • +
        • clang does not support the Microsoft extension where anonymous record members can be declared using user defined typedefs.
        • @@ -942,16 +943,19 @@ definition.

          X86

          -

          The support for X86 (both 32-bit and 64-bit) is considered stable -on Darwin (Mac OS/X), Linux, FreeBSD, and Dragonfly BSD: it has been tested to -correctly compile large C and Objective-C codebases. (FIXME: Anything specific -we want to say here? Possibly mention some LLVM x86 limitations?) + +

          The support for X86 (both 32-bit and 64-bit) is considered stable on Darwin +(Mac OS/X), Linux, FreeBSD, and Dragonfly BSD: it has been tested to correctly +compile many large C, C++, Objective-C, and Objective-C++ codebases.

          ARM

          -ARM support is mostly feature-complete, but still experimental; it hasn't -undergone significant testing. + +

          The support for ARM (specifically ARMv6 and ARMv7) is considered stable on +Darwin (iOS): it has been tested to correctly compile many large C, C++, +Objective-C, and Objective-C++ codebases. Clang only supports a limited number +of ARM architectures. It does not yet fully support ARMv5, for example.

          Other platforms

          @@ -960,9 +964,6 @@ clang currently contains some support for PPC and Sparc; however, significant pieces of code generation are still missing, and they haven't undergone significant testing. -

          clang contains some support for the embedded PIC16 processor -(FIXME: I haven't been keeping track of this; what should this say?). -

          clang contains limited support for the MSP430 embedded processor, but both the clang support and the LLVM backend support are highly experimental. diff --git a/docs/tools/clang.pod b/docs/tools/clang.pod index 032efcfcabc5f..9f7a4483019ec 100644 --- a/docs/tools/clang.pod +++ b/docs/tools/clang.pod @@ -2,7 +2,7 @@ =head1 NAME -clang - the Clang C and Objective-C compiler +clang - the Clang C, C++, and Objective-C compiler =head1 SYNOPSIS @@ -14,11 +14,12 @@ B [B<-c>|B<-S>|B<-E>] B<-std=>I B<-g> B<-f>I B<-m>I B<-o> I + B<-stdlib=>I I =head1 DESCRIPTION -B is a C and Objective-C compiler which encompasses preprocessing, +B is a C, C++, and Objective-C compiler which encompasses preprocessing, parsing, optimization, code generation, assembly, and linking. Depending on which high-level mode setting is passed, Clang will stop before doing a full link. While Clang is highly integrated, it is important to understand the @@ -37,7 +38,8 @@ the other tools. This stage handles tokenization of the input source file, macro expansion, #include expansion and handling of other preprocessor directives. The output of -this stage is typically called a ".i" (for C) or ".mi" (for Objective-C) file. +this stage is typically called a ".i" (for C), ".ii" (for C++), ".mi" (for +Objective-C) , or ".mii" (for Objective-C++) file. =item B @@ -78,7 +80,7 @@ stages. In addition to compilation of code, Clang also supports other tools: B The Clang Static Analyzer is a tool that scans source code to try to find bugs -though code analysis. This tool uses many parts of Clang and is built into the +through code analysis. This tool uses many parts of Clang and is built into the same driver. @@ -130,6 +132,11 @@ Treat subsequent input files as having type I. Specify the language standard to compile for. +=item B<-stdlib>=I + +Specify the C++ standard library to use; supported options are libstdc++ and +libc++. + =item B<-ansi> Same as B<-std=c89>. @@ -168,6 +175,10 @@ Enable support for Pascal-style strings with "\pfoo". Enable support for Microsoft extensions. +=item B<-fmsc-version=> + +Set _MSC_VER. Defaults to 1300 on Windows. Not set otherwise. + =item B<-fborland-extensions> Enable support for Borland extensions. @@ -185,7 +196,6 @@ Allow loose type checking rules for implicit vector conversions. Enable the "Blocks" language feature. - =item B<-fobjc-gc-only> Indicate that Objective-C code should be compiled in GC-only mode, which only @@ -196,6 +206,22 @@ works when Objective-C Garbage Collection is enabled. Indicate that Objective-C code should be compiled in hybrid-GC mode, which works with both GC and non-GC mode. +=item B<-fobjc-abi-version>=I + +Select the Objective-C ABI version to use. Available versions are 1 (legacy +"fragile" ABI), 2 (non-fragile ABI 1), and 3 (non-fragile ABI 2). + +=item B<-fobjc-nonfragile-abi-version>=I + +Select the Objective-C non-fragile ABI version to use by default. This will only +be used as the Objective-C ABI when the non-fragile ABI is enabled (either via +-fobjc-nonfragile-abi, or because it is the platform default). + +=item B<-fobjc-nonfragile-abi> + +Enable use of the Objective-C non-fragile ABI. On platforms for which this is +the default ABI, it can be disabled with B<-fno-objc-nonfragile-abi>. + =back diff --git a/examples/PrintFunctionNames/CMakeLists.txt b/examples/PrintFunctionNames/CMakeLists.txt index 5ea75db42e02c..86793ce7e187b 100644 --- a/examples/PrintFunctionNames/CMakeLists.txt +++ b/examples/PrintFunctionNames/CMakeLists.txt @@ -1,6 +1,11 @@ set(MODULE TRUE) -set(LLVM_NO_RTTI 1) +set( LLVM_USED_LIBS + clangFrontend + clangAST + ) + +set( LLVM_LINK_COMPONENTS support mc) add_clang_library(PrintFunctionNames PrintFunctionNames.cpp) diff --git a/examples/PrintFunctionNames/Makefile b/examples/PrintFunctionNames/Makefile index 125ac4854ffc7..23a53054019d1 100644 --- a/examples/PrintFunctionNames/Makefile +++ b/examples/PrintFunctionNames/Makefile @@ -18,7 +18,11 @@ EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/PrintFunctionNames.exports endif endif -LINK_LIBS_IN_SHARED = 1 +LINK_LIBS_IN_SHARED = 0 SHARED_LIBRARY = 1 include $(CLANG_LEVEL)/Makefile + +ifeq ($(OS),Darwin) + LDFLAGS=-Wl,-undefined,dynamic_lookup +endif diff --git a/examples/PrintFunctionNames/README.txt b/examples/PrintFunctionNames/README.txt index 267865c903519..4c284cd170d5c 100644 --- a/examples/PrintFunctionNames/README.txt +++ b/examples/PrintFunctionNames/README.txt @@ -1,10 +1,12 @@ This is a simple example demonstrating how to use clang's facility for providing AST consumers using a plugin. -You will probably need to build clang so that it exports all symbols (disable -TOOL_NO_EXPORT in the tools/clang Makefile). +Build the plugin by running `make` in this directory. Once the plugin is built, you can run it using: -- -$ clang -cc1 -load path/to/PrintFunctionNames.so -plugin print-fns some-input-file.c --- +Linux: +$ clang -cc1 -load ../../Debug+Asserts/lib/libPrintFunctionNames.so -plugin print-fns some-input-file.c + +Mac: +$ clang -cc1 -load ../../Debug+Asserts/lib/libPrintFunctionNames.dylib -plugin print-fns some-input-file.c diff --git a/examples/clang-interpreter/CMakeLists.txt b/examples/clang-interpreter/CMakeLists.txt index 73f28bb7a2e7c..a747b92a76cb6 100644 --- a/examples/clang-interpreter/CMakeLists.txt +++ b/examples/clang-interpreter/CMakeLists.txt @@ -1,12 +1,12 @@ -set(LLVM_NO_RTTI 1) - set(LLVM_USED_LIBS clangFrontend clangSerialization clangDriver clangCodeGen clangSema - clangChecker + clangStaticAnalyzerFrontend + clangStaticAnalyzerCheckers + clangStaticAnalyzerCore clangIndex clangAnalysis clangRewrite diff --git a/examples/clang-interpreter/Makefile b/examples/clang-interpreter/Makefile index 2f5e017af803c..6e762da708d20 100644 --- a/examples/clang-interpreter/Makefile +++ b/examples/clang-interpreter/Makefile @@ -18,7 +18,7 @@ TOOL_NO_EXPORTS = 1 LINK_COMPONENTS := jit interpreter nativecodegen bitreader bitwriter ipo \ selectiondag asmparser USEDLIBS = clangFrontend.a clangSerialization.a clangDriver.a clangCodeGen.a \ - clangSema.a clangChecker.a clangAnalysis.a clangRewrite.a \ + clangSema.a clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.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 2ccba8b24a855..a99766f9a3148 100644 --- a/examples/clang-interpreter/main.cpp +++ b/examples/clang-interpreter/main.cpp @@ -17,7 +17,6 @@ #include "clang/Frontend/FrontendDiagnostic.h" #include "clang/Frontend/TextDiagnosticPrinter.h" -#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/Config/config.h" #include "llvm/ADT/OwningPtr.h" @@ -26,12 +25,17 @@ #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/System/Host.h" -#include "llvm/System/Path.h" +#include "llvm/Support/Host.h" +#include "llvm/Support/Path.h" #include "llvm/Target/TargetSelect.h" using namespace clang; using namespace clang::driver; +// This function isn't referenced outside its translation unit, but it +// can't use the "static" keyword because its address is used for +// GetMainExecutable (since some platforms don't support taking the +// address of main, and some platforms can't implement GetMainExecutable +// without being given the address of a function in the main executable). llvm::sys::Path GetExecutablePath(const char *Argv0) { // This just needs to be some symbol in the binary; C++ doesn't // allow taking the address of ::main however. @@ -39,7 +43,7 @@ llvm::sys::Path GetExecutablePath(const char *Argv0) { return llvm::sys::Path::GetMainExecutable(Argv0, MainAddr); } -int Execute(llvm::Module *Mod, char * const *envp) { +static int Execute(llvm::Module *Mod, char * const *envp) { llvm::InitializeNativeTarget(); std::string Error; @@ -69,7 +73,8 @@ int main(int argc, const char **argv, char * const *envp) { TextDiagnosticPrinter *DiagClient = new TextDiagnosticPrinter(llvm::errs(), DiagnosticOptions()); - Diagnostic Diags(DiagClient); + llvm::IntrusiveRefCntPtr DiagID(new DiagnosticIDs()); + Diagnostic Diags(DiagID, DiagClient); Driver TheDriver(Path.str(), llvm::sys::getHostTriple(), "a.out", /*IsProduction=*/false, /*CXXIsProduction=*/false, Diags); @@ -124,7 +129,6 @@ int main(int argc, const char **argv, char * const *envp) { // Create a compiler instance to handle the actual work. CompilerInstance Clang; - Clang.setLLVMContext(new llvm::LLVMContext); Clang.setInvocation(CI.take()); // Create the compilers actual diagnostics engine. diff --git a/examples/wpa/CMakeLists.txt b/examples/wpa/CMakeLists.txt index 13e4298c1f2ec..ad1bb8e36b0e2 100644 --- a/examples/wpa/CMakeLists.txt +++ b/examples/wpa/CMakeLists.txt @@ -1,5 +1,3 @@ -set(LLVM_NO_RTTI 1) - set(LLVM_USED_LIBS clangIndex clangFrontend @@ -7,7 +5,9 @@ set(LLVM_USED_LIBS clangSema clangAnalysis clangSerialization - clangChecker + clangStaticAnalyzerFrontend + clangStaticAnalyzerCheckers + clangStaticAnalyzerCore clangRewrite clangAST clangParse diff --git a/examples/wpa/Makefile b/examples/wpa/Makefile index 0a70ea6359c81..2ce2040c87ca2 100644 --- a/examples/wpa/Makefile +++ b/examples/wpa/Makefile @@ -16,7 +16,7 @@ NO_INSTALL = 1 TOOL_NO_EXPORTS = 1 LINK_COMPONENTS := asmparser bitreader mc core -USEDLIBS = clangChecker.a clangIndex.a clangFrontend.a clangDriver.a \ +USEDLIBS = clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a clangIndex.a clangFrontend.a clangDriver.a \ clangSema.a clangAnalysis.a clangSerialization.a \ clangAST.a clangParse.a clangLex.a clangBasic.a diff --git a/examples/wpa/clang-wpa.cpp b/examples/wpa/clang-wpa.cpp index 41dca0dc451ee..bbb9e147ebade 100644 --- a/examples/wpa/clang-wpa.cpp +++ b/examples/wpa/clang-wpa.cpp @@ -14,10 +14,12 @@ #include "clang/Basic/FileManager.h" #include "clang/Basic/SourceManager.h" -#include "clang/Checker/PathSensitive/AnalysisManager.h" -#include "clang/Checker/PathSensitive/GRExprEngine.h" -#include "clang/Checker/PathSensitive/GRTransferFuncs.h" -#include "clang/Checker/Checkers/LocalCheckers.h" +#include "clang/StaticAnalyzer/Frontend/CheckerRegistration.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/TransferFuncs.h" +#include "clang/StaticAnalyzer/Core/CheckerManager.h" +#include "clang/StaticAnalyzer/Checkers/LocalCheckers.h" #include "clang/Frontend/ASTUnit.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Index/CallGraph.h" @@ -26,6 +28,7 @@ #include "clang/Index/DeclReferenceMap.h" #include "clang/Index/SelectorMap.h" #include "clang/Lex/Preprocessor.h" +#include "clang/Basic/TargetInfo.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" @@ -91,7 +94,9 @@ 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 AST(ASTUnit::LoadFromASTFile(InFile, Diags)); + llvm::OwningPtr AST(ASTUnit::LoadFromASTFile(InFile, Diags, + FileSystemOptions(), + false, 0, 0, true)); if (!AST) return 1; @@ -129,20 +134,45 @@ int main(int argc, char **argv) { // Create an analysis engine. Preprocessor &PP = TU->getPreprocessor(); - // Hard code options for now. + AnalyzerOptions Opts; + + // Hard code options and checkers for now. + + Opts.MaxNodes = 300000; + Opts.MaxLoop = 3; + Opts.InlineCall = true; + Opts.CFGAddImplicitDtors = true; + Opts.EagerlyTrimEGraph = true; + + Opts.CheckersControlList.push_back(std::make_pair("core", true)); + if (PP.getTargetInfo().getTriple().getOS() != llvm::Triple::Win32) + Opts.CheckersControlList.push_back(std::make_pair("unix", true)); + if (PP.getTargetInfo().getTriple().getVendor() == llvm::Triple::Apple) + Opts.CheckersControlList.push_back(std::make_pair("macosx", true)); + + // Checks to perform for Objective-C/Objective-C++. + if (PP.getLangOptions().ObjC1) + Opts.CheckersControlList.push_back(std::make_pair("cocoa", true)); + + llvm::OwningPtr checkerMgr; + checkerMgr.reset(ento::registerCheckers(Opts, PP.getDiagnostics())); + + using namespace clang::ento; AnalysisManager AMgr(TU->getASTContext(), PP.getDiagnostics(), PP.getLangOptions(), /* PathDiagnostic */ 0, CreateRegionStoreManager, - CreateRangeConstraintManager, &Idxer, - /* MaxNodes */ 300000, /* MaxLoop */ 3, - /* VisualizeEG */ false, /* VisualizeEGUbi */ false, - /* PurgeDead */ true, /* EagerlyAssume */ false, - /* TrimGraph */ false, /* InlineCall */ true, - /* UseUnoptimizedCFG */ false); - - GRTransferFuncs* TF = MakeCFRefCountTF(AMgr.getASTContext(), /*GC*/false, + CreateRangeConstraintManager, checkerMgr.get(), &Idxer, + Opts.MaxNodes, Opts.MaxLoop, + Opts.VisualizeEGDot, Opts.VisualizeEGUbi, + Opts.PurgeDead, Opts.EagerlyAssume, + Opts.TrimGraph, Opts.InlineCall, + Opts.UnoptimizedCFG, Opts.CFGAddImplicitDtors, + Opts.CFGAddInitializers, + Opts.EagerlyTrimEGraph); + + TransferFuncs* TF = MakeCFRefCountTF(AMgr.getASTContext(), /*GC*/false, AMgr.getLangOptions()); - GRExprEngine Eng(AMgr, TF); + ExprEngine Eng(AMgr, TF); Eng.ExecuteWorkList(AMgr.getStackFrame(FD, TU), AMgr.getMaxNodes()); diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 4631c65bf05aa..b3b49c79c3a97 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -63,7 +63,7 @@ typedef void *CXIndex; /** * \brief A single translation unit, which resides in an index. */ -typedef void *CXTranslationUnit; /* A translation unit instance. */ +typedef struct CXTranslationUnitImpl *CXTranslationUnit; /** * \brief Opaque pointer representing client data that will be passed through @@ -133,10 +133,8 @@ enum CXAvailabilityKind { * with the string data, call \c clang_disposeString() to free the string. */ typedef struct { - const char *Spelling; - /* A 1 value indicates the clang_ indexing API needed to allocate the string - (and it must be freed by clang_disposeString()). */ - int MustFreeString; + void *data; + unsigned private_flags; } CXString; /** @@ -201,18 +199,6 @@ CINDEX_LINKAGE CXIndex clang_createIndex(int excludeDeclarationsFromPCH, */ CINDEX_LINKAGE void clang_disposeIndex(CXIndex index); -/** - * \brief Request that AST's be generated externally for API calls which parse - * source code on the fly, e.g. \see createTranslationUnitFromSourceFile. - * - * Note: This is for debugging purposes only, and may be removed at a later - * date. - * - * \param index - The index to update. - * \param value - The new flag value. - */ -CINDEX_LINKAGE void clang_setUseExternalASTGeneration(CXIndex index, - int value); /** * \defgroup CINDEX_FILES File manipulation routines * @@ -269,8 +255,8 @@ CINDEX_LINKAGE CXFile clang_getFile(CXTranslationUnit tu, * \brief Identifies a specific source location within a translation * unit. * - * Use clang_getInstantiationLocation() to map a source location to a - * particular file, line, and column. + * Use clang_getInstantiationLocation() or clang_getSpellingLocation() + * to map a source location to a particular file, line, and column. */ typedef struct { void *ptr_data[2]; @@ -313,6 +299,13 @@ CINDEX_LINKAGE CXSourceLocation clang_getLocation(CXTranslationUnit tu, CXFile file, unsigned line, unsigned column); +/** + * \brief Retrieves the source location associated with a given character offset + * in a particular translation unit. + */ +CINDEX_LINKAGE CXSourceLocation clang_getLocationForOffset(CXTranslationUnit tu, + CXFile file, + unsigned offset); /** * \brief Retrieve a NULL (invalid) source range. @@ -330,6 +323,9 @@ CINDEX_LINKAGE CXSourceRange clang_getRange(CXSourceLocation begin, * \brief Retrieve the file, line, column, and offset represented by * the given source location. * + * If the location refers into a macro instantiation, retrieves the + * location of the macro instantiation. + * * \param location the location within a source file that will be decomposed * into its parts. * @@ -351,6 +347,34 @@ CINDEX_LINKAGE void clang_getInstantiationLocation(CXSourceLocation location, unsigned *column, unsigned *offset); +/** + * \brief Retrieve the file, line, column, and offset represented by + * the given source location. + * + * If the location refers into a macro instantiation, return where the + * location was originally spelled in the source file. + * + * \param location the location within a source file that will be decomposed + * into its parts. + * + * \param file [out] if non-NULL, will be set to the file to which the given + * source location points. + * + * \param line [out] if non-NULL, will be set to the line to which the given + * source location points. + * + * \param column [out] if non-NULL, will be set to the column to which the given + * source location points. + * + * \param offset [out] if non-NULL, will be set to the offset into the + * buffer to which the given source location points. + */ +CINDEX_LINKAGE void clang_getSpellingLocation(CXSourceLocation location, + CXFile *file, + unsigned *line, + unsigned *column, + unsigned *offset); + /** * \brief Retrieve a source location representing the first character within a * source range. @@ -475,7 +499,34 @@ enum CXDiagnosticDisplayOptions { * This option corresponds to the clang flag * \c -fdiagnostics-print-source-range-info. */ - CXDiagnostic_DisplaySourceRanges = 0x04 + CXDiagnostic_DisplaySourceRanges = 0x04, + + /** + * \brief Display the option name associated with this diagnostic, if any. + * + * The option name displayed (e.g., -Wconversion) will be placed in brackets + * after the diagnostic text. This option corresponds to the clang flag + * \c -fdiagnostics-show-option. + */ + CXDiagnostic_DisplayOption = 0x08, + + /** + * \brief Display the category number associated with this diagnostic, if any. + * + * The category number is displayed within brackets after the diagnostic text. + * This option corresponds to the clang flag + * \c -fdiagnostics-show-category=id. + */ + CXDiagnostic_DisplayCategoryId = 0x10, + + /** + * \brief Display the category name associated with this diagnostic, if any. + * + * The category name is displayed within brackets after the diagnostic text. + * This option corresponds to the clang flag + * \c -fdiagnostics-show-category=name. + */ + CXDiagnostic_DisplayCategoryName = 0x20 }; /** @@ -505,10 +556,6 @@ CINDEX_LINKAGE CXString clang_formatDiagnostic(CXDiagnostic Diagnostic, */ CINDEX_LINKAGE unsigned clang_defaultDiagnosticDisplayOptions(void); -/** - * \brief Print a diagnostic to the given file. - */ - /** * \brief Determine the severity of the given diagnostic. */ @@ -528,6 +575,43 @@ CINDEX_LINKAGE CXSourceLocation clang_getDiagnosticLocation(CXDiagnostic); */ CINDEX_LINKAGE CXString clang_getDiagnosticSpelling(CXDiagnostic); +/** + * \brief Retrieve the name of the command-line option that enabled this + * diagnostic. + * + * \param Diag The diagnostic to be queried. + * + * \param Disable If non-NULL, will be set to the option that disables this + * diagnostic (if any). + * + * \returns A string that contains the command-line option used to enable this + * warning, such as "-Wconversion" or "-pedantic". + */ +CINDEX_LINKAGE CXString clang_getDiagnosticOption(CXDiagnostic Diag, + CXString *Disable); + +/** + * \brief Retrieve the category number for this diagnostic. + * + * Diagnostics can be categorized into groups along with other, related + * diagnostics (e.g., diagnostics under the same warning flag). This routine + * retrieves the category number for the given diagnostic. + * + * \returns The number of the category that contains this diagnostic, or zero + * if this diagnostic is uncategorized. + */ +CINDEX_LINKAGE unsigned clang_getDiagnosticCategory(CXDiagnostic); + +/** + * \brief Retrieve the name of a particular diagnostic category. + * + * \param Category A diagnostic category number, as returned by + * \c clang_getDiagnosticCategory(). + * + * \returns The name of the given diagnostic category. + */ +CINDEX_LINKAGE CXString clang_getDiagnosticCategoryName(unsigned Category); + /** * \brief Determine the number of source ranges associated with the given * diagnostic. @@ -621,9 +705,20 @@ clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit); * '-fsyntax-only' * '-o ' (both '-o' and '' are ignored) * + * \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 clang_command_line_args. + * source file is included in \p clang_command_line_args. + * + * \param num_clang_command_line_args The number of command-line arguments in + * \p clang_command_line_args. + * + * \param clang_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 '. * * \param num_unsaved_files the number of unsaved file entries in \p * unsaved_files. @@ -633,13 +728,6 @@ clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit); * 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 diag_callback callback function that will receive any diagnostics - * emitted while processing this source file. If NULL, diagnostics will be - * suppressed. - * - * \param diag_client_data client data that will be passed to the diagnostic - * callback function. */ CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnitFromSourceFile( CXIndex CIdx, @@ -718,7 +806,22 @@ enum CXTranslationUnit_Flags { * introduces some overhead to reparsing but improves the performance of * code-completion operations. */ - CXTranslationUnit_CacheCompletionResults = 0x08 + CXTranslationUnit_CacheCompletionResults = 0x08, + /** + * \brief Enable precompiled preambles in C++. + * + * Note: this is a *temporary* option that is available only while + * we are testing C++ precompiled preamble support. + */ + CXTranslationUnit_CXXPrecompiledPreamble = 0x10, + + /** + * \brief Enabled chained precompiled preambles in C++. + * + * Note: this is a *temporary* option that is available only while + * we are testing C++ precompiled preamble support. + */ + CXTranslationUnit_CXXChainedPCH = 0x20 }; /** @@ -749,7 +852,7 @@ CINDEX_LINKAGE unsigned clang_defaultEditingTranslationUnitOptions(void); * 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. + * source file is included in \p 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. @@ -1000,7 +1103,6 @@ enum CXCursorKind { CXCursor_UsingDirective = 34, /** \brief A using declaration. */ CXCursor_UsingDeclaration = 35, - CXCursor_FirstDecl = CXCursor_UnexposedDecl, CXCursor_LastDecl = CXCursor_UsingDeclaration, @@ -1027,15 +1129,75 @@ enum CXCursorKind { CXCursor_TypeRef = 43, CXCursor_CXXBaseSpecifier = 44, /** - * \brief A reference to a class template, function template, or template - * template parameter. + * \brief A reference to a class template, function template, template + * template parameter, or class template partial specialization. */ CXCursor_TemplateRef = 45, /** * \brief A reference to a namespace or namespace alias. */ CXCursor_NamespaceRef = 46, - CXCursor_LastRef = CXCursor_NamespaceRef, + /** + * \brief A reference to a member of a struct, union, or class that occurs in + * some non-expression context, e.g., a designated initializer. + */ + CXCursor_MemberRef = 47, + /** + * \brief A reference to a labeled statement. + * + * This cursor kind is used to describe the jump to "start_over" in the + * goto statement in the following example: + * + * \code + * start_over: + * ++counter; + * + * goto start_over; + * \endcode + * + * A label reference cursor refers to a label statement. + */ + CXCursor_LabelRef = 48, + + /** + * \brief A reference to a set of overloaded functions or function templates + * that has not yet been resolved to a specific function or function template. + * + * An overloaded declaration reference cursor occurs in C++ templates where + * a dependent name refers to a function. For example: + * + * \code + * template void swap(T&, T&); + * + * struct X { ... }; + * void swap(X&, X&); + * + * template + * void reverse(T* first, T* last) { + * while (first < last - 1) { + * swap(*first, *--last); + * ++first; + * } + * } + * + * struct Y { }; + * void swap(Y&, Y&); + * \endcode + * + * Here, the identifier "swap" is associated with an overloaded declaration + * reference. In the template definition, "swap" refers to either of the two + * "swap" functions declared above, so both results will be available. At + * instantiation time, "swap" may also refer to other functions found via + * argument-dependent lookup (e.g., the "swap" function at the end of the + * example). + * + * The functions \c clang_getNumOverloadedDecls() and + * \c clang_getOverloadedDecl() can be used to retrieve the definitions + * referenced by this cursor. + */ + CXCursor_OverloadedDeclRef = 49, + + CXCursor_LastRef = CXCursor_OverloadedDeclRef, /* Error conditions */ CXCursor_FirstInvalid = 70, @@ -1095,7 +1257,21 @@ enum CXCursorKind { * reported. */ CXCursor_UnexposedStmt = 200, - CXCursor_LastStmt = 200, + + /** \brief A labelled statement in a function. + * + * This cursor kind is used to describe the "start_over:" label statement in + * the following example: + * + * \code + * start_over: + * ++counter; + * \endcode + * + */ + CXCursor_LabelStmt = 201, + + CXCursor_LastStmt = CXCursor_LabelStmt, /** * \brief Cursor that represents the translation unit itself. @@ -1122,8 +1298,9 @@ enum CXCursorKind { CXCursor_PreprocessingDirective = 500, CXCursor_MacroDefinition = 501, CXCursor_MacroInstantiation = 502, + CXCursor_InclusionDirective = 503, CXCursor_FirstPreprocessing = CXCursor_PreprocessingDirective, - CXCursor_LastPreprocessing = CXCursor_MacroInstantiation + CXCursor_LastPreprocessing = CXCursor_InclusionDirective }; /** @@ -1173,6 +1350,11 @@ CINDEX_LINKAGE CXCursor clang_getTranslationUnitCursor(CXTranslationUnit); */ CINDEX_LINKAGE unsigned clang_equalCursors(CXCursor, CXCursor); +/** + * \brief Compute a hash value for the given cursor. + */ +CINDEX_LINKAGE unsigned clang_hashCursor(CXCursor); + /** * \brief Retrieve the kind of the given cursor. */ @@ -1278,6 +1460,167 @@ CINDEX_LINKAGE enum CXLanguageKind { */ CINDEX_LINKAGE enum CXLanguageKind clang_getCursorLanguage(CXCursor cursor); + +/** + * \brief A fast container representing a set of CXCursors. + */ +typedef struct CXCursorSetImpl *CXCursorSet; + +/** + * \brief Creates an empty CXCursorSet. + */ +CINDEX_LINKAGE CXCursorSet clang_createCXCursorSet(); + +/** + * \brief Disposes a CXCursorSet and releases its associated memory. + */ +CINDEX_LINKAGE void clang_disposeCXCursorSet(CXCursorSet cset); + +/** + * \brief Queries a CXCursorSet to see if it contains a specific CXCursor. + * + * \returns non-zero if the set contains the specified cursor. +*/ +CINDEX_LINKAGE unsigned clang_CXCursorSet_contains(CXCursorSet cset, + CXCursor cursor); + +/** + * \brief Inserts a CXCursor into a CXCursorSet. + * + * \returns zero if the CXCursor was already in the set, and non-zero otherwise. +*/ +CINDEX_LINKAGE unsigned clang_CXCursorSet_insert(CXCursorSet cset, + CXCursor cursor); + +/** + * \brief Determine the semantic parent of the given cursor. + * + * The semantic parent of a cursor is the cursor that semantically contains + * the given \p cursor. For many declarations, the lexical and semantic parents + * are equivalent (the lexical parent is returned by + * \c clang_getCursorLexicalParent()). They diverge when declarations or + * definitions are provided out-of-line. For example: + * + * \code + * class C { + * void f(); + * }; + * + * void C::f() { } + * \endcode + * + * In the out-of-line definition of \c C::f, the semantic parent is the + * the class \c C, of which this function is a member. The lexical parent is + * the place where the declaration actually occurs in the source code; in this + * case, the definition occurs in the translation unit. In general, the + * lexical parent for a given entity can change without affecting the semantics + * of the program, and the lexical parent of different declarations of the + * same entity may be different. Changing the semantic parent of a declaration, + * on the other hand, can have a major impact on semantics, and redeclarations + * of a particular entity should all have the same semantic context. + * + * In the example above, both declarations of \c C::f have \c C as their + * semantic context, while the lexical context of the first \c C::f is \c C + * and the lexical context of the second \c C::f is the translation unit. + * + * For global declarations, the semantic parent is the translation unit. + */ +CINDEX_LINKAGE CXCursor clang_getCursorSemanticParent(CXCursor cursor); + +/** + * \brief Determine the lexical parent of the given cursor. + * + * The lexical parent of a cursor is the cursor in which the given \p cursor + * was actually written. For many declarations, the lexical and semantic parents + * are equivalent (the semantic parent is returned by + * \c clang_getCursorSemanticParent()). They diverge when declarations or + * definitions are provided out-of-line. For example: + * + * \code + * class C { + * void f(); + * }; + * + * void C::f() { } + * \endcode + * + * In the out-of-line definition of \c C::f, the semantic parent is the + * the class \c C, of which this function is a member. The lexical parent is + * the place where the declaration actually occurs in the source code; in this + * case, the definition occurs in the translation unit. In general, the + * lexical parent for a given entity can change without affecting the semantics + * of the program, and the lexical parent of different declarations of the + * same entity may be different. Changing the semantic parent of a declaration, + * on the other hand, can have a major impact on semantics, and redeclarations + * of a particular entity should all have the same semantic context. + * + * In the example above, both declarations of \c C::f have \c C as their + * semantic context, while the lexical context of the first \c C::f is \c C + * and the lexical context of the second \c C::f is the translation unit. + * + * For declarations written in the global scope, the lexical parent is + * the translation unit. + */ +CINDEX_LINKAGE CXCursor clang_getCursorLexicalParent(CXCursor cursor); + +/** + * \brief Determine the set of methods that are overridden by the given + * method. + * + * In both Objective-C and C++, a method (aka virtual member function, + * in C++) can override a virtual method in a base class. For + * Objective-C, a method is said to override any method in the class's + * interface (if we're coming from an implementation), its protocols, + * or its categories, that has the same selector and is of the same + * kind (class or instance). If no such method exists, the search + * continues to the class's superclass, its protocols, and its + * categories, and so on. + * + * For C++, a virtual member function overrides any virtual member + * function with the same signature that occurs in its base + * classes. With multiple inheritance, a virtual member function can + * override several virtual member functions coming from different + * base classes. + * + * In all cases, this function determines the immediate overridden + * method, rather than all of the overridden methods. For example, if + * a method is originally declared in a class A, then overridden in B + * (which in inherits from A) and also in C (which inherited from B), + * then the only overridden method returned from this function when + * invoked on C's method will be B's method. The client may then + * invoke this function again, given the previously-found overridden + * methods, to map out the complete method-override set. + * + * \param cursor A cursor representing an Objective-C or C++ + * method. This routine will compute the set of methods that this + * method overrides. + * + * \param overridden A pointer whose pointee will be replaced with a + * pointer to an array of cursors, representing the set of overridden + * methods. If there are no overridden methods, the pointee will be + * set to NULL. The pointee must be freed via a call to + * \c clang_disposeOverriddenCursors(). + * + * \param num_overridden A pointer to the number of overridden + * functions, will be set to the number of overridden functions in the + * array pointed to by \p overridden. + */ +CINDEX_LINKAGE void clang_getOverriddenCursors(CXCursor cursor, + CXCursor **overridden, + unsigned *num_overridden); + +/** + * \brief Free the set of overridden cursors returned by \c + * clang_getOverriddenCursors(). + */ +CINDEX_LINKAGE void clang_disposeOverriddenCursors(CXCursor *overridden); + +/** + * \brief Retrieve the file that is included by the given inclusion directive + * cursor. + */ +CINDEX_LINKAGE CXFile clang_getIncludedFile(CXCursor cursor); + /** * @} */ @@ -1438,6 +1781,24 @@ CINDEX_LINKAGE unsigned clang_equalTypes(CXType A, CXType B); */ CINDEX_LINKAGE CXType clang_getCanonicalType(CXType T); +/** + * \determine Determine whether a CXType has the "const" qualifier set, + * without looking through typedefs that may have added "const" at a different level. + */ +CINDEX_LINKAGE unsigned clang_isConstQualifiedType(CXType T); + +/** + * \determine Determine whether a CXType has the "volatile" qualifier set, + * without looking through typedefs that may have added "volatile" at a different level. + */ +CINDEX_LINKAGE unsigned clang_isVolatileQualifiedType(CXType T); + +/** + * \determine Determine whether a CXType has the "restrict" qualifier set, + * without looking through typedefs that may have added "restrict" at a different level. + */ +CINDEX_LINKAGE unsigned clang_isRestrictQualifiedType(CXType T); + /** * \brief For pointer types, returns the type of the pointee. * @@ -1449,6 +1810,10 @@ CINDEX_LINKAGE CXType clang_getPointeeType(CXType T); */ CINDEX_LINKAGE CXCursor clang_getTypeDeclaration(CXType T); +/** + * Returns the Objective-C type encoding for the specified declaration. + */ +CINDEX_LINKAGE CXString clang_getDeclObjCTypeEncoding(CXCursor C); /** * \brief Retrieve the spelling of a given CXTypeKind. @@ -1495,6 +1860,34 @@ enum CX_CXXAccessSpecifier { */ CINDEX_LINKAGE enum CX_CXXAccessSpecifier clang_getCXXAccessSpecifier(CXCursor); +/** + * \brief Determine the number of overloaded declarations referenced by a + * \c CXCursor_OverloadedDeclRef cursor. + * + * \param cursor The cursor whose overloaded declarations are being queried. + * + * \returns The number of overloaded declarations referenced by \c cursor. If it + * is not a \c CXCursor_OverloadedDeclRef cursor, returns 0. + */ +CINDEX_LINKAGE unsigned clang_getNumOverloadedDecls(CXCursor cursor); + +/** + * \brief Retrieve a cursor for one of the overloaded declarations referenced + * by a \c CXCursor_OverloadedDeclRef cursor. + * + * \param cursor The cursor whose overloaded declarations are being queried. + * + * \param index The zero-based index into the set of overloaded declarations in + * the cursor. + * + * \returns A cursor representing the declaration referenced by the given + * \c cursor at the specified \c index. If the cursor does not have an + * associated set of overloaded declarations, or if the index is out of bounds, + * returns \c clang_getNullCursor(); + */ +CINDEX_LINKAGE CXCursor clang_getOverloadedDecl(CXCursor cursor, + unsigned index); + /** * @} */ @@ -1591,6 +1984,29 @@ typedef enum CXChildVisitResult (*CXCursorVisitor)(CXCursor cursor, CINDEX_LINKAGE unsigned clang_visitChildren(CXCursor parent, CXCursorVisitor visitor, CXClientData client_data); +#ifdef __has_feature +# if __has_feature(blocks) +/** + * \brief Visitor invoked for each cursor found by a traversal. + * + * This visitor block will be invoked for each cursor found by + * clang_visitChildrenWithBlock(). Its first argument is the cursor being + * visited, its second argument is the parent visitor for that cursor. + * + * The visitor should return one of the \c CXChildVisitResult values + * to direct clang_visitChildrenWithBlock(). + */ +typedef enum CXChildVisitResult + (^CXCursorVisitorBlock)(CXCursor cursor, CXCursor parent); + +/** + * Visits the children of a cursor using the specified block. Behaves + * identically to clang_visitChildren() in all other respects. + */ +unsigned clang_visitChildrenWithBlock(CXCursor parent, + CXCursorVisitorBlock block); +# endif +#endif /** * @} @@ -1664,6 +2080,15 @@ CINDEX_LINKAGE CXString clang_constructUSR_ObjCProperty(const char *property, */ CINDEX_LINKAGE CXString clang_getCursorSpelling(CXCursor); +/** + * \brief Retrieve the display name for the entity referenced by this cursor. + * + * The display name contains extra information that helps identify the cursor, + * such as the parameters of a function or template or the arguments of a + * class template specialization. + */ +CINDEX_LINKAGE CXString clang_getCursorDisplayName(CXCursor); + /** \brief For a cursor that is a reference, retrieve a cursor representing the * entity that it references. * @@ -1712,6 +2137,32 @@ CINDEX_LINKAGE CXCursor clang_getCursorDefinition(CXCursor); */ CINDEX_LINKAGE unsigned clang_isCursorDefinition(CXCursor); +/** + * \brief Retrieve the canonical cursor corresponding to the given cursor. + * + * In the C family of languages, many kinds of entities can be declared several + * times within a single translation unit. For example, a structure type can + * be forward-declared (possibly multiple times) and later defined: + * + * \code + * struct X; + * struct X; + * struct X { + * int member; + * }; + * \endcode + * + * The declarations and the definition of \c X are represented by three + * different cursors, all of which are declarations of the same underlying + * entity. One of these cursor is considered the "canonical" cursor, which + * is effectively the representative for the underlying entity. One can + * determine if two cursors are declarations of the same underlying entity by + * comparing their canonical cursors. + * + * \returns The canonical cursor for the entity referred to by the given cursor. + */ +CINDEX_LINKAGE CXCursor clang_getCanonicalCursor(CXCursor); + /** * @} */ @@ -1939,6 +2390,9 @@ CINDEX_LINKAGE void clang_getDefinitionSpellingAndExtent(CXCursor, unsigned *endLine, unsigned *endColumn); CINDEX_LINKAGE void clang_enableStackTraces(void); +CINDEX_LINKAGE void clang_executeOnThread(void (*fn)(void*), void *user_data, + unsigned stack_size); + /** * @} */ @@ -2243,7 +2697,7 @@ clang_getCompletionAvailability(CXCompletionString completion_string); * \brief Contains the results of code-completion. * * This data structure contains the results of code completion, as - * produced by \c clang_codeComplete. Its contents must be freed by + * produced by \c clang_codeCompleteAt(). Its contents must be freed by * \c clang_disposeCodeCompleteResults. */ typedef struct { @@ -2259,99 +2713,6 @@ typedef struct { unsigned NumResults; } CXCodeCompleteResults; -/** - * \brief Perform code completion at a given location in a source file. - * - * 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 CIdx the \c CXIndex instance that will be used to perform code - * completion. - * - * \param source_filename the name of the source file that should be parsed to - * perform code-completion. This source file must be the same as or include the - * filename described by \p complete_filename, or no code-completion results - * will be produced. NOTE: One can also specify NULL for this argument if the - * source file is included in command_line_args. - * - * \param num_command_line_args the number of command-line arguments stored in - * \p command_line_args. - * - * \param command_line_args the command-line arguments to pass to the Clang - * compiler to build the given source file. This should include all of the - * necessary include paths, language-dialect switches, precompiled header - * includes, etc., but should not include any information specific to - * code completion. - * - * \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 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 complete_filename the name of the source file where code completion - * should be performed. In many cases, this name will be the same as the - * source filename. However, the completion filename may also be a file - * included by the source file, which is required when producing - * code-completion results for a header. - * - * \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 diag_callback callback function that will receive any diagnostics - * emitted while processing this source file. If NULL, diagnostics will be - * suppressed. - * - * \param diag_client_data client data that will be passed to the diagnostic - * callback function. - * - * \returns if successful, a new 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_codeComplete(CXIndex CIdx, - const char *source_filename, - int num_command_line_args, - const char * const *command_line_args, - unsigned num_unsaved_files, - struct CXUnsavedFile *unsaved_files, - const char *complete_filename, - unsigned complete_line, - unsigned complete_column); - /** * \brief Flags that can be passed to \c clang_codeCompleteAt() to * modify its behavior. @@ -2510,12 +2871,6 @@ CXDiagnostic clang_codeCompleteGetDiagnostic(CXCodeCompleteResults *Results, */ CINDEX_LINKAGE CXString clang_getClangVersion(); -/** - * \brief Return a version string, suitable for showing to a user, but not - * intended to be parsed (the format is not guaranteed to be stable). - */ - - /** * \brief Visitor invoked for each file in a translation unit * (used with clang_getInclusions()). diff --git a/include/clang/AST/ASTConsumer.h b/include/clang/AST/ASTConsumer.h index 84833c099f976..08ee4ef40de06 100644 --- a/include/clang/AST/ASTConsumer.h +++ b/include/clang/AST/ASTConsumer.h @@ -19,6 +19,7 @@ namespace clang { class CXXRecordDecl; class DeclGroupRef; class HandleTagDeclDefinition; + class ASTMutationListener; class ASTDeserializationListener; // layering violation because void* is ugly class SemaConsumer; // layering violation required for safe SemaConsumer class TagDecl; @@ -86,10 +87,13 @@ public: /// it was actually used. virtual void HandleVTable(CXXRecordDecl *RD, bool DefinitionRequired) {} + /// \brief If the consumer is interested in entities getting modified after + /// their initial creation, it should return a pointer to + /// a GetASTMutationListener here. + virtual ASTMutationListener *GetASTMutationListener() { return 0; } + /// \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. diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index ae4ee946fe27c..0e887133d01eb 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -45,6 +45,7 @@ namespace clang { class Diagnostic; class Expr; class ExternalASTSource; + class ASTMutationListener; class IdentifierTable; class SelectorTable; class SourceManager; @@ -56,6 +57,7 @@ namespace clang { class CXXRecordDecl; class Decl; class FieldDecl; + class MangleContext; class ObjCIvarDecl; class ObjCIvarRefExpr; class ObjCPropertyDecl; @@ -78,49 +80,61 @@ namespace clang { class ASTContext { ASTContext &this_() { return *this; } - std::vector Types; - llvm::FoldingSet ExtQualNodes; - llvm::FoldingSet ComplexTypes; - llvm::FoldingSet PointerTypes; - llvm::FoldingSet BlockPointerTypes; - llvm::FoldingSet LValueReferenceTypes; - llvm::FoldingSet RValueReferenceTypes; - llvm::FoldingSet MemberPointerTypes; - llvm::FoldingSet ConstantArrayTypes; - llvm::FoldingSet IncompleteArrayTypes; - std::vector VariableArrayTypes; - llvm::FoldingSet DependentSizedArrayTypes; - llvm::FoldingSet DependentSizedExtVectorTypes; - llvm::FoldingSet VectorTypes; - llvm::FoldingSet FunctionNoProtoTypes; - llvm::FoldingSet FunctionProtoTypes; - llvm::FoldingSet DependentTypeOfExprTypes; - llvm::FoldingSet DependentDecltypeTypes; - llvm::FoldingSet TemplateTypeParmTypes; - llvm::FoldingSet SubstTemplateTypeParmTypes; - llvm::ContextualFoldingSet + mutable std::vector Types; + mutable llvm::FoldingSet ExtQualNodes; + mutable llvm::FoldingSet ComplexTypes; + mutable llvm::FoldingSet PointerTypes; + mutable llvm::FoldingSet BlockPointerTypes; + mutable llvm::FoldingSet LValueReferenceTypes; + mutable llvm::FoldingSet RValueReferenceTypes; + mutable llvm::FoldingSet MemberPointerTypes; + mutable llvm::FoldingSet ConstantArrayTypes; + mutable llvm::FoldingSet IncompleteArrayTypes; + mutable std::vector VariableArrayTypes; + mutable llvm::FoldingSet DependentSizedArrayTypes; + mutable llvm::FoldingSet + DependentSizedExtVectorTypes; + mutable llvm::FoldingSet VectorTypes; + mutable llvm::FoldingSet FunctionNoProtoTypes; + mutable llvm::FoldingSet FunctionProtoTypes; + mutable llvm::FoldingSet DependentTypeOfExprTypes; + mutable llvm::FoldingSet DependentDecltypeTypes; + mutable llvm::FoldingSet TemplateTypeParmTypes; + mutable llvm::FoldingSet + SubstTemplateTypeParmTypes; + mutable llvm::FoldingSet + SubstTemplateTypeParmPackTypes; + mutable llvm::ContextualFoldingSet TemplateSpecializationTypes; - llvm::FoldingSet ElaboratedTypes; - llvm::FoldingSet DependentNameTypes; - llvm::ContextualFoldingSet + mutable llvm::FoldingSet ParenTypes; + mutable llvm::FoldingSet ElaboratedTypes; + mutable llvm::FoldingSet DependentNameTypes; + mutable llvm::ContextualFoldingSet DependentTemplateSpecializationTypes; - llvm::FoldingSet ObjCObjectTypes; - llvm::FoldingSet ObjCObjectPointerTypes; - - llvm::FoldingSet QualifiedTemplateNames; - llvm::FoldingSet DependentTemplateNames; - + llvm::FoldingSet PackExpansionTypes; + mutable llvm::FoldingSet ObjCObjectTypes; + mutable llvm::FoldingSet ObjCObjectPointerTypes; + llvm::FoldingSet AttributedTypes; + + mutable llvm::FoldingSet QualifiedTemplateNames; + mutable llvm::FoldingSet DependentTemplateNames; + mutable llvm::FoldingSet + SubstTemplateTemplateParmPacks; + /// \brief The set of nested name specifiers. /// /// This set is managed by the NestedNameSpecifier class. - llvm::FoldingSet NestedNameSpecifiers; - NestedNameSpecifier *GlobalNestedNameSpecifier; + mutable llvm::FoldingSet NestedNameSpecifiers; + mutable NestedNameSpecifier *GlobalNestedNameSpecifier; friend class NestedNameSpecifier; /// ASTRecordLayouts - A cache mapping from RecordDecls to ASTRecordLayouts. /// This is lazily created. This is intentionally not serialized. - llvm::DenseMap ASTRecordLayouts; - llvm::DenseMap ObjCLayouts; + mutable llvm::DenseMap + ASTRecordLayouts; + mutable llvm::DenseMap + ObjCLayouts; /// KeyFunctions - A cache mapping from CXXRecordDecls to key functions. llvm::DenseMap KeyFunctions; @@ -128,6 +142,9 @@ class ASTContext { /// \brief Mapping from ObjCContainers to their ObjCImplementations. llvm::DenseMap ObjCImpls; + /// \brief Mapping from __block VarDecls to their copy initialization expr. + llvm::DenseMap BlockVarCopyInits; + /// \brief Representation of a "canonical" template template parameter that /// is used in canonical template names. class CanonicalTemplateTemplateParm : public llvm::FoldingSetNode { @@ -144,10 +161,11 @@ class ASTContext { static void Profile(llvm::FoldingSetNodeID &ID, TemplateTemplateParmDecl *Parm); }; - llvm::FoldingSet CanonTemplateTemplateParms; + mutable llvm::FoldingSet + CanonTemplateTemplateParms; - TemplateTemplateParmDecl *getCanonicalTemplateTemplateParmDecl( - TemplateTemplateParmDecl *TTP); + TemplateTemplateParmDecl * + getCanonicalTemplateTemplateParmDecl(TemplateTemplateParmDecl *TTP) const; /// \brief Whether __[u]int128_t identifier is installed. bool IsInt128Installed; @@ -171,11 +189,11 @@ class ASTContext { QualType ObjCClassTypedefType; QualType ObjCConstantStringType; - RecordDecl *CFConstantStringTypeDecl; + mutable RecordDecl *CFConstantStringTypeDecl; - RecordDecl *NSConstantStringTypeDecl; + mutable RecordDecl *NSConstantStringTypeDecl; - RecordDecl *ObjCFastEnumerationStateTypeDecl; + mutable RecordDecl *ObjCFastEnumerationStateTypeDecl; /// \brief The type for the C FILE type. TypeDecl *FILEDecl; @@ -187,10 +205,13 @@ class ASTContext { TypeDecl *sigjmp_bufDecl; /// \brief Type for the Block descriptor for Blocks CodeGen. - RecordDecl *BlockDescriptorType; + mutable RecordDecl *BlockDescriptorType; /// \brief Type for the Block descriptor for Blocks CodeGen. - RecordDecl *BlockDescriptorExtendedType; + mutable RecordDecl *BlockDescriptorExtendedType; + + /// \brief Declaration for the CUDA cudaConfigureCall function. + FunctionDecl *cudaConfigureCallDecl; TypeSourceInfo NullTypeSourceInfo; @@ -279,7 +300,7 @@ class ASTContext { /// /// 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; + mutable llvm::BumpPtrAllocator BumpAlloc; /// \brief Allocator for partial diagnostics. PartialDiagnostic::StorageAllocator DiagAllocator; @@ -287,14 +308,17 @@ class ASTContext { /// \brief The current C++ ABI. llvm::OwningPtr ABI; CXXABI *createCXXABI(const TargetInfo &T); - + + friend class ASTDeclReader; + public: const TargetInfo &Target; IdentifierTable &Idents; SelectorTable &Selectors; Builtin::Context &BuiltinInfo; - DeclarationNameTable DeclarationNames; + mutable DeclarationNameTable DeclarationNames; llvm::OwningPtr ExternalSource; + ASTMutationListener *Listener; clang::PrintingPolicy PrintingPolicy; // Typedefs which may be provided defining the structure of Objective-C @@ -305,10 +329,10 @@ public: SourceManager& getSourceManager() { return SourceMgr; } const SourceManager& getSourceManager() const { return SourceMgr; } - void *Allocate(unsigned Size, unsigned Align = 8) { + void *Allocate(unsigned Size, unsigned Align = 8) const { return BumpAlloc.Allocate(Size, Align); } - void Deallocate(void *Ptr) { } + void Deallocate(void *Ptr) const { } PartialDiagnostic::StorageAllocator &getDiagAllocator() { return DiagAllocator; @@ -316,6 +340,8 @@ public: const LangOptions& getLangOptions() const { return LangOpts; } + Diagnostic &getDiagnostics() const; + FullSourceLoc getFullLoc(SourceLocation Loc) const { return FullSourceLoc(Loc,SourceMgr); } @@ -388,7 +414,6 @@ public: CanQualType VoidPtrTy, NullPtrTy; CanQualType OverloadTy; CanQualType DependentTy; - CanQualType UndeducedAutoTy; CanQualType ObjCBuiltinIdTy, ObjCBuiltinClassTy, ObjCBuiltinSelTy; ASTContext(const LangOptions& LOpts, SourceManager &SM, const TargetInfo &t, @@ -409,6 +434,19 @@ public: /// with this AST context, if any. ExternalASTSource *getExternalSource() const { return ExternalSource.get(); } + /// \brief Attach an AST mutation listener to the AST context. + /// + /// The AST mutation listener provides the ability to track modifications to + /// the abstract syntax tree entities committed after they were initially + /// created. + void setASTMutationListener(ASTMutationListener *Listener) { + this->Listener = Listener; + } + + /// \brief Retrieve a pointer to the AST mutation listener associated + /// with this AST context, if any. + ASTMutationListener *getASTMutationListener() const { return Listener; } + void PrintStats() const; const std::vector& getTypes() const { return Types; } @@ -418,9 +456,9 @@ public: private: /// getExtQualType - Return a type with extended qualifiers. - QualType getExtQualType(const Type *Base, Qualifiers Quals); + QualType getExtQualType(const Type *Base, Qualifiers Quals) const; - QualType getTypeDeclTypeSlow(const TypeDecl *Decl); + QualType getTypeDeclTypeSlow(const TypeDecl *Decl) const; public: /// getAddSpaceQualType - Return the uniqued reference to the type for an @@ -428,24 +466,26 @@ public: /// The resulting type has a union of the qualifiers from T and the address /// space. If T already has an address space specifier, it is silently /// replaced. - QualType getAddrSpaceQualType(QualType T, unsigned AddressSpace); + QualType getAddrSpaceQualType(QualType T, unsigned AddressSpace) const; /// getObjCGCQualType - Returns the uniqued reference to the type for an /// objc gc qualified type. The retulting type has a union of the qualifiers /// from T and the gc attribute. - QualType getObjCGCQualType(QualType T, Qualifiers::GC gcAttr); + QualType getObjCGCQualType(QualType T, Qualifiers::GC gcAttr) const; /// getRestrictType - Returns the uniqued reference to the type for a /// 'restrict' qualified type. The resulting type has a union of the /// qualifiers from T and 'restrict'. - QualType getRestrictType(QualType T) { + QualType getRestrictType(QualType T) const { return T.withFastQualifiers(Qualifiers::Restrict); } /// getVolatileType - Returns the uniqued reference to the type for a /// 'volatile' qualified type. The resulting type has a union of the /// qualifiers from T and 'volatile'. - QualType getVolatileType(QualType T); + QualType getVolatileType(QualType T) const { + return T.withFastQualifiers(Qualifiers::Volatile); + } /// getConstType - Returns the uniqued reference to the type for a /// 'const' qualified type. The resulting type has a union of the @@ -453,44 +493,33 @@ public: /// /// It can be reasonably expected that this will always be /// equivalent to calling T.withConst(). - QualType getConstType(QualType T) { return T.withConst(); } - - /// getNoReturnType - Add or remove the noreturn attribute to the given type - /// which must be a FunctionType or a pointer to an allowable type or a - /// BlockPointer. - QualType getNoReturnType(QualType T, bool AddNoReturn = true); - - /// getCallConvType - Adds the specified calling convention attribute to - /// the given type, which must be a FunctionType or a pointer to an - /// allowable type. - QualType getCallConvType(QualType T, CallingConv CallConv); + QualType getConstType(QualType T) const { return T.withConst(); } - /// getRegParmType - Sets the specified regparm attribute to - /// the given type, which must be a FunctionType or a pointer to an - /// allowable type. - QualType getRegParmType(QualType T, unsigned RegParm); + /// adjustFunctionType - Change the ExtInfo on a function type. + const FunctionType *adjustFunctionType(const FunctionType *Fn, + FunctionType::ExtInfo EInfo); /// getComplexType - Return the uniqued reference to the type for a complex /// number with the specified element type. - QualType getComplexType(QualType T); - CanQualType getComplexType(CanQualType T) { + QualType getComplexType(QualType T) const; + CanQualType getComplexType(CanQualType T) const { return CanQualType::CreateUnsafe(getComplexType((QualType) T)); } /// getPointerType - Return the uniqued reference to the type for a pointer to /// the specified type. - QualType getPointerType(QualType T); - CanQualType getPointerType(CanQualType T) { + QualType getPointerType(QualType T) const; + CanQualType getPointerType(CanQualType T) const { return CanQualType::CreateUnsafe(getPointerType((QualType) T)); } /// getBlockPointerType - Return the uniqued reference to the type for a block /// of the specified type. - QualType getBlockPointerType(QualType T); + QualType getBlockPointerType(QualType T) const; /// This gets the struct used to keep track of the descriptor for pointer to /// blocks. - QualType getBlockDescriptorType(); + QualType getBlockDescriptorType() const; // Set the type for a Block descriptor type. void setBlockDescriptorType(QualType T); @@ -503,48 +532,56 @@ public: /// This gets the struct used to keep track of the extended descriptor for /// pointer to blocks. - QualType getBlockDescriptorExtendedType(); + QualType getBlockDescriptorExtendedType() const; // Set the type for a Block descriptor extended type. void setBlockDescriptorExtendedType(QualType T); /// Get the BlockDescriptorExtendedType type, or NULL if it hasn't yet been /// built. - QualType getRawBlockdescriptorExtendedType() { + QualType getRawBlockdescriptorExtendedType() const { if (BlockDescriptorExtendedType) return getTagDeclType(BlockDescriptorExtendedType); return QualType(); } + void setcudaConfigureCallDecl(FunctionDecl *FD) { + cudaConfigureCallDecl = FD; + } + FunctionDecl *getcudaConfigureCallDecl() { + return cudaConfigureCallDecl; + } + /// This gets the struct used to keep track of pointer to blocks, complete /// with captured variables. QualType getBlockParmType(bool BlockHasCopyDispose, - llvm::SmallVectorImpl &Layout); + llvm::SmallVectorImpl &Layout) const; /// This builds the struct used for __block variables. - QualType BuildByRefType(llvm::StringRef DeclName, QualType Ty); + QualType BuildByRefType(llvm::StringRef DeclName, QualType Ty) const; /// Returns true iff we need copy/dispose helpers for the given type. - bool BlockRequiresCopying(QualType Ty); + bool BlockRequiresCopying(QualType Ty) const; /// getLValueReferenceType - Return the uniqued reference to the type for an /// lvalue reference to the specified type. - QualType getLValueReferenceType(QualType T, bool SpelledAsLValue = true); + QualType getLValueReferenceType(QualType T, bool SpelledAsLValue = true) + const; /// getRValueReferenceType - Return the uniqued reference to the type for an /// rvalue reference to the specified type. - QualType getRValueReferenceType(QualType T); + QualType getRValueReferenceType(QualType T) const; /// getMemberPointerType - Return the uniqued reference to the type for a /// member pointer to the specified type in the specified class. The class /// is a Type because it could be a dependent name. - QualType getMemberPointerType(QualType T, const Type *Cls); + QualType getMemberPointerType(QualType T, const Type *Cls) const; /// getVariableArrayType - Returns a non-unique reference to the type for a /// variable array of the specified element type. QualType getVariableArrayType(QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, - unsigned EltTypeQuals, - SourceRange Brackets); + unsigned IndexTypeQuals, + SourceRange Brackets) const; /// getDependentSizedArrayType - Returns a non-unique reference to /// the type for a dependently-sized array of the specified element @@ -552,30 +589,34 @@ public: /// comparable, at some point. QualType getDependentSizedArrayType(QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, - unsigned EltTypeQuals, - SourceRange Brackets); + unsigned IndexTypeQuals, + SourceRange Brackets) const; /// getIncompleteArrayType - Returns a unique reference to the type for a /// incomplete array of the specified element type. QualType getIncompleteArrayType(QualType EltTy, ArrayType::ArraySizeModifier ASM, - unsigned EltTypeQuals); + unsigned IndexTypeQuals) const; /// getConstantArrayType - Return the unique reference to the type for a /// constant array of the specified element type. QualType getConstantArrayType(QualType EltTy, const llvm::APInt &ArySize, ArrayType::ArraySizeModifier ASM, - unsigned EltTypeQuals); + unsigned IndexTypeQuals) const; + + /// getVariableArrayDecayedType - Returns a vla type where known sizes + /// are replaced with [*]. + QualType getVariableArrayDecayedType(QualType Ty) const; /// getVectorType - Return the unique reference to a vector type of /// the specified element type and size. VectorType must be a built-in type. QualType getVectorType(QualType VectorType, unsigned NumElts, - VectorType::AltiVecSpecific AltiVecSpec); + VectorType::VectorKind VecKind) const; /// getExtVectorType - Return the unique reference to an extended vector type /// of the specified element type and size. VectorType must be a built-in /// type. - QualType getExtVectorType(QualType VectorType, unsigned NumElts); + QualType getExtVectorType(QualType VectorType, unsigned NumElts) const; /// getDependentSizedExtVectorType - Returns a non-unique reference to /// the type for a dependently-sized vector of the specified element @@ -583,30 +624,27 @@ public: /// comparable, at some point. QualType getDependentSizedExtVectorType(QualType VectorType, Expr *SizeExpr, - SourceLocation AttrLoc); + SourceLocation AttrLoc) const; /// getFunctionNoProtoType - Return a K&R style C function type like 'int()'. /// QualType getFunctionNoProtoType(QualType ResultTy, - const FunctionType::ExtInfo &Info); + const FunctionType::ExtInfo &Info) const; - QualType getFunctionNoProtoType(QualType ResultTy) { + QualType getFunctionNoProtoType(QualType ResultTy) const { return getFunctionNoProtoType(ResultTy, FunctionType::ExtInfo()); } - /// getFunctionType - Return a normal function type with a typed argument - /// list. isVariadic indicates whether the argument list includes '...'. - QualType getFunctionType(QualType ResultTy, const QualType *ArgArray, - unsigned NumArgs, bool isVariadic, - unsigned TypeQuals, bool hasExceptionSpec, - bool hasAnyExceptionSpec, - unsigned NumExs, const QualType *ExArray, - const FunctionType::ExtInfo &Info); + /// getFunctionType - Return a normal function type with a typed + /// argument list. + QualType getFunctionType(QualType ResultTy, + const QualType *Args, unsigned NumArgs, + const FunctionProtoType::ExtProtoInfo &EPI) const; /// getTypeDeclType - Return the unique reference to the type for /// the specified type declaration. QualType getTypeDeclType(const TypeDecl *Decl, - const TypeDecl *PrevDecl = 0) { + const TypeDecl *PrevDecl = 0) const { assert(Decl && "Passed null for Decl param"); if (Decl->TypeForDecl) return QualType(Decl->TypeForDecl, 0); @@ -621,77 +659,93 @@ public: /// getTypedefType - Return the unique reference to the type for the /// specified typename decl. - QualType getTypedefType(const TypedefDecl *Decl, QualType Canon = QualType()); + QualType getTypedefType(const TypedefDecl *Decl, QualType Canon = QualType()) + const; + + QualType getRecordType(const RecordDecl *Decl) const; - QualType getRecordType(const RecordDecl *Decl); + QualType getEnumType(const EnumDecl *Decl) const; - QualType getEnumType(const EnumDecl *Decl); + QualType getInjectedClassNameType(CXXRecordDecl *Decl, QualType TST) const; - QualType getInjectedClassNameType(CXXRecordDecl *Decl, QualType TST); + QualType getAttributedType(AttributedType::Kind attrKind, + QualType modifiedType, + QualType equivalentType); QualType getSubstTemplateTypeParmType(const TemplateTypeParmType *Replaced, - QualType Replacement); + QualType Replacement) const; + QualType getSubstTemplateTypeParmPackType( + const TemplateTypeParmType *Replaced, + const TemplateArgument &ArgPack); QualType getTemplateTypeParmType(unsigned Depth, unsigned Index, bool ParameterPack, - IdentifierInfo *Name = 0); + IdentifierInfo *Name = 0) const; QualType getTemplateSpecializationType(TemplateName T, const TemplateArgument *Args, unsigned NumArgs, - QualType Canon = QualType()); + QualType Canon = QualType()) const; QualType getCanonicalTemplateSpecializationType(TemplateName T, const TemplateArgument *Args, - unsigned NumArgs); + unsigned NumArgs) const; QualType getTemplateSpecializationType(TemplateName T, const TemplateArgumentListInfo &Args, - QualType Canon = QualType()); + QualType Canon = QualType()) const; TypeSourceInfo * getTemplateSpecializationTypeInfo(TemplateName T, SourceLocation TLoc, const TemplateArgumentListInfo &Args, - QualType Canon = QualType()); + QualType Canon = QualType()) const; + + QualType getParenType(QualType NamedType) const; QualType getElaboratedType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, - QualType NamedType); + QualType NamedType) const; QualType getDependentNameType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, - QualType Canon = QualType()); + QualType Canon = QualType()) const; QualType getDependentTemplateSpecializationType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, - const TemplateArgumentListInfo &Args); + const TemplateArgumentListInfo &Args) const; QualType getDependentTemplateSpecializationType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, unsigned NumArgs, - const TemplateArgument *Args); + const TemplateArgument *Args) const; + + QualType getPackExpansionType(QualType Pattern, + llvm::Optional NumExpansions); - QualType getObjCInterfaceType(const ObjCInterfaceDecl *Decl); + QualType getObjCInterfaceType(const ObjCInterfaceDecl *Decl) const; QualType getObjCObjectType(QualType Base, ObjCProtocolDecl * const *Protocols, - unsigned NumProtocols); + unsigned NumProtocols) const; /// getObjCObjectPointerType - Return a ObjCObjectPointerType type /// for the given ObjCObjectType. - QualType getObjCObjectPointerType(QualType OIT); + QualType getObjCObjectPointerType(QualType OIT) const; /// getTypeOfType - GCC extension. - QualType getTypeOfExprType(Expr *e); - QualType getTypeOfType(QualType t); + QualType getTypeOfExprType(Expr *e) const; + QualType getTypeOfType(QualType t) const; /// getDecltypeType - C++0x decltype. - QualType getDecltypeType(Expr *e); + QualType getDecltypeType(Expr *e) const; + + /// getAutoType - C++0x deduced auto type. + QualType getAutoType(QualType DeducedType) const; /// getTagDeclType - Return the unique reference to the type for the /// specified TagDecl (struct/union/class/enum) decl. - QualType getTagDeclType(const TagDecl *Decl); + QualType getTagDeclType(const TagDecl *Decl) const; /// getSizeType - Return the unique type for "size_t" (C99 7.17), defined /// in . The sizeof operator requires this (C99 6.5.3.4p4). @@ -716,14 +770,14 @@ public: // getCFConstantStringType - Return the C structure type used to represent // constant CFStrings. - QualType getCFConstantStringType(); + QualType getCFConstantStringType() const; // getNSConstantStringType - Return the C structure type used to represent // constant NSStrings. - QualType getNSConstantStringType(); + QualType getNSConstantStringType() const; /// Get the structure type used to representation NSStrings, or NULL /// if it hasn't yet been built. - QualType getRawNSConstantStringType() { + QualType getRawNSConstantStringType() const { if (NSConstantStringTypeDecl) return getTagDeclType(NSConstantStringTypeDecl); return QualType(); @@ -733,7 +787,7 @@ public: /// Get the structure type used to representation CFStrings, or NULL /// if it hasn't yet been built. - QualType getRawCFConstantStringType() { + QualType getRawCFConstantStringType() const { if (CFConstantStringTypeDecl) return getTagDeclType(CFConstantStringTypeDecl); return QualType(); @@ -747,11 +801,11 @@ public: } //// This gets the struct used to keep track of fast enumerations. - QualType getObjCFastEnumerationStateType(); + QualType getObjCFastEnumerationStateType() const; /// Get the ObjCFastEnumerationState type, or NULL if it hasn't yet /// been built. - QualType getRawObjCFastEnumerationStateType() { + QualType getRawObjCFastEnumerationStateType() const { if (ObjCFastEnumerationStateTypeDecl) return getTagDeclType(ObjCFastEnumerationStateTypeDecl); return QualType(); @@ -763,7 +817,7 @@ public: void setFILEDecl(TypeDecl *FILEDecl) { this->FILEDecl = FILEDecl; } /// \brief Retrieve the C FILE type. - QualType getFILEType() { + QualType getFILEType() const { if (FILEDecl) return getTypeDeclType(FILEDecl); return QualType(); @@ -775,7 +829,7 @@ public: } /// \brief Retrieve the C jmp_buf type. - QualType getjmp_bufType() { + QualType getjmp_bufType() const { if (jmp_bufDecl) return getTypeDeclType(jmp_bufDecl); return QualType(); @@ -787,17 +841,22 @@ public: } /// \brief Retrieve the C sigjmp_buf type. - QualType getsigjmp_bufType() { + QualType getsigjmp_bufType() const { if (sigjmp_bufDecl) return getTypeDeclType(sigjmp_bufDecl); return QualType(); } + /// \brief The result type of logical operations, '<', '>', '!=', etc. + QualType getLogicalOperationType() const { + return getLangOptions().CPlusPlus ? BoolTy : IntTy; + } + /// getObjCEncodingForType - Emit the ObjC type encoding for the /// given type into \arg S. If \arg NameFields is specified then /// record field names are also encoded. void getObjCEncodingForType(QualType t, std::string &S, - const FieldDecl *Field=0); + const FieldDecl *Field=0) const; void getLegacyIntegralTypeEncoding(QualType &t) const; @@ -805,13 +864,18 @@ public: void getObjCEncodingForTypeQualifier(Decl::ObjCDeclQualifier QT, std::string &S) const; + /// getObjCEncodingForFunctionDecl - Returns the encoded type for this + //function. This is in the same format as Objective-C method encodings. + void getObjCEncodingForFunctionDecl(const FunctionDecl *Decl, std::string& S); + /// getObjCEncodingForMethodDecl - Return the encoded type for this method /// declaration. - void getObjCEncodingForMethodDecl(const ObjCMethodDecl *Decl, std::string &S); + void getObjCEncodingForMethodDecl(const ObjCMethodDecl *Decl, std::string &S) + const; - /// getObjCEncodingForBlockDecl - Return the encoded type for this block + /// getObjCEncodingForBlock - Return the encoded type for this block /// declaration. - void getObjCEncodingForBlock(const BlockExpr *Expr, std::string& S); + std::string getObjCEncodingForBlock(const BlockExpr *blockExpr) const; /// getObjCEncodingForPropertyDecl - Return the encoded type for /// this method declaration. If non-NULL, Container must be either @@ -819,14 +883,14 @@ public: /// only be NULL when getting encodings for protocol properties. void getObjCEncodingForPropertyDecl(const ObjCPropertyDecl *PD, const Decl *Container, - std::string &S); + std::string &S) const; bool ProtocolCompatibleWithProtocol(ObjCProtocolDecl *lProto, - ObjCProtocolDecl *rProto); + ObjCProtocolDecl *rProto) const; /// getObjCEncodingTypeSize returns size of type for objective-c encoding /// purpose in characters. - CharUnits getObjCEncodingTypeSize(QualType t); + CharUnits getObjCEncodingTypeSize(QualType t) const; /// \brief Whether __[u]int128_t identifier is installed. bool isInt128Installed() const { return IsInt128Installed; } @@ -854,12 +918,12 @@ public: /// getCVRQualifiedType - Returns a type with additional const, /// volatile, or restrict qualifiers. - QualType getCVRQualifiedType(QualType T, unsigned CVR) { + QualType getCVRQualifiedType(QualType T, unsigned CVR) const { return getQualifiedType(T, Qualifiers::fromCVRMask(CVR)); } /// getQualifiedType - Returns a type with additional qualifiers. - QualType getQualifiedType(QualType T, Qualifiers Qs) { + QualType getQualifiedType(QualType T, Qualifiers Qs) const { if (!Qs.hasNonFastQualifiers()) return T.withFastQualifiers(Qs.getFastQualifiers()); QualifierCollector Qc(Qs); @@ -868,35 +932,41 @@ public: } /// getQualifiedType - Returns a type with additional qualifiers. - QualType getQualifiedType(const Type *T, Qualifiers Qs) { + QualType getQualifiedType(const Type *T, Qualifiers Qs) const { if (!Qs.hasNonFastQualifiers()) return QualType(T, Qs.getFastQualifiers()); return getExtQualType(T, Qs); } DeclarationNameInfo getNameForTemplate(TemplateName Name, - SourceLocation NameLoc); + SourceLocation NameLoc) const; TemplateName getOverloadedTemplateName(UnresolvedSetIterator Begin, - UnresolvedSetIterator End); + UnresolvedSetIterator End) const; TemplateName getQualifiedTemplateName(NestedNameSpecifier *NNS, bool TemplateKeyword, - TemplateDecl *Template); + TemplateDecl *Template) const; TemplateName getDependentTemplateName(NestedNameSpecifier *NNS, - const IdentifierInfo *Name); + const IdentifierInfo *Name) const; TemplateName getDependentTemplateName(NestedNameSpecifier *NNS, - OverloadedOperatorKind Operator); - + OverloadedOperatorKind Operator) const; + TemplateName getSubstTemplateTemplateParmPack(TemplateTemplateParmDecl *Param, + const TemplateArgument &ArgPack) const; + enum GetBuiltinTypeError { GE_None, //< No error GE_Missing_stdio, //< Missing a type from GE_Missing_setjmp //< Missing a type from }; - /// GetBuiltinType - Return the type for the specified builtin. - QualType GetBuiltinType(unsigned ID, GetBuiltinTypeError &Error); + /// GetBuiltinType - Return the type for the specified builtin. If + /// IntegerConstantArgs is non-null, it is filled in with a bitmask of + /// arguments to the builtin that are required to be integer constant + /// expressions. + QualType GetBuiltinType(unsigned ID, GetBuiltinTypeError &Error, + unsigned *IntegerConstantArgs = 0) const; private: CanQualType getFromTargetType(unsigned Type) const; @@ -909,11 +979,12 @@ public: /// getObjCGCAttr - Returns one of GCNone, Weak or Strong objc's /// garbage collection attribute. /// - Qualifiers::GC getObjCGCAttrKind(const QualType &Ty) const; + Qualifiers::GC getObjCGCAttrKind(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. + /// areCompatibleVectorTypes - Return true if the given vector types + /// are of the same unqualified type or if they are equivalent to the same + /// GCC vector type, ignoring whether they are target-specific (AltiVec or + /// Neon) types. bool areCompatibleVectorTypes(QualType FirstVec, QualType SecondVec); /// isObjCNSObjectType - Return true if this is an NSObject object with @@ -930,76 +1001,83 @@ public: /// getTypeInfo - Get the size and alignment of the specified complete type in /// bits. - std::pair getTypeInfo(const Type *T); - std::pair getTypeInfo(QualType T) { + std::pair getTypeInfo(const Type *T) const; + std::pair getTypeInfo(QualType T) const { return getTypeInfo(T.getTypePtr()); } /// getTypeSize - Return the size of the specified type, in bits. This method /// does not work on incomplete types. - uint64_t getTypeSize(QualType T) { + uint64_t getTypeSize(QualType T) const { return getTypeInfo(T).first; } - uint64_t getTypeSize(const Type *T) { + uint64_t getTypeSize(const Type *T) const { return getTypeInfo(T).first; } /// getCharWidth - Return the size of the character type, in bits - uint64_t getCharWidth() { + uint64_t getCharWidth() const { return getTypeSize(CharTy); } + /// toCharUnitsFromBits - Convert a size in bits to a size in characters. + CharUnits toCharUnitsFromBits(int64_t BitSize) const; + + /// toBits - Convert a size in characters to a size in bits. + int64_t toBits(CharUnits CharSize) const; + /// getTypeSizeInChars - Return the size of the specified type, in characters. /// This method does not work on incomplete types. - CharUnits getTypeSizeInChars(QualType T); - CharUnits getTypeSizeInChars(const Type *T); + CharUnits getTypeSizeInChars(QualType T) const; + CharUnits getTypeSizeInChars(const Type *T) const; /// getTypeAlign - Return the ABI-specified alignment of a type, in bits. /// This method does not work on incomplete types. - unsigned getTypeAlign(QualType T) { + unsigned getTypeAlign(QualType T) const { return getTypeInfo(T).second; } - unsigned getTypeAlign(const Type *T) { + unsigned getTypeAlign(const Type *T) const { return getTypeInfo(T).second; } /// getTypeAlignInChars - Return the ABI-specified alignment of a type, in /// characters. This method does not work on incomplete types. - CharUnits getTypeAlignInChars(QualType T); - CharUnits getTypeAlignInChars(const Type *T); + CharUnits getTypeAlignInChars(QualType T) const; + CharUnits getTypeAlignInChars(const Type *T) const; - std::pair getTypeInfoInChars(const Type *T); - std::pair getTypeInfoInChars(QualType T); + std::pair getTypeInfoInChars(const Type *T) const; + std::pair getTypeInfoInChars(QualType T) const; /// getPreferredTypeAlign - Return the "preferred" alignment of the specified /// type for the current target in bits. This can be different than the ABI /// alignment in cases where it is beneficial for performance to overalign /// a data type. - unsigned getPreferredTypeAlign(const Type *T); + unsigned getPreferredTypeAlign(const Type *T) const; /// getDeclAlign - Return a conservative estimate of the alignment of /// the specified decl. Note that bitfields do not have a valid alignment, so /// this method will assert on them. /// If @p RefAsPointee, references are treated like their underlying type /// (for alignof), else they're treated like pointers (for CodeGen). - CharUnits getDeclAlign(const Decl *D, bool RefAsPointee = false); + CharUnits getDeclAlign(const Decl *D, bool RefAsPointee = false) const; /// getASTRecordLayout - Get or compute information about the layout of the /// specified record (struct/union/class), which indicates its size and field /// position information. - const ASTRecordLayout &getASTRecordLayout(const RecordDecl *D); + const ASTRecordLayout &getASTRecordLayout(const RecordDecl *D) const; /// getASTObjCInterfaceLayout - Get or compute information about the /// layout of the specified Objective-C interface. - const ASTRecordLayout &getASTObjCInterfaceLayout(const ObjCInterfaceDecl *D); + const ASTRecordLayout &getASTObjCInterfaceLayout(const ObjCInterfaceDecl *D) + const; - void DumpRecordLayout(const RecordDecl *RD, llvm::raw_ostream &OS); + void DumpRecordLayout(const RecordDecl *RD, llvm::raw_ostream &OS) const; /// getASTObjCImplementationLayout - Get or compute information about /// the layout of the specified Objective-C implementation. This may /// differ from the interface if synthesized ivars are present. const ASTRecordLayout & - getASTObjCImplementationLayout(const ObjCImplementationDecl *D); + getASTObjCImplementationLayout(const ObjCImplementationDecl *D) const; /// getKeyFunction - Get the key function for the given record decl, or NULL /// if there isn't one. The key function is, according to the Itanium C++ ABI @@ -1009,13 +1087,18 @@ public: /// of class definition. const CXXMethodDecl *getKeyFunction(const CXXRecordDecl *RD); + bool isNearlyEmpty(const CXXRecordDecl *RD) const; + + MangleContext *createMangleContext(); + void ShallowCollectObjCIvars(const ObjCInterfaceDecl *OI, - llvm::SmallVectorImpl &Ivars); + llvm::SmallVectorImpl &Ivars) + const; void DeepCollectObjCIvars(const ObjCInterfaceDecl *OI, bool leafClass, - llvm::SmallVectorImpl &Ivars); + llvm::SmallVectorImpl &Ivars) const; - unsigned CountNonClassIvars(const ObjCInterfaceDecl *OI); + unsigned CountNonClassIvars(const ObjCInterfaceDecl *OI) const; void CollectInheritedProtocols(const Decl *CDecl, llvm::SmallPtrSet &Protocols); @@ -1029,8 +1112,11 @@ public: /// include typedefs, 'typeof' operators, etc. The returned type is guaranteed /// to be free of any of these, allowing two canonical types to be compared /// for exact equality with a simple pointer comparison. - CanQualType getCanonicalType(QualType T); - const Type *getCanonicalType(const Type *T) { + CanQualType getCanonicalType(QualType T) const { + return CanQualType::CreateUnsafe(T.getCanonicalType()); + } + + const Type *getCanonicalType(const Type *T) const { return T->getCanonicalTypeInternal().getTypePtr(); } @@ -1038,7 +1124,7 @@ public: /// corresponding to the specific potentially non-canonical one. /// Qualifiers are stripped off, functions are turned into function /// pointers, and arrays decay one level into pointers. - CanQualType getCanonicalParamType(QualType T); + CanQualType getCanonicalParamType(QualType T) const; /// \brief Determine whether the given types are equivalent. bool hasSameType(QualType T1, QualType T2) { @@ -1062,13 +1148,8 @@ public: /// \brief Determine whether the given types are equivalent after /// cvr-qualifiers have been removed. bool hasSameUnqualifiedType(QualType T1, QualType T2) { - CanQualType CT1 = getCanonicalType(T1); - CanQualType CT2 = getCanonicalType(T2); - - Qualifiers Quals; - QualType UnqualT1 = getUnqualifiedArrayType(CT1, Quals); - QualType UnqualT2 = getUnqualifiedArrayType(CT2, Quals); - return UnqualT1 == UnqualT2; + return getCanonicalType(T1).getTypePtr() == + getCanonicalType(T2).getTypePtr(); } bool UnwrapSimilarPointerTypes(QualType &T1, QualType &T2); @@ -1097,11 +1178,15 @@ public: /// by declarations in the type system and the canonical type for /// the template type parameter 'T' is template-param-0-0. NestedNameSpecifier * - getCanonicalNestedNameSpecifier(NestedNameSpecifier *NNS); + getCanonicalNestedNameSpecifier(NestedNameSpecifier *NNS) const; + + /// \brief Retrieves the default calling convention to use for + /// C++ instance methods. + CallingConv getDefaultMethodCallConv(); /// \brief Retrieves the canonical representation of the given /// calling convention. - CallingConv getCanonicalCallConv(CallingConv CC) { + CallingConv getCanonicalCallConv(CallingConv CC) const { if (CC == CC_C) return CC_Default; return CC; @@ -1131,7 +1216,7 @@ public: /// template name uses the shortest form of the dependent /// nested-name-specifier, which itself contains all canonical /// types, values, and templates. - TemplateName getCanonicalTemplateName(TemplateName Name); + TemplateName getCanonicalTemplateName(TemplateName Name) const; /// \brief Determine whether the given template names refer to the same /// template. @@ -1142,33 +1227,35 @@ public: /// The canonical template argument is the simplest template argument /// (which may be a type, value, expression, or declaration) that /// expresses the value of the argument. - TemplateArgument getCanonicalTemplateArgument(const TemplateArgument &Arg); + TemplateArgument getCanonicalTemplateArgument(const TemplateArgument &Arg) + const; /// Type Query functions. If the type is an instance of the specified class, /// return the Type pointer for the underlying maximally pretty type. This /// is a member of ASTContext because this may need to do some amount of /// canonicalization, e.g. to move type qualifiers into the element type. - const ArrayType *getAsArrayType(QualType T); - const ConstantArrayType *getAsConstantArrayType(QualType T) { + const ArrayType *getAsArrayType(QualType T) const; + const ConstantArrayType *getAsConstantArrayType(QualType T) const { return dyn_cast_or_null(getAsArrayType(T)); } - const VariableArrayType *getAsVariableArrayType(QualType T) { + const VariableArrayType *getAsVariableArrayType(QualType T) const { return dyn_cast_or_null(getAsArrayType(T)); } - const IncompleteArrayType *getAsIncompleteArrayType(QualType T) { + const IncompleteArrayType *getAsIncompleteArrayType(QualType T) const { return dyn_cast_or_null(getAsArrayType(T)); } - const DependentSizedArrayType *getAsDependentSizedArrayType(QualType T) { + const DependentSizedArrayType *getAsDependentSizedArrayType(QualType T) + const { return dyn_cast_or_null(getAsArrayType(T)); } /// getBaseElementType - Returns the innermost element type of an array type. /// For example, will return "int" for int[m][n] - QualType getBaseElementType(const ArrayType *VAT); + QualType getBaseElementType(const ArrayType *VAT) const; /// getBaseElementType - Returns the innermost element type of a type /// (which needn't actually be an array type). - QualType getBaseElementType(QualType QT); + QualType getBaseElementType(QualType QT) const; /// getConstantArrayElementCount - Returns number of constant array elements. uint64_t getConstantArrayElementCount(const ConstantArrayType *CA) const; @@ -1179,30 +1266,30 @@ public: /// this returns a pointer to a properly qualified element of the array. /// /// See C99 6.7.5.3p7 and C99 6.3.2.1p3. - QualType getArrayDecayedType(QualType T); + QualType getArrayDecayedType(QualType T) const; /// getPromotedIntegerType - Returns the type that Promotable will /// promote to: C99 6.3.1.1p2, assuming that Promotable is a promotable /// integer type. - QualType getPromotedIntegerType(QualType PromotableType); + QualType getPromotedIntegerType(QualType PromotableType) const; /// \brief Whether this is a promotable bitfield reference according /// to C99 6.3.1.1p2, bullet 2 (and GCC extensions). /// /// \returns the type this bit-field will promote to, or NULL if no /// promotion occurs. - QualType isPromotableBitField(Expr *E); + QualType isPromotableBitField(Expr *E) const; /// getIntegerTypeOrder - Returns the highest ranked integer type: /// C99 6.3.1.8p1. If LHS > RHS, return 1. If LHS == RHS, return 0. If /// LHS < RHS, return -1. - int getIntegerTypeOrder(QualType LHS, QualType RHS); + int getIntegerTypeOrder(QualType LHS, QualType RHS) const; /// getFloatingTypeOrder - Compare the rank of the two specified floating /// point types, ignoring the domain of the type (i.e. 'double' == /// '_Complex double'). If LHS > RHS, return 1. If LHS == RHS, return 0. If /// LHS < RHS, return -1. - int getFloatingTypeOrder(QualType LHS, QualType RHS); + int getFloatingTypeOrder(QualType LHS, QualType RHS) const; /// getFloatingTypeOfSizeWithinDomain - Returns a real floating /// point or a complex type (based on typeDomain/typeSize). @@ -1213,7 +1300,7 @@ public: private: // Helper for integer ordering - unsigned getIntegerRank(Type* T); + unsigned getIntegerRank(const Type *T) const; public: @@ -1260,14 +1347,15 @@ public: bool Unqualified = false); QualType mergeFunctionTypes(QualType, QualType, bool OfBlockPointer=false, bool Unqualified = false); + QualType mergeFunctionArgumentTypes(QualType, QualType, + bool OfBlockPointer=false, + bool Unqualified = false); + QualType mergeTransparentUnionType(QualType, QualType, + bool OfBlockPointer=false, + bool Unqualified = false); QualType mergeObjCGCQualifiers(QualType, QualType); - /// UsualArithmeticConversionsType - handles the various conversions - /// 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; } @@ -1278,7 +1366,7 @@ public: // The width of an integer, as defined in C99 6.2.6.2. This is the number // of bits in an integer type excluding any padding bits. - unsigned getIntWidth(QualType T); + unsigned getIntWidth(QualType T) const; // Per C99 6.2.5p6, for every signed integer type, there is a corresponding // unsigned integer type. This method takes a signed type, and returns the @@ -1303,7 +1391,7 @@ public: /// MakeIntValue - Make an APSInt of the appropriate width and /// signedness for the given \arg Value and integer \arg Type. - llvm::APSInt MakeIntValue(uint64_t Value, QualType Type) { + llvm::APSInt MakeIntValue(uint64_t Value, QualType Type) const { llvm::APSInt Res(getIntWidth(Type), !Type->isSignedIntegerType()); Res = Value; return Res; @@ -1314,12 +1402,23 @@ public: /// \brief Get the implementation of ObjCCategoryDecl, or NULL if none exists. ObjCCategoryImplDecl *getObjCImplementation(ObjCCategoryDecl *D); + /// \brief returns true if there is at lease one @implementation in TU. + bool AnyObjCImplementation() { + return !ObjCImpls.empty(); + } + /// \brief Set the implementation of ObjCInterfaceDecl. void setObjCImplementation(ObjCInterfaceDecl *IFaceD, ObjCImplementationDecl *ImplD); /// \brief Set the implementation of ObjCCategoryDecl. void setObjCImplementation(ObjCCategoryDecl *CatD, ObjCCategoryImplDecl *ImplD); + + /// \brief Set the copy inialization expression of a block var decl. + void setBlockVarCopyInits(VarDecl*VD, Expr* Init); + /// \brief Get the copy initialization expression of VarDecl,or NULL if + /// none exists. + Expr *getBlockVarCopyInits(const VarDecl*VD); /// \brief Allocate an uninitialized TypeSourceInfo. /// @@ -1332,13 +1431,14 @@ public: /// /// \param Size the size of the type info to create, or 0 if the size /// should be calculated based on the type. - TypeSourceInfo *CreateTypeSourceInfo(QualType T, unsigned Size = 0); + TypeSourceInfo *CreateTypeSourceInfo(QualType T, unsigned Size = 0) const; /// \brief Allocate a TypeSourceInfo where all locations have been /// initialized to a given location, which defaults to the empty /// location. TypeSourceInfo * - getTrivialTypeSourceInfo(QualType T, SourceLocation Loc = SourceLocation()); + getTrivialTypeSourceInfo(QualType T, + SourceLocation Loc = SourceLocation()) const; TypeSourceInfo *getNullTypeSourceInfo() { return &NullTypeSourceInfo; } @@ -1407,10 +1507,11 @@ private: bool ExpandStructures, const FieldDecl *Field, bool OutermostType = false, - bool EncodingProperty = false); + bool EncodingProperty = false) const; - const ASTRecordLayout &getObjCLayout(const ObjCInterfaceDecl *D, - const ObjCImplementationDecl *Impl); + const ASTRecordLayout & + getObjCLayout(const ObjCInterfaceDecl *D, + const ObjCImplementationDecl *Impl) const; private: /// \brief A set of deallocations that should be performed when the @@ -1423,8 +1524,8 @@ private: llvm::PointerIntPair LastSDM; /// \brief A counter used to uniquely identify "blocks". - unsigned int UniqueBlockByRefTypeID; - unsigned int UniqueBlockParmTypeID; + mutable unsigned int UniqueBlockByRefTypeID; + mutable unsigned int UniqueBlockParmTypeID; friend class DeclContext; friend class DeclarationNameTable; @@ -1469,7 +1570,7 @@ static inline Selector GetUnarySelector(const char* name, ASTContext& Ctx) { /// @param Alignment The alignment of the allocated memory (if the underlying /// allocator supports it). /// @return The allocated memory. Could be NULL. -inline void *operator new(size_t Bytes, clang::ASTContext &C, +inline void *operator new(size_t Bytes, const clang::ASTContext &C, size_t Alignment) throw () { return C.Allocate(Bytes, Alignment); } @@ -1479,7 +1580,7 @@ inline void *operator new(size_t Bytes, clang::ASTContext &C, /// invoking it directly; see the new operator for more details. This operator /// is called implicitly by the compiler if a placement new expression using /// the ASTContext throws in the object constructor. -inline void operator delete(void *Ptr, clang::ASTContext &C, size_t) +inline void operator delete(void *Ptr, const clang::ASTContext &C, size_t) throw () { C.Deallocate(Ptr); } @@ -1503,7 +1604,7 @@ inline void operator delete(void *Ptr, clang::ASTContext &C, size_t) /// @param Alignment The alignment of the allocated memory (if the underlying /// allocator supports it). /// @return The allocated memory. Could be NULL. -inline void *operator new[](size_t Bytes, clang::ASTContext& C, +inline void *operator new[](size_t Bytes, const clang::ASTContext& C, size_t Alignment = 8) throw () { return C.Allocate(Bytes, Alignment); } @@ -1514,7 +1615,7 @@ inline void *operator new[](size_t Bytes, clang::ASTContext& C, /// invoking it directly; see the new[] operator for more details. This operator /// is called implicitly by the compiler if a placement new[] expression using /// the ASTContext throws in the object constructor. -inline void operator delete[](void *Ptr, clang::ASTContext &C, size_t) +inline void operator delete[](void *Ptr, const clang::ASTContext &C, size_t) throw () { C.Deallocate(Ptr); } diff --git a/include/clang/AST/ASTDiagnostic.h b/include/clang/AST/ASTDiagnostic.h index 7cbf3a5117054..1ab53b3e91488 100644 --- a/include/clang/AST/ASTDiagnostic.h +++ b/include/clang/AST/ASTDiagnostic.h @@ -15,7 +15,7 @@ namespace clang { namespace diag { enum { -#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM, +#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,ACCESS,CATEGORY) ENUM, #define ASTSTART #include "clang/Basic/DiagnosticASTKinds.inc" #undef DIAG diff --git a/include/clang/AST/ASTImporter.h b/include/clang/AST/ASTImporter.h index 9380058118c59..b659ce74bb7cb 100644 --- a/include/clang/AST/ASTImporter.h +++ b/include/clang/AST/ASTImporter.h @@ -45,13 +45,13 @@ namespace clang { /// \brief The file managers we're importing to and from. FileManager &ToFileManager, &FromFileManager; - - /// \brief The diagnostics object that we should use to emit diagnostics. - Diagnostic &Diags; + + /// \brief Whether to perform a minimal import. + bool Minimal; /// \brief Mapping from the already-imported types in the "from" context /// to the corresponding types in the "to" context. - llvm::DenseMap ImportedTypes; + llvm::DenseMap ImportedTypes; /// \brief Mapping from the already-imported declarations in the "from" /// context to the corresponding declarations in the "to" context. @@ -63,7 +63,7 @@ namespace clang { /// \brief Mapping from the already-imported FileIDs in the "from" source /// manager to the corresponding FileIDs in the "to" source manager. - llvm::DenseMap ImportedFileIDs; + llvm::DenseMap ImportedFileIDs; /// \brief Imported, anonymous tag declarations that are missing their /// corresponding typedefs. @@ -74,12 +74,29 @@ namespace clang { NonEquivalentDeclSet NonEquivalentDecls; public: - ASTImporter(Diagnostic &Diags, - ASTContext &ToContext, FileManager &ToFileManager, - ASTContext &FromContext, FileManager &FromFileManager); + /// \brief Create a new AST importer. + /// + /// \param ToContext The context we'll be importing into. + /// + /// \param ToFileManager The file manager we'll be importing into. + /// + /// \param FromContext The context we'll be importing from. + /// + /// \param FromFileManager The file manager we'll be importing into. + /// + /// \param MinimalImport If true, the importer will attempt to import + /// as little as it can, e.g., by importing declarations as forward + /// declarations that can be completed at a later point. + ASTImporter(ASTContext &ToContext, FileManager &ToFileManager, + ASTContext &FromContext, FileManager &FromFileManager, + bool MinimalImport); virtual ~ASTImporter(); + /// \brief Whether the importer will perform a minimal import, creating + /// to-be-completed forward declarations when possible. + bool isMinimalImport() const { return Minimal; } + /// \brief Import the given type from the "from" context into the "to" /// context. /// @@ -129,6 +146,10 @@ namespace clang { /// context, or NULL if an error occurred. NestedNameSpecifier *Import(NestedNameSpecifier *FromNNS); + /// \brief Import the goven template name from the "from" context into the + /// "to" context. + TemplateName Import(TemplateName From); + /// \brief Import the given source location from the "from" context into /// the "to" context. /// @@ -154,7 +175,7 @@ namespace clang { /// into the "to" context. /// /// \returns the equivalent identifier in the "to" context. - IdentifierInfo *Import(IdentifierInfo *FromId); + IdentifierInfo *Import(const IdentifierInfo *FromId); /// \brief Import the given Objective-C selector from the "from" /// context into the "to" context. @@ -169,6 +190,12 @@ namespace clang { /// context. FileID Import(FileID); + /// \brief Import the definition of the given declaration, including all of + /// the declarations it contains. + /// + /// This routine is intended to be used + void ImportDefinition(Decl *From); + /// \brief Cope with a name conflict when importing a declaration into the /// given context. /// @@ -212,9 +239,6 @@ namespace clang { /// \brief Retrieve the file manager that AST nodes are being imported from. FileManager &getFromFileManager() const { return FromFileManager; } - - /// \brief Retrieve the diagnostic formatter. - Diagnostic &getDiags() const { return Diags; } /// \brief Report a diagnostic in the "to" context. DiagnosticBuilder ToDiag(SourceLocation Loc, unsigned DiagID); @@ -228,12 +252,13 @@ namespace clang { /// \brief Note that we have imported the "from" declaration by mapping it /// to the (potentially-newly-created) "to" declaration. /// - /// \returns \p To - Decl *Imported(Decl *From, Decl *To); + /// Subclasses can override this function to observe all of the \c From -> + /// \c To declaration mappings as they are imported. + virtual Decl *Imported(Decl *From, Decl *To); /// \brief Determine whether the given types are structurally /// equivalent. - bool IsStructurallyEquivalent(QualType From, QualType To); + bool IsStructurallyEquivalent(QualType From, QualType To); }; } diff --git a/include/clang/AST/ASTMutationListener.h b/include/clang/AST/ASTMutationListener.h new file mode 100644 index 0000000000000..01e6180249137 --- /dev/null +++ b/include/clang/AST/ASTMutationListener.h @@ -0,0 +1,48 @@ +//===--- ASTMutationListener.h - AST Mutation Interface --------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the ASTMutationListener interface. +// +//===----------------------------------------------------------------------===// +#ifndef LLVM_CLANG_AST_ASTMUTATIONLISTENER_H +#define LLVM_CLANG_AST_ASTMUTATIONLISTENER_H + +namespace clang { + class Decl; + class DeclContext; + class TagDecl; + class CXXRecordDecl; + class ClassTemplateDecl; + class ClassTemplateSpecializationDecl; + +/// \brief An abstract interface that should be implemented by listeners +/// that want to be notified when an AST entity gets modified after its +/// initial creation. +class ASTMutationListener { +public: + virtual ~ASTMutationListener(); + + /// \brief A new TagDecl definition was completed. + virtual void CompletedTagDefinition(const TagDecl *D) { } + + /// \brief A new declaration with name has been added to a DeclContext. + virtual void AddedVisibleDecl(const DeclContext *DC, const Decl *D) {} + + /// \brief An implicit member was added after the definition was completed. + virtual void AddedCXXImplicitMember(const CXXRecordDecl *RD, const Decl *D) {} + + /// \brief A template specialization (or partial one) was added to the + /// template declaration. + virtual void AddedCXXTemplateSpecialization(const ClassTemplateDecl *TD, + const ClassTemplateSpecializationDecl *D) {} +}; + +} // end namespace clang + +#endif diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h index 62ca49fbf3b13..67968fde2d6bd 100644 --- a/include/clang/AST/Attr.h +++ b/include/clang/AST/Attr.h @@ -36,19 +36,19 @@ namespace clang { } // Defined in ASTContext.h -void *operator new(size_t Bytes, clang::ASTContext &C, +void *operator new(size_t Bytes, const 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, +void *operator new[](size_t Bytes, const 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) +void operator delete(void *Ptr, const clang::ASTContext &C, size_t) throw (); -void operator delete[](void *Ptr, clang::ASTContext &C, size_t) +void operator delete[](void *Ptr, const clang::ASTContext &C, size_t) throw (); namespace clang { @@ -58,9 +58,10 @@ class Attr { private: SourceLocation Loc; unsigned AttrKind : 16; - bool Inherited : 1; protected: + bool Inherited : 1; + virtual ~Attr(); void* operator new(size_t bytes) throw() { @@ -88,10 +89,6 @@ protected: public: - /// \brief Whether this attribute should be merged to new - /// declarations. - virtual bool isMerged() const { return true; } - attr::Kind getKind() const { return static_cast(AttrKind); } @@ -100,7 +97,6 @@ public: void setLocation(SourceLocation L) { Loc = L; } bool isInherited() const { return Inherited; } - void setInherited(bool I) { Inherited = I; } // Clone this attribute. virtual Attr* clone(ASTContext &C) const = 0; @@ -109,6 +105,21 @@ public: static bool classof(const Attr *) { return true; } }; +class InheritableAttr : public Attr { +protected: + InheritableAttr(attr::Kind AK, SourceLocation L) + : Attr(AK, L) {} + +public: + void setInherited(bool I) { Inherited = I; } + + // Implement isa/cast/dyncast/etc. + static bool classof(const Attr *A) { + return A->getKind() <= attr::LAST_INHERITABLE; + } + static bool classof(const InheritableAttr *) { return true; } +}; + #include "clang/AST/Attrs.inc" /// AttrVec - A vector of Attr, which is how they are stored on the AST. diff --git a/include/clang/AST/CXXInheritance.h b/include/clang/AST/CXXInheritance.h index 5a84e404a1b6b..2d30cb3b8b625 100644 --- a/include/clang/AST/CXXInheritance.h +++ b/include/clang/AST/CXXInheritance.h @@ -20,6 +20,7 @@ #include "clang/AST/Type.h" #include "clang/AST/TypeOrdering.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" #include #include @@ -359,7 +360,11 @@ public: /// subobjects of that type. class CXXFinalOverriderMap : public llvm::DenseMap { }; - + +/// \brief A set of all the primary bases for a class. +class CXXIndirectPrimaryBaseSet + : public llvm::SmallSet { }; + } // end namespace clang #endif diff --git a/include/clang/AST/CanonicalType.h b/include/clang/AST/CanonicalType.h index dad4dfc926e16..4d7fcfd1d121f 100644 --- a/include/clang/AST/CanonicalType.h +++ b/include/clang/AST/CanonicalType.h @@ -66,7 +66,16 @@ public: /// \brief Retrieve the underlying type pointer, which refers to a /// canonical type. - T *getTypePtr() const { return cast_or_null(Stored.getTypePtr()); } + /// + /// The underlying pointer must not be NULL. + const T *getTypePtr() const { return cast(Stored.getTypePtr()); } + + /// \brief Retrieve the underlying type pointer, which refers to a + /// canonical type, or NULL. + /// + const T *getTypePtrOrNull() const { + return cast_or_null(Stored.getTypePtrOrNull()); + } /// \brief Implicit conversion to a qualified type. operator QualType() const { return Stored; } @@ -78,6 +87,8 @@ public: return Stored.isNull(); } + SplitQualType split() const { return Stored.split(); } + /// \brief Retrieve a canonical type pointer with a different static type, /// upcasting or downcasting as needed. /// @@ -216,7 +227,7 @@ protected: public: /// \brief Retrieve the pointer to the underlying Type - T* getTypePtr() const { return Stored.getTypePtr(); } + const T *getTypePtr() const { return Stored.getTypePtr(); } /// \brief Implicit conversion to the underlying pointer. /// @@ -225,7 +236,7 @@ public: /// @code /// if (CanQual Ptr = T->getAs()) { ... } /// @endcode - operator const T*() const { return this->Stored.getTypePtr(); } + operator const T*() const { return this->Stored.getTypePtrOrNull(); } /// \brief Try to convert the given canonical type to a specific structural /// type. @@ -336,7 +347,7 @@ namespace llvm { /// to return smart pointer (proxies?). template struct simplify_type > { - typedef T* SimpleType; + typedef const T *SimpleType; static SimpleType getSimplifiedValue(const ::clang::CanQual &Val) { return Val.getTypePtr(); } @@ -630,7 +641,6 @@ struct CanProxyAdaptor : public CanProxyBase { LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(RecordDecl *, getDecl) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isBeingDefined) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, hasConstFields) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(unsigned, getAddressSpace) }; template<> diff --git a/include/clang/AST/CharUnits.h b/include/clang/AST/CharUnits.h index 0bb4b769d0f35..cf909e88220f8 100644 --- a/include/clang/AST/CharUnits.h +++ b/include/clang/AST/CharUnits.h @@ -14,7 +14,9 @@ #ifndef LLVM_CLANG_AST_CHARUNITS_H #define LLVM_CLANG_AST_CHARUNITS_H -#include "llvm/System/DataTypes.h" +#include "llvm/ADT/DenseMapInfo.h" +#include "llvm/Support/DataTypes.h" +#include "llvm/Support/MathExtras.h" namespace clang { @@ -131,12 +133,24 @@ namespace clang { CharUnits operator- (const CharUnits &Other) const { return CharUnits(Quantity - Other.Quantity); } + CharUnits operator- () const { + return CharUnits(-Quantity); + } + // Conversions. /// getQuantity - Get the raw integer representation of this quantity. QuantityType getQuantity() const { return Quantity; } + /// RoundUpToAlignment - Returns the next integer (mod 2**64) that is + /// greater than or equal to this quantity and is a multiple of \arg + /// Align. Align must be non-zero. + CharUnits RoundUpToAlignment(const CharUnits &Align) { + return CharUnits(llvm::RoundUpToAlignment(Quantity, + Align.Quantity)); + } + }; // class CharUnit } // namespace clang @@ -146,4 +160,38 @@ inline clang::CharUnits operator* (clang::CharUnits::QuantityType Scale, return CU * Scale; } +namespace llvm { + +template<> struct DenseMapInfo { + static clang::CharUnits getEmptyKey() { + clang::CharUnits::QuantityType Quantity = + DenseMapInfo::getEmptyKey(); + + return clang::CharUnits::fromQuantity(Quantity); + } + + static clang::CharUnits getTombstoneKey() { + clang::CharUnits::QuantityType Quantity = + DenseMapInfo::getTombstoneKey(); + + return clang::CharUnits::fromQuantity(Quantity); + } + + static unsigned getHashValue(const clang::CharUnits &CU) { + clang::CharUnits::QuantityType Quantity = CU.getQuantity(); + return DenseMapInfo::getHashValue(Quantity); + } + + static bool isEqual(const clang::CharUnits &LHS, + const clang::CharUnits &RHS) { + return LHS == RHS; + } +}; + +template <> struct isPodLike { + static const bool value = true; +}; + +} // end namespace llvm + #endif // LLVM_CLANG_AST_CHARUNITS_H diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 6749255322109..ee515da0835cd 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -36,6 +36,7 @@ class FunctionTemplateSpecializationInfo; class DependentFunctionTemplateSpecializationInfo; class TypeLoc; class UnresolvedSetImpl; +class LabelStmt; /// \brief A container of type source information. /// @@ -196,9 +197,86 @@ public: /// determine whether it's an instance member of its class. bool isCXXInstanceMember() const; + class LinkageInfo { + Linkage linkage_; + Visibility visibility_; + bool explicit_; + + public: + LinkageInfo() : linkage_(ExternalLinkage), visibility_(DefaultVisibility), + explicit_(false) {} + LinkageInfo(Linkage L, Visibility V, bool E) + : linkage_(L), visibility_(V), explicit_(E) {} + + static LinkageInfo external() { + return LinkageInfo(); + } + static LinkageInfo internal() { + return LinkageInfo(InternalLinkage, DefaultVisibility, false); + } + static LinkageInfo uniqueExternal() { + return LinkageInfo(UniqueExternalLinkage, DefaultVisibility, false); + } + static LinkageInfo none() { + return LinkageInfo(NoLinkage, DefaultVisibility, false); + } + + Linkage linkage() const { return linkage_; } + Visibility visibility() const { return visibility_; } + bool visibilityExplicit() const { return explicit_; } + + void setLinkage(Linkage L) { linkage_ = L; } + void setVisibility(Visibility V) { visibility_ = V; } + void setVisibility(Visibility V, bool E) { visibility_ = V; explicit_ = E; } + void setVisibility(LinkageInfo Other) { + setVisibility(Other.visibility(), Other.visibilityExplicit()); + } + + void mergeLinkage(Linkage L) { + setLinkage(minLinkage(linkage(), L)); + } + void mergeLinkage(LinkageInfo Other) { + setLinkage(minLinkage(linkage(), Other.linkage())); + } + + void mergeVisibility(Visibility V) { + setVisibility(minVisibility(visibility(), V)); + } + void mergeVisibility(Visibility V, bool E) { + setVisibility(minVisibility(visibility(), V), visibilityExplicit() || E); + } + void mergeVisibility(LinkageInfo Other) { + mergeVisibility(Other.visibility(), Other.visibilityExplicit()); + } + + void merge(LinkageInfo Other) { + mergeLinkage(Other); + mergeVisibility(Other); + } + void merge(std::pair LV) { + mergeLinkage(LV.first); + mergeVisibility(LV.second); + } + + friend LinkageInfo merge(LinkageInfo L, LinkageInfo R) { + L.merge(R); + return L; + } + }; + /// \brief Determine what kind of linkage this entity has. Linkage getLinkage() const; + /// \brief Determines the visibility of this entity. + Visibility getVisibility() const { return getLinkageAndVisibility().visibility(); } + + /// \brief Determines the linkage and visibility of this entity. + LinkageInfo getLinkageAndVisibility() const; + + /// \brief Clear the linkage cache in response to a change + /// to the declaration. + void ClearLinkageCache(); + /// \brief Looks through UsingDecls and ObjCCompatibleAliasDecls for /// the underlying named decl. NamedDecl *getUnderlyingDecl(); @@ -217,6 +295,29 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, return OS; } +/// LabelDecl - Represents the declaration of a label. Labels also have a +/// corresponding LabelStmt, which indicates the position that the label was +/// defined at. For normal labels, the location of the decl is the same as the +/// location of the statement. For GNU local labels (__label__), the decl +/// location is where the __label__ is. +class LabelDecl : public NamedDecl { + LabelStmt *TheStmt; + LabelDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *II, LabelStmt *S) + : NamedDecl(Label, DC, L, II), TheStmt(S) {} + +public: + static LabelDecl *Create(ASTContext &C, DeclContext *DC, + SourceLocation L, IdentifierInfo *II); + + LabelStmt *getStmt() const { return TheStmt; } + void setStmt(LabelStmt *T) { TheStmt = T; } + + // Implement isa/cast/dyncast/etc. + static bool classof(const Decl *D) { return classofKind(D->getKind()); } + static bool classof(const LabelDecl *D) { return true; } + static bool classofKind(Kind K) { return K == Label; } +}; + /// NamespaceDecl - Represent a C++ namespace. class NamespaceDecl : public NamedDecl, public DeclContext { bool IsInline : 1; @@ -232,7 +333,7 @@ class NamespaceDecl : public NamedDecl, public DeclContext { // NextNamespace points to the next extended declaration. // OrigNamespace points to the original namespace declaration. // OrigNamespace of the first namespace decl points to its anonymous namespace - NamespaceDecl *NextNamespace; + LazyDeclPtr NextNamespace; /// \brief A pointer to either the original namespace definition for /// this namespace (if the boolean value is false) or the anonymous @@ -250,7 +351,7 @@ class NamespaceDecl : public NamedDecl, public DeclContext { NamespaceDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id) : NamedDecl(Namespace, DC, L, Id), DeclContext(Namespace), - IsInline(false), NextNamespace(0), OrigOrAnonNamespace(0, true) { } + IsInline(false), NextNamespace(), OrigOrAnonNamespace(0, true) { } public: static NamespaceDecl *Create(ASTContext &C, DeclContext *DC, @@ -281,8 +382,10 @@ public: /// \brief Return the next extended namespace declaration or null if there /// is none. - NamespaceDecl *getNextNamespace() { return NextNamespace; } - const NamespaceDecl *getNextNamespace() const { return NextNamespace; } + NamespaceDecl *getNextNamespace(); + const NamespaceDecl *getNextNamespace() const { + return const_cast(this)->getNextNamespace(); + } /// \brief Set the next extended namespace declaration. void setNextNamespace(NamespaceDecl *ND) { NextNamespace = ND; } @@ -331,9 +434,9 @@ public: SourceLocation getLBracLoc() const { return LBracLoc; } SourceLocation getRBracLoc() const { return RBracLoc; } - void setLBracLoc(SourceLocation LBrace) { LBracLoc = LBrace; } - void setRBracLoc(SourceLocation RBrace) { RBracLoc = RBrace; } - + void setLBracLoc(SourceLocation L) { LBracLoc = L; } + void setRBracLoc(SourceLocation R) { RBracLoc = R; } + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const NamespaceDecl *D) { return true; } @@ -471,6 +574,9 @@ public: static bool classofKind(Kind K) { return K >= firstDeclarator && K <= lastDeclarator; } + + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// \brief Structure used to store a statement, the constant value to @@ -545,15 +651,21 @@ private: /// \brief Whether this local variable could be allocated in the return /// slot of its function, enabling the named return value optimization (NRVO). bool NRVOVariable : 1; + + /// \brief Whether this variable has a deduced C++0x auto type for which we're + /// currently parsing the initializer. + bool ParsingAutoInit : 1; friend class StmtIteratorBase; + friend class ASTDeclReader; + protected: VarDecl(Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass SC, StorageClass SCAsWritten) : DeclaratorDecl(DK, DC, L, Id, T, TInfo), Init(), ThreadSpecified(false), HasCXXDirectInit(false), - ExceptionVar(false), NRVOVariable(false) { + ExceptionVar(false), NRVOVariable(false), ParsingAutoInit(false) { SClass = SC; SClassAsWritten = SCAsWritten; } @@ -582,10 +694,7 @@ public: StorageClass getStorageClassAsWritten() const { return (StorageClass) SClassAsWritten; } - void setStorageClass(StorageClass SC) { - assert(isLegalForVariable(SC)); - SClass = SC; - } + void setStorageClass(StorageClass SC); void setStorageClassAsWritten(StorageClass SC) { assert(isLegalForVariable(SC)); SClassAsWritten = SC; @@ -630,13 +739,13 @@ public: /// external, C linkage. bool isExternC() const; - /// isBlockVarDecl - Returns true for local variable declarations. Note that - /// this includes static variables inside of functions. It also includes - /// variables inside blocks. + /// isLocalVarDecl - Returns true for local variable declarations + /// other than parameters. Note that this includes static variables + /// inside of functions. It also includes variables inside blocks. /// /// void foo() { int x; static int y; extern int z; } /// - bool isBlockVarDecl() const { + bool isLocalVarDecl() const { if (getKind() != Decl::Var) return false; if (const DeclContext *DC = getDeclContext()) @@ -644,8 +753,8 @@ public: return false; } - /// isFunctionOrMethodVarDecl - Similar to isBlockVarDecl, but excludes - /// variables declared in blocks. + /// isFunctionOrMethodVarDecl - Similar to isLocalVarDecl, but + /// excludes variables declared in blocks. bool isFunctionOrMethodVarDecl() const { if (getKind() != Decl::Var) return false; @@ -683,6 +792,10 @@ public: /// definition. DefinitionKind isThisDeclarationADefinition() const; + /// \brief Check whether this variable is defined in this + /// translation unit. + DefinitionKind hasDefinition() const; + /// \brief Get the tentative definition that acts as the real definition in /// a TU. Returns null if there is a proper definition available. VarDecl *getActingDefinition(); @@ -733,7 +846,7 @@ public: const Expr *getAnyInitializer(const VarDecl *&D) const; bool hasInit() const { - return !Init.isNull(); + return !Init.isNull() && (Init.is() || Init.is()); } const Expr *getInit() const { if (Init.isNull()) @@ -776,6 +889,18 @@ public: void setInit(Expr *I); + /// \brief Check whether we are in the process of parsing an initializer + /// needed to deduce the type of this variable. + bool isParsingAutoInit() const { + return ParsingAutoInit; + } + + /// \brief Note whether we are currently parsing an initializer needed to + /// deduce the type of this variable. + void setParsingAutoInit(bool P) { + ParsingAutoInit = P; + } + EvaluatedStmt *EnsureEvaluatedStmt() const { EvaluatedStmt *Eval = Init.dyn_cast(); if (!Eval) { @@ -928,7 +1053,9 @@ class ImplicitParamDecl : public VarDecl { protected: ImplicitParamDecl(Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType Tw) - : VarDecl(DK, DC, L, Id, Tw, /*TInfo=*/0, SC_None, SC_None) {} + : VarDecl(DK, DC, L, Id, Tw, /*TInfo=*/0, SC_None, SC_None) { + setImplicit(); + } public: static ImplicitParamDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, @@ -1046,6 +1173,10 @@ public: return getType(); } + /// \brief Determine whether this parameter is actually a function + /// parameter pack. + bool isParameterPack() const; + /// setOwningFunction - Sets the function declaration that owns this /// ParmVarDecl. Since ParmVarDecls are often created before the /// FunctionDecls that own them, this routine is required to update @@ -1096,13 +1227,13 @@ private: unsigned SClass : 2; unsigned SClassAsWritten : 2; bool IsInline : 1; + bool IsInlineSpecified : 1; bool IsVirtualAsWritten : 1; bool IsPure : 1; bool HasInheritedPrototype : 1; bool HasWrittenPrototype : 1; bool IsDeleted : 1; bool IsTrivial : 1; // sunk from CXXMethodDecl - bool IsCopyAssignment : 1; // sunk from CXXMethodDecl bool HasImplicitReturnZero : 1; /// \brief End part of this FunctionDecl's source range. @@ -1136,19 +1267,54 @@ private: /// declaration name embedded in the DeclaratorDecl base class. DeclarationNameLoc DNLoc; + /// \brief Specify that this function declaration is actually a function + /// template specialization. + /// + /// \param C the ASTContext. + /// + /// \param Template the function template that this function template + /// specialization specializes. + /// + /// \param TemplateArgs the template arguments that produced this + /// function template specialization from the template. + /// + /// \param InsertPos If non-NULL, the position in the function template + /// specialization set where the function template specialization data will + /// be inserted. + /// + /// \param TSK the kind of template specialization this is. + /// + /// \param TemplateArgsAsWritten location info of template arguments. + /// + /// \param PointOfInstantiation point at which the function template + /// specialization was first instantiated. + void setFunctionTemplateSpecialization(ASTContext &C, + FunctionTemplateDecl *Template, + const TemplateArgumentList *TemplateArgs, + void *InsertPos, + TemplateSpecializationKind TSK, + const TemplateArgumentListInfo *TemplateArgsAsWritten, + SourceLocation PointOfInstantiation); + + /// \brief Specify that this record is an instantiation of the + /// member function FD. + void setInstantiationOfMemberFunction(ASTContext &C, FunctionDecl *FD, + TemplateSpecializationKind TSK); + + void setParams(ASTContext &C, ParmVarDecl **NewParamInfo, unsigned NumParams); + protected: FunctionDecl(Kind DK, DeclContext *DC, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, - StorageClass S, StorageClass SCAsWritten, bool isInline) + StorageClass S, StorageClass SCAsWritten, bool isInlineSpecified) : DeclaratorDecl(DK, DC, NameInfo.getLoc(), NameInfo.getName(), T, TInfo), DeclContext(DK), ParamInfo(0), Body(), - SClass(S), SClassAsWritten(SCAsWritten), IsInline(isInline), + SClass(S), SClassAsWritten(SCAsWritten), + IsInline(isInlineSpecified), IsInlineSpecified(isInlineSpecified), IsVirtualAsWritten(false), IsPure(false), HasInheritedPrototype(false), HasWrittenPrototype(true), IsDeleted(false), IsTrivial(false), - IsCopyAssignment(false), - HasImplicitReturnZero(false), - EndRangeLoc(NameInfo.getEndLoc()), + HasImplicitReturnZero(false), EndRangeLoc(NameInfo.getEndLoc()), TemplateOrSpecialization(), DNLoc(NameInfo.getInfo()) {} @@ -1169,11 +1335,11 @@ public: TypeSourceInfo *TInfo, StorageClass S = SC_None, StorageClass SCAsWritten = SC_None, - bool isInline = false, + bool isInlineSpecified = false, bool hasWrittenPrototype = true) { DeclarationNameInfo NameInfo(N, L); return FunctionDecl::Create(C, DC, NameInfo, T, TInfo, S, SCAsWritten, - isInline, hasWrittenPrototype); + isInlineSpecified, hasWrittenPrototype); } static FunctionDecl *Create(ASTContext &C, DeclContext *DC, @@ -1181,7 +1347,7 @@ public: QualType T, TypeSourceInfo *TInfo, StorageClass S = SC_None, StorageClass SCAsWritten = SC_None, - bool isInline = false, + bool isInlineSpecified = false, bool hasWrittenPrototype = true); DeclarationNameInfo getNameInfo() const { @@ -1246,7 +1412,7 @@ public: /// Whether this virtual function is pure, i.e. makes the containing class /// abstract. bool isPure() const { return IsPure; } - void setPure(bool P = true) { IsPure = P; } + void setPure(bool P = true); /// Whether this function is "trivial" in some specialized C++ senses. /// Can only be true for default constructors, copy constructors, @@ -1255,9 +1421,6 @@ public: bool isTrivial() const { return IsTrivial; } void setTrivial(bool IT) { IsTrivial = IT; } - bool isCopyAssignment() const { return IsCopyAssignment; } - void setCopyAssignment(bool CA) { IsCopyAssignment = CA; } - /// Whether falling off this function implicitly returns null/zero. /// If a more specific implicit return value is required, front-ends /// should synthesize the appropriate return statements. @@ -1273,7 +1436,6 @@ public: } bool hasWrittenPrototype() const { return HasWrittenPrototype; } - void setHasWrittenPrototype(bool P) { HasWrittenPrototype = P; } /// \brief Whether this function inherited its prototype from a /// previous declaration. @@ -1343,7 +1505,9 @@ public: assert(i < getNumParams() && "Illegal param #"); return ParamInfo[i]; } - void setParams(ParmVarDecl **NewParamInfo, unsigned NumParams); + void setParams(ParmVarDecl **NewParamInfo, unsigned NumParams) { + setParams(getASTContext(), NewParamInfo, NumParams); + } /// getMinRequiredArguments - Returns the minimum number of arguments /// needed to call this function. This may be fewer than the number of @@ -1361,31 +1525,32 @@ public: } StorageClass getStorageClass() const { return StorageClass(SClass); } - void setStorageClass(StorageClass SC) { - assert(isLegalForFunction(SC)); - SClass = SC; - } + void setStorageClass(StorageClass SC); StorageClass getStorageClassAsWritten() const { return StorageClass(SClassAsWritten); } - void setStorageClassAsWritten(StorageClass SC) { - assert(isLegalForFunction(SC)); - SClassAsWritten = SC; - } /// \brief Determine whether the "inline" keyword was specified for this /// function. - bool isInlineSpecified() const { return IsInline; } + bool isInlineSpecified() const { return IsInlineSpecified; } /// Set whether the "inline" keyword was specified for this function. - void setInlineSpecified(bool I) { IsInline = I; } + void setInlineSpecified(bool I) { + IsInlineSpecified = I; + IsInline = I; + } + + /// Flag that this function is implicitly inline. + void setImplicitlyInline() { + IsInline = true; + } /// \brief Determine whether this function should be inlined, because it is /// either marked "inline" or is a member function of a C++ class that /// was defined in the class body. bool isInlined() const; - + bool isInlineDefinitionExternallyVisible() const; /// isOverloadedOperator - Whether this function declaration @@ -1432,7 +1597,9 @@ public: /// \brief Specify that this record is an instantiation of the /// member function FD. void setInstantiationOfMemberFunction(FunctionDecl *FD, - TemplateSpecializationKind TSK); + TemplateSpecializationKind TSK) { + setInstantiationOfMemberFunction(getASTContext(), FD, TSK); + } /// \brief Retrieves the function template that is described by this /// function declaration. @@ -1526,43 +1693,11 @@ public: void *InsertPos, TemplateSpecializationKind TSK = TSK_ImplicitInstantiation, const TemplateArgumentListInfo *TemplateArgsAsWritten = 0, - SourceLocation PointOfInstantiation = SourceLocation()); - - /// \brief Specify that this function declaration is actually a function - /// template specialization. - /// - /// \param Template the function template that this function template - /// specialization specializes. - /// - /// \param NumTemplateArgs number of template arguments that produced this - /// function template specialization from the template. - /// - /// \param TemplateArgs array of template arguments that produced this - /// function template specialization from the template. - /// - /// \param TSK the kind of template specialization this is. - /// - /// \param NumTemplateArgsAsWritten number of template arguments that produced - /// this function template specialization from the template. - /// - /// \param TemplateArgsAsWritten array of location info for the template - /// arguments. - /// - /// \param LAngleLoc location of left angle token. - /// - /// \param RAngleLoc location of right angle token. - /// - /// \param PointOfInstantiation point at which the function template - /// specialization was first instantiated. - void setFunctionTemplateSpecialization(FunctionTemplateDecl *Template, - unsigned NumTemplateArgs, - const TemplateArgument *TemplateArgs, - TemplateSpecializationKind TSK, - unsigned NumTemplateArgsAsWritten, - TemplateArgumentLoc *TemplateArgsAsWritten, - SourceLocation LAngleLoc, - SourceLocation RAngleLoc, - SourceLocation PointOfInstantiation); + SourceLocation PointOfInstantiation = SourceLocation()) { + setFunctionTemplateSpecialization(getASTContext(), Template, TemplateArgs, + InsertPos, TSK, TemplateArgsAsWritten, + PointOfInstantiation); + } /// \brief Specifies that this function declaration is actually a /// dependent function template specialization. @@ -1620,19 +1755,26 @@ public: class FieldDecl : public DeclaratorDecl { // FIXME: This can be packed into the bitfields in Decl. bool Mutable : 1; + mutable unsigned CachedFieldIndex : 31; + Expr *BitWidth; protected: FieldDecl(Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, Expr *BW, bool Mutable) - : DeclaratorDecl(DK, DC, L, Id, T, TInfo), Mutable(Mutable), BitWidth(BW) { + : DeclaratorDecl(DK, DC, L, Id, T, TInfo), + Mutable(Mutable), CachedFieldIndex(0), BitWidth(BW) { } public: - static FieldDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, - IdentifierInfo *Id, QualType T, + static FieldDecl *Create(const ASTContext &C, DeclContext *DC, + SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, Expr *BW, bool Mutable); + /// getFieldIndex - Returns the index of this field within its record, + /// as appropriate for passing to ASTRecordLayout::getFieldOffset. + unsigned getFieldIndex() const; + /// isMutable - Determines whether this field is mutable (C++ only). bool isMutable() const { return Mutable; } @@ -1707,6 +1849,45 @@ public: friend class StmtIteratorBase; }; +/// IndirectFieldDecl - An instance of this class is created to represent a +/// field injected from an anonymous union/struct into the parent scope. +/// IndirectFieldDecl are always implicit. +class IndirectFieldDecl : public ValueDecl { + NamedDecl **Chaining; + unsigned ChainingSize; + + IndirectFieldDecl(DeclContext *DC, SourceLocation L, + DeclarationName N, QualType T, + NamedDecl **CH, unsigned CHS) + : ValueDecl(IndirectField, DC, L, N, T), Chaining(CH), ChainingSize(CHS) {} + +public: + static IndirectFieldDecl *Create(ASTContext &C, DeclContext *DC, + SourceLocation L, IdentifierInfo *Id, + QualType T, NamedDecl **CH, unsigned CHS); + + typedef NamedDecl * const *chain_iterator; + chain_iterator chain_begin() const { return Chaining; } + chain_iterator chain_end() const { return Chaining+ChainingSize; } + + unsigned getChainingSize() const { return ChainingSize; } + + FieldDecl *getAnonField() const { + assert(ChainingSize >= 2); + return cast(Chaining[ChainingSize - 1]); + } + + VarDecl *getVarDecl() const { + assert(ChainingSize >= 2); + return dyn_cast(*chain_begin()); + } + + // Implement isa/cast/dyncast/etc. + static bool classof(const Decl *D) { return classofKind(D->getKind()); } + static bool classof(const IndirectFieldDecl *D) { return true; } + static bool classofKind(Kind K) { return K == IndirectField; } + friend class ASTDeclReader; +}; /// TypeDecl - Represents a declaration of a type. /// @@ -1715,7 +1896,7 @@ class TypeDecl : public NamedDecl { /// this TypeDecl. It is a cache maintained by /// ASTContext::getTypedefType, ASTContext::getTagDeclType, and /// ASTContext::getTemplateTypeParmType, and TemplateTypeParmDecl. - mutable Type *TypeForDecl; + mutable const Type *TypeForDecl; friend class ASTContext; friend class DeclContext; friend class TagDecl; @@ -1729,8 +1910,8 @@ protected: public: // Low-level accessor - Type *getTypeForDecl() const { return TypeForDecl; } - void setTypeForDecl(Type *TD) { TypeForDecl = TD; } + const Type *getTypeForDecl() const { return TypeForDecl; } + void setTypeForDecl(const Type *TD) { TypeForDecl = TD; } // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } @@ -1820,6 +2001,19 @@ protected: unsigned NumPositiveBits : 8; unsigned NumNegativeBits : 8; + /// IsScoped - True if this tag declaration is a scoped enumeration. Only + /// possible in C++0x mode. + bool IsScoped : 1; + /// IsScopedUsingClassTag - If this tag declaration is a scoped enum, + /// then this is true if the scoped enum was declared using the class + /// tag, false if it was declared with the struct tag. No meaning is + /// associated if this tag declaration is not a scoped enum. + bool IsScopedUsingClassTag : 1; + + /// IsFixed - True if this is an enumeration with fixed underlying type. Only + /// possible in C++0x mode. + bool IsFixed : 1; + private: SourceLocation TagKeywordLoc; SourceLocation RBraceLoc; @@ -1859,6 +2053,11 @@ protected: typedef Redeclarable redeclarable_base; virtual TagDecl *getNextRedeclaration() { return RedeclLink.getNext(); } + /// @brief Completes the definition of this tag declaration. + /// + /// This is a helper function for derived classes. + void completeDefinition(); + public: typedef redeclarable_base::redecl_iterator redecl_iterator; redecl_iterator redecls_begin() const { @@ -1923,9 +2122,6 @@ public: /// where it is in the process of being defined. void startDefinition(); - /// @brief Completes the definition of this tag declaration. - void completeDefinition(); - /// getDefinition - Returns the TagDecl that actually defines this /// struct/union/class/enum. When determining whether or not a /// struct/union/class/enum is completely defined, one should use this method @@ -2001,7 +2197,19 @@ class EnumDecl : public TagDecl { /// IntegerType - This represent the integer type that the enum corresponds /// to for code generation purposes. Note that the enumerator constants may /// have a different type than this does. - QualType IntegerType; + /// + /// If the underlying integer type was explicitly stated in the source + /// code, this is a TypeSourceInfo* for that type. Otherwise this type + /// was automatically deduced somehow, and this is a Type*. + /// + /// Normally if IsFixed(), this would contain a TypeSourceInfo*, but in + /// some cases it won't. + /// + /// The underlying type of an enumeration never has any qualifiers, so + /// we can get away with just storing a raw Type*, and thus save an + /// extra pointer when TypeSourceInfo is needed. + + llvm::PointerUnion IntegerType; /// PromotionType - The integer type that values of this type should /// promote to. In C, enumerators are generally of an integer type @@ -2022,11 +2230,16 @@ class EnumDecl : public TagDecl { }; EnumDecl(DeclContext *DC, SourceLocation L, - IdentifierInfo *Id, EnumDecl *PrevDecl, SourceLocation TKL) + IdentifierInfo *Id, EnumDecl *PrevDecl, SourceLocation TKL, + bool Scoped, bool ScopedUsingClassTag, bool Fixed) : TagDecl(Enum, TTK_Enum, DC, L, Id, PrevDecl, TKL), InstantiatedFrom(0) { - IntegerType = QualType(); + assert(Scoped || !ScopedUsingClassTag); + IntegerType = (const Type*)0; NumNegativeBits = 0; NumPositiveBits = 0; + IsScoped = Scoped; + IsScopedUsingClassTag = ScopedUsingClassTag; + IsFixed = Fixed; } public: EnumDecl *getCanonicalDecl() { @@ -2045,7 +2258,9 @@ public: static EnumDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, - SourceLocation TKL, EnumDecl *PrevDecl); + SourceLocation TKL, EnumDecl *PrevDecl, + bool IsScoped, bool IsScopedUsingClassTag, + bool IsFixed); static EnumDecl *Create(ASTContext &C, EmptyShell Empty); /// completeDefinition - When created, the EnumDecl corresponds to a @@ -2085,10 +2300,25 @@ public: /// getIntegerType - Return the integer type this enum decl corresponds to. /// This returns a null qualtype for an enum forward definition. - QualType getIntegerType() const { return IntegerType; } + QualType getIntegerType() const { + if (!IntegerType) + return QualType(); + if (const Type* T = IntegerType.dyn_cast()) + return QualType(T, 0); + return IntegerType.get()->getType(); + } /// \brief Set the underlying integer type. - void setIntegerType(QualType T) { IntegerType = T; } + void setIntegerType(QualType T) { IntegerType = T.getTypePtrOrNull(); } + + /// \brief Set the underlying integer type source info. + void setIntegerTypeSourceInfo(TypeSourceInfo* TInfo) { IntegerType = TInfo; } + + /// \brief Return the type source info for the underlying integer type, + /// if no type source info exists, return 0. + TypeSourceInfo* getIntegerTypeSourceInfo() const { + return IntegerType.dyn_cast(); + } /// \brief Returns the width in bits requred to store all the /// non-negative enumerators of this enum. @@ -2116,6 +2346,27 @@ public: NumNegativeBits = Num; } + /// \brief Returns true if this is a C++0x scoped enumeration. + bool isScoped() const { + return IsScoped; + } + + /// \brief Returns true if this is a C++0x scoped enumeration. + bool isScopedUsingClassTag() const { + return IsScopedUsingClassTag; + } + + /// \brief Returns true if this is a C++0x enumeration with fixed underlying + /// type. + bool isFixed() const { + return IsFixed; + } + + /// \brief Returns true if this can be considered a complete type. + bool isComplete() const { + return isDefinition() || isFixed(); + } + /// \brief Returns the enumeration (declared within the template) /// from which this enumeration type was instantiated, or NULL if /// this enumeration was not instantiated from any template. @@ -2128,6 +2379,8 @@ public: static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const EnumDecl *D) { return true; } static bool classofKind(Kind K) { return K == Enum; } + + friend class ASTDeclReader; }; @@ -2151,17 +2404,24 @@ class RecordDecl : public TagDecl { /// containing an object. bool HasObjectMember : 1; + /// \brief Whether the field declarations of this record have been loaded + /// from external storage. To avoid unnecessary deserialization of + /// methods/nested types we allow deserialization of just the fields + /// when needed. + mutable bool LoadedFieldsFromExternalStorage : 1; + friend class DeclContext; + protected: RecordDecl(Kind DK, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, RecordDecl *PrevDecl, SourceLocation TKL); public: - static RecordDecl *Create(ASTContext &C, TagKind TK, DeclContext *DC, + static RecordDecl *Create(const ASTContext &C, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, SourceLocation TKL = SourceLocation(), RecordDecl* PrevDecl = 0); - static RecordDecl *Create(ASTContext &C, EmptyShell Empty); + static RecordDecl *Create(const ASTContext &C, EmptyShell Empty); const RecordDecl *getPreviousDeclaration() const { return cast_or_null(TagDecl::getPreviousDeclaration()); @@ -2190,11 +2450,6 @@ public: AnonymousStructOrUnion = Anon; } - ValueDecl *getAnonymousStructOrUnionObject(); - const ValueDecl *getAnonymousStructOrUnionObject() const { - return const_cast(this)->getAnonymousStructOrUnionObject(); - } - bool hasObjectMember() const { return HasObjectMember; } void setHasObjectMember (bool val) { HasObjectMember = val; } @@ -2229,11 +2484,10 @@ public: // data members, functions, constructors, destructors, etc. typedef specific_decl_iterator field_iterator; - field_iterator field_begin() const { - return field_iterator(decls_begin()); - } + field_iterator field_begin() const; + field_iterator field_end() const { - return field_iterator(decls_end()); + return field_iterator(decl_iterator()); } // field_empty - Whether there are any fields (non-static data @@ -2244,13 +2498,17 @@ public: /// completeDefinition - Notes that the definition of this type is /// now complete. - void completeDefinition(); + virtual void completeDefinition(); static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const RecordDecl *D) { return true; } static bool classofKind(Kind K) { return K >= firstRecord && K <= lastRecord; } + +private: + /// \brief Deserialize just the fields. + void LoadFieldsFromExternalStorage() const; }; class FileScopeAsmDecl : public Decl { @@ -2275,8 +2533,49 @@ public: /// ^{ statement-body } or ^(int arg1, float arg2){ statement-body } /// class BlockDecl : public Decl, public DeclContext { +public: + /// A class which contains all the information about a particular + /// captured value. + class Capture { + enum { + flag_isByRef = 0x1, + flag_isNested = 0x2 + }; + + /// The variable being captured. + llvm::PointerIntPair VariableAndFlags; + + /// The copy expression, expressed in terms of a DeclRef (or + /// BlockDeclRef) to the captured variable. Only required if the + /// variable has a C++ class type. + Expr *CopyExpr; + + public: + Capture(VarDecl *variable, bool byRef, bool nested, Expr *copy) + : VariableAndFlags(variable, + (byRef ? flag_isByRef : 0) | (nested ? flag_isNested : 0)), + CopyExpr(copy) {} + + /// The variable being captured. + VarDecl *getVariable() const { return VariableAndFlags.getPointer(); } + + /// Whether this is a "by ref" capture, i.e. a capture of a __block + /// variable. + bool isByRef() const { return VariableAndFlags.getInt() & flag_isByRef; } + + /// Whether this is a nested capture, i.e. the variable captured + /// is not from outside the immediately enclosing function/block. + bool isNested() const { return VariableAndFlags.getInt() & flag_isNested; } + + bool hasCopyExpr() const { return CopyExpr != 0; } + Expr *getCopyExpr() const { return CopyExpr; } + void setCopyExpr(Expr *e) { CopyExpr = e; } + }; + +private: // FIXME: This can be packed into the bitfields in Decl. bool IsVariadic : 1; + bool CapturesCXXThis : 1; /// ParamInfo - new[]'d array of pointers to ParmVarDecls for the formal /// parameters of this function. This is null if a prototype or if there are /// no formals. @@ -2286,11 +2585,15 @@ class BlockDecl : public Decl, public DeclContext { Stmt *Body; TypeSourceInfo *SignatureAsWritten; + Capture *Captures; + unsigned NumCaptures; + protected: BlockDecl(DeclContext *DC, SourceLocation CaretLoc) : Decl(Block, DC, CaretLoc), DeclContext(Block), - IsVariadic(false), ParamInfo(0), NumParams(0), Body(0), - SignatureAsWritten(0) {} + IsVariadic(false), CapturesCXXThis(false), + ParamInfo(0), NumParams(0), Body(0), + SignatureAsWritten(0), Captures(0), NumCaptures(0) {} public: static BlockDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L); @@ -2319,7 +2622,7 @@ public: param_const_iterator param_begin() const { return ParamInfo; } param_const_iterator param_end() const { return ParamInfo+param_size(); } - unsigned getNumParams() const; + unsigned getNumParams() const { return NumParams; } const ParmVarDecl *getParamDecl(unsigned i) const { assert(i < getNumParams() && "Illegal param #"); return ParamInfo[i]; @@ -2330,6 +2633,30 @@ public: } void setParams(ParmVarDecl **NewParamInfo, unsigned NumParams); + /// hasCaptures - True if this block (or its nested blocks) captures + /// anything of local storage from its enclosing scopes. + bool hasCaptures() const { return NumCaptures != 0 || CapturesCXXThis; } + + /// getNumCaptures - Returns the number of captured variables. + /// Does not include an entry for 'this'. + unsigned getNumCaptures() const { return NumCaptures; } + + typedef const Capture *capture_iterator; + typedef const Capture *capture_const_iterator; + capture_iterator capture_begin() { return Captures; } + capture_iterator capture_end() { return Captures + NumCaptures; } + capture_const_iterator capture_begin() const { return Captures; } + capture_const_iterator capture_end() const { return Captures + NumCaptures; } + + bool capturesCXXThis() const { return CapturesCXXThis; } + + void setCaptures(ASTContext &Context, + const Capture *begin, + const Capture *end, + bool capturesCXXThis); + + virtual SourceRange getSourceRange() const; + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const BlockDecl *D) { return true; } @@ -2350,6 +2677,32 @@ inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB, return DB; } +template +void Redeclarable::setPreviousDeclaration(decl_type *PrevDecl) { + // Note: This routine is implemented here because we need both NamedDecl + // and Redeclarable to be defined. + + decl_type *First; + + if (PrevDecl) { + // Point to previous. Make sure that this is actually the most recent + // redeclaration, or we can build invalid chains. If the most recent + // redeclaration is invalid, it won't be PrevDecl, but we want it anyway. + RedeclLink = PreviousDeclLink(llvm::cast( + PrevDecl->getMostRecentDeclaration())); + First = PrevDecl->getFirstDeclaration(); + assert(First->RedeclLink.NextIsLatest() && "Expected first"); + } else { + // Make this first. + First = static_cast(this); + } + + // First one will point to this one as latest. + First->RedeclLink = LatestDeclLink(static_cast(this)); + if (NamedDecl *ND = dyn_cast(static_cast(this))) + ND->ClearLinkageCache(); +} + } // end namespace clang #endif diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index 1369c2b5955a9..bf249cea9d5fb 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -43,6 +43,7 @@ class DeclarationName; class CompoundStmt; class StoredDeclsMap; class DependentDiagnostic; +class ASTMutationListener; } namespace llvm { @@ -197,25 +198,25 @@ private: return DeclCtx.get(); } - /// Loc - The location that this decl. + /// Loc - The location of this decl. SourceLocation Loc; /// DeclKind - This indicates which class this is. - Kind DeclKind : 8; + unsigned DeclKind : 8; /// InvalidDecl - This indicates a semantic error occurred. - unsigned int InvalidDecl : 1; + unsigned InvalidDecl : 1; /// HasAttrs - This indicates whether the decl has attributes or not. - unsigned int HasAttrs : 1; + unsigned HasAttrs : 1; /// Implicit - Whether this declaration was implicitly generated by /// the implementation rather than explicitly written by the user. - bool Implicit : 1; + unsigned Implicit : 1; /// \brief Whether this declaration was "used", meaning that a definition is /// required. - bool Used : 1; + unsigned Used : 1; protected: /// Access - Used by C++ decls for the access specifier. @@ -227,17 +228,24 @@ protected: unsigned PCHLevel : 2; /// ChangedAfterLoad - if this declaration has changed since being loaded - bool ChangedAfterLoad : 1; + unsigned ChangedAfterLoad : 1; /// IdentifierNamespace - This specifies what IDNS_* namespace this lives in. - unsigned IdentifierNamespace : 15; + unsigned IdentifierNamespace : 12; + /// \brief Whether the \c CachedLinkage field is active. + /// + /// This field is only valid for NamedDecls subclasses. + mutable unsigned HasCachedLinkage : 1; + + /// \brief If \c HasCachedLinkage, the linkage of this declaration. + /// + /// This field is only valid for NamedDecls subclasses. + mutable unsigned CachedLinkage : 2; + + private: -#ifndef NDEBUG void CheckAccessDeclContext() const; -#else - void CheckAccessDeclContext() const { } -#endif protected: @@ -246,7 +254,9 @@ protected: Loc(L), DeclKind(DK), InvalidDecl(0), HasAttrs(false), Implicit(false), Used(false), Access(AS_none), PCHLevel(0), ChangedAfterLoad(false), - IdentifierNamespace(getIdentifierNamespaceForKind(DK)) { + IdentifierNamespace(getIdentifierNamespaceForKind(DK)), + HasCachedLinkage(0) + { if (Decl::CollectingStats()) add(DK); } @@ -254,7 +264,9 @@ protected: : NextDeclInContext(0), DeclKind(DK), InvalidDecl(0), HasAttrs(false), Implicit(false), Used(false), Access(AS_none), PCHLevel(0), ChangedAfterLoad(false), - IdentifierNamespace(getIdentifierNamespaceForKind(DK)) { + IdentifierNamespace(getIdentifierNamespaceForKind(DK)), + HasCachedLinkage(0) + { if (Decl::CollectingStats()) add(DK); } @@ -272,7 +284,7 @@ public: SourceLocation getLocation() const { return Loc; } void setLocation(SourceLocation L) { Loc = L; } - Kind getKind() const { return DeclKind; } + Kind getKind() const { return static_cast(DeclKind); } const char *getDeclKindName() const; Decl *getNextDeclInContext() { return NextDeclInContext; } @@ -298,17 +310,21 @@ public: void setAccess(AccessSpecifier AS) { Access = AS; +#ifndef NDEBUG CheckAccessDeclContext(); +#endif } AccessSpecifier getAccess() const { +#ifndef NDEBUG CheckAccessDeclContext(); +#endif return AccessSpecifier(Access); } bool hasAttrs() const { return HasAttrs; } void setAttrs(const AttrVec& Attrs); - AttrVec& getAttrs() { + AttrVec &getAttrs() { return const_cast(const_cast(this)->getAttrs()); } const AttrVec &getAttrs() const; @@ -551,6 +567,9 @@ public: /// template parameter pack. bool isTemplateParameterPack() const; + /// \brief Whether this declaration is a parameter pack. + bool isParameterPack() const; + /// \brief Whether this declaration is a function or function template. bool isFunctionOrFunctionTemplate() const; @@ -621,10 +640,14 @@ public: llvm::raw_ostream &Out, const PrintingPolicy &Policy, unsigned Indentation = 0); void dump() const; + void dumpXML() const; + void dumpXML(llvm::raw_ostream &OS) const; private: const Attr *getAttrsImpl() const; +protected: + ASTMutationListener *getASTMutationListener() const; }; /// PrettyStackTraceDecl - If a crash occurs, indicate that it happened when @@ -681,23 +704,24 @@ public: /// class DeclContext { /// DeclKind - This indicates which class this is. - Decl::Kind DeclKind : 8; + unsigned DeclKind : 8; /// \brief Whether this declaration context also has some external /// storage that contains additional declarations that are lexically /// part of this context. - mutable bool ExternalLexicalStorage : 1; + mutable unsigned ExternalLexicalStorage : 1; /// \brief Whether this declaration context also has some external /// storage that contains additional declarations that are visible /// in this context. - mutable bool ExternalVisibleStorage : 1; + mutable unsigned ExternalVisibleStorage : 1; /// \brief Pointer to the data structure used to lookup declarations /// within this context (or a DependentStoredDeclsMap if this is a /// dependent context). mutable StoredDeclsMap *LookupPtr; +protected: /// FirstDecl - The first declaration stored within this declaration /// context. mutable Decl *FirstDecl; @@ -710,7 +734,12 @@ class DeclContext { friend class ExternalASTSource; -protected: + /// \brief Build up a chain of declarations. + /// + /// \returns the first/last pair of declarations. + static std::pair + BuildDeclChain(const llvm::SmallVectorImpl &Decls); + DeclContext(Decl::Kind K) : DeclKind(K), ExternalLexicalStorage(false), ExternalVisibleStorage(false), LookupPtr(0), FirstDecl(0), @@ -720,7 +749,7 @@ public: ~DeclContext(); Decl::Kind getDeclKind() const { - return DeclKind; + return static_cast(DeclKind); } const char *getDeclKindName() const; @@ -807,6 +836,10 @@ public: /// C++0x scoped enums), and C++ linkage specifications. bool isTransparentContext() const; + /// \brief Determines whether this context is, or is nested within, + /// a C++ extern "C" linkage spec. + bool isExternCContext() const; + /// \brief Determine whether this declaration context is equivalent /// to the declaration context DC. bool Equals(const DeclContext *DC) const { diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index a9802bfcaf4e7..d11ee8f7fd648 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -35,6 +35,7 @@ class CXXMethodDecl; class CXXRecordDecl; class CXXMemberLookupCriteria; class CXXFinalOverriderMap; +class CXXIndirectPrimaryBaseSet; class FriendDecl; /// \brief Represents any kind of function declaration, whether it is a @@ -112,6 +113,8 @@ class AccessSpecDecl : public Decl { : Decl(AccessSpec, DC, ASLoc), ColonLoc(ColonLoc) { setAccess(AS); } + AccessSpecDecl(EmptyShell Empty) + : Decl(AccessSpec, Empty) { } public: /// getAccessSpecifierLoc - The location of the access specifier. SourceLocation getAccessSpecifierLoc() const { return getLocation(); } @@ -132,6 +135,9 @@ public: SourceLocation ColonLoc) { return new (C) AccessSpecDecl(AS, DC, ASLoc, ColonLoc); } + static AccessSpecDecl *Create(ASTContext &C, EmptyShell Empty) { + return new (C) AccessSpecDecl(Empty); + } // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } @@ -162,6 +168,10 @@ class CXXBaseSpecifier { /// specifier (if present). SourceRange Range; + /// \brief The source location of the ellipsis, if this is a pack + /// expansion. + SourceLocation EllipsisLoc; + /// Virtual - Whether this is a virtual base class or not. bool Virtual : 1; @@ -177,6 +187,10 @@ class CXXBaseSpecifier { /// VC++ bug. unsigned Access : 2; + /// InheritConstructors - Whether the class contains a using declaration + /// to inherit the named class's constructors. + bool InheritConstructors : 1; + /// 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. @@ -186,8 +200,9 @@ public: CXXBaseSpecifier() { } CXXBaseSpecifier(SourceRange R, bool V, bool BC, AccessSpecifier A, - TypeSourceInfo *TInfo) - : Range(R), Virtual(V), BaseOfClass(BC), Access(A), BaseTypeInfo(TInfo) { } + TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) + : Range(R), EllipsisLoc(EllipsisLoc), Virtual(V), BaseOfClass(BC), + Access(A), InheritConstructors(false), BaseTypeInfo(TInfo) { } /// getSourceRange - Retrieves the source range that contains the /// entire base specifier. @@ -201,6 +216,22 @@ public: /// with the 'class' keyword (vs. one declared with the 'struct' keyword). bool isBaseOfClass() const { return BaseOfClass; } + /// \brief Determine whether this base specifier is a pack expansion. + bool isPackExpansion() const { return EllipsisLoc.isValid(); } + + /// \brief Determine whether this base class's constructors get inherited. + bool getInheritConstructors() const { return InheritConstructors; } + + /// \brief Set that this base class's constructors should be inherited. + void setInheritConstructors(bool Inherit = true) { + InheritConstructors = Inherit; + } + + /// \brief For a pack expansion, determine the location of the ellipsis. + SourceLocation getEllipsisLoc() const { + return EllipsisLoc; + } + /// getAccessSpecifier - Returns the access specifier for this base /// specifier. This is the actual base specifier as used for /// semantic analysis, so the result can never be AS_none. To @@ -336,20 +367,20 @@ class CXXRecordDecl : public RecordDecl { /// \brief Whether we have already declared a destructor within the class. bool DeclaredDestructor : 1; - - /// Bases - Base classes of this class. - /// FIXME: This is wasted space for a union. - CXXBaseSpecifier *Bases; /// NumBases - The number of base class specifiers in Bases. unsigned NumBases; - - /// VBases - direct and indirect virtual base classes of this class. - CXXBaseSpecifier *VBases; - + /// NumVBases - The number of virtual base class specifiers in VBases. unsigned NumVBases; + /// Bases - Base classes of this class. + /// FIXME: This is wasted space for a union. + LazyCXXBaseSpecifiersPtr Bases; + + /// VBases - direct and indirect virtual base classes of this class. + LazyCXXBaseSpecifiersPtr VBases; + /// Conversions - Overload set containing the conversion functions /// of this C++ class (but not its inherited conversion /// functions). Each of the entries in this overload set is a @@ -371,6 +402,15 @@ class CXXRecordDecl : public RecordDecl { /// in reverse order. FriendDecl *FirstFriend; + /// \brief Retrieve the set of direct base classes. + CXXBaseSpecifier *getBases() const { + return Bases.get(Definition->getASTContext().getExternalSource()); + } + + /// \brief Retrieve the set of virtual base classes. + CXXBaseSpecifier *getVBases() const { + return VBases.get(Definition->getASTContext().getExternalSource()); + } } *DefinitionData; struct DefinitionData &data() { @@ -395,9 +435,17 @@ class CXXRecordDecl : public RecordDecl { llvm::PointerUnion TemplateOrInstantiation; -#ifndef NDEBUG - void CheckConversionFunction(NamedDecl *D); -#endif + friend class DeclContext; + + /// \brief Notify the class that member has been added. + /// + /// This routine helps maintain information about the class based on which + /// members have been added. It will be invoked by DeclContext::addDecl() + /// whenever a member is added to this record. + void addedMember(Decl *D); + + void markedVirtualFunctionPure(); + friend void FunctionDecl::setPure(bool); protected: CXXRecordDecl(Kind K, TagKind TK, DeclContext *DC, @@ -445,12 +493,12 @@ public: bool hasDefinition() const { return DefinitionData != 0; } - static CXXRecordDecl *Create(ASTContext &C, TagKind TK, DeclContext *DC, + static CXXRecordDecl *Create(const ASTContext &C, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, SourceLocation TKL = SourceLocation(), CXXRecordDecl* PrevDecl=0, bool DelayTypeCreation = false); - static CXXRecordDecl *Create(ASTContext &C, EmptyShell Empty); + static CXXRecordDecl *Create(const ASTContext &C, EmptyShell Empty); bool isDynamicClass() const { return data().Polymorphic || data().NumVBases != 0; @@ -463,8 +511,8 @@ public: /// class. unsigned getNumBases() const { return data().NumBases; } - base_class_iterator bases_begin() { return data().Bases; } - base_class_const_iterator bases_begin() const { return data().Bases; } + base_class_iterator bases_begin() { return data().getBases(); } + base_class_const_iterator bases_begin() const { return data().getBases(); } base_class_iterator bases_end() { return bases_begin() + data().NumBases; } base_class_const_iterator bases_end() const { return bases_begin() + data().NumBases; @@ -486,8 +534,8 @@ public: /// class. unsigned getNumVBases() const { return data().NumVBases; } - base_class_iterator vbases_begin() { return data().VBases; } - base_class_const_iterator vbases_begin() const { return data().VBases; } + base_class_iterator vbases_begin() { return data().getVBases(); } + base_class_const_iterator vbases_begin() const { return data().getVBases(); } base_class_iterator vbases_end() { return vbases_begin() + data().NumVBases; } base_class_const_iterator vbases_end() const { return vbases_begin() + data().NumVBases; @@ -553,18 +601,12 @@ public: return data().DeclaredDefaultConstructor; } - /// \brief Note whether this class has already had its default constructor - /// implicitly declared or doesn't need one. - void setDeclaredDefaultConstructor(bool DDC) { - data().DeclaredDefaultConstructor = DDC; - } - /// hasConstCopyConstructor - Determines whether this class has a /// copy constructor that accepts a const-qualified argument. - bool hasConstCopyConstructor(ASTContext &Context) const; + bool hasConstCopyConstructor(const ASTContext &Context) const; /// getCopyConstructor - Returns the copy constructor for this class - CXXConstructorDecl *getCopyConstructor(ASTContext &Context, + CXXConstructorDecl *getCopyConstructor(const ASTContext &Context, unsigned TypeQuals) const; /// \brief Retrieve the copy-assignment operator for this class, if available. @@ -579,11 +621,6 @@ public: /// a unique copy-assignment operator could not be found. CXXMethodDecl *getCopyAssignmentOperator(bool ArgIsConst) const; - /// addedConstructor - Notify the class that another constructor has - /// been added. This routine helps maintain information about the - /// class based on which constructors have been added. - void addedConstructor(ASTContext &Context, CXXConstructorDecl *ConDecl); - /// hasUserDeclaredConstructor - Whether this class has any /// user-declared constructors. When true, a default constructor /// will not be implicitly declared. @@ -606,17 +643,6 @@ public: return data().DeclaredCopyConstructor; } - /// \brief Note whether this class has already had its copy constructor - /// declared. - void setDeclaredCopyConstructor(bool DCC) { - data().DeclaredCopyConstructor = DCC; - } - - /// addedAssignmentOperator - Notify the class that another assignment - /// operator has been added. This routine helps maintain information about the - /// class based on which operators have been added. - void addedAssignmentOperator(ASTContext &Context, CXXMethodDecl *OpDecl); - /// hasUserDeclaredCopyAssignment - Whether this class has a /// user-declared copy assignment operator. When false, a copy /// assigment operator will be implicitly declared. @@ -632,12 +658,6 @@ public: return data().DeclaredCopyAssignment; } - /// \brief Note whether this class has already had its copy assignment - /// operator declared. - void setDeclaredCopyAssignment(bool DCA) { - data().DeclaredCopyAssignment = DCA; - } - /// hasUserDeclaredDestructor - Whether this class has a /// user-declared destructor. When false, a destructor will be /// implicitly declared. @@ -645,26 +665,12 @@ public: return data().UserDeclaredDestructor; } - /// setUserDeclaredDestructor - Set whether this class has a - /// user-declared destructor. If not set by the time the class is - /// fully defined, a destructor will be implicitly declared. - void setUserDeclaredDestructor(bool UCD) { - data().UserDeclaredDestructor = UCD; - if (UCD) - data().DeclaredDestructor = true; - } - /// \brief Determine whether this class has had its destructor declared, /// either via the user or via an implicit declaration. /// /// This value is used for lazy creation of destructors. bool hasDeclaredDestructor() const { return data().DeclaredDestructor; } - - /// \brief Note whether this class has already had its destructor declared. - void setDeclaredDestructor(bool DD) { - data().DeclaredDestructor = DD; - } - + /// getConversions - Retrieve the overload set containing all of the /// conversion functions in this class. UnresolvedSetImpl *getConversionFunctions() { @@ -682,13 +688,6 @@ public: return getConversionFunctions()->end(); } - /// Replaces a conversion function with a new declaration. - /// - /// Returns true if the old conversion was found. - bool replaceConversion(const NamedDecl* Old, NamedDecl *New) { - return getConversionFunctions()->replace(Old, New); - } - /// Removes a conversion function from this class. The conversion /// function must currently be a member of this class. Furthermore, /// this class must currently be in the process of being defined. @@ -698,105 +697,52 @@ public: /// in current class; including conversion function templates. const UnresolvedSetImpl *getVisibleConversionFunctions(); - /// addConversionFunction - Registers a conversion function which - /// this class declares directly. - void addConversionFunction(NamedDecl *Decl) { -#ifndef NDEBUG - CheckConversionFunction(Decl); -#endif - - // We intentionally don't use the decl's access here because it - // hasn't been set yet. That's really just a misdesign in Sema. - data().Conversions.addDecl(Decl); - } - /// isAggregate - Whether this class is an aggregate (C++ /// [dcl.init.aggr]), which is a class with no user-declared /// constructors, no private or protected non-static data members, /// no base classes, and no virtual functions (C++ [dcl.init.aggr]p1). bool isAggregate() const { return data().Aggregate; } - /// setAggregate - Set whether this class is an aggregate (C++ - /// [dcl.init.aggr]). - void setAggregate(bool Agg) { data().Aggregate = Agg; } - - /// setMethodAsVirtual - Make input method virtual and set the necesssary - /// special function bits and other bits accordingly. - void setMethodAsVirtual(FunctionDecl *Method); - /// isPOD - Whether this class is a POD-type (C++ [class]p4), which is a class /// that is an aggregate that has no non-static non-POD data members, no /// reference data members, no user-defined copy assignment operator and no /// user-defined destructor. bool isPOD() const { return data().PlainOldData; } - /// setPOD - Set whether this class is a POD-type (C++ [class]p4). - void setPOD(bool POD) { data().PlainOldData = POD; } - /// isEmpty - Whether this class is empty (C++0x [meta.unary.prop]), which /// means it has a virtual function, virtual base, data member (other than /// 0-width bit-field) or inherits from a non-empty class. Does NOT include /// a check for union-ness. bool isEmpty() const { return data().Empty; } - /// Set whether this class is empty (C++0x [meta.unary.prop]) - void setEmpty(bool Emp) { data().Empty = Emp; } - /// isPolymorphic - Whether this class is polymorphic (C++ [class.virtual]), /// which means that the class contains or inherits a virtual function. bool isPolymorphic() const { return data().Polymorphic; } - /// setPolymorphic - Set whether this class is polymorphic (C++ - /// [class.virtual]). - void setPolymorphic(bool Poly) { data().Polymorphic = Poly; } - /// isAbstract - Whether this class is abstract (C++ [class.abstract]), /// which means that the class contains or inherits a pure virtual function. bool isAbstract() const { return data().Abstract; } - /// setAbstract - Set whether this class is abstract (C++ [class.abstract]) - void setAbstract(bool Abs) { data().Abstract = Abs; } - // hasTrivialConstructor - Whether this class has a trivial constructor // (C++ [class.ctor]p5) bool hasTrivialConstructor() const { return data().HasTrivialConstructor; } - // setHasTrivialConstructor - Set whether this class has a trivial constructor - // (C++ [class.ctor]p5) - void setHasTrivialConstructor(bool TC) { data().HasTrivialConstructor = TC; } - // hasTrivialCopyConstructor - Whether this class has a trivial copy // constructor (C++ [class.copy]p6) bool hasTrivialCopyConstructor() const { return data().HasTrivialCopyConstructor; } - // setHasTrivialCopyConstructor - Set whether this class has a trivial - // copy constructor (C++ [class.copy]p6) - void setHasTrivialCopyConstructor(bool TC) { - data().HasTrivialCopyConstructor = TC; - } - // hasTrivialCopyAssignment - Whether this class has a trivial copy // assignment operator (C++ [class.copy]p11) bool hasTrivialCopyAssignment() const { return data().HasTrivialCopyAssignment; } - // setHasTrivialCopyAssignment - Set whether this class has a - // trivial copy assignment operator (C++ [class.copy]p11) - void setHasTrivialCopyAssignment(bool TC) { - data().HasTrivialCopyAssignment = TC; - } - // hasTrivialDestructor - Whether this class has a trivial destructor // (C++ [class.dtor]p3) bool hasTrivialDestructor() const { return data().HasTrivialDestructor; } - // setHasTrivialDestructor - Set whether this class has a trivial destructor - // (C++ [class.dtor]p3) - void setHasTrivialDestructor(bool TC) { data().HasTrivialDestructor = TC; } - /// \brief If this record is an instantiation of a member class, /// retrieves the member class from which it was instantiated. /// @@ -854,9 +800,6 @@ public: /// \brief Set the kind of specialization or template instantiation this is. void setTemplateSpecializationKind(TemplateSpecializationKind TSK); - - /// getDefaultConstructor - Returns the default constructor for this class - CXXConstructorDecl *getDefaultConstructor(); /// getDestructor - Returns the destructor decl for this class. CXXDestructorDecl *getDestructor() const; @@ -880,7 +823,7 @@ public: /// \param Base the base class we are searching for. /// /// \returns true if this class is derived from Base, false otherwise. - bool isDerivedFrom(CXXRecordDecl *Base) const; + bool isDerivedFrom(const CXXRecordDecl *Base) const; /// \brief Determine whether this class is derived from the type \p Base. /// @@ -898,7 +841,7 @@ public: /// /// \todo add a separate paramaeter to configure IsDerivedFrom, rather than /// tangling input and output in \p Paths - bool isDerivedFrom(CXXRecordDecl *Base, CXXBasePaths &Paths) const; + bool isDerivedFrom(const CXXRecordDecl *Base, CXXBasePaths &Paths) const; /// \brief Determine whether this class is virtually derived from /// the class \p Base. @@ -1034,6 +977,9 @@ public: /// most-derived class in the class hierarchy. void getFinalOverriders(CXXFinalOverriderMap &FinaOverriders) const; + /// \brief Get the indirect primary bases for this class. + void getIndirectPrimaryBases(CXXIndirectPrimaryBaseSet& Bases) const; + /// viewInheritance - Renders and displays an inheritance diagram /// for this C++ class and all of its base classes (transitively) using /// GraphViz. @@ -1048,6 +994,27 @@ public: return (PathAccess > DeclAccess ? PathAccess : DeclAccess); } + /// \brief Indicates that the definition of this class is now complete. + virtual void completeDefinition(); + + /// \brief Indicates that the definition of this class is now complete, + /// and provides a final overrider map to help determine + /// + /// \param FinalOverriders The final overrider map for this class, which can + /// be provided as an optimization for abstract-class checking. If NULL, + /// final overriders will be computed if they are needed to complete the + /// definition. + void completeDefinition(CXXFinalOverriderMap *FinalOverriders); + + /// \brief Determine whether this class may end up being abstract, even though + /// it is not yet known to be abstract. + /// + /// \returns true if this class is not known to be abstract but has any + /// base classes that are abstract. In this case, \c completeDefinition() + /// will need to compute final overriders to determine whether the class is + /// actually abstract. + bool mayBeAbstract() const; + static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classofKind(Kind K) { return K >= firstCXXRecord && K <= lastCXXRecord; @@ -1059,6 +1026,8 @@ public: friend class ASTDeclReader; friend class ASTDeclWriter; + friend class ASTReader; + friend class ASTWriter; }; /// CXXMethodDecl - Represents a static or instance method of a @@ -1139,6 +1108,20 @@ public: return getType()->getAs()->getTypeQuals(); } + /// \brief Retrieve the ref-qualifier associated with this method. + /// + /// In the following example, \c f() has an lvalue ref-qualifier, \c g() + /// has an rvalue ref-qualifier, and \c h() has no ref-qualifier. + /// \code + /// struct X { + /// void f() &; + /// void g() &&; + /// void h(); + /// }; + RefQualifierKind getRefQualifier() const { + return getType()->getAs()->getRefQualifier(); + } + bool hasInlineBody() const; // Implement isa/cast/dyncast/etc. @@ -1149,7 +1132,7 @@ public: } }; -/// CXXBaseOrMemberInitializer - Represents a C++ base or member +/// CXXCtorInitializer - Represents a C++ base or member /// initializer, which is part of a constructor initializer that /// initializes one non-static member variable or one base class. For /// example, in the following, both 'A(a)' and 'f(3.14159)' are member @@ -1163,37 +1146,20 @@ public: /// B(A& a) : A(a), f(3.14159) { } /// }; /// @endcode -class CXXBaseOrMemberInitializer { - /// \brief Either the base class name (stored as a TypeSourceInfo*) or the - /// field being initialized. - llvm::PointerUnion BaseOrMember; +class CXXCtorInitializer { + /// \brief Either the base class name (stored as a TypeSourceInfo*), an normal + /// field (FieldDecl) or an anonymous field (IndirectFieldDecl*) being + /// initialized. + llvm::PointerUnion3 + Initializee; - /// \brief The source location for the field name. - SourceLocation MemberLocation; + /// \brief The source location for the field name or, for a base initializer + /// pack expansion, the location of the ellipsis. + SourceLocation MemberOrEllipsisLocation; /// \brief The argument used to initialize the base or member, which may /// end up constructing an object (when multiple arguments are involved). Stmt *Init; - - /// \brief Stores either the constructor to call to initialize this base or - /// member (a CXXConstructorDecl pointer), or stores the anonymous union of - /// which the initialized value is a member. - /// - /// When the value is a FieldDecl pointer, 'BaseOrMember' is class's - /// anonymous union data member, this field holds the FieldDecl for the - /// member of the anonymous union being initialized. - /// @code - /// struct X { - /// X() : au_i1(123) {} - /// union { - /// int au_i1; - /// float au_f1; - /// }; - /// }; - /// @endcode - /// In above example, BaseOrMember holds the field decl. for anonymous union - /// and AnonUnionMember holds field decl for au_i1. - FieldDecl *AnonUnionMember; /// LParenLoc - Location of the left paren of the ctor-initializer. SourceLocation LParenLoc; @@ -1208,6 +1174,7 @@ class CXXBaseOrMemberInitializer { /// IsWritten - Whether or not the initializer is explicitly written /// in the sources. bool IsWritten : 1; + /// SourceOrderOrNumArrayIndices - If IsWritten is true, then this /// number keeps track of the textual order of this initializer in the /// original sources, counting from 0; otherwise, if IsWritten is false, @@ -1215,50 +1182,62 @@ class CXXBaseOrMemberInitializer { /// object in memory. unsigned SourceOrderOrNumArrayIndices : 14; - CXXBaseOrMemberInitializer(ASTContext &Context, - FieldDecl *Member, SourceLocation MemberLoc, - SourceLocation L, - Expr *Init, - SourceLocation R, - VarDecl **Indices, - unsigned NumIndices); + CXXCtorInitializer(ASTContext &Context, FieldDecl *Member, + SourceLocation MemberLoc, SourceLocation L, Expr *Init, + SourceLocation R, VarDecl **Indices, unsigned NumIndices); public: - /// CXXBaseOrMemberInitializer - Creates a new base-class initializer. + /// CXXCtorInitializer - Creates a new base-class initializer. explicit - CXXBaseOrMemberInitializer(ASTContext &Context, - TypeSourceInfo *TInfo, bool IsVirtual, - SourceLocation L, - Expr *Init, - SourceLocation R); + CXXCtorInitializer(ASTContext &Context, TypeSourceInfo *TInfo, bool IsVirtual, + SourceLocation L, Expr *Init, SourceLocation R, + SourceLocation EllipsisLoc); - /// CXXBaseOrMemberInitializer - Creates a new member initializer. + /// CXXCtorInitializer - Creates a new member initializer. explicit - CXXBaseOrMemberInitializer(ASTContext &Context, - FieldDecl *Member, SourceLocation MemberLoc, - SourceLocation L, - Expr *Init, - SourceLocation R); + CXXCtorInitializer(ASTContext &Context, FieldDecl *Member, + SourceLocation MemberLoc, SourceLocation L, Expr *Init, + SourceLocation R); + + explicit + CXXCtorInitializer(ASTContext &Context, IndirectFieldDecl *Member, + SourceLocation MemberLoc, SourceLocation L, Expr *Init, + SourceLocation R); /// \brief Creates a new member initializer that optionally contains /// array indices used to describe an elementwise initialization. - static CXXBaseOrMemberInitializer *Create(ASTContext &Context, - FieldDecl *Member, - SourceLocation MemberLoc, - SourceLocation L, - Expr *Init, - SourceLocation R, - VarDecl **Indices, - unsigned NumIndices); + static CXXCtorInitializer *Create(ASTContext &Context, FieldDecl *Member, + SourceLocation MemberLoc, SourceLocation L, + Expr *Init, SourceLocation R, + VarDecl **Indices, unsigned NumIndices); /// isBaseInitializer - Returns true when this initializer is /// initializing a base class. - bool isBaseInitializer() const { return BaseOrMember.is(); } + bool isBaseInitializer() const { return Initializee.is(); } /// isMemberInitializer - Returns true when this initializer is /// initializing a non-static data member. - bool isMemberInitializer() const { return BaseOrMember.is(); } + bool isMemberInitializer() const { return Initializee.is(); } + + bool isAnyMemberInitializer() const { + return isMemberInitializer() || isIndirectMemberInitializer(); + } + bool isIndirectMemberInitializer() const { + return Initializee.is(); + } + + /// \brief Determine whether this initializer is a pack expansion. + bool isPackExpansion() const { + return isBaseInitializer() && MemberOrEllipsisLocation.isValid(); + } + + // \brief For a pack expansion, returns the location of the ellipsis. + SourceLocation getEllipsisLoc() const { + assert(isPackExpansion() && "Initializer is not a pack expansion"); + return MemberOrEllipsisLocation; + } + /// If this is a base class initializer, returns the type of the /// base class with location information. Otherwise, returns an NULL /// type location. @@ -1267,7 +1246,6 @@ public: /// If this is a base class initializer, returns the type of the base class. /// Otherwise, returns NULL. const Type *getBaseClass() const; - Type *getBaseClass(); /// Returns whether the base is virtual or not. bool isBaseVirtual() const { @@ -1278,7 +1256,7 @@ public: /// \brief Returns the declarator information for a base class initializer. TypeSourceInfo *getBaseClassInfo() const { - return BaseOrMember.dyn_cast(); + return Initializee.dyn_cast(); } /// getMember - If this is a member initializer, returns the @@ -1286,18 +1264,28 @@ public: /// initialized. Otherwise, returns NULL. FieldDecl *getMember() const { if (isMemberInitializer()) - return BaseOrMember.get(); + return Initializee.get(); + else + return 0; + } + FieldDecl *getAnyMember() const { + if (isMemberInitializer()) + return Initializee.get(); + else if (isIndirectMemberInitializer()) + return Initializee.get()->getAnonField(); else return 0; } - SourceLocation getMemberLocation() const { - return MemberLocation; + IndirectFieldDecl *getIndirectMember() const { + if (isIndirectMemberInitializer()) + return Initializee.get(); + else + return 0; } - void setMember(FieldDecl *Member) { - assert(isMemberInitializer()); - BaseOrMember = Member; + SourceLocation getMemberLocation() const { + return MemberOrEllipsisLocation; } /// \brief Determine the source location of the initializer. @@ -1329,15 +1317,7 @@ public: IsWritten = true; SourceOrderOrNumArrayIndices = static_cast(pos); } - - FieldDecl *getAnonUnionMember() const { - return AnonUnionMember; - } - void setAnonUnionMember(FieldDecl *anonMember) { - AnonUnionMember = anonMember; - } - SourceLocation getLParenLoc() const { return LParenLoc; } SourceLocation getRParenLoc() const { return RParenLoc; } @@ -1388,10 +1368,10 @@ class CXXConstructorDecl : public CXXMethodDecl { bool ImplicitlyDefined : 1; /// Support for base and member initializers. - /// BaseOrMemberInitializers - The arguments used to initialize the base + /// CtorInitializers - The arguments used to initialize the base /// or member. - CXXBaseOrMemberInitializer **BaseOrMemberInitializers; - unsigned NumBaseOrMemberInitializers; + CXXCtorInitializer **CtorInitializers; + unsigned NumCtorInitializers; CXXConstructorDecl(CXXRecordDecl *RD, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, @@ -1400,7 +1380,7 @@ class CXXConstructorDecl : public CXXMethodDecl { : CXXMethodDecl(CXXConstructor, RD, NameInfo, T, TInfo, false, SC_None, isInline), IsExplicitSpecified(isExplicitSpecified), ImplicitlyDefined(false), - BaseOrMemberInitializers(0), NumBaseOrMemberInitializers(0) { + CtorInitializers(0), NumCtorInitializers(0) { setImplicit(isImplicitlyDeclared); } @@ -1443,37 +1423,54 @@ public: } /// init_iterator - Iterates through the member/base initializer list. - typedef CXXBaseOrMemberInitializer **init_iterator; + typedef CXXCtorInitializer **init_iterator; /// init_const_iterator - Iterates through the memberbase initializer list. - typedef CXXBaseOrMemberInitializer * const * init_const_iterator; + typedef CXXCtorInitializer * const * init_const_iterator; /// init_begin() - Retrieve an iterator to the first initializer. - init_iterator init_begin() { return BaseOrMemberInitializers; } + init_iterator init_begin() { return CtorInitializers; } /// begin() - Retrieve an iterator to the first initializer. - init_const_iterator init_begin() const { return BaseOrMemberInitializers; } + init_const_iterator init_begin() const { return CtorInitializers; } /// init_end() - Retrieve an iterator past the last initializer. init_iterator init_end() { - return BaseOrMemberInitializers + NumBaseOrMemberInitializers; + return CtorInitializers + NumCtorInitializers; } /// end() - Retrieve an iterator past the last initializer. init_const_iterator init_end() const { - return BaseOrMemberInitializers + NumBaseOrMemberInitializers; + return CtorInitializers + NumCtorInitializers; + } + + typedef std::reverse_iterator init_reverse_iterator; + typedef std::reverse_iterator init_const_reverse_iterator; + + init_reverse_iterator init_rbegin() { + return init_reverse_iterator(init_end()); + } + init_const_reverse_iterator init_rbegin() const { + return init_const_reverse_iterator(init_end()); + } + + init_reverse_iterator init_rend() { + return init_reverse_iterator(init_begin()); + } + init_const_reverse_iterator init_rend() const { + return init_const_reverse_iterator(init_begin()); } /// getNumArgs - Determine the number of arguments used to /// initialize the member or base. - unsigned getNumBaseOrMemberInitializers() const { - return NumBaseOrMemberInitializers; + unsigned getNumCtorInitializers() const { + return NumCtorInitializers; } - void setNumBaseOrMemberInitializers(unsigned numBaseOrMemberInitializers) { - NumBaseOrMemberInitializers = numBaseOrMemberInitializers; + void setNumCtorInitializers(unsigned numCtorInitializers) { + NumCtorInitializers = numCtorInitializers; } - void setBaseOrMemberInitializers(CXXBaseOrMemberInitializer ** initializers) { - BaseOrMemberInitializers = initializers; + void setCtorInitializers(CXXCtorInitializer ** initializers) { + CtorInitializers = initializers; } /// isDefaultConstructor - Whether this constructor is a default /// constructor (C++ [class.ctor]p5), which can be used to @@ -1502,15 +1499,44 @@ public: return isCopyConstructor(TypeQuals); } + /// \brief Determine whether this constructor is a move constructor + /// (C++0x [class.copy]p3), which can be used to move values of the class. + /// + /// \param TypeQuals If this constructor is a move constructor, will be set + /// to the type qualifiers on the referent of the first parameter's type. + bool isMoveConstructor(unsigned &TypeQuals) const; + + /// \brief Determine whether this constructor is a move constructor + /// (C++0x [class.copy]p3), which can be used to move values of the class. + bool isMoveConstructor() const; + + /// \brief Determine whether this is a copy or move constructor. + /// + /// \param TypeQuals Will be set to the type qualifiers on the reference + /// parameter, if in fact this is a copy or move constructor. + bool isCopyOrMoveConstructor(unsigned &TypeQuals) const; + + /// \brief Determine whether this a copy or move constructor. + bool isCopyOrMoveConstructor() const { + unsigned Quals; + return isCopyOrMoveConstructor(Quals); + } + /// isConvertingConstructor - Whether this constructor is a /// converting constructor (C++ [class.conv.ctor]), which can be /// used for user-defined conversions. bool isConvertingConstructor(bool AllowExplicit) const; /// \brief Determine whether this is a member template specialization that - /// looks like a copy constructor. Such constructors are never used to copy + /// would copy the object to itself. Such constructors are never used to copy /// an object. - bool isCopyConstructorLikeSpecialization() const; + bool isSpecializationCopyingObject() const; + + /// \brief Get the constructor that this inheriting constructor is based on. + const CXXConstructorDecl *getInheritedConstructor() const; + + /// \brief Set the constructor that this inheriting constructor is based on. + void setInheritedConstructor(const CXXConstructorDecl *BaseCtor); // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } @@ -1542,8 +1568,9 @@ class CXXDestructorDecl : public CXXMethodDecl { FunctionDecl *OperatorDelete; CXXDestructorDecl(CXXRecordDecl *RD, const DeclarationNameInfo &NameInfo, - QualType T, bool isInline, bool isImplicitlyDeclared) - : CXXMethodDecl(CXXDestructor, RD, NameInfo, T, /*TInfo=*/0, false, + QualType T, TypeSourceInfo *TInfo, + bool isInline, bool isImplicitlyDeclared) + : CXXMethodDecl(CXXDestructor, RD, NameInfo, T, TInfo, false, SC_None, isInline), ImplicitlyDefined(false), OperatorDelete(0) { setImplicit(isImplicitlyDeclared); @@ -1553,7 +1580,8 @@ public: static CXXDestructorDecl *Create(ASTContext& C, EmptyShell Empty); static CXXDestructorDecl *Create(ASTContext &C, CXXRecordDecl *RD, const DeclarationNameInfo &NameInfo, - QualType T, bool isInline, + QualType T, TypeSourceInfo* TInfo, + bool isInline, bool isImplicitlyDeclared); /// isImplicitlyDefined - Whether this destructor was implicitly @@ -1918,13 +1946,16 @@ class UsingShadowDecl : public NamedDecl { /// The referenced declaration. NamedDecl *Underlying; - /// The using declaration which introduced this decl. - UsingDecl *Using; + /// \brief The using declaration which introduced this decl or the next using + /// shadow declaration contained in the aforementioned using declaration. + NamedDecl *UsingOrNextShadow; + friend class UsingDecl; UsingShadowDecl(DeclContext *DC, SourceLocation Loc, UsingDecl *Using, NamedDecl *Target) : NamedDecl(UsingShadow, DC, Loc, DeclarationName()), - Underlying(Target), Using(Using) { + Underlying(Target), + UsingOrNextShadow(reinterpret_cast(Using)) { if (Target) { setDeclName(Target->getDeclName()); IdentifierNamespace = Target->getIdentifierNamespace(); @@ -1952,15 +1983,20 @@ public: } /// \brief Gets the using declaration to which this declaration is tied. - UsingDecl *getUsingDecl() const { return Using; } + UsingDecl *getUsingDecl() const; - /// \brief Sets the using declaration that introduces this target - /// declaration. - void setUsingDecl(UsingDecl* UD) { Using = UD; } + /// \brief The next using shadow declaration contained in the shadow decl + /// chain of the using declaration which introduced this decl. + UsingShadowDecl *getNextUsingShadowDecl() const { + return dyn_cast_or_null(UsingOrNextShadow); + } static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const UsingShadowDecl *D) { return true; } static bool classofKind(Kind K) { return K == Decl::UsingShadow; } + + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// UsingDecl - Represents a C++ using-declaration. For example: @@ -1980,10 +2016,9 @@ class UsingDecl : public NamedDecl { /// 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. - llvm::SmallPtrSet Shadows; + /// \brief The first shadow declaration of the shadow decl chain associated + /// with this using declaration. + UsingShadowDecl *FirstUsingShadow; // \brief Has 'typename' keyword. bool IsTypeName; @@ -1993,7 +2028,7 @@ class UsingDecl : public NamedDecl { const DeclarationNameInfo &NameInfo, bool IsTypeNameArg) : NamedDecl(Using, DC, NameInfo.getLoc(), NameInfo.getName()), NestedNameRange(NNR), UsingLocation(UL), TargetNestedName(TargetNNS), - DNLoc(NameInfo.getInfo()), IsTypeName(IsTypeNameArg) { + DNLoc(NameInfo.getInfo()), FirstUsingShadow(0),IsTypeName(IsTypeNameArg) { } public: @@ -2031,29 +2066,58 @@ public: /// \brief Sets whether the using declaration has 'typename'. void setTypeName(bool TN) { IsTypeName = TN; } - typedef llvm::SmallPtrSet::const_iterator shadow_iterator; - shadow_iterator shadow_begin() const { return Shadows.begin(); } - shadow_iterator shadow_end() const { return Shadows.end(); } + /// \brief Iterates through the using shadow declarations assosiated with + /// this using declaration. + class shadow_iterator { + /// \brief The current using shadow declaration. + UsingShadowDecl *Current; + + public: + typedef UsingShadowDecl* value_type; + typedef UsingShadowDecl* reference; + typedef UsingShadowDecl* pointer; + typedef std::forward_iterator_tag iterator_category; + typedef std::ptrdiff_t difference_type; + + shadow_iterator() : Current(0) { } + explicit shadow_iterator(UsingShadowDecl *C) : Current(C) { } - void addShadowDecl(UsingShadowDecl *S) { - assert(S->getUsingDecl() == this); - if (!Shadows.insert(S)) { - assert(false && "declaration already in set"); + reference operator*() const { return Current; } + pointer operator->() const { return Current; } + + shadow_iterator& operator++() { + Current = Current->getNextUsingShadowDecl(); + return *this; } - } - void removeShadowDecl(UsingShadowDecl *S) { - assert(S->getUsingDecl() == this); - if (!Shadows.erase(S)) { - assert(false && "declaration not in set"); + + shadow_iterator operator++(int) { + shadow_iterator tmp(*this); + ++(*this); + return tmp; } + + friend bool operator==(shadow_iterator x, shadow_iterator y) { + return x.Current == y.Current; + } + friend bool operator!=(shadow_iterator x, shadow_iterator y) { + return x.Current != y.Current; + } + }; + + shadow_iterator shadow_begin() const { + return shadow_iterator(FirstUsingShadow); } + shadow_iterator shadow_end() const { return shadow_iterator(); } /// \brief Return the number of shadowed declarations associated with this /// using declaration. - unsigned getNumShadowDecls() const { - return Shadows.size(); + unsigned shadow_size() const { + return std::distance(shadow_begin(), shadow_end()); } + void addShadowDecl(UsingShadowDecl *S); + void removeShadowDecl(UsingShadowDecl *S); + static UsingDecl *Create(ASTContext &C, DeclContext *DC, SourceRange NNR, SourceLocation UsingL, NestedNameSpecifier* TargetNNS, @@ -2145,6 +2209,9 @@ public: static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const UnresolvedUsingValueDecl *D) { return true; } static bool classofKind(Kind K) { return K == UnresolvedUsingValue; } + + friend class ASTDeclReader; + friend class ASTDeclWriter; }; /// UnresolvedUsingTypenameDecl - Represents a dependent using diff --git a/include/clang/AST/DeclFriend.h b/include/clang/AST/DeclFriend.h index 4b5e6fd48bb3c..20d6da19b8ca0 100644 --- a/include/clang/AST/DeclFriend.h +++ b/include/clang/AST/DeclFriend.h @@ -43,11 +43,16 @@ private: FriendUnion Friend; // A pointer to the next friend in the sequence. - FriendDecl *NextFriend; + LazyDeclPtr NextFriend; // Location of the 'friend' specifier. SourceLocation FriendLoc; + /// True if this 'friend' declaration is unsupported. Eventually we + /// will support every possible friend declaration, but for now we + /// silently ignore some and set this flag to authorize all access. + bool UnsupportedFriend; + friend class CXXRecordDecl::friend_iterator; friend class CXXRecordDecl; @@ -55,13 +60,19 @@ private: SourceLocation FriendL) : Decl(Decl::Friend, DC, L), Friend(Friend), - NextFriend(0), - FriendLoc(FriendL) { + NextFriend(), + FriendLoc(FriendL), + UnsupportedFriend(false) { } explicit FriendDecl(EmptyShell Empty) - : Decl(Decl::Friend, Empty), NextFriend(0) { } + : Decl(Decl::Friend, Empty), NextFriend() { } + FriendDecl *getNextFriend() { + return cast_or_null( + NextFriend.get(getASTContext().getExternalSource())); + } + public: static FriendDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, FriendUnion Friend_, @@ -87,6 +98,14 @@ public: return FriendLoc; } + /// Determines if this friend kind is unsupported. + bool isUnsupportedFriend() const { + return UnsupportedFriend; + } + void setUnsupportedFriend(bool Unsupported) { + UnsupportedFriend = Unsupported; + } + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const FriendDecl *D) { return true; } @@ -115,7 +134,7 @@ public: friend_iterator &operator++() { assert(Ptr && "attempt to increment past end of friend list"); - Ptr = Ptr->NextFriend; + Ptr = Ptr->getNextFriend(); return *this; } diff --git a/include/clang/AST/DeclGroup.h b/include/clang/AST/DeclGroup.h index 030291ea7345e..cb9e1681cc06f 100644 --- a/include/clang/AST/DeclGroup.h +++ b/include/clang/AST/DeclGroup.h @@ -14,7 +14,7 @@ #ifndef LLVM_CLANG_AST_DECLGROUP_H #define LLVM_CLANG_AST_DECLGROUP_H -#include "llvm/System/DataTypes.h" +#include "llvm/Support/DataTypes.h" #include namespace clang { diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index ad26748e1343d..b3ca474fcc191 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -28,7 +28,7 @@ class ObjCProtocolDecl; class ObjCCategoryDecl; class ObjCPropertyDecl; class ObjCPropertyImplDecl; -class CXXBaseOrMemberInitializer; +class CXXCtorInitializer; class ObjCListBase { void operator=(const ObjCListBase &); // DO NOT IMPLEMENT @@ -437,7 +437,7 @@ public: class ObjCInterfaceDecl : public ObjCContainerDecl { /// TypeForDecl - This indicates the Type object that represents this /// TypeDecl. It is a cache maintained by ASTContext::getObjCInterfaceType - mutable Type *TypeForDecl; + mutable const Type *TypeForDecl; friend class ASTContext; /// Class's super class. @@ -449,8 +449,11 @@ class ObjCInterfaceDecl : public ObjCContainerDecl { /// Protocols reference in both the @interface and class extensions. ObjCList AllReferencedProtocols; - /// List of categories defined for this class. - /// FIXME: Why is this a linked list?? + /// \brief List of categories and class extensions defined for this class. + /// + /// Categories are stored as a linked list in the AST, since the categories + /// and class extensions come long after the initial interface declaration, + /// and we avoid dynamically-resized arrays in the AST whereever possible. ObjCCategoryDecl *CategoryList; /// IvarList - List of all ivars defined by this class; including class @@ -459,7 +462,11 @@ class ObjCInterfaceDecl : public ObjCContainerDecl { bool ForwardDecl:1; // declared with @class. bool InternalInterface:1; // true - no @interface for @implementation - + + /// \brief Indicates that the contents of this Objective-C class will be + /// completed by the external AST source when required. + mutable bool ExternallyCompleted : 1; + SourceLocation ClassLoc; // location of the class identifier. SourceLocation SuperClassLoc; // location of the super class identifier. SourceLocation EndLoc; // marks the '>', '}', or identifier. @@ -467,6 +474,7 @@ class ObjCInterfaceDecl : public ObjCContainerDecl { ObjCInterfaceDecl(DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id, SourceLocation CLoc, bool FD, bool isInternal); + void LoadExternalDefinition() const; public: static ObjCInterfaceDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation atLoc, @@ -474,7 +482,16 @@ public: SourceLocation ClassLoc = SourceLocation(), bool ForwardDecl = false, bool isInternal = false); + + /// \brief Indicate that this Objective-C class is complete, but that + /// the external AST source will be responsible for filling in its contents + /// when a complete class is required. + void setExternallyCompleted(); + const ObjCProtocolList &getReferencedProtocols() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return ReferencedProtocols; } @@ -494,29 +511,47 @@ public: typedef ObjCProtocolList::iterator protocol_iterator; protocol_iterator protocol_begin() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return ReferencedProtocols.begin(); } protocol_iterator protocol_end() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return ReferencedProtocols.end(); } typedef ObjCProtocolList::loc_iterator protocol_loc_iterator; protocol_loc_iterator protocol_loc_begin() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return ReferencedProtocols.loc_begin(); } protocol_loc_iterator protocol_loc_end() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return ReferencedProtocols.loc_end(); } typedef ObjCList::iterator all_protocol_iterator; all_protocol_iterator all_referenced_protocol_begin() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return AllReferencedProtocols.empty() ? protocol_begin() : AllReferencedProtocols.begin(); } all_protocol_iterator all_referenced_protocol_end() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + return AllReferencedProtocols.empty() ? protocol_end() : AllReferencedProtocols.end(); } @@ -551,10 +586,22 @@ public: bool isForwardDecl() const { return ForwardDecl; } void setForwardDecl(bool val) { ForwardDecl = val; } - ObjCInterfaceDecl *getSuperClass() const { return SuperClass; } + ObjCInterfaceDecl *getSuperClass() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + + return SuperClass; + } + void setSuperClass(ObjCInterfaceDecl * superCls) { SuperClass = superCls; } - ObjCCategoryDecl* getCategoryList() const { return CategoryList; } + ObjCCategoryDecl* getCategoryList() const { + if (ExternallyCompleted) + LoadExternalDefinition(); + + return CategoryList; + } + void setCategoryList(ObjCCategoryDecl *category) { CategoryList = category; } @@ -595,7 +642,7 @@ public: ObjCInterfaceDecl *lookupInheritedClass(const IdentifierInfo *ICName); // Lookup a method in the classes implementation hierarchy. - ObjCMethodDecl *lookupPrivateInstanceMethod(const Selector &Sel); + ObjCMethodDecl *lookupPrivateMethod(const Selector &Sel, bool Instance=true); // Location information, modeled after the Stmt API. SourceLocation getLocStart() const { return getLocation(); } // '@'interface @@ -621,8 +668,8 @@ public: bool RHSIsQualifiedID = false); // Low-level accessor - Type *getTypeForDecl() const { return TypeForDecl; } - void setTypeForDecl(Type *TD) const { TypeForDecl = TD; } + const Type *getTypeForDecl() const { return TypeForDecl; } + void setTypeForDecl(const Type *TD) const { TypeForDecl = TD; } static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const ObjCInterfaceDecl *D) { return true; } @@ -991,6 +1038,7 @@ public: void insertNextClassCategory() { NextClassCategory = ClassInterface->getCategoryList(); ClassInterface->setCategoryList(this); + ClassInterface->setChangedSinceDeserialization(true); } bool IsClassExtension() const { return getIdentifier() == 0; } @@ -1168,7 +1216,7 @@ class ObjCImplementationDecl : public ObjCImplDecl { ObjCInterfaceDecl *SuperClass; /// Support for ivar initialization. /// IvarInitializers - The arguments used to initialize the ivars - CXXBaseOrMemberInitializer **IvarInitializers; + CXXCtorInitializer **IvarInitializers; unsigned NumIvarInitializers; /// true of class extension has at least one bitfield ivar. @@ -1187,10 +1235,10 @@ public: ObjCInterfaceDecl *superDecl); /// init_iterator - Iterates through the ivar initializer list. - typedef CXXBaseOrMemberInitializer **init_iterator; + typedef CXXCtorInitializer **init_iterator; /// init_const_iterator - Iterates through the ivar initializer list. - typedef CXXBaseOrMemberInitializer * const * init_const_iterator; + typedef CXXCtorInitializer * const * init_const_iterator; /// init_begin() - Retrieve an iterator to the first initializer. init_iterator init_begin() { return IvarInitializers; } @@ -1215,7 +1263,7 @@ public: } void setIvarInitializers(ASTContext &C, - CXXBaseOrMemberInitializer ** initializers, + CXXCtorInitializer ** initializers, unsigned numInitializers); bool hasSynthBitfield() const { return HasSynthBitfield; } @@ -1322,7 +1370,8 @@ public: OBJC_PR_retain = 0x10, OBJC_PR_copy = 0x20, OBJC_PR_nonatomic = 0x40, - OBJC_PR_setter = 0x80 + OBJC_PR_setter = 0x80, + OBJC_PR_atomic = 0x100 }; enum SetterKind { Assign, Retain, Copy }; @@ -1330,8 +1379,8 @@ public: private: SourceLocation AtLoc; // location of @property TypeSourceInfo *DeclType; - unsigned PropertyAttributes : 8; - unsigned PropertyAttributesAsWritten : 8; + unsigned PropertyAttributes : 9; + unsigned PropertyAttributesAsWritten : 9; // @required/@optional unsigned PropertyImplementation : 2; @@ -1429,6 +1478,10 @@ public: return PropertyIvarDecl; } + virtual SourceRange getSourceRange() const { + return SourceRange(AtLoc, getLocation()); + } + /// Lookup a property by name in the specified DeclContext. static ObjCPropertyDecl *findPropertyDecl(const DeclContext *DC, IdentifierInfo *propertyID); @@ -1450,6 +1503,15 @@ public: }; private: SourceLocation AtLoc; // location of @synthesize or @dynamic + + /// \brief For @synthesize, the location of the ivar, if it was written in + /// the source code. + /// + /// \code + /// @synthesize int a = b + /// \endcode + SourceLocation IvarLoc; + /// Property declaration being implemented ObjCPropertyDecl *PropertyDecl; @@ -1466,9 +1528,10 @@ private: ObjCPropertyImplDecl(DeclContext *DC, SourceLocation atLoc, SourceLocation L, ObjCPropertyDecl *property, Kind PK, - ObjCIvarDecl *ivarDecl) + ObjCIvarDecl *ivarDecl, + SourceLocation ivarLoc) : Decl(ObjCPropertyImpl, DC, L), AtLoc(atLoc), - PropertyDecl(property), PropertyIvarDecl(ivarDecl), + IvarLoc(ivarLoc), PropertyDecl(property), PropertyIvarDecl(ivarDecl), GetterCXXConstructor(0), SetterCXXAssignment(0) { assert (PK == Dynamic || PropertyIvarDecl); } @@ -1478,11 +1541,11 @@ public: SourceLocation atLoc, SourceLocation L, ObjCPropertyDecl *property, Kind PK, - ObjCIvarDecl *ivarDecl); + ObjCIvarDecl *ivarDecl, + SourceLocation ivarLoc); - virtual SourceRange getSourceRange() const { - return SourceRange(AtLoc, getLocation()); - } + virtual SourceRange getSourceRange() const; + SourceLocation getLocStart() const { return AtLoc; } void setAtLoc(SourceLocation Loc) { AtLoc = Loc; } @@ -1498,7 +1561,13 @@ public: ObjCIvarDecl *getPropertyIvarDecl() const { return PropertyIvarDecl; } - void setPropertyIvarDecl(ObjCIvarDecl *Ivar) { PropertyIvarDecl = Ivar; } + SourceLocation getPropertyIvarDeclLoc() const { return IvarLoc; } + + void setPropertyIvarDecl(ObjCIvarDecl *Ivar, + SourceLocation IvarLoc) { + PropertyIvarDecl = Ivar; + this->IvarLoc = IvarLoc; + } Expr *getGetterCXXConstructor() const { return GetterCXXConstructor; @@ -1517,6 +1586,8 @@ public: static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const ObjCPropertyImplDecl *D) { return true; } static bool classofKind(Decl::Kind K) { return K == ObjCPropertyImpl; } + + friend class ASTDeclReader; }; } // end namespace clang diff --git a/include/clang/AST/DeclTemplate.h b/include/clang/AST/DeclTemplate.h index b532668242fd0..176c6badae16f 100644 --- a/include/clang/AST/DeclTemplate.h +++ b/include/clang/AST/DeclTemplate.h @@ -53,7 +53,7 @@ class TemplateParameterList { SourceLocation RAngleLoc); public: - static TemplateParameterList *Create(ASTContext &C, + static TemplateParameterList *Create(const ASTContext &C, SourceLocation TemplateLoc, SourceLocation LAngleLoc, NamedDecl **Params, @@ -85,7 +85,7 @@ public: return begin()[Idx]; } - /// \btief Returns the minimum number of arguments needed to form a + /// \brief Returns the minimum number of arguments needed to form a /// template specialization. This may be fewer than the number of /// template parameters, if some of the parameters have default /// arguments or if there is a parameter pack. @@ -107,101 +107,57 @@ public: } }; -/// \brief A helper class for making template argument lists. -class TemplateArgumentListBuilder { - TemplateArgument *StructuredArgs; - unsigned MaxStructuredArgs; - unsigned NumStructuredArgs; - - llvm::SmallVector FlatArgs; - unsigned MaxFlatArgs; - unsigned NumFlatArgs; - - bool AddingToPack; - unsigned PackBeginIndex; - -public: - TemplateArgumentListBuilder(const TemplateParameterList *Parameters, - unsigned NumTemplateArgs) - : StructuredArgs(0), MaxStructuredArgs(Parameters->size()), - NumStructuredArgs(0), FlatArgs(0), - MaxFlatArgs(std::max(MaxStructuredArgs, NumTemplateArgs)), NumFlatArgs(0), - AddingToPack(false), PackBeginIndex(0) { } - - void Append(const TemplateArgument &Arg); - void BeginPack(); - void EndPack(); - - unsigned flatSize() const { return FlatArgs.size(); } - const TemplateArgument *getFlatArguments() const { return FlatArgs.data(); } - - unsigned structuredSize() const { - // If we don't have any structured args, just reuse the flat size. - if (!StructuredArgs) - return flatSize(); - - return NumStructuredArgs; - } - const TemplateArgument *getStructuredArguments() const { - // If we don't have any structured args, just reuse the flat args. - if (!StructuredArgs) - return getFlatArguments(); - - return StructuredArgs; - } -}; - /// \brief A template argument list. -/// -/// FIXME: In the future, this class will be extended to support -/// variadic templates and member templates, which will make some of -/// the function names below make more sense. class TemplateArgumentList { /// \brief The template argument list. /// /// The integer value will be non-zero to indicate that this /// template argument list does own the pointer. - llvm::PointerIntPair FlatArguments; + llvm::PointerIntPair Arguments; /// \brief The number of template arguments in this template /// argument list. - unsigned NumFlatArguments; - - llvm::PointerIntPair StructuredArguments; - unsigned NumStructuredArguments; + unsigned NumArguments; TemplateArgumentList(const TemplateArgumentList &Other); // DO NOT IMPL void operator=(const TemplateArgumentList &Other); // DO NOT IMPL + + TemplateArgumentList(const TemplateArgument *Args, unsigned NumArgs, + bool Owned) + : Arguments(Args, Owned), NumArguments(NumArgs) { } + public: - /// TemplateArgumentList - If this constructor is passed "true" for 'TakeArgs' - /// it copies them into a locally new[]'d array. If passed "false", then it - /// just references the array passed in. This is only safe if the builder - /// outlives it, but saves a copy. - TemplateArgumentList(ASTContext &Context, - TemplateArgumentListBuilder &Builder, - bool TakeArgs); - - /// TemplateArgumentList - It copies the template arguments into a locally - /// new[]'d array. - TemplateArgumentList(ASTContext &Context, - const TemplateArgument *Args, unsigned NumArgs); - - /// Produces a shallow copy of the given template argument list. This - /// assumes that the input argument list outlives it. This takes the list as - /// a pointer to avoid looking like a copy constructor, since this really - /// really isn't safe to use that way. - explicit TemplateArgumentList(const TemplateArgumentList *Other); - - TemplateArgumentList() : NumFlatArguments(0), NumStructuredArguments(0) { } - - /// \brief Copies the template arguments into a locally new[]'d array. - void init(ASTContext &Context, - const TemplateArgument *Args, unsigned NumArgs); + /// \brief Type used to indicate that the template argument list itself is a + /// stack object. It does not own its template arguments. + enum OnStackType { OnStack }; + + /// \brief Create a new template argument list that copies the given set of + /// template arguments. + static TemplateArgumentList *CreateCopy(ASTContext &Context, + const TemplateArgument *Args, + unsigned NumArgs); + + /// \brief Construct a new, temporary template argument list on the stack. + /// + /// The template argument list does not own the template arguments + /// provided. + explicit TemplateArgumentList(OnStackType, + const TemplateArgument *Args, unsigned NumArgs) + : Arguments(Args, false), NumArguments(NumArgs) { } + + /// \brief Produces a shallow copy of the given template argument list. + /// + /// This operation assumes that the input argument list outlives it. + /// This takes the list as a pointer to avoid looking like a copy + /// constructor, since this really really isn't safe to use that + /// way. + explicit TemplateArgumentList(const TemplateArgumentList *Other) + : Arguments(Other->data(), false), NumArguments(Other->size()) { } /// \brief Retrieve the template argument at a given index. const TemplateArgument &get(unsigned Idx) const { - assert(Idx < NumFlatArguments && "Invalid template argument index"); - return getFlatArgumentList()[Idx]; + assert(Idx < NumArguments && "Invalid template argument index"); + return data()[Idx]; } /// \brief Retrieve the template argument at a given index. @@ -209,15 +165,11 @@ public: /// \brief Retrieve the number of template arguments in this /// template argument list. - unsigned size() const { return NumFlatArguments; } - - /// \brief Retrieve the number of template arguments in the - /// flattened template argument list. - unsigned flat_size() const { return NumFlatArguments; } + unsigned size() const { return NumArguments; } - /// \brief Retrieve the flattened template argument list. - const TemplateArgument *getFlatArgumentList() const { - return FlatArguments.getPointer(); + /// \brief Retrieve a pointer to the template argument list. + const TemplateArgument *data() const { + return Arguments.getPointer(); } }; @@ -292,7 +244,31 @@ public: /// which is a FunctionDecl that has been explicitly specialization or /// instantiated from a function template. class FunctionTemplateSpecializationInfo : public llvm::FoldingSetNode { + FunctionTemplateSpecializationInfo(FunctionDecl *FD, + FunctionTemplateDecl *Template, + TemplateSpecializationKind TSK, + const TemplateArgumentList *TemplateArgs, + const TemplateArgumentListInfo *TemplateArgsAsWritten, + SourceLocation POI) + : Function(FD), + Template(Template, TSK - 1), + TemplateArguments(TemplateArgs), + TemplateArgumentsAsWritten(TemplateArgsAsWritten), + PointOfInstantiation(POI) { } + public: + static FunctionTemplateSpecializationInfo * + Create(ASTContext &C, FunctionDecl *FD, FunctionTemplateDecl *Template, + TemplateSpecializationKind TSK, + const TemplateArgumentList *TemplateArgs, + const TemplateArgumentListInfo *TemplateArgsAsWritten, + SourceLocation POI) { + return new (C) FunctionTemplateSpecializationInfo(FD, Template, TSK, + TemplateArgs, + TemplateArgsAsWritten, + POI); + } + /// \brief The function template specialization that this structure /// describes. FunctionDecl *Function; @@ -345,8 +321,8 @@ public: } void Profile(llvm::FoldingSetNodeID &ID) { - Profile(ID, TemplateArguments->getFlatArgumentList(), - TemplateArguments->flat_size(), + Profile(ID, TemplateArguments->data(), + TemplateArguments->size(), Function->getASTContext()); } @@ -441,11 +417,6 @@ class DependentFunctionTemplateSpecializationInfo { return reinterpret_cast(this+1); } - const TemplateArgumentLoc *getTemplateArgs() const { - return reinterpret_cast( - &getTemplates()[getNumTemplates()]); - } - public: DependentFunctionTemplateSpecializationInfo( const UnresolvedSetImpl &Templates, @@ -463,6 +434,12 @@ public: return getTemplates()[I]; } + /// \brief Returns the explicit template arguments that were given. + const TemplateArgumentLoc *getTemplateArgs() const { + return reinterpret_cast( + &getTemplates()[getNumTemplates()]); + } + /// \brief Returns the number of explicit template arguments that were given. unsigned getNumTemplateArgs() const { return d.NumArgs; @@ -584,7 +561,7 @@ protected: /// for the common pointer. CommonBase *getCommonPtr(); - virtual CommonBase *newCommon() = 0; + virtual CommonBase *newCommon(ASTContext &C) = 0; // Construct a template decl with name, parameters, and templated element. RedeclarableTemplateDecl(Kind DK, DeclContext *DC, SourceLocation L, @@ -789,19 +766,13 @@ protected: TemplateParameterList *Params, NamedDecl *Decl) : RedeclarableTemplateDecl(FunctionTemplate, DC, L, Name, Params, Decl) { } - CommonBase *newCommon(); + CommonBase *newCommon(ASTContext &C); Common *getCommonPtr() { return static_cast(RedeclarableTemplateDecl::getCommonPtr()); } - friend void FunctionDecl::setFunctionTemplateSpecialization( - FunctionTemplateDecl *Template, - const TemplateArgumentList *TemplateArgs, - void *InsertPos, - TemplateSpecializationKind TSK, - const TemplateArgumentListInfo *TemplateArgsAsWritten, - SourceLocation PointOfInstantiation); + friend class FunctionDecl; /// \brief Retrieve the set of function template specializations of this /// function template. @@ -940,15 +911,15 @@ class TemplateTypeParmDecl : public TypeDecl { bool Typename, QualType Type, bool ParameterPack) : TypeDecl(TemplateTypeParm, DC, L, Id), Typename(Typename), InheritedDefault(false), ParameterPack(ParameterPack), DefaultArgument() { - TypeForDecl = Type.getTypePtr(); + TypeForDecl = Type.getTypePtrOrNull(); } public: - static TemplateTypeParmDecl *Create(ASTContext &C, DeclContext *DC, + static TemplateTypeParmDecl *Create(const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, unsigned P, IdentifierInfo *Id, bool Typename, bool ParameterPack); - static TemplateTypeParmDecl *Create(ASTContext &C, EmptyShell Empty); + static TemplateTypeParmDecl *Create(const ASTContext &C, EmptyShell Empty); /// \brief Whether this template type parameter was declared with /// the 'typename' keyword. If not, it was declared with the 'class' @@ -1014,22 +985,54 @@ public: /// template class array { }; /// @endcode class NonTypeTemplateParmDecl - : public VarDecl, protected TemplateParmPosition { + : public DeclaratorDecl, protected TemplateParmPosition { /// \brief The default template argument, if any, and whether or not /// it was inherited. llvm::PointerIntPair DefaultArgumentAndInherited; + // FIXME: Collapse this into TemplateParamPosition; or, just move depth/index + // down here to save memory. + + /// \brief Whether this non-type template parameter is a parameter pack. + bool ParameterPack; + + /// \brief Whether this non-type template parameter is an "expanded" + /// parameter pack, meaning that its type is a pack expansion and we + /// already know the set of types that expansion expands to. + bool ExpandedParameterPack; + + /// \brief The number of types in an expanded parameter pack. + unsigned NumExpandedTypes; + NonTypeTemplateParmDecl(DeclContext *DC, SourceLocation L, unsigned D, unsigned P, IdentifierInfo *Id, QualType T, - TypeSourceInfo *TInfo) - : VarDecl(NonTypeTemplateParm, DC, L, Id, T, TInfo, SC_None, SC_None), - TemplateParmPosition(D, P), DefaultArgumentAndInherited(0, false) + bool ParameterPack, TypeSourceInfo *TInfo) + : DeclaratorDecl(NonTypeTemplateParm, DC, L, Id, T, TInfo), + TemplateParmPosition(D, P), DefaultArgumentAndInherited(0, false), + ParameterPack(ParameterPack), ExpandedParameterPack(false), + NumExpandedTypes(0) { } + NonTypeTemplateParmDecl(DeclContext *DC, SourceLocation L, unsigned D, + unsigned P, IdentifierInfo *Id, QualType T, + TypeSourceInfo *TInfo, + const QualType *ExpandedTypes, + unsigned NumExpandedTypes, + TypeSourceInfo **ExpandedTInfos); + + friend class ASTDeclReader; + public: static NonTypeTemplateParmDecl * - Create(ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, - unsigned P, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo); + Create(const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, + unsigned P, IdentifierInfo *Id, QualType T, bool ParameterPack, + TypeSourceInfo *TInfo); + + static NonTypeTemplateParmDecl * + Create(const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, + unsigned P, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, + const QualType *ExpandedTypes, unsigned NumExpandedTypes, + TypeSourceInfo **ExpandedTInfos); using TemplateParmPosition::getDepth; using TemplateParmPosition::setDepth; @@ -1037,6 +1040,9 @@ public: using TemplateParmPosition::setPosition; using TemplateParmPosition::getIndex; + SourceLocation getInnerLocStart() const; + SourceRange getSourceRange() const; + /// \brief Determine whether this template parameter has a default /// argument. bool hasDefaultArgument() const { @@ -1071,6 +1077,65 @@ public: DefaultArgumentAndInherited.setInt(false); } + /// \brief Whether this parameter is a non-type template parameter pack. + /// + /// If the parameter is a parameter pack, the type may be a + /// \c PackExpansionType. In the following example, the \c Dims parameter + /// is a parameter pack (whose type is 'unsigned'). + /// + /// \code + /// template struct multi_array; + /// \endcode + bool isParameterPack() const { return ParameterPack; } + + /// \brief Whether this parameter is a non-type template parameter pack + /// that has different types at different positions. + /// + /// A parameter pack is an expanded parameter pack when the original + /// parameter pack's type was itself a pack expansion, and that expansion + /// has already been expanded. For example, given: + /// + /// \code + /// template + /// struct X { + /// template + /// struct Y { /* ... */ }; + /// }; + /// \endcode + /// + /// The parameter pack \c Values has a \c PackExpansionType as its type, + /// which expands \c Types. When \c Types is supplied with template arguments + /// by instantiating \c X, the instantiation of \c Values becomes an + /// expanded parameter pack. For example, instantiating + /// \c X results in \c Values being an expanded parameter + /// pack with expansion types \c int and \c unsigned int. + /// + /// The \c getExpansionType() and \c getExpansionTypeSourceInfo() functions + /// return the expansion types. + bool isExpandedParameterPack() const { return ExpandedParameterPack; } + + /// \brief Retrieves the number of expansion types in an expanded parameter pack. + unsigned getNumExpansionTypes() const { + assert(ExpandedParameterPack && "Not an expansion parameter pack"); + return NumExpandedTypes; + } + + /// \brief Retrieve a particular expansion type within an expanded parameter + /// pack. + QualType getExpansionType(unsigned I) const { + assert(I < NumExpandedTypes && "Out-of-range expansion type index"); + void * const *TypesAndInfos = reinterpret_cast(this + 1); + return QualType::getFromOpaquePtr(TypesAndInfos[2*I]); + } + + /// \brief Retrieve a particular expansion type source info within an + /// expanded parameter pack. + TypeSourceInfo *getExpansionTypeSourceInfo(unsigned I) const { + assert(I < NumExpandedTypes && "Out-of-range expansion type index"); + void * const *TypesAndInfos = reinterpret_cast(this + 1); + return static_cast(TypesAndInfos[2*I+1]); + } + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const NonTypeTemplateParmDecl *D) { return true; } @@ -1092,24 +1157,36 @@ class TemplateTemplateParmDecl /// Whether or not the default argument was inherited. bool DefaultArgumentWasInherited; + /// \brief Whether this parameter is a parameter pack. + bool ParameterPack; + TemplateTemplateParmDecl(DeclContext *DC, SourceLocation L, - unsigned D, unsigned P, + unsigned D, unsigned P, bool ParameterPack, IdentifierInfo *Id, TemplateParameterList *Params) : TemplateDecl(TemplateTemplateParm, DC, L, Id, Params), TemplateParmPosition(D, P), DefaultArgument(), - DefaultArgumentWasInherited(false) + DefaultArgumentWasInherited(false), ParameterPack(ParameterPack) { } public: - static TemplateTemplateParmDecl *Create(ASTContext &C, DeclContext *DC, + static TemplateTemplateParmDecl *Create(const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, - unsigned P, IdentifierInfo *Id, + unsigned P, bool ParameterPack, + IdentifierInfo *Id, TemplateParameterList *Params); using TemplateParmPosition::getDepth; using TemplateParmPosition::getPosition; using TemplateParmPosition::getIndex; + /// \brief Whether this template template parameter is a template + /// parameter pack. + /// + /// \code + /// template