From dbe13110f59f48b4dbb7552b3ac2935acdeece7f Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 14 Apr 2012 14:01:31 +0000 Subject: Vendor import of clang trunk r154661: http://llvm.org/svn/llvm-project/cfe/trunk@r154661 --- CMakeLists.txt | 12 +- INPUTS/all-std-headers.cpp | 37 +- LICENSE.TXT | 2 +- NOTES.txt | 11 + bindings/python/clang/cindex.py | 375 +- bindings/python/tests/cindex/test_cursor.py | 37 +- bindings/python/tests/cindex/test_cursor_kind.py | 9 + bindings/python/tests/cindex/test_diagnostics.py | 39 +- bindings/python/tests/cindex/test_file.py | 9 + bindings/python/tests/cindex/test_location.py | 100 +- bindings/python/tests/cindex/test_type.py | 294 +- bindings/python/tests/cindex/util.py | 65 + docs/AddressSanitizer.html | 139 + docs/AnalyzerRegions.html | 6 +- docs/AutomaticReferenceCounting.html | 387 +- docs/Block-ABI-Apple.txt | 1 - docs/DriverInternals.html | 26 +- docs/InternalsManual.html | 64 +- docs/LanguageExtensions.html | 660 +- docs/ObjectiveCLiterals.html | 314 + docs/PCHInternals.html | 8 +- docs/PTHInternals.html | 6 +- docs/ReleaseNotes.html | 193 + docs/UsersManual.html | 89 +- docs/doxygen.cfg.in | 2 +- docs/tools/clang.pod | 2 +- examples/CMakeLists.txt | 5 + examples/Makefile | 2 +- examples/PrintFunctionNames/PrintFunctionNames.cpp | 4 +- examples/PrintFunctionNames/README.txt | 4 + examples/analyzer-plugin/CMakeLists.txt | 2 +- examples/analyzer-plugin/MainCallChecker.cpp | 7 +- examples/analyzer-plugin/Makefile | 2 +- examples/clang-interpreter/CMakeLists.txt | 1 + examples/clang-interpreter/Makefile | 5 +- examples/clang-interpreter/main.cpp | 16 +- examples/wpa/CMakeLists.txt | 26 - examples/wpa/Makefile | 26 - examples/wpa/clang-wpa.cpp | 181 - include/clang-c/Index.h | 952 ++- include/clang-c/Makefile | 19 +- include/clang/ARCMigrate/ARCMT.h | 18 +- include/clang/ARCMigrate/ARCMTActions.h | 26 + include/clang/ARCMigrate/FileRemapper.h | 11 +- include/clang/AST/APValue.h | 269 +- include/clang/AST/ASTConsumer.h | 24 +- include/clang/AST/ASTContext.h | 221 +- include/clang/AST/ASTDiagnostic.h | 4 +- include/clang/AST/ASTImporter.h | 6 + include/clang/AST/ASTMutationListener.h | 17 + include/clang/AST/Attr.h | 18 +- include/clang/AST/BuiltinTypes.def | 224 + include/clang/AST/CanonicalType.h | 9 + include/clang/AST/Decl.h | 852 ++- include/clang/AST/DeclBase.h | 354 +- include/clang/AST/DeclCXX.h | 668 +- include/clang/AST/DeclFriend.h | 6 +- include/clang/AST/DeclLookups.h | 84 + include/clang/AST/DeclObjC.h | 784 ++- include/clang/AST/DeclTemplate.h | 529 +- include/clang/AST/DeclVisitor.h | 2 +- include/clang/AST/DeclarationName.h | 14 +- include/clang/AST/DependentDiagnostic.h | 2 +- include/clang/AST/Expr.h | 1157 ++-- include/clang/AST/ExprCXX.h | 1556 +++-- include/clang/AST/ExprObjC.h | 517 +- include/clang/AST/ExternalASTSource.h | 46 + include/clang/AST/LambdaMangleContext.h | 36 + include/clang/AST/Mangle.h | 4 +- include/clang/AST/NSAPI.h | 152 + include/clang/AST/NestedNameSpecifier.h | 103 +- include/clang/AST/OperationKinds.h | 30 +- include/clang/AST/PrettyPrinter.h | 6 +- include/clang/AST/RecordLayout.h | 20 +- include/clang/AST/RecursiveASTVisitor.h | 270 +- include/clang/AST/Redeclarable.h | 32 +- include/clang/AST/Stmt.h | 223 +- include/clang/AST/StmtCXX.h | 96 +- include/clang/AST/StmtIterator.h | 10 +- include/clang/AST/StmtObjC.h | 15 +- include/clang/AST/StmtVisitor.h | 2 - include/clang/AST/TemplateBase.h | 45 +- include/clang/AST/Type.h | 710 +- include/clang/AST/TypeLoc.h | 142 +- include/clang/AST/TypeVisitor.h | 2 +- include/clang/AST/UsuallyTinyPtrVector.h | 114 - include/clang/AST/VTableBuilder.h | 82 +- include/clang/Analysis/Analyses/Dominators.h | 212 + include/clang/Analysis/Analyses/FormatString.h | 140 +- include/clang/Analysis/Analyses/LiveVariables.h | 10 +- include/clang/Analysis/Analyses/PostOrderCFGView.h | 111 + include/clang/Analysis/Analyses/ReachableCode.h | 5 +- include/clang/Analysis/Analyses/ThreadSafety.h | 14 +- .../clang/Analysis/Analyses/UninitializedValues.h | 12 +- include/clang/Analysis/AnalysisContext.h | 207 +- include/clang/Analysis/AnalysisDiagnostic.h | 2 +- include/clang/Analysis/CFG.h | 188 +- include/clang/Analysis/CallGraph.h | 257 + .../Analysis/DomainSpecific/CocoaConventions.h | 12 +- include/clang/Analysis/ProgramPoint.h | 113 +- include/clang/Analysis/Support/SaveAndRestore.h | 47 - .../Analysis/Visitors/CFGRecStmtDeclVisitor.h | 3 +- include/clang/Basic/AllDiagnostics.h | 39 + include/clang/Basic/Attr.td | 42 +- include/clang/Basic/Builtins.def | 328 +- include/clang/Basic/BuiltinsHexagon.def | 689 ++ include/clang/Basic/BuiltinsX86.def | 271 +- include/clang/Basic/CMakeLists.txt | 1 + include/clang/Basic/ConvertUTF.h | 14 +- include/clang/Basic/DeclNodes.td | 4 +- include/clang/Basic/Diagnostic.h | 276 +- include/clang/Basic/Diagnostic.td | 9 +- include/clang/Basic/DiagnosticASTKinds.td | 98 +- include/clang/Basic/DiagnosticAnalysisKinds.td | 3 - include/clang/Basic/DiagnosticCommonKinds.td | 13 +- include/clang/Basic/DiagnosticDriverKinds.td | 24 +- include/clang/Basic/DiagnosticFrontendKinds.td | 93 +- include/clang/Basic/DiagnosticGroups.td | 128 +- include/clang/Basic/DiagnosticIDs.h | 65 +- include/clang/Basic/DiagnosticLexKinds.td | 175 +- include/clang/Basic/DiagnosticParseKinds.td | 246 +- include/clang/Basic/DiagnosticSemaKinds.td | 1282 +++- .../clang/Basic/DiagnosticSerializationKinds.td | 60 + include/clang/Basic/ExpressionTraits.h | 2 +- include/clang/Basic/FileManager.h | 17 +- include/clang/Basic/FileSystemStatCache.h | 4 +- include/clang/Basic/IdentifierTable.h | 79 +- include/clang/Basic/LLVM.h | 22 +- include/clang/Basic/Lambda.h | 38 + include/clang/Basic/LangOptions.def | 20 +- include/clang/Basic/LangOptions.h | 38 +- include/clang/Basic/Linkage.h | 2 +- include/clang/Basic/Makefile | 3 +- include/clang/Basic/Module.h | 284 + include/clang/Basic/OnDiskHashTable.h | 10 +- include/clang/Basic/PartialDiagnostic.h | 137 +- include/clang/Basic/SourceLocation.h | 4 +- include/clang/Basic/SourceManager.h | 206 +- include/clang/Basic/Specifiers.h | 10 +- include/clang/Basic/StmtNodes.td | 11 +- include/clang/Basic/TargetBuiltins.h | 49 + include/clang/Basic/TargetInfo.h | 47 +- include/clang/Basic/TokenKinds.def | 29 +- include/clang/Basic/TypeTraits.h | 10 +- include/clang/Basic/Version.h | 24 +- include/clang/CMakeLists.txt | 1 + include/clang/CodeGen/CodeGenAction.h | 14 +- include/clang/CodeGen/ModuleBuilder.h | 1 + include/clang/Config/config.h.cmake | 13 +- include/clang/Config/config.h.in | 21 + include/clang/Driver/Action.h | 24 + include/clang/Driver/ArgList.h | 12 +- include/clang/Driver/CC1AsOptions.td | 9 + include/clang/Driver/CC1Options.td | 131 +- include/clang/Driver/Compilation.h | 15 + include/clang/Driver/Driver.h | 34 +- include/clang/Driver/DriverDiagnostic.h | 2 +- include/clang/Driver/HostInfo.h | 94 - include/clang/Driver/Job.h | 2 + include/clang/Driver/ObjCRuntime.h | 5 +- include/clang/Driver/OptTable.h | 2 +- include/clang/Driver/Options.td | 157 +- include/clang/Driver/Tool.h | 1 + include/clang/Driver/ToolChain.h | 37 +- include/clang/Driver/Types.def | 2 + include/clang/Edit/Commit.h | 140 + include/clang/Edit/EditedSource.h | 87 + include/clang/Edit/EditsReceiver.h | 35 + include/clang/Edit/FileOffset.h | 65 + include/clang/Edit/Rewriters.h | 33 + include/clang/Frontend/ASTUnit.h | 185 +- include/clang/Frontend/Analyses.def | 17 + include/clang/Frontend/AnalyzerOptions.h | 29 +- include/clang/Frontend/ChainedDiagnosticConsumer.h | 10 +- include/clang/Frontend/ChainedIncludesSource.h | 75 + include/clang/Frontend/CodeGenOptions.h | 26 + include/clang/Frontend/CompilerInstance.h | 78 +- include/clang/Frontend/CompilerInvocation.h | 47 +- include/clang/Frontend/DependencyOutputOptions.h | 5 +- include/clang/Frontend/DiagnosticOptions.h | 10 +- include/clang/Frontend/DiagnosticRenderer.h | 149 + include/clang/Frontend/FrontendAction.h | 57 +- include/clang/Frontend/FrontendActions.h | 50 +- include/clang/Frontend/FrontendDiagnostic.h | 2 +- include/clang/Frontend/FrontendOptions.h | 63 +- include/clang/Frontend/LangStandard.h | 6 +- include/clang/Frontend/LangStandards.def | 23 +- include/clang/Frontend/LayoutOverrideSource.h | 61 + include/clang/Frontend/MigratorOptions.h | 31 + include/clang/Frontend/MultiplexConsumer.h | 13 +- include/clang/Frontend/PreprocessorOptions.h | 20 +- .../clang/Frontend/SerializedDiagnosticPrinter.h | 62 + include/clang/Frontend/TextDiagnostic.h | 120 + include/clang/Frontend/TextDiagnosticPrinter.h | 36 +- include/clang/Frontend/Utils.h | 23 +- include/clang/Frontend/VerifyDiagnosticConsumer.h | 2 +- include/clang/Index/ASTLocation.h | 17 +- include/clang/Index/CallGraph.h | 146 - include/clang/Index/GlobalCallGraph.h | 149 + include/clang/Lex/DirectoryLookup.h | 21 +- include/clang/Lex/ExternalPreprocessorSource.h | 3 + include/clang/Lex/HeaderSearch.h | 229 +- include/clang/Lex/LexDiagnostic.h | 2 +- include/clang/Lex/Lexer.h | 75 +- include/clang/Lex/LiteralSupport.h | 54 +- include/clang/Lex/MacroInfo.h | 25 +- include/clang/Lex/ModuleLoader.h | 32 +- include/clang/Lex/ModuleMap.h | 237 + include/clang/Lex/PPCallbacks.h | 89 +- include/clang/Lex/PreprocessingRecord.h | 111 +- include/clang/Lex/Preprocessor.h | 210 +- include/clang/Lex/PreprocessorLexer.h | 1 + include/clang/Lex/Token.h | 6 +- include/clang/Makefile | 11 +- include/clang/Parse/ParseAST.h | 6 +- include/clang/Parse/ParseDiagnostic.h | 2 +- include/clang/Parse/Parser.h | 581 +- include/clang/Rewrite/ASTConsumers.h | 5 + include/clang/Rewrite/FixItRewriter.h | 28 +- include/clang/Rewrite/FrontendActions.h | 15 +- include/clang/Rewrite/TokenRewriter.h | 2 +- include/clang/Sema/AttributeList.h | 149 +- include/clang/Sema/CMakeLists.txt | 14 + include/clang/Sema/CodeCompleteConsumer.h | 469 +- include/clang/Sema/DeclSpec.h | 153 +- include/clang/Sema/DelayedDiagnostic.h | 10 +- include/clang/Sema/ExternalSemaSource.h | 5 +- include/clang/Sema/IdentifierResolver.h | 33 +- include/clang/Sema/Initialization.h | 252 +- include/clang/Sema/LocInfoType.h | 12 +- include/clang/Sema/Lookup.h | 55 +- include/clang/Sema/Makefile | 27 + include/clang/Sema/MultiInitializer.h | 72 - include/clang/Sema/Overload.h | 145 +- include/clang/Sema/ParsedTemplate.h | 6 +- include/clang/Sema/PrettyDeclStackTrace.h | 5 +- include/clang/Sema/Scope.h | 35 +- include/clang/Sema/ScopeInfo.h | 274 +- include/clang/Sema/Sema.h | 1679 +++-- include/clang/Sema/SemaConsumer.h | 1 + include/clang/Sema/SemaDiagnostic.h | 2 +- include/clang/Sema/SemaFixItUtils.h | 2 +- include/clang/Sema/Template.h | 64 +- include/clang/Sema/TemplateDeduction.h | 21 +- include/clang/Sema/TypoCorrection.h | 148 +- include/clang/Serialization/ASTBitCodes.h | 215 +- .../Serialization/ASTDeserializationListener.h | 6 + include/clang/Serialization/ASTReader.h | 544 +- include/clang/Serialization/ASTWriter.h | 235 +- .../clang/Serialization/ChainedIncludesSource.h | 75 - include/clang/Serialization/ContinuousRangeMap.h | 10 + include/clang/Serialization/Module.h | 229 +- include/clang/Serialization/ModuleManager.h | 30 +- .../clang/Serialization/SerializationDiagnostic.h | 28 + .../StaticAnalyzer/Checkers/CommonBugCategories.h | 24 + .../StaticAnalyzer/Core/BugReporter/BugReporter.h | 197 +- .../Core/BugReporter/BugReporterVisitor.h | 80 +- .../StaticAnalyzer/Core/BugReporter/BugType.h | 1 + .../Core/BugReporter/PathDiagnostic.h | 394 +- include/clang/StaticAnalyzer/Core/Checker.h | 44 +- include/clang/StaticAnalyzer/Core/CheckerManager.h | 83 +- .../clang/StaticAnalyzer/Core/CheckerRegistry.h | 4 +- .../StaticAnalyzer/Core/PathDiagnosticConsumers.h | 4 + .../Core/PathSensitive/AnalysisManager.h | 95 +- .../Core/PathSensitive/BasicValueFactory.h | 7 - .../Core/PathSensitive/CheckerContext.h | 228 +- .../Core/PathSensitive/ConstraintManager.h | 27 +- .../StaticAnalyzer/Core/PathSensitive/CoreEngine.h | 545 +- .../Core/PathSensitive/Environment.h | 66 +- .../Core/PathSensitive/ExplodedGraph.h | 84 +- .../StaticAnalyzer/Core/PathSensitive/ExprEngine.h | 210 +- .../Core/PathSensitive/ExprEngineBuilders.h | 80 - .../Core/PathSensitive/FunctionSummary.h | 107 + .../StaticAnalyzer/Core/PathSensitive/MemRegion.h | 204 +- .../Core/PathSensitive/ObjCMessage.h | 244 +- .../Core/PathSensitive/ProgramState.h | 260 +- .../Core/PathSensitive/ProgramStateTrait.h | 19 +- .../Core/PathSensitive/ProgramState_Fwd.h | 43 + .../Core/PathSensitive/SValBuilder.h | 102 +- .../StaticAnalyzer/Core/PathSensitive/SVals.h | 63 +- .../StaticAnalyzer/Core/PathSensitive/Store.h | 63 +- .../StaticAnalyzer/Core/PathSensitive/SubEngine.h | 51 +- .../Core/PathSensitive/SymbolManager.h | 173 +- .../Core/PathSensitive/TaintManager.h | 40 + .../StaticAnalyzer/Core/PathSensitive/TaintTag.h | 27 + .../StaticAnalyzer/Core/PathSensitive/WorkList.h | 1 + include/clang/Tooling/CompilationDatabase.h | 164 + include/clang/Tooling/Tooling.h | 213 + lib/ARCMigrate/ARCMT.cpp | 165 +- lib/ARCMigrate/ARCMTActions.cpp | 17 +- lib/ARCMigrate/CMakeLists.txt | 3 + lib/ARCMigrate/FileRemapper.cpp | 44 +- lib/ARCMigrate/Internals.h | 19 +- lib/ARCMigrate/ObjCMT.cpp | 226 + lib/ARCMigrate/TransARCAssign.cpp | 3 + lib/ARCMigrate/TransAutoreleasePool.cpp | 4 - lib/ARCMigrate/TransBlockObjCVariable.cpp | 66 +- lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp | 43 +- lib/ARCMigrate/TransGCAttrs.cpp | 358 + lib/ARCMigrate/TransGCCalls.cpp | 84 + lib/ARCMigrate/TransProperties.cpp | 328 +- lib/ARCMigrate/TransRetainReleaseDealloc.cpp | 112 +- lib/ARCMigrate/TransUnbridgedCasts.cpp | 30 +- lib/ARCMigrate/TransUnusedInitDelegate.cpp | 6 +- lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp | 75 +- lib/ARCMigrate/TransformActions.cpp | 33 + lib/ARCMigrate/Transforms.cpp | 344 +- lib/ARCMigrate/Transforms.h | 118 +- lib/AST/APValue.cpp | 573 +- lib/AST/ASTConsumer.cpp | 6 +- lib/AST/ASTContext.cpp | 530 +- lib/AST/ASTDiagnostic.cpp | 26 +- lib/AST/ASTImporter.cpp | 773 ++- lib/AST/AttrImpl.cpp | 4 + lib/AST/CMakeLists.txt | 2 + lib/AST/CXXInheritance.cpp | 15 +- lib/AST/Decl.cpp | 919 ++- lib/AST/DeclBase.cpp | 418 +- lib/AST/DeclCXX.cpp | 467 +- lib/AST/DeclFriend.cpp | 7 +- lib/AST/DeclObjC.cpp | 442 +- lib/AST/DeclPrinter.cpp | 91 +- lib/AST/DeclTemplate.cpp | 198 +- lib/AST/DeclarationName.cpp | 16 +- lib/AST/DumpXML.cpp | 50 +- lib/AST/Expr.cpp | 1003 ++- lib/AST/ExprCXX.cpp | 536 +- lib/AST/ExprClassification.cpp | 90 +- lib/AST/ExprConstant.cpp | 5833 +++++++++++++--- lib/AST/ItaniumMangle.cpp | 387 +- lib/AST/LambdaMangleContext.cpp | 30 + lib/AST/Mangle.cpp | 12 +- lib/AST/MicrosoftMangle.cpp | 33 +- lib/AST/NSAPI.cpp | 312 + lib/AST/NestedNameSpecifier.cpp | 28 +- lib/AST/ParentMap.cpp | 4 + lib/AST/RecordLayout.cpp | 4 +- lib/AST/RecordLayoutBuilder.cpp | 766 ++- lib/AST/Stmt.cpp | 102 +- lib/AST/StmtDumper.cpp | 69 +- lib/AST/StmtPrinter.cpp | 412 +- lib/AST/StmtProfile.cpp | 99 +- lib/AST/TemplateBase.cpp | 114 +- lib/AST/TemplateName.cpp | 2 +- lib/AST/Type.cpp | 277 +- lib/AST/TypeLoc.cpp | 113 +- lib/AST/TypePrinter.cpp | 109 +- lib/AST/VTableBuilder.cpp | 17 +- lib/Analysis/AnalysisContext.cpp | 436 -- lib/Analysis/AnalysisDeclContext.cpp | 463 ++ lib/Analysis/CFG.cpp | 405 +- lib/Analysis/CMakeLists.txt | 5 +- lib/Analysis/CallGraph.cpp | 184 + lib/Analysis/CocoaConventions.cpp | 49 +- lib/Analysis/Dominators.cpp | 14 + lib/Analysis/FormatString.cpp | 251 +- lib/Analysis/FormatStringParsing.h | 6 +- lib/Analysis/LiveVariables.cpp | 171 +- lib/Analysis/PostOrderCFGView.cpp | 49 + lib/Analysis/PrintfFormatString.cpp | 167 +- lib/Analysis/ProgramPoint.cpp | 2 - lib/Analysis/PseudoConstantAnalysis.cpp | 17 +- lib/Analysis/ReachableCode.cpp | 6 +- lib/Analysis/ScanfFormatString.cpp | 290 +- lib/Analysis/ThreadSafety.cpp | 1533 ++++- lib/Analysis/UninitializedValues.cpp | 10 +- lib/Basic/Builtins.cpp | 1 + lib/Basic/CMakeLists.txt | 2 + lib/Basic/ConvertUTF.c | 143 +- lib/Basic/Diagnostic.cpp | 126 +- lib/Basic/DiagnosticIDs.cpp | 229 +- lib/Basic/FileManager.cpp | 27 +- lib/Basic/FileSystemStatCache.cpp | 2 + lib/Basic/IdentifierTable.cpp | 43 +- lib/Basic/LangOptions.cpp | 2 + lib/Basic/Makefile | 21 +- lib/Basic/Module.cpp | 274 + lib/Basic/SourceLocation.cpp | 4 + lib/Basic/SourceManager.cpp | 144 +- lib/Basic/TargetInfo.cpp | 5 + lib/Basic/Targets.cpp | 1008 ++- lib/Basic/Version.cpp | 58 +- lib/CMakeLists.txt | 2 + lib/CodeGen/ABIInfo.h | 21 +- lib/CodeGen/BackendUtil.cpp | 143 +- lib/CodeGen/CGBlocks.cpp | 387 +- lib/CodeGen/CGBlocks.h | 47 +- lib/CodeGen/CGBuiltin.cpp | 2692 +++++++- lib/CodeGen/CGCXX.cpp | 29 +- lib/CodeGen/CGCXXABI.cpp | 43 +- lib/CodeGen/CGCXXABI.h | 34 +- lib/CodeGen/CGCall.cpp | 621 +- lib/CodeGen/CGCall.h | 154 +- lib/CodeGen/CGClass.cpp | 362 +- lib/CodeGen/CGCleanup.cpp | 74 +- lib/CodeGen/CGDebugInfo.cpp | 946 ++- lib/CodeGen/CGDebugInfo.h | 42 +- lib/CodeGen/CGDecl.cpp | 243 +- lib/CodeGen/CGDeclCXX.cpp | 220 +- lib/CodeGen/CGException.cpp | 145 +- lib/CodeGen/CGException.h | 56 - lib/CodeGen/CGExpr.cpp | 1017 ++- lib/CodeGen/CGExprAgg.cpp | 580 +- lib/CodeGen/CGExprCXX.cpp | 296 +- lib/CodeGen/CGExprComplex.cpp | 66 +- lib/CodeGen/CGExprConstant.cpp | 879 ++- lib/CodeGen/CGExprScalar.cpp | 335 +- lib/CodeGen/CGObjC.cpp | 836 ++- lib/CodeGen/CGObjCGNU.cpp | 296 +- lib/CodeGen/CGObjCMac.cpp | 851 ++- lib/CodeGen/CGObjCRuntime.cpp | 74 +- lib/CodeGen/CGObjCRuntime.h | 28 +- lib/CodeGen/CGRTTI.cpp | 59 +- lib/CodeGen/CGRecordLayoutBuilder.cpp | 183 +- lib/CodeGen/CGStmt.cpp | 62 +- lib/CodeGen/CGTemporaries.cpp | 49 - lib/CodeGen/CGVTT.cpp | 21 +- lib/CodeGen/CGVTables.cpp | 40 +- lib/CodeGen/CGValue.h | 84 +- lib/CodeGen/CMakeLists.txt | 3 +- lib/CodeGen/CodeGenAction.cpp | 107 +- lib/CodeGen/CodeGenFunction.cpp | 180 +- lib/CodeGen/CodeGenFunction.h | 407 +- lib/CodeGen/CodeGenModule.cpp | 617 +- lib/CodeGen/CodeGenModule.h | 115 +- lib/CodeGen/CodeGenTBAA.cpp | 6 +- lib/CodeGen/CodeGenTBAA.h | 4 + lib/CodeGen/CodeGenTypes.cpp | 44 +- lib/CodeGen/CodeGenTypes.h | 109 +- lib/CodeGen/ItaniumCXXABI.cpp | 334 +- lib/CodeGen/MicrosoftCXXABI.cpp | 7 + lib/CodeGen/ModuleBuilder.cpp | 17 +- lib/CodeGen/TargetInfo.cpp | 882 ++- lib/CodeGen/TargetInfo.h | 5 +- lib/Driver/Action.cpp | 31 + lib/Driver/Arg.cpp | 4 +- lib/Driver/ArgList.cpp | 30 +- lib/Driver/CC1AsOptions.cpp | 2 +- lib/Driver/CC1Options.cpp | 2 +- lib/Driver/CMakeLists.txt | 2 +- lib/Driver/Compilation.cpp | 8 +- lib/Driver/Driver.cpp | 370 +- lib/Driver/DriverOptions.cpp | 2 +- lib/Driver/HostInfo.cpp | 731 -- lib/Driver/Job.cpp | 2 + lib/Driver/Option.cpp | 2 - lib/Driver/ToolChain.cpp | 187 +- lib/Driver/ToolChains.cpp | 1519 ++-- lib/Driver/ToolChains.h | 337 +- lib/Driver/Tools.cpp | 1658 +++-- lib/Driver/Tools.h | 97 +- lib/Driver/Types.cpp | 1 + lib/Driver/WindowsToolChain.cpp | 368 + lib/Edit/CMakeLists.txt | 7 + lib/Edit/Commit.cpp | 345 + lib/Edit/EditedSource.cpp | 329 + lib/Edit/Makefile | 14 + lib/Edit/RewriteObjCFoundationAPI.cpp | 587 ++ lib/Frontend/ASTConsumers.cpp | 3 +- lib/Frontend/ASTMerge.cpp | 13 +- lib/Frontend/ASTUnit.cpp | 746 +- lib/Frontend/CMakeLists.txt | 8 + lib/Frontend/CacheTokens.cpp | 4 +- lib/Frontend/ChainedDiagnosticConsumer.cpp | 14 + lib/Frontend/ChainedIncludesSource.cpp | 240 + lib/Frontend/CompilerInstance.cpp | 813 ++- lib/Frontend/CompilerInvocation.cpp | 818 ++- lib/Frontend/CreateInvocationFromCommandLine.cpp | 17 +- lib/Frontend/DependencyFile.cpp | 64 +- lib/Frontend/DependencyGraph.cpp | 140 + lib/Frontend/DiagnosticRenderer.cpp | 386 ++ lib/Frontend/FrontendAction.cpp | 137 +- lib/Frontend/FrontendActions.cpp | 314 +- lib/Frontend/HeaderIncludeGen.cpp | 5 +- lib/Frontend/InitHeaderSearch.cpp | 46 +- lib/Frontend/InitPreprocessor.cpp | 128 +- lib/Frontend/LangStandards.cpp | 3 +- lib/Frontend/LayoutOverrideSource.cpp | 206 + lib/Frontend/LogDiagnosticPrinter.cpp | 8 +- lib/Frontend/MultiplexConsumer.cpp | 50 +- lib/Frontend/PrintPreprocessedOutput.cpp | 8 +- lib/Frontend/SerializedDiagnosticPrinter.cpp | 592 ++ lib/Frontend/TextDiagnostic.cpp | 881 +++ lib/Frontend/TextDiagnosticBuffer.cpp | 2 +- lib/Frontend/TextDiagnosticPrinter.cpp | 1148 +-- lib/Frontend/VerifyDiagnosticConsumer.cpp | 38 +- lib/Frontend/Warnings.cpp | 190 +- lib/FrontendTool/ExecuteCompilerInvocation.cpp | 43 +- lib/Headers/CMakeLists.txt | 9 + lib/Headers/Makefile | 14 +- lib/Headers/avx2intrin.h | 961 +++ lib/Headers/avxintrin.h | 331 +- lib/Headers/bmi2intrin.h | 75 + lib/Headers/bmiintrin.h | 115 + lib/Headers/cpuid.h | 33 + lib/Headers/emmintrin.h | 56 +- lib/Headers/float.h | 11 + lib/Headers/fma4intrin.h | 231 + lib/Headers/immintrin.h | 18 +- lib/Headers/lzcntintrin.h | 55 + lib/Headers/mm3dnow.h | 2 +- lib/Headers/module.map | 108 + lib/Headers/popcntintrin.h | 45 + lib/Headers/smmintrin.h | 127 +- lib/Headers/tgmath.h | 23 +- lib/Headers/tmmintrin.h | 11 +- lib/Headers/unwind.h | 124 + lib/Headers/wmmintrin.h | 2 +- lib/Headers/x86intrin.h | 26 +- lib/Headers/xmmintrin.h | 21 +- lib/Index/ASTLocation.cpp | 12 +- lib/Index/Analyzer.cpp | 4 +- lib/Index/CMakeLists.txt | 2 +- lib/Index/CallGraph.cpp | 150 - lib/Index/GlobalCallGraph.cpp | 152 + lib/Lex/CMakeLists.txt | 2 + lib/Lex/HeaderMap.cpp | 4 +- lib/Lex/HeaderSearch.cpp | 516 +- lib/Lex/Lexer.cpp | 438 +- lib/Lex/LiteralSupport.cpp | 464 +- lib/Lex/MacroArgs.cpp | 9 +- lib/Lex/MacroInfo.cpp | 5 +- lib/Lex/ModuleMap.cpp | 1437 ++++ lib/Lex/PPCaching.cpp | 22 +- lib/Lex/PPCallbacks.cpp | 14 + lib/Lex/PPDirectives.cpp | 354 +- lib/Lex/PPExpressions.cpp | 22 +- lib/Lex/PPLexerChange.cpp | 88 +- lib/Lex/PPMacroExpansion.cpp | 134 +- lib/Lex/PTHLexer.cpp | 6 +- lib/Lex/Pragma.cpp | 211 +- lib/Lex/PreprocessingRecord.cpp | 265 +- lib/Lex/Preprocessor.cpp | 149 +- lib/Lex/PreprocessorLexer.cpp | 2 + lib/Lex/TokenConcatenation.cpp | 49 +- lib/Lex/TokenLexer.cpp | 12 +- lib/Makefile | 4 +- lib/Parse/ParseAST.cpp | 35 +- lib/Parse/ParseCXXInlineMethods.cpp | 120 +- lib/Parse/ParseDecl.cpp | 1544 +++-- lib/Parse/ParseDeclCXX.cpp | 685 +- lib/Parse/ParseExpr.cpp | 365 +- lib/Parse/ParseExprCXX.cpp | 610 +- lib/Parse/ParseInit.cpp | 179 +- lib/Parse/ParseObjc.cpp | 526 +- lib/Parse/ParsePragma.cpp | 118 +- lib/Parse/ParsePragma.h | 10 + lib/Parse/ParseStmt.cpp | 252 +- lib/Parse/ParseTemplate.cpp | 184 +- lib/Parse/ParseTentative.cpp | 331 +- lib/Parse/Parser.cpp | 454 +- lib/Rewrite/CMakeLists.txt | 1 + lib/Rewrite/FixItRewriter.cpp | 115 +- lib/Rewrite/FrontendActions.cpp | 75 +- lib/Rewrite/HTMLPrint.cpp | 2 +- lib/Rewrite/HTMLRewrite.cpp | 10 +- lib/Rewrite/RewriteMacros.cpp | 6 +- lib/Rewrite/RewriteModernObjC.cpp | 7275 ++++++++++++++++++++ lib/Rewrite/RewriteObjC.cpp | 5959 ++++++++-------- lib/Rewrite/RewriteTest.cpp | 2 +- lib/Rewrite/Rewriter.cpp | 3 +- lib/Sema/AnalysisBasedWarnings.cpp | 250 +- lib/Sema/AttributeList.cpp | 133 +- lib/Sema/CMakeLists.txt | 18 +- lib/Sema/CodeCompleteConsumer.cpp | 186 +- lib/Sema/DeclSpec.cpp | 33 +- lib/Sema/DelayedDiagnostic.cpp | 6 +- lib/Sema/IdentifierResolver.cpp | 158 +- lib/Sema/JumpDiagnostics.cpp | 124 +- lib/Sema/MultiInitializer.cpp | 92 - lib/Sema/Scope.cpp | 28 +- lib/Sema/Sema.cpp | 269 +- lib/Sema/SemaAccess.cpp | 326 +- lib/Sema/SemaAttr.cpp | 54 +- lib/Sema/SemaCXXScopeSpec.cpp | 167 +- lib/Sema/SemaCast.cpp | 271 +- lib/Sema/SemaChecking.cpp | 2118 ++++-- lib/Sema/SemaCodeComplete.cpp | 1135 +-- lib/Sema/SemaConsumer.cpp | 14 + lib/Sema/SemaDecl.cpp | 2340 ++++--- lib/Sema/SemaDeclAttr.cpp | 267 +- lib/Sema/SemaDeclCXX.cpp | 3143 +++++---- lib/Sema/SemaDeclObjC.cpp | 779 ++- lib/Sema/SemaExceptionSpec.cpp | 21 +- lib/Sema/SemaExpr.cpp | 3464 +++++++--- lib/Sema/SemaExprCXX.cpp | 1341 +++- lib/Sema/SemaExprMember.cpp | 346 +- lib/Sema/SemaExprObjC.cpp | 1491 +++- lib/Sema/SemaFixItUtils.cpp | 44 + lib/Sema/SemaInit.cpp | 2322 ++++--- lib/Sema/SemaLambda.cpp | 820 +++ lib/Sema/SemaLookup.cpp | 825 ++- lib/Sema/SemaObjCProperty.cpp | 382 +- lib/Sema/SemaOverload.cpp | 2109 ++++-- lib/Sema/SemaPseudoObject.cpp | 1351 ++++ lib/Sema/SemaStmt.cpp | 532 +- lib/Sema/SemaTemplate.cpp | 1265 ++-- lib/Sema/SemaTemplateDeduction.cpp | 763 +- lib/Sema/SemaTemplateInstantiate.cpp | 305 +- lib/Sema/SemaTemplateInstantiateDecl.cpp | 654 +- lib/Sema/SemaTemplateVariadic.cpp | 117 +- lib/Sema/SemaType.cpp | 837 ++- lib/Sema/TargetAttributesSema.cpp | 2 +- lib/Sema/TreeTransform.h | 1141 ++- lib/Serialization/ASTCommon.cpp | 3 + lib/Serialization/ASTCommon.h | 1 - lib/Serialization/ASTReader.cpp | 1653 ++++- lib/Serialization/ASTReaderDecl.cpp | 1529 ++-- lib/Serialization/ASTReaderInternals.h | 25 +- lib/Serialization/ASTReaderStmt.cpp | 377 +- lib/Serialization/ASTWriter.cpp | 930 ++- lib/Serialization/ASTWriterDecl.cpp | 435 +- lib/Serialization/ASTWriterStmt.cpp | 295 +- lib/Serialization/CMakeLists.txt | 6 +- lib/Serialization/ChainedIncludesSource.cpp | 240 - lib/Serialization/GeneratePCH.cpp | 13 +- lib/Serialization/Module.cpp | 18 +- lib/Serialization/ModuleManager.cpp | 51 +- .../Checkers/AdjustedReturnValueChecker.cpp | 11 +- .../Checkers/AnalyzerStatsChecker.cpp | 74 +- lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp | 9 +- .../Checkers/ArrayBoundCheckerV2.cpp | 63 +- lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp | 13 +- .../Checkers/BasicObjCFoundationChecks.cpp | 70 +- .../Checkers/BoolAssignmentChecker.cpp | 157 + .../Checkers/BuiltinFunctionChecker.cpp | 21 +- lib/StaticAnalyzer/Checkers/CMakeLists.txt | 12 +- lib/StaticAnalyzer/Checkers/CStringChecker.cpp | 481 +- .../Checkers/CStringSyntaxChecker.cpp | 191 + .../Checkers/CallAndMessageChecker.cpp | 128 +- lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp | 6 +- .../Checkers/CastToStructChecker.cpp | 4 +- lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp | 21 +- .../Checkers/CheckObjCInstMethSignature.cpp | 4 +- .../Checkers/CheckSecuritySyntaxOnly.cpp | 232 +- lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp | 9 +- .../Checkers/CheckerDocumentation.cpp | 233 + lib/StaticAnalyzer/Checkers/Checkers.td | 148 +- lib/StaticAnalyzer/Checkers/ChrootChecker.cpp | 22 +- lib/StaticAnalyzer/Checkers/ClangSACheckers.h | 2 + .../Checkers/CommonBugCategories.cpp | 18 + lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp | 56 +- lib/StaticAnalyzer/Checkers/DebugCheckers.cpp | 70 +- lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp | 60 +- lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp | 45 +- .../Checkers/FixedAddressChecker.cpp | 9 +- .../Checkers/GenericTaintChecker.cpp | 740 ++ .../Checkers/IdempotentOperationChecker.cpp | 34 +- lib/StaticAnalyzer/Checkers/InterCheckerAPI.h | 22 + lib/StaticAnalyzer/Checkers/IteratorsChecker.cpp | 46 +- .../Checkers/LLVMConventionsChecker.cpp | 15 +- .../Checkers/MacOSKeychainAPIChecker.cpp | 229 +- lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp | 34 +- lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 1341 +++- .../Checkers/MallocOverflowSecurityChecker.cpp | 7 +- .../Checkers/MallocSizeofChecker.cpp | 211 + .../Checkers/NSAutoreleasePoolChecker.cpp | 31 +- lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp | 14 +- .../Checkers/NoReturnFunctionChecker.cpp | 4 +- lib/StaticAnalyzer/Checkers/OSAtomicChecker.cpp | 96 +- lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp | 21 +- .../Checkers/ObjCContainersASTChecker.cpp | 174 + .../Checkers/ObjCContainersChecker.cpp | 159 + .../Checkers/ObjCSelfInitChecker.cpp | 82 +- .../Checkers/ObjCUnusedIVarsChecker.cpp | 2 +- .../Checkers/PointerArithChecker.cpp | 11 +- lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp | 11 +- lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp | 44 +- lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 900 +-- .../Checkers/ReturnPointerRangeChecker.cpp | 10 +- lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp | 7 +- .../Checkers/StackAddrEscapeChecker.cpp | 64 +- lib/StaticAnalyzer/Checkers/StreamChecker.cpp | 109 +- lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp | 62 + lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp | 37 +- .../Checkers/UndefCapturedBlockVarChecker.cpp | 20 +- lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp | 20 +- .../Checkers/UndefinedArraySubscriptChecker.cpp | 7 +- .../Checkers/UndefinedAssignmentChecker.cpp | 8 +- lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp | 204 +- .../Checkers/UnreachableCodeChecker.cpp | 34 +- lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp | 87 +- lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp | 241 + lib/StaticAnalyzer/Core/AggExprVisitor.cpp | 69 - lib/StaticAnalyzer/Core/AnalysisManager.cpp | 38 +- lib/StaticAnalyzer/Core/BasicConstraintManager.cpp | 66 +- lib/StaticAnalyzer/Core/BugReporter.cpp | 750 +- lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | 237 +- lib/StaticAnalyzer/Core/CMakeLists.txt | 3 +- lib/StaticAnalyzer/Core/Checker.cpp | 9 + lib/StaticAnalyzer/Core/CheckerContext.cpp | 76 +- lib/StaticAnalyzer/Core/CheckerManager.cpp | 174 +- lib/StaticAnalyzer/Core/CheckerRegistry.cpp | 5 +- lib/StaticAnalyzer/Core/CoreEngine.cpp | 592 +- lib/StaticAnalyzer/Core/Environment.cpp | 147 +- lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 174 +- lib/StaticAnalyzer/Core/ExprEngine.cpp | 1215 ++-- lib/StaticAnalyzer/Core/ExprEngineC.cpp | 611 +- lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 237 +- .../Core/ExprEngineCallAndReturn.cpp | 357 +- lib/StaticAnalyzer/Core/ExprEngineObjC.cpp | 92 +- lib/StaticAnalyzer/Core/FunctionSummary.cpp | 38 + lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | 127 +- lib/StaticAnalyzer/Core/MemRegion.cpp | 170 +- lib/StaticAnalyzer/Core/ObjCMessage.cpp | 118 +- lib/StaticAnalyzer/Core/PathDiagnostic.cpp | 466 +- lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | 298 +- lib/StaticAnalyzer/Core/ProgramState.cpp | 350 +- lib/StaticAnalyzer/Core/RangeConstraintManager.cpp | 64 +- lib/StaticAnalyzer/Core/RegionStore.cpp | 388 +- lib/StaticAnalyzer/Core/SValBuilder.cpp | 152 +- lib/StaticAnalyzer/Core/SVals.cpp | 89 +- .../Core/SimpleConstraintManager.cpp | 178 +- lib/StaticAnalyzer/Core/SimpleConstraintManager.h | 36 +- lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | 341 +- lib/StaticAnalyzer/Core/Store.cpp | 46 +- lib/StaticAnalyzer/Core/SubEngine.cpp | 14 + lib/StaticAnalyzer/Core/SymbolManager.cpp | 128 +- lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp | 31 +- lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp | 414 +- lib/StaticAnalyzer/Frontend/CMakeLists.txt | 3 +- .../Frontend/CheckerRegistration.cpp | 2 +- lib/Tooling/CMakeLists.txt | 7 + lib/Tooling/CompilationDatabase.cpp | 230 + lib/Tooling/Makefile | 13 + lib/Tooling/Tooling.cpp | 296 + runtime/compiler-rt/Makefile | 69 +- runtime/libcxx/Makefile | 10 +- test/ARCMT/Common.h | 5 + test/ARCMT/GC-check-warn-nsalloc.m | 12 + test/ARCMT/GC-check.m | 20 + test/ARCMT/GC-no-arc-runtime.m | 78 + test/ARCMT/GC-no-arc-runtime.m.result | 73 + test/ARCMT/GC-no-finalize-removal.m | 90 + test/ARCMT/GC-no-finalize-removal.m.result | 98 + test/ARCMT/GC.h | 6 + test/ARCMT/GC.m | 95 + test/ARCMT/GC.m.result | 90 + test/ARCMT/api.m | 1 + test/ARCMT/api.m.result | 1 + test/ARCMT/assign-prop-with-arc-runtime.m | 22 + test/ARCMT/assign-prop-with-arc-runtime.m.result | 28 +- test/ARCMT/atautorelease-2.m | 1 + test/ARCMT/atautorelease-2.m.result | 1 + test/ARCMT/atautorelease-3.m | 1 + test/ARCMT/atautorelease-3.m.result | 1 + test/ARCMT/atautorelease-check.m | 1 + test/ARCMT/atautorelease.m | 1 + test/ARCMT/atautorelease.m.result | 1 + test/ARCMT/autoreleases.m | 1 + test/ARCMT/autoreleases.m.result | 1 + test/ARCMT/check-with-serialized-diag.m | 55 + test/ARCMT/checking.m | 44 +- test/ARCMT/cxx-checking.mm | 1 + test/ARCMT/cxx-rewrite.mm | 1 + test/ARCMT/cxx-rewrite.mm.result | 1 + test/ARCMT/dealloc.m | 1 + test/ARCMT/dealloc.m.result | 1 + test/ARCMT/dispatch.m | 29 + test/ARCMT/dispatch.m.result | 25 + test/ARCMT/driver-migrate.m | 6 +- test/ARCMT/init.m | 3 + test/ARCMT/init.m.result | 7 +- test/ARCMT/migrate-emit-errors.m | 2 +- test/ARCMT/migrate-plist-output.m | 6 +- test/ARCMT/migrate-space-in-path.m | 7 +- test/ARCMT/migrate.m | 7 +- test/ARCMT/no-canceling-bridge-to-bridge-cast.m | 43 + test/ARCMT/nonobjc-to-objc-cast-2.m | 12 +- test/ARCMT/nonobjc-to-objc-cast.m | 1 + test/ARCMT/nonobjc-to-objc-cast.m.result | 1 + test/ARCMT/objcmt-numeric-literals.m | 501 ++ test/ARCMT/objcmt-numeric-literals.m.result | 501 ++ test/ARCMT/objcmt-subscripting-literals.m | 137 + test/ARCMT/objcmt-subscripting-literals.m.result | 137 + test/ARCMT/rewrite-block-var.m | 20 + test/ARCMT/rewrite-block-var.m.result | 20 + test/ARCMT/with-arc-mode-migrate.m | 4 +- test/ARCMT/with-arc-mode-migrate.m.result | 4 +- test/ASTMerge/Inputs/interface2.m | 2 +- test/Analysis/CFContainers.mm | 204 + test/Analysis/CFDateGC.m | 4 +- test/Analysis/CheckNSError.m | 4 +- test/Analysis/NSPanel.m | 4 +- test/Analysis/NSString.m | 22 +- test/Analysis/ObjCProperties.m | 4 +- test/Analysis/ObjCRetSigs.m | 2 +- test/Analysis/additive-folding.c | 4 +- test/Analysis/array-struct-region.c | 4 +- test/Analysis/auto-obj-dtors-cfg-output.cpp | 1422 ++-- test/Analysis/bool-assignment.cpp | 87 + test/Analysis/bool-assignment2.c | 35 + test/Analysis/bstring.c | 8 +- test/Analysis/casts.m | 3 +- test/Analysis/check-deserialization.cpp | 20 + test/Analysis/coverage.c | 94 + test/Analysis/cstring-syntax-cxx.cpp | 16 + test/Analysis/cstring-syntax.c | 13 + test/Analysis/dead-stores.c | 30 +- test/Analysis/dead-stores.m | 14 +- test/Analysis/debug-CallGraph.c | 21 + test/Analysis/default-analyze.m | 63 + test/Analysis/domtest.c | 165 + test/Analysis/dtor.cpp | 2 +- test/Analysis/dtors-in-dtor-cfg-output.cpp | 42 +- test/Analysis/dynamic-cast.cpp | 230 + test/Analysis/exercise-ps.c | 2 +- test/Analysis/free.c | 3 +- test/Analysis/global-region-invalidation.c | 75 + test/Analysis/html-diags-multifile.c | 17 + test/Analysis/html-diags-multifile.h | 4 + test/Analysis/html-diags.c | 20 + .../Analysis/idempotent-operations-limited-loops.c | 6 +- test/Analysis/idempotent-operations.c | 3 +- test/Analysis/idempotent-operations.cpp | 2 +- test/Analysis/idempotent-operations.m | 2 +- test/Analysis/initializers-cfg-output.cpp | 109 +- test/Analysis/inline-not-supported.c | 29 + test/Analysis/inline-plist.c | 369 + test/Analysis/inline-unique-reports.c | 184 + test/Analysis/inline.c | 65 +- test/Analysis/inline2.c | 2 +- test/Analysis/inline3.c | 4 +- test/Analysis/inline4.c | 2 +- test/Analysis/keychainAPI.m | 94 +- test/Analysis/lambdas.cpp | 20 + test/Analysis/malloc-annotations.c | 271 + test/Analysis/malloc-interprocedural.c | 98 + test/Analysis/malloc-plist.c | 2814 ++++++++ test/Analysis/malloc-sizeof.c | 27 + test/Analysis/malloc.c | 722 +- test/Analysis/malloc.cpp | 16 + test/Analysis/malloc.m | 37 + test/Analysis/malloc.mm | 156 + test/Analysis/method-arg-decay.m | 5 +- test/Analysis/method-call-intra-p.cpp | 32 + test/Analysis/misc-ps-cxx0x.cpp | 5 + test/Analysis/misc-ps-region-store.cpp | 115 +- test/Analysis/misc-ps-region-store.m | 26 +- test/Analysis/misc-ps-region-store.mm | 17 + test/Analysis/misc-ps.c | 81 +- test/Analysis/misc-ps.m | 36 +- test/Analysis/new.cpp | 1 + ...iver-undefined-larger-than-voidptr-ret-region.m | 28 +- ...il-receiver-undefined-larger-than-voidptr-ret.m | 18 +- test/Analysis/null-deref-ps.c | 29 +- test/Analysis/nullptr.cpp | 38 +- test/Analysis/objc-arc.m | 67 +- test/Analysis/objc-bool.m | 22 + test/Analysis/objc-method-coverage.m | 17 + test/Analysis/out-of-bounds.c | 6 +- test/Analysis/plist-output-alternate.m | 289 +- test/Analysis/plist-output.m | 1019 ++- test/Analysis/pr_2542_rdar_6793404.m | 2 +- test/Analysis/properties.m | 25 +- test/Analysis/ptr-arith.c | 2 +- test/Analysis/rdar-6540084.m | 2 +- ...dar-6600344-nil-receiver-undefined-struct-ret.m | 6 +- test/Analysis/redefined_system.c | 17 + test/Analysis/reference.cpp | 2 +- test/Analysis/retain-release-gc-only.m | 4 +- test/Analysis/retain-release-inline.m | 347 + test/Analysis/retain-release-path-notes-gc.m | 8 +- test/Analysis/retain-release-path-notes.m | 16 +- test/Analysis/retain-release-region-store.m | 7 +- test/Analysis/retain-release.m | 159 +- test/Analysis/retain-release.mm | 51 + test/Analysis/security-syntax-checks-no-emit.c | 2 +- test/Analysis/security-syntax-checks.m | 34 +- test/Analysis/self-init.m | 52 +- test/Analysis/stack-addr-ps.c | 18 +- test/Analysis/stats.c | 8 + test/Analysis/string.c | 32 +- test/Analysis/system-header-simulator-objc.h | 114 + test/Analysis/system-header-simulator.h | 38 + test/Analysis/taint-generic.c | 185 + test/Analysis/taint-tester.c | 204 + test/Analysis/taint-tester.cpp | 26 + test/Analysis/taint-tester.m | 20 + test/Analysis/temp-obj-dtors-cfg-output.cpp | 1315 ++-- test/Analysis/uninit-vals-ps-region.m | 2 +- test/Analysis/unix-fns.c | 70 + test/Analysis/unreachable-code-path.c | 17 + test/Analysis/unused-ivars.m | 2 +- test/Analysis/variadic-method-types.m | 8 + test/Analysis/virtualcall.cpp | 53 + test/CMakeLists.txt | 3 +- test/CXX/basic/basic.link/p9.cpp | 3 +- .../basic/basic.lookup/basic.lookup.argdep/p2.cpp | 2 +- .../basic/basic.lookup/basic.lookup.argdep/p4.cpp | 2 +- .../basic.lookup/basic.lookup.classref/p1.cpp | 27 +- .../CXX/basic/basic.start/basic.start.main/p2f.cpp | 4 +- .../CXX/basic/basic.start/basic.start.main/p2i.cpp | 6 + test/CXX/basic/basic.types/p10.cpp | 87 +- test/CXX/class.access/class.protected/p1-cxx11.cpp | 20 + test/CXX/class.access/class.protected/p1.cpp | 102 +- test/CXX/class.access/p4.cpp | 4 +- test/CXX/class.access/p6.cpp | 2 +- test/CXX/class.derived/class.member.lookup/p6.cpp | 2 +- test/CXX/class.derived/p1.cpp | 40 + .../CXX/class/class.base/class.base.init/p5-0x.cpp | 26 + test/CXX/class/class.friend/p1-cxx11.cpp | 12 + test/CXX/class/class.friend/p1.cpp | 20 +- test/CXX/class/class.friend/p6.cpp | 2 +- test/CXX/class/class.local/p1-0x.cpp | 18 + test/CXX/class/class.local/p1.cpp | 2 +- test/CXX/class/class.local/p3.cpp | 2 +- test/CXX/class/class.mem/p13.cpp | 2 +- test/CXX/class/class.nest/p1-cxx0x.cpp | 2 +- test/CXX/class/class.nest/p1.cpp | 6 +- .../class/class.static/class.static.data/p3.cpp | 22 +- test/CXX/class/class.union/p1.cpp | 7 +- test/CXX/class/class.union/p2-0x.cpp | 48 + test/CXX/class/p6-0x.cpp | 15 + test/CXX/conv/conv.prom/p2.cpp | 16 + test/CXX/conv/conv.prom/p4.cpp | 9 + .../dcl.dcl/basic.namespace/namespace.udecl/p1.cpp | 4 +- .../basic.namespace/namespace.udecl/p11.cpp | 27 +- test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p6.cpp | 13 + test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp | 31 +- test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp | 40 +- test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp | 47 +- test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp | 112 + test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp | 42 +- test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p8.cpp | 14 +- test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p9.cpp | 26 +- test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp | 26 + .../dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p2.cpp | 2 +- .../dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp | 8 +- .../dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp | 2 +- .../dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp | 4 +- .../dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp | 7 +- .../dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7.cpp | 2 +- .../dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p3.cpp | 7 +- .../dcl.spec/dcl.type/dcl.type.simple/p4-cxx0x.cpp | 6 + .../dcl.spec/dcl.type/dcl.type.simple/p5-cxx0x.cpp | 108 + test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp | 14 +- test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp | 11 +- test/CXX/dcl.dcl/p4-0x.cpp | 21 + .../dcl.fct.def/dcl.fct.def.default/p2.cpp | 56 + test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p1-0x.cpp | 48 +- test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp | 14 +- .../dcl.init/dcl.init.list/p7-0x-fixits.cpp | 2 +- test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x.cpp | 40 +- .../dcl.init/dcl.init.list/p7-cxx11-nowarn.cpp | 210 + test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-0x.cpp | 2 +- .../dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp | 4 +- test/CXX/dcl.decl/dcl.init/dcl.init.string/p1.cpp | 12 + test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6-0x.cpp | 41 +- test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp | 14 +- test/CXX/dcl.decl/dcl.meaning/dcl.fct/p9-0x.cpp | 2 +- test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp | 2 +- test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp | 24 + test/CXX/dcl.decl/dcl.meaning/p1.cpp | 37 + test/CXX/dcl.decl/dcl.name/p1.cpp | 6 +- test/CXX/except/except.spec/p1.cpp | 2 +- test/CXX/expr/expr.ass/p9-cxx11.cpp | 34 + test/CXX/expr/expr.const/p2-0x.cpp | 575 +- test/CXX/expr/expr.const/p3-0x-nowarn.cpp | 8 + test/CXX/expr/expr.const/p3-0x.cpp | 110 + test/CXX/expr/expr.const/p5-0x.cpp | 85 + test/CXX/expr/expr.post/expr.type.conv/p1-0x.cpp | 12 + .../expr/expr.prim/expr.prim.general/p12-0x.cpp | 38 + .../CXX/expr/expr.prim/expr.prim.general/p4-0x.cpp | 20 + .../CXX/expr/expr.prim/expr.prim.general/p8-0x.cpp | 78 + test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm | 88 + .../expr.prim.lambda/default-arguments.cpp | 50 + test/CXX/expr/expr.prim/expr.prim.lambda/p10.cpp | 40 + test/CXX/expr/expr.prim/expr.prim.lambda/p11.cpp | 16 + test/CXX/expr/expr.prim/expr.prim.lambda/p12.cpp | 77 + test/CXX/expr/expr.prim/expr.prim.lambda/p13.cpp | 16 + test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp | 75 + test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp | 12 + test/CXX/expr/expr.prim/expr.prim.lambda/p16.cpp | 40 + test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp | 45 + test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp | 28 + test/CXX/expr/expr.prim/expr.prim.lambda/p2.cpp | 42 + test/CXX/expr/expr.prim/expr.prim.lambda/p20.cpp | 12 + test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp | 9 + test/CXX/expr/expr.prim/expr.prim.lambda/p23.cpp | 58 + test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp | 6 + test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp | 51 + test/CXX/expr/expr.prim/expr.prim.lambda/p4.mm | 8 + test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp | 64 + test/CXX/expr/expr.prim/expr.prim.lambda/p6.cpp | 22 + test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp | 56 + test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp | 29 + .../expr/expr.prim/expr.prim.lambda/templates.cpp | 149 + test/CXX/expr/expr.prim/p12-0x.cpp | 12 - test/CXX/expr/expr.prim/p4-0x.cpp | 10 - test/CXX/expr/expr.unary/expr.new/p17-crash.cpp | 14 + test/CXX/expr/expr.unary/expr.new/p17.cpp | 16 + test/CXX/expr/expr.unary/expr.unary.op/p3.cpp | 28 + test/CXX/lex/lex.charset/p2-cxx11.cpp | 42 + test/CXX/lex/lex.charset/p2-cxx98.cpp | 55 + test/CXX/lex/lex.literal/lex.ext/p1.cpp | 6 +- test/CXX/lex/lex.literal/lex.ext/p10.cpp | 14 + test/CXX/lex/lex.literal/lex.ext/p2.cpp | 16 + test/CXX/lex/lex.literal/lex.ext/p3.cpp | 18 + test/CXX/lex/lex.literal/lex.ext/p4.cpp | 18 + test/CXX/lex/lex.literal/lex.ext/p5.cpp | 13 + test/CXX/lex/lex.literal/lex.ext/p6.cpp | 14 + test/CXX/lex/lex.literal/lex.ext/p7.cpp | 27 + test/CXX/lex/lex.literal/lex.ext/p8.cpp | 18 + test/CXX/lex/lex.literal/lex.ext/p9.cpp | 13 + .../over.best.ics/over.ics.list/p6.cpp | 15 + .../over.match.funcs/over.match.copy/p1.cpp | 37 + test/CXX/over/over.oper/over.literal/p2.cpp | 35 + test/CXX/over/over.oper/over.literal/p3.cpp | 40 + test/CXX/over/over.oper/over.literal/p5.cpp | 22 + test/CXX/over/over.oper/over.literal/p6.cpp | 13 + test/CXX/over/over.oper/over.literal/p7.cpp | 16 + test/CXX/over/over.oper/over.literal/p8.cpp | 19 + .../over.over/p2-resolve-single-template-id.cpp | 12 +- test/CXX/special/class.copy/implicit-move-def.cpp | 19 +- test/CXX/special/class.copy/implicit-move.cpp | 88 +- test/CXX/special/class.copy/p11.0x.copy.cpp | 73 +- test/CXX/special/class.copy/p11.0x.move.cpp | 83 +- test/CXX/special/class.copy/p13-0x.cpp | 60 + test/CXX/special/class.copy/p15-0x.cpp | 23 + test/CXX/special/class.copy/p15-inclass.cpp | 42 + test/CXX/special/class.ctor/p5-0x.cpp | 143 +- test/CXX/special/class.ctor/p6-0x.cpp | 57 + test/CXX/special/class.dtor/p10-0x.cpp | 39 + test/CXX/special/class.dtor/p5-0x.cpp | 104 + test/CXX/special/class.free/p1.cpp | 4 +- test/CXX/special/class.free/p6.cpp | 4 +- test/CXX/special/class.inhctor/elsewhere.cpp | 26 + test/CXX/special/class.inhctor/p3.cpp | 18 + test/CXX/special/class.inhctor/p7.cpp | 13 +- .../special/class.init/class.base.init/p8-0x.cpp | 13 +- test/CXX/special/class.temporary/p1.cpp | 3 +- test/CXX/stmt.stmt/stmt.ambig/p1-0x.cpp | 40 + test/CXX/stmt.stmt/stmt.dcl/p3.cpp | 4 +- test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp | 2 +- .../stmt.stmt/stmt.select/stmt.switch/p2-0x.cpp | 39 + test/CXX/temp/p3.cpp | 4 +- test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp | 60 + test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp | 66 +- .../temp.decls/temp.class/temp.mem.enum/p1.cpp | 152 + .../temp.decls/temp.variadic/fixed-expansion.cpp | 127 + test/CXX/temp/temp.decls/temp.variadic/p4.cpp | 59 +- test/CXX/temp/temp.decls/temp.variadic/p5.cpp | 12 +- .../temp.deduct/temp.deduct.call/p4.cpp | 8 + .../temp.deduct/temp.deduct.call/p6.cpp | 17 +- test/CXX/temp/temp.param/p11-0x.cpp | 3 +- test/CXX/temp/temp.param/p5.cpp | 13 + .../temp.res/temp.dep/temp.dep.constexpr/p2-0x.cpp | 27 + .../temp.res/temp.dep/temp.dep.constexpr/p2.cpp | 21 + test/CXX/temp/temp.spec/p5.cpp | 5 +- .../CXX/temp/temp.spec/temp.expl.spec/examples.cpp | 125 + test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp | 6 +- test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp | 15 +- test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp | 9 + test/CXX/temp/temp.spec/temp.explicit/p2.cpp | 2 +- test/CXX/temp/temp.spec/temp.explicit/p3.cpp | 9 +- test/CXX/temp/temp.spec/temp.explicit/p4.cpp | 2 +- test/CXX/temp/temp.spec/temp.explicit/p5.cpp | 2 +- test/CXX/temp/temp.spec/temp.explicit/p8.cpp | 23 +- test/CXX/temp/temp.spec/temp.inst/p1.cpp | 104 + test/CodeCompletion/enum-switch-case.c | 2 +- test/CodeCompletion/ordinary-name.cpp | 38 +- test/CodeGen/2005-05-06-CountBuiltins.c | 17 - test/CodeGen/2007-09-28-PackedUnionMember.c | 2 +- test/CodeGen/2009-02-13-zerosize-union-field-ppc.c | 3 +- test/CodeGen/2009-10-20-GlobalDebug.c | 7 +- test/CodeGen/3dnow-builtins.c | 156 + test/CodeGen/Inputs/stdio.h | 9 + test/CodeGen/address-safety-attr.cpp | 35 + test/CodeGen/align-param.c | 18 + test/CodeGen/alignment.c | 59 + test/CodeGen/altivec.c | 9 + test/CodeGen/arm-aapcs-vfp.c | 8 +- test/CodeGen/arm-aapcs-zerolength-bitfield.c | 236 + test/CodeGen/arm-arguments.c | 12 + test/CodeGen/arm-vector-align.c | 10 + test/CodeGen/asm-inout.c | 23 +- test/CodeGen/asm-label.c | 13 +- test/CodeGen/asm-variable.c | 6 + test/CodeGen/asm.c | 16 +- test/CodeGen/atomic-ops.c | 267 +- test/CodeGen/atomic.c | 8 +- test/CodeGen/atomic_ops.c | 14 + test/CodeGen/avx-builtins.c | 25 + test/CodeGen/avx-shuffle-builtins.c | 49 + test/CodeGen/avx2-builtins.c | 782 +++ test/CodeGen/bmi-builtins.c | 79 + test/CodeGen/bmi2-builtins.c | 36 + test/CodeGen/builtin-count-zeros.c | 8 +- test/CodeGen/builtin-memfns.c | 15 + test/CodeGen/builtin-recursive.cc | 10 + test/CodeGen/builtins-x86.c | 21 +- test/CodeGen/builtinshufflevector2.c | 35 + test/CodeGen/cfstring.c | 10 + test/CodeGen/char-literal.c | 63 +- test/CodeGen/complex-indirect.c | 10 +- test/CodeGen/complex-init-list.c | 8 +- test/CodeGen/compound-literal.c | 5 +- test/CodeGen/conditional.c | 6 + test/CodeGen/const-init.c | 12 + test/CodeGen/count-builtins.c | 33 + test/CodeGen/darwin-string-literals.c | 7 +- test/CodeGen/debug-info-args.c | 9 + test/CodeGen/debug-info-block.c | 11 + test/CodeGen/debug-info-compilation-dir.c | 6 + test/CodeGen/debug-info-iv.c | 3 +- test/CodeGen/debug-info-static.c | 8 + test/CodeGen/debug-line-1.c | 20 + test/CodeGen/decl-in-prototype.c | 21 + test/CodeGen/ext-vector-member-alignment.c | 27 + test/CodeGen/ext-vector.c | 24 +- test/CodeGen/fma4-builtins.c | 166 + test/CodeGen/frame-pointer-elim.c | 8 +- test/CodeGen/global-init.c | 2 +- test/CodeGen/init.c | 7 + test/CodeGen/inline.c | 31 +- test/CodeGen/kr-call.c | 12 - test/CodeGen/libcalls-fno-builtin.c | 28 + test/CodeGen/lifetime.c | 23 + test/CodeGen/link-bitcode-file.c | 24 + test/CodeGen/lzcnt-builtins.c | 24 + test/CodeGen/mips-clobber-reg.c | 80 + test/CodeGen/mips-constraint-regs.c | 44 + test/CodeGen/mips64-class-return.cpp | 46 + test/CodeGen/mips64-f128-literal.c | 9 + test/CodeGen/mips64-nontrivial-return.cpp | 17 + test/CodeGen/mips64-padding-arg.c | 43 + test/CodeGen/mmx-inline-asm.c | 2 +- test/CodeGen/mmx-shift-with-immediate.c | 2 +- test/CodeGen/ms-declspecs.c | 16 + test/CodeGen/mult-alt-generic.c | 2 - test/CodeGen/noinline.c | 14 + test/CodeGen/object-size.c | 3 +- test/CodeGen/override-layout.c | 174 + test/CodeGen/packed-nest-unpacked.c | 31 + test/CodeGen/pascal-wchar-string.c | 4 +- test/CodeGen/popcnt-builtins.c | 16 + test/CodeGen/powerpc_types.c | 10 + test/CodeGen/pr12251.c | 11 + test/CodeGen/pr9614.c | 9 +- test/CodeGen/redefine_extname.c | 15 + test/CodeGen/sse-builtins.c | 49 + test/CodeGen/statements.c | 2 +- test/CodeGen/string-literal-short-wstring.c | 15 +- test/CodeGen/string-literal-unicode-conversion.c | 63 + test/CodeGen/string-literal.c | 30 +- test/CodeGen/switch-dce.c | 31 +- test/CodeGen/tbaa-for-vptr.cpp | 19 + test/CodeGen/utf16-cfstrings.c | 10 + test/CodeGen/va_list_test.c | 6 - test/CodeGen/var-align.c | 4 - test/CodeGen/vla-4.c | 24 + test/CodeGen/vla.c | 3 - test/CodeGen/vld_dup.c | 49 + test/CodeGen/wchar-const.c | 4 +- test/CodeGen/x86_32-arguments-darwin.c | 51 +- test/CodeGen/x86_32-arguments-win32.c | 48 + test/CodeGen/x86_64-arguments.c | 54 +- test/CodeGenCXX/2007-01-06-PtrMethodInit.cpp | 2 +- test/CodeGenCXX/2011-12-19-init-list-ctor.cpp | 26 + test/CodeGenCXX/2012-02-06-VecInitialization.cpp | 8 + test/CodeGenCXX/2012-03-16-StoreAlign.cpp | 36 + test/CodeGenCXX/apple-kext-guard-variable.cpp | 2 +- test/CodeGenCXX/apple-kext.cpp | 22 + test/CodeGenCXX/arm.cpp | 26 +- test/CodeGenCXX/assign-operator.cpp | 11 + test/CodeGenCXX/atomic.cpp | 17 + test/CodeGenCXX/atomicinit.cpp | 48 + test/CodeGenCXX/block.cpp | 19 + test/CodeGenCXX/blocks-cxx11.cpp | 84 + test/CodeGenCXX/blocks.cpp | 98 + test/CodeGenCXX/c99-variable-length-array.cpp | 10 + test/CodeGenCXX/compound-literals.cpp | 17 + test/CodeGenCXX/conditional-gnu-ext.cpp | 8 + test/CodeGenCXX/const-base-cast.cpp | 5 +- test/CodeGenCXX/const-init-cxx11.cpp | 425 ++ test/CodeGenCXX/const-init.cpp | 42 +- test/CodeGenCXX/constructor-init.cpp | 3 +- test/CodeGenCXX/constructors.cpp | 2 - test/CodeGenCXX/copy-constructor-elim-2.cpp | 22 + test/CodeGenCXX/cxx-apple-kext.cpp | 4 +- test/CodeGenCXX/cxx0x-initializer-array.cpp | 10 + test/CodeGenCXX/cxx0x-initializer-references.cpp | 69 + ...xx0x-initializer-stdinitializerlist-pr12086.cpp | 37 + ...x0x-initializer-stdinitializerlist-startend.cpp | 85 + .../cxx0x-initializer-stdinitializerlist.cpp | 252 + test/CodeGenCXX/cxx11-unrestricted-union.cpp | 76 + test/CodeGenCXX/cxx11-user-defined-literal.cpp | 69 + test/CodeGenCXX/debug-info-artificial-arg.cpp | 30 + test/CodeGenCXX/debug-info-byval.cpp | 2 +- test/CodeGenCXX/debug-info-char16.cpp | 7 +- test/CodeGenCXX/debug-info-context.cpp | 17 + test/CodeGenCXX/debug-info-dup-fwd-decl.cpp | 24 + test/CodeGenCXX/debug-info-fn-template.cpp | 2 +- test/CodeGenCXX/debug-info-fwd-ref.cpp | 26 + test/CodeGenCXX/debug-info-limit-type.cpp | 24 + test/CodeGenCXX/debug-info-limit.cpp | 4 +- test/CodeGenCXX/debug-info-member.cpp | 2 +- test/CodeGenCXX/debug-info-method-spec.cpp | 2 +- test/CodeGenCXX/debug-info-method.cpp | 2 +- test/CodeGenCXX/debug-info-method2.cpp | 19 + test/CodeGenCXX/debug-info-nullptr.cpp | 9 +- test/CodeGenCXX/debug-info-pubtypes.cpp | 4 +- test/CodeGenCXX/debug-info-static-fns.cpp | 10 + test/CodeGenCXX/debug-info-template-limit.cpp | 15 + test/CodeGenCXX/debug-info-template-member.cpp | 21 + test/CodeGenCXX/debug-info-template-recursive.cpp | 13 + test/CodeGenCXX/debug-info-use-after-free.cpp | 312 + test/CodeGenCXX/debug-lambda-expressions.cpp | 71 + test/CodeGenCXX/default-arguments.cpp | 11 + test/CodeGenCXX/empty-union.cpp | 9 +- test/CodeGenCXX/exceptions.cpp | 33 +- test/CodeGenCXX/field-access-debug-info.cpp | 7 +- test/CodeGenCXX/for-range-temporaries.cpp | 7 + test/CodeGenCXX/forward-enum.cpp | 11 + test/CodeGenCXX/global-dtor-no-atexit.cpp | 35 +- test/CodeGenCXX/global-init.cpp | 8 +- test/CodeGenCXX/goto.cpp | 2 +- test/CodeGenCXX/inheriting-constructor.cpp | 9 + test/CodeGenCXX/init-invariant.cpp | 60 + test/CodeGenCXX/instantiate-temporaries.cpp | 37 + test/CodeGenCXX/lambda-expressions.cpp | 78 + test/CodeGenCXX/mangle-98.cpp | 12 + test/CodeGenCXX/mangle-address-space.cpp | 6 + test/CodeGenCXX/mangle-alias-template.cpp | 7 + test/CodeGenCXX/mangle-exprs.cpp | 66 + test/CodeGenCXX/mangle-lambdas.cpp | 202 + test/CodeGenCXX/mangle-ms.cpp | 13 +- test/CodeGenCXX/mangle-nullptr-arg.cpp | 13 + test/CodeGenCXX/mangle-std-externc.cpp | 27 + test/CodeGenCXX/mangle-template.cpp | 26 + test/CodeGenCXX/mangle.cpp | 11 +- test/CodeGenCXX/member-function-pointer-calls.cpp | 6 +- test/CodeGenCXX/member-function-pointers.cpp | 40 + test/CodeGenCXX/new-array-init-exceptions.cpp | 41 + test/CodeGenCXX/new-array-init.cpp | 33 + test/CodeGenCXX/new.cpp | 19 + test/CodeGenCXX/nrvo.cpp | 12 + test/CodeGenCXX/override-layout.cpp | 64 + test/CodeGenCXX/pointers-to-data-members.cpp | 10 + test/CodeGenCXX/pr11676.cpp | 17 + test/CodeGenCXX/pr11797.cpp | 8 + test/CodeGenCXX/pr12104.cpp | 7 + test/CodeGenCXX/pr12104.h | 9 + test/CodeGenCXX/pr12251.cpp | 146 + test/CodeGenCXX/pr9965.cpp | 4 +- test/CodeGenCXX/pragma-pack-2.cpp | 17 + test/CodeGenCXX/pragma-visibility.cpp | 12 - test/CodeGenCXX/predefined-expr-sizeof.cpp | 8 +- test/CodeGenCXX/predefined-expr.cpp | 180 +- test/CodeGenCXX/references.cpp | 14 + test/CodeGenCXX/regparm.cpp | 6 + test/CodeGenCXX/static-data-member.cpp | 38 + test/CodeGenCXX/static-init.cpp | 93 +- test/CodeGenCXX/static-mutable.cpp | 12 + test/CodeGenCXX/switch-case-folding-1.cpp | 22 + test/CodeGenCXX/switch-case-folding-2.cpp | 21 + test/CodeGenCXX/switch-case-folding.cpp | 18 + test/CodeGenCXX/temporaries.cpp | 18 + test/CodeGenCXX/thiscall-struct-return.cpp | 41 + test/CodeGenCXX/throw-expressions.cpp | 5 + test/CodeGenCXX/thunk-use-after-free.cpp | 42 + test/CodeGenCXX/thunks.cpp | 4 +- test/CodeGenCXX/typeid-cxx11.cpp | 30 + test/CodeGenCXX/typeid.cpp | 21 + test/CodeGenCXX/uncode-string.cpp | 2 +- test/CodeGenCXX/value-init.cpp | 3 +- .../virtual-implicit-move-assignment.cpp | 12 + test/CodeGenCXX/visibility-inlines-hidden.cpp | 11 + test/CodeGenCXX/visibility.cpp | 161 +- test/CodeGenCXX/vla.cpp | 15 +- test/CodeGenCXX/vtable-layout.cpp | 26 + test/CodeGenCXX/weak-extern-typeinfo.cpp | 47 + test/CodeGenCXX/x86_32-arguments.cpp | 2 +- test/CodeGenObjC/2009-08-05-utf16.m | 2 +- test/CodeGenObjC/Inputs/literal-support.h | 35 + test/CodeGenObjC/arc-blocks.m | 523 ++ test/CodeGenObjC/arc-cond-stmt.m | 48 + test/CodeGenObjC/arc-exceptions.m | 45 + test/CodeGenObjC/arc-foreach.m | 6 +- test/CodeGenObjC/arc-ivar-layout.m | 11 + test/CodeGenObjC/arc-literals.m | 121 + test/CodeGenObjC/arc-no-arc-exceptions.m | 78 + test/CodeGenObjC/arc-property.m | 15 + test/CodeGenObjC/arc.m | 537 +- .../auto-property-synthesize-protocol.m | 37 + test/CodeGenObjC/catch-lexical-block.m | 16 + test/CodeGenObjC/complex-double-abi.m | 16 + test/CodeGenObjC/constant-strings.m | 2 - test/CodeGenObjC/debug-info-block-helper.m | 4 +- test/CodeGenObjC/debug-info-fwddecl.m | 5 + test/CodeGenObjC/debug-info-getter-name.m | 8 +- test/CodeGenObjC/debug-info-impl.m | 16 + test/CodeGenObjC/debug-info-property.m | 2 + test/CodeGenObjC/debug-info-property3.m | 12 + test/CodeGenObjC/debug-info-property4.m | 17 + test/CodeGenObjC/debug-info-property5.m | 32 + test/CodeGenObjC/debug-info-pubtypes.m | 9 +- test/CodeGenObjC/debug-info-static-var.m | 5 +- test/CodeGenObjC/debug-info-synthesis.m | 34 + test/CodeGenObjC/debug-property-synth.m | 3 +- test/CodeGenObjC/exceptions.m | 6 +- test/CodeGenObjC/forward-class-impl-metadata.m | 6 + test/CodeGenObjC/fp2ret.m | 28 + test/CodeGenObjC/image-info.m | 13 +- test/CodeGenObjC/ivar-base-as-invariant-load.m | 29 + test/CodeGenObjC/ns_consume_null_check.m | 32 + test/CodeGenObjC/objc-align.m | 2 - test/CodeGenObjC/objc-arc-container-subscripting.m | 21 + test/CodeGenObjC/objc-container-subscripting-1.m | 56 + test/CodeGenObjC/objc-container-subscripting.m | 45 + test/CodeGenObjC/objc-dictionary-literal.m | 25 + test/CodeGenObjC/objc-literal-debugger-test.m | 16 + test/CodeGenObjC/objc-literal-tests.m | 95 + test/CodeGenObjC/optimized-setter.m | 33 + test/CodeGenObjC/property.m | 54 + test/CodeGenObjC/selector-ref-invariance.m | 9 + test/CodeGenObjC/variadic-sends.m | 8 +- test/CodeGenObjCXX/Inputs/literal-support.h | 35 + test/CodeGenObjCXX/address-safety-attr.mm | 20 + test/CodeGenObjCXX/arc-exceptions.mm | 85 + test/CodeGenObjCXX/arc.mm | 69 +- test/CodeGenObjCXX/copy.mm | 2 - test/CodeGenObjCXX/debug-info.mm | 41 + test/CodeGenObjCXX/lambda-expressions.mm | 39 + test/CodeGenObjCXX/literals.mm | 111 + test/CodeGenObjCXX/lvalue-reference-getter.mm | 28 + .../CodeGenObjCXX/objc-container-subscripting-1.mm | 50 + test/CodeGenObjCXX/objc-container-subscripting.mm | 57 + test/CodeGenObjCXX/property-object-reference-1.mm | 31 + test/CodeGenObjCXX/property-object-reference-2.mm | 56 + test/CodeGenObjCXX/property-object-reference.mm | 12 + test/CodeGenObjCXX/property-reference.mm | 44 +- test/CodeGenOpenCL/fpaccuracy.cl | 25 + test/CodeGenOpenCL/vector_literals_nested.cl | 23 + test/CodeGenOpenCL/vector_logops.cl | 19 + test/Coverage/targets.c | 3 +- test/Driver/Inputs/basic_freebsd64_tree/lib/.keep | 0 .../Inputs/basic_freebsd64_tree/usr/lib/.keep | 0 .../Inputs/basic_freebsd64_tree/usr/lib/crt1.o | 0 .../Inputs/basic_freebsd64_tree/usr/lib32/.keep | 0 test/Driver/Inputs/basic_freebsd_tree/lib/.keep | 0 .../Driver/Inputs/basic_freebsd_tree/usr/lib/.keep | 0 .../Inputs/basic_freebsd_tree/usr/lib/crt1.o | 0 .../Inputs/basic_freebsd_tree/usr/lib32/.keep | 0 test/Driver/Inputs/debian_multiarch_tree/lib/.keep | 0 .../debian_multiarch_tree/lib/i386-linux-gnu/.keep | 0 .../lib/powerpc-linux-gnu/.keep | 0 .../lib/powerpc64-linux-gnu/.keep | 0 .../lib/x86_64-linux-gnu/.keep | 0 .../Inputs/debian_multiarch_tree/usr/include/.keep | 0 .../usr/include/c++/4.5/.keep | 0 .../usr/include/c++/4.5/backward/.keep | 0 .../usr/include/c++/4.5/i686-linux-gnu/.keep | 0 .../usr/include/c++/4.5/powerpc-linux-gnu/.keep | 0 .../usr/include/c++/4.5/powerpc64-linux-gnu/.keep | 0 .../usr/include/c++/4.5/x86_64-linux-gnu/.keep | 0 .../usr/include/i386-linux-gnu/.keep | 0 .../usr/include/powerpc-linux-gnu/.keep | 0 .../usr/include/powerpc64-linux-gnu/.keep | 0 .../usr/include/x86_64-linux-gnu/.keep | 0 .../Inputs/debian_multiarch_tree/usr/lib/.keep | 0 .../usr/lib/gcc/i686-linux-gnu/4.5/crtbegin.o | 0 .../usr/lib/gcc/powerpc-linux-gnu/4.5/crtbegin.o | 0 .../usr/lib/gcc/powerpc64-linux-gnu/4.5/crtbegin.o | 0 .../usr/lib/gcc/x86_64-linux-gnu/4.5/crtbegin.o | 0 .../usr/lib/i386-linux-gnu/.keep | 0 .../usr/lib/powerpc-linux-gnu/.keep | 0 .../usr/lib/powerpc64-linux-gnu/.keep | 0 .../usr/lib/x86_64-linux-gnu/.keep | 0 .../Inputs/multiarch_freebsd64_tree/lib/.keep | 0 .../Inputs/multiarch_freebsd64_tree/usr/lib/.keep | 0 .../Inputs/multiarch_freebsd64_tree/usr/lib/crt1.o | 0 .../multiarch_freebsd64_tree/usr/lib32/.keep | 0 .../multiarch_freebsd64_tree/usr/lib32/crt1.o | 0 .../Inputs/prefixed_tools_tree/x86_64--linux-as | 2 + .../Inputs/prefixed_tools_tree/x86_64--linux-ld | 2 + test/Driver/Inputs/suse_10.3_ppc64_tree/lib/.keep | 0 .../Driver/Inputs/suse_10.3_ppc64_tree/lib64/.keep | 0 .../gcc/powerpc64-suse-linux/4.1.2/64/crtbegin.o | 0 .../lib/gcc/powerpc64-suse-linux/4.1.2/crtbegin.o | 0 .../Inputs/suse_10.3_ppc64_tree/usr/lib64/.keep | 0 .../Inputs/ubuntu_11.04_multiarch_tree/lib/.keep | 0 .../lib/i386-linux-gnu/.keep | 0 .../ubuntu_11.04_multiarch_tree/usr/include/.keep | 0 .../usr/include/c++/4.5/.keep | 0 .../usr/include/c++/4.5/backward/.keep | 0 .../usr/include/c++/4.5/i686-linux-gnu/.keep | 0 .../usr/include/i386-linux-gnu/.keep | 0 .../ubuntu_11.04_multiarch_tree/usr/lib/.keep | 0 .../usr/lib/i386-linux-gnu/.keep | 0 .../gcc/i686-linux-gnu/4.5/crtbegin.o | 0 test/Driver/Wp-args.c | 2 +- test/Driver/Xarch.c | 6 +- test/Driver/Xlinker-args.c | 2 +- test/Driver/altivec.cpp | 14 + test/Driver/analyze.c | 2 +- test/Driver/apple-kext-i386.cpp | 20 +- test/Driver/apple-kext-mkernel.c | 8 +- test/Driver/arc.c | 13 +- test/Driver/arch.c | 2 +- test/Driver/arclite-link.c | 8 + test/Driver/arm-darwin-builtin.c | 6 +- test/Driver/arm-mfpmath.c | 29 + test/Driver/arm-mfpu.c | 48 + test/Driver/asan.c | 8 + test/Driver/ast.c | 4 +- test/Driver/bindings.c | 28 +- test/Driver/cc-log-diagnostics.c | 4 +- test/Driver/ccc-host-triple-no-integrated-as.c | 8 +- test/Driver/cfi.c | 5 +- test/Driver/clang-translation.c | 12 +- test/Driver/cpath.c | 18 +- test/Driver/cpp-precomp.c | 5 + test/Driver/darwin-as.c | 11 +- test/Driver/darwin-cc.c | 2 +- test/Driver/darwin-debug-flags.c | 6 +- test/Driver/darwin-dsymutil.c | 10 +- test/Driver/darwin-iphone-defaults.m | 6 +- test/Driver/darwin-ld.c | 71 +- test/Driver/darwin-objc-defaults.m | 18 +- test/Driver/darwin-objc-gc.m | 2 +- test/Driver/darwin-objc-options.m | 4 +- test/Driver/darwin-verify-debug.c | 8 +- test/Driver/darwin-version.c | 8 +- test/Driver/darwin-xarch.c | 6 +- test/Driver/debug-options-as.c | 18 + test/Driver/debug-options.c | 27 + test/Driver/debug.c | 11 + test/Driver/default-toolchain.c | 6 +- test/Driver/diagnostics.c | 9 + test/Driver/dragonfly.c | 2 +- test/Driver/dwarf2-cfi-asm.c | 35 + test/Driver/exceptions.m | 2 +- test/Driver/fast-math.c | 119 + test/Driver/flags.c | 6 +- test/Driver/frame-pointer.c | 24 + test/Driver/freebsd.c | 35 +- test/Driver/gcc-toolchain.cpp | 23 + test/Driver/gcc_forward.c | 2 +- test/Driver/gnu-runtime.m | 4 +- test/Driver/gold-lto.c | 6 + test/Driver/invalid-o-level.c | 4 + test/Driver/ios-simulator-arcruntime.c | 4 +- test/Driver/le32-unknown-nacl.cpp | 11 +- test/Driver/linker-opts.c | 5 + test/Driver/linux-as.c | 31 + test/Driver/linux-header-search.cpp | 75 + test/Driver/linux-ld.c | 147 +- test/Driver/mips-as.c | 31 + test/Driver/mips-float.c | 42 + test/Driver/mno-global-merge.c | 4 +- test/Driver/modules.m | 6 + test/Driver/modules.mm | 6 + test/Driver/no-objc-arr.m | 2 +- .../Driver/no-objc-default-synthesize-properties.m | 10 + test/Driver/no-sibling-calls.c | 8 + test/Driver/noinline.c | 10 + test/Driver/nostdlib.c | 2 +- test/Driver/nostdlibinc.c | 2 +- test/Driver/openbsd.c | 2 +- test/Driver/output-file-cleanup.c | 25 + test/Driver/parsing.c | 3 - test/Driver/phases.c | 22 +- test/Driver/pic.c | 81 + test/Driver/prefixed-tools.c | 12 + test/Driver/pth.c | 4 +- test/Driver/redundant-args.c | 2 + test/Driver/redzone.c | 4 +- test/Driver/rewrite-legacy-objc.m | 15 + test/Driver/rewrite-objc.m | 8 +- test/Driver/stackrealign.c | 12 + test/Driver/sysroot-flags.c | 6 +- test/Driver/sysroot.c | 6 +- test/Driver/target.c | 11 + test/Driver/tsan.c | 8 + test/Driver/unknown-arg.c | 4 + test/Driver/unknown-gcc-arch.c | 8 +- test/Driver/working-directory.c | 4 + test/Driver/x86_features.c | 2 +- test/FixIt/atomic-property.m | 29 + test/FixIt/fixit-cxx0x.cpp | 108 +- test/FixIt/fixit-cxx11-compat.cpp | 11 + test/FixIt/fixit-missing-method-return-type.m | 8 +- test/FixIt/fixit-recompile.c | 6 + test/FixIt/fixit-recursive-block.c | 12 + test/FixIt/fixit-vexing-parse-cxx0x.cpp | 21 + test/FixIt/fixit-vexing-parse.cpp | 89 + test/FixIt/fixit.c | 62 +- test/FixIt/fixit.cpp | 118 +- test/FixIt/no-fixit.cpp | 7 + test/FixIt/objc-literals.m | 44 + test/FixIt/typo-crash.cpp | 17 + test/FixIt/typo.c | 2 +- test/FixIt/typo.m | 6 +- .../Headers/TestFramework.h | 1 + test/Frontend/Wno-everything.c | 7 + test/Frontend/darwin-version.c | 20 +- test/Frontend/dependency-gen.c | 8 +- test/Frontend/diagnostic-name.c | 5 - test/Frontend/iframework.c | 3 + test/Frontend/ir-support-errors.ll | 4 +- test/Frontend/rewrite-macros.c | 2 +- test/Headers/c89.c | 2 +- test/Headers/wmmintrin.c | 4 + .../Framework.framework/Headers/Framework.h | 2 + test/Index/Inputs/Headers/a.h | 2 + test/Index/Inputs/Headers/a_extensions.h | 1 + test/Index/Inputs/Headers/crash.h | 6 + test/Index/Inputs/Headers/module.map | 10 + test/Index/Inputs/Headers/nested/module.map | 4 + test/Index/Inputs/Headers/nested/nested.h | 1 + test/Index/Inputs/pragma_disable_warning.h | 1 + test/Index/Inputs/redeclarations.h | 21 + test/Index/Inputs/reparse-instantiate.h | 14 + test/Index/TestClassDecl.m | 2 +- test/Index/TestClassForwardDecl.m | 2 +- test/Index/annotate-attribute.cpp | 28 +- test/Index/annotate-literals.m | 72 + test/Index/annotate-macro-args.m | 8 +- test/Index/annotate-subscripting.m | 92 + test/Index/annotate-tokens-cxx0x.cpp | 11 + test/Index/annotate-tokens-pp.c | 7 +- test/Index/annotate-tokens.cpp | 6 +- test/Index/annotate-tokens.m | 200 +- test/Index/annotate-toplevel-in-objccontainer.m | 33 + test/Index/annotate-toplevel-in-objccontainer.m.h | 9 + test/Index/asm-attribute.c | 6 + test/Index/c-index-api-loadTU-test.m | 30 +- test/Index/c-index-getCursor-test.m | 32 +- test/Index/cindex-on-invalid-usrs.m | 2 +- test/Index/complete-at-exprstmt.m | 6 +- test/Index/complete-blocks.m | 15 +- test/Index/complete-cxx-inline-methods.cpp | 24 +- test/Index/complete-declarators.m | 4 +- test/Index/complete-enums.c | 12 +- test/Index/complete-enums.cpp | 25 + test/Index/complete-exprs.c | 6 +- test/Index/complete-exprs.cpp | 35 +- test/Index/complete-exprs.m | 19 +- test/Index/complete-in-invalid-method.m | 19 + test/Index/complete-ivar-access.m | 69 + test/Index/complete-lambdas.cpp | 43 + test/Index/complete-macros.c | 6 +- test/Index/complete-member-access.m | 17 +- test/Index/complete-method-decls.m | 36 +- test/Index/complete-modules.m | 14 + test/Index/complete-objc-message.m | 14 +- test/Index/complete-qualified.cpp | 8 +- test/Index/complete-recovery.m | 11 +- test/Index/complete-stmt.c | 6 +- test/Index/complete-super.cpp | 9 + test/Index/complete-synthesized.m | 8 +- test/Index/complete-type-factors.m | 10 +- test/Index/crash-recovery-code-complete.c | 3 +- test/Index/crash-recovery-modules.m | 20 + test/Index/crash-recovery-reparse.c | 3 +- test/Index/cxx11-lambdas.cpp | 33 + test/Index/error-on-deserialized.c | 13 + test/Index/file-macro-refs.c | 12 + test/Index/file-refs-subscripting.m | 65 + test/Index/file-refs.m | 48 +- test/Index/fix-its.c | 11 +- test/Index/get-cursor-macro-args.m | 4 +- test/Index/get-cursor.cpp | 13 + test/Index/get-cursor.m | 54 +- test/Index/index-attrs.m | 17 + test/Index/index-decls.m | 30 + test/Index/index-invalid-code.m | 8 + test/Index/index-many-logical-ops.c | 2011 ++++++ test/Index/index-refs.cpp | 121 + test/Index/index-subscripting-literals.m | 66 + test/Index/index-suppress-refs.cpp | 12 + test/Index/index-suppress-refs.h | 9 + test/Index/index-suppress-refs.hpp | 3 + test/Index/index-suppress-refs.m | 44 + test/Index/invalid-code-rdar10451854.m | 15 + test/Index/invalid-rdar-8236270.cpp | 2 +- test/Index/linkage.c | 8 +- test/Index/local-symbols.m | 4 +- test/Index/ms-if-exists.cpp | 24 + test/Index/nested-macro-instantiations.cpp | 20 - test/Index/overrides.m | 36 +- test/Index/pch-opaque-value.cpp | 16 + test/Index/pch-with-errors.c | 42 + test/Index/pch-with-errors.m | 28 + test/Index/pragma-diag-reparse.c | 15 +- test/Index/preamble-reparse-import.m | 12 + test/Index/preamble-reparse-import.m-1.h | 5 + test/Index/preamble-reparse-import.m-2.h | 5 + test/Index/preamble-reparse-import.m-3.h | 1 + test/Index/print-typekind.c | 2 +- test/Index/print-typekind.m | 6 +- test/Index/properties-class-extensions.m | 4 +- test/Index/recursive-cxx-member-calls.cpp | 2 +- test/Index/redeclarations.cpp | 21 + test/Index/reparse-instantiate.cpp | 7 + test/Index/retain-target-options.c | 8 +- test/Index/targeted-annotation.c | 99 + test/Index/targeted-cursor.c | 65 + test/Index/targeted-cursor.m | 6 + test/Index/targeted-cursor.m.h | 7 + test/Index/targeted-fields.h | 3 + test/Index/targeted-file-refs.c | 59 + test/Index/targeted-nested1.h | 2 + test/Index/targeted-preamble.h | 2 + test/Index/targeted-top.h | 24 + test/Index/unmatched-braces.c | 9 + test/Index/unmatched-braces.m | 11 + test/Index/usrs.m | 43 +- test/Index/vector-types.c | 6 + test/Index/werror.c | 5 +- test/Lexer/char-literal-encoding-error.c | 15 + test/Lexer/char-literal.cpp | 24 + test/Lexer/constants.c | 2 +- test/Lexer/cxx0x_keyword_as_cxx98.cpp | 2 +- test/Lexer/cxx0x_raw_string_delim_length.cpp | 8 +- test/Lexer/escape_newline.c | 4 + test/Lexer/has_attribute.cpp | 12 - test/Lexer/has_extension.c | 6 + test/Lexer/has_extension_cxx.cpp | 8 + test/Lexer/has_feature_address_sanitizer.cpp | 11 + test/Lexer/has_feature_c1x.c | 18 + test/Lexer/has_feature_cxx0x.cpp | 92 +- test/Lexer/has_feature_modules.m | 25 + test/Lexer/has_feature_type_traits.cpp | 5 + test/Lexer/hexfloat.cpp | 5 +- test/Lexer/ms-extensions.c | 1 + test/Lexer/ms-extensions.cpp | 6 + test/Lexer/newline-eof-c++11.cpp | 4 + test/Lexer/newline-eof-c++98-compat.cpp | 4 + test/Lexer/newline-eof.c | 4 +- test/Lexer/rdr-6096838-2.c | 2 +- test/Lexer/string-literal-encoding.c | 33 + test/Lexer/string_concat.cpp | 48 +- test/Lexer/token-concat.cpp | 19 + test/Lexer/utf8-char-literal.cpp | 5 +- test/Lexer/wchar.c | 4 +- test/Misc/caret-diags-macros.c | 58 +- test/Misc/diag-aka-types.cpp | 18 +- test/Misc/diag-format.c | 6 +- test/Misc/diag-macro-backtrace.c | 53 + test/Misc/diag-verify.cpp | 48 + test/Misc/include-stack-for-note-flag.cpp | 4 +- test/Misc/integer-literal-printing.cpp | 13 + test/Misc/macro-backtrace-limit.c | 32 - test/Misc/macro-backtrace.c | 57 + test/Misc/pubnames.c | 19 + test/Misc/serialized-diags-no-category.c | 12 + test/Misc/serialized-diags-no-issue.c | 10 + test/Misc/serialized-diags-single-issue.c | 36 + test/Misc/serialized-diags.c | 67 + test/Misc/serialized-diags.h | 5 + test/Misc/warn-in-system-header.c | 2 +- test/Misc/warning-flags.c | 46 +- .../Headers/AlsoDependsOnModule.h | 2 + .../SubFramework.framework/Headers/Other.h | 1 + .../SubFramework.framework/Headers/SubFramework.h | 2 + .../Headers/DependsOnModule.h | 4 +- .../DependsOnModule.framework/Headers/cxx_other.h | 5 + .../DependsOnModule.framework/Headers/other.h | 1 + .../PrivateHeaders/DependsOnModulePrivate.h | 2 + .../Inputs/DependsOnModule.framework/module.map | 19 + .../DependsOnModule.framework/module_private.map | 6 + test/Modules/Inputs/MethodPoolA.h | 8 + test/Modules/Inputs/MethodPoolB.h | 13 + .../SubFramework.framework/Headers/SubFramework.h | 5 + .../Module.framework/Headers/Buried/Treasure.h | 1 + .../Inputs/Module.framework/Headers/Module.h | 10 + .../Inputs/Module.framework/Headers/NotInModule.h | 1 + test/Modules/Inputs/Module.framework/Headers/Sub.h | 3 + .../Modules/Inputs/Module.framework/Headers/Sub2.h | 1 + .../PrivateHeaders/ModulePrivate.h | 1 + .../Headers/MutuallyRecursive1.h | 2 +- .../Headers/MutuallyRecursive2.h | 2 +- .../Inputs/NoUmbrella.framework/Headers/A.h | 8 + .../Inputs/NoUmbrella.framework/Headers/B.h | 1 + .../Inputs/NoUmbrella.framework/Headers/Boom.h | 1 + .../Inputs/NoUmbrella.framework/Headers/SubDir/C.h | 1 + .../PrivateHeaders/A_Private.h | 1 + .../PrivateHeaders/B_Private.h | 1 + .../Modules/Inputs/NoUmbrella.framework/module.map | 9 + .../Inputs/NoUmbrella.framework/module_private.map | 4 + test/Modules/Inputs/System/usr/include/module.map | 21 + test/Modules/Inputs/System/usr/include/stdbool.h | 1 + test/Modules/Inputs/System/usr/include/stdint.h | 1 + test/Modules/Inputs/System/usr/include/stdio.h | 3 + test/Modules/Inputs/category_bottom.h | 11 + test/Modules/Inputs/category_left.h | 15 + test/Modules/Inputs/category_other.h | 6 + test/Modules/Inputs/category_right.h | 12 + test/Modules/Inputs/category_top.h | 14 + test/Modules/Inputs/decl.h | 2 + test/Modules/Inputs/decl2.h | 1 + test/Modules/Inputs/def-include.h | 13 + test/Modules/Inputs/def.h | 11 + test/Modules/Inputs/diamond.h | 1 + test/Modules/Inputs/diamond_bottom.h | 4 +- test/Modules/Inputs/diamond_left.h | 2 +- test/Modules/Inputs/diamond_right.h | 2 +- test/Modules/Inputs/irgen.h | 1 + test/Modules/Inputs/macros.h | 10 + test/Modules/Inputs/module.map | 86 + test/Modules/Inputs/module_private_left.h | 26 + test/Modules/Inputs/module_private_right.h | 13 + test/Modules/Inputs/namespaces-left.h | 53 + test/Modules/Inputs/namespaces-right.h | 61 + test/Modules/Inputs/namespaces-top.h | 14 + .../Inputs/normal-module-map/Umbrella/Umbrella.h | 4 + .../Inputs/normal-module-map/Umbrella/module.map | 3 + .../normal-module-map/Umbrella/umbrella_sub.h | 2 + .../Inputs/normal-module-map/Umbrella2/Umbrella2.h | 1 + .../Inputs/normal-module-map/Umbrella2/module.map | 3 + test/Modules/Inputs/normal-module-map/a1.h | 1 + test/Modules/Inputs/normal-module-map/a2.h | 1 + test/Modules/Inputs/normal-module-map/b1.h | 2 + test/Modules/Inputs/normal-module-map/module.map | 13 + .../Inputs/normal-module-map/nested/module.map | 4 + .../Inputs/normal-module-map/nested/nested1.h | 1 + .../Inputs/normal-module-map/nested/nested2.h | 1 + .../Inputs/normal-module-map/nested_umbrella/a.h | 2 + .../Inputs/normal-module-map/nested_umbrella/b.h | 2 + test/Modules/Inputs/redecl-merge-bottom.h | 28 + test/Modules/Inputs/redecl-merge-left-left.h | 7 + test/Modules/Inputs/redecl-merge-left.h | 90 + test/Modules/Inputs/redecl-merge-right.h | 94 + test/Modules/Inputs/redecl-merge-top-explicit.h | 9 + test/Modules/Inputs/redecl-merge-top.h | 20 + test/Modules/Inputs/redecl_namespaces_left.h | 3 + test/Modules/Inputs/redecl_namespaces_right.h | 3 + test/Modules/Inputs/redeclarations_left.h | 2 + test/Modules/Inputs/redeclarations_right.h | 2 + test/Modules/Inputs/subdir/module.map | 3 + test/Modules/Inputs/subdir/subdir.h | 1 + test/Modules/Inputs/submodules/hash_map.h | 4 + test/Modules/Inputs/submodules/module.map | 5 + test/Modules/Inputs/submodules/type_traits.h | 12 + test/Modules/Inputs/submodules/vector.h | 3 + .../Inputs/wildcard-submodule-exports/A_one.h | 1 + .../Inputs/wildcard-submodule-exports/A_two.h | 1 + .../Inputs/wildcard-submodule-exports/B_one.h | 1 + .../Inputs/wildcard-submodule-exports/B_two.h | 1 + .../Inputs/wildcard-submodule-exports/C_one.h | 4 + .../Inputs/wildcard-submodule-exports/C_two.h | 4 + .../Inputs/wildcard-submodule-exports/module.map | 20 + test/Modules/auto-module-import.c | 13 - test/Modules/auto-module-import.m | 73 + test/Modules/compiler_builtins.m | 10 + test/Modules/cstd.m | 29 + test/Modules/cycles.c | 12 +- test/Modules/decldef.mm | 28 + test/Modules/diamond-pch.c | 28 + test/Modules/diamond.c | 14 +- test/Modules/header-import.m | 4 +- test/Modules/inferred-submodules.m | 15 + test/Modules/irgen.c | 12 +- test/Modules/load_failure.c | 16 +- test/Modules/lookup.cpp | 21 +- test/Modules/lookup.m | 13 +- test/Modules/macros.c | 25 +- test/Modules/method_pool.m | 30 + test/Modules/module-private.cpp | 82 +- test/Modules/namespaces.cpp | 64 + test/Modules/normal-module-map.cpp | 35 + test/Modules/objc-categories.m | 87 +- test/Modules/on-demand-build-warnings.m | 4 +- test/Modules/on-demand-build.m | 18 +- test/Modules/on-demand-macros.m | 6 +- test/Modules/redecl-merge.m | 158 + test/Modules/redecl-namespaces.mm | 13 + test/Modules/redeclarations.m | 11 + test/Modules/requires.m | 5 + test/Modules/subframeworks.m | 22 + test/Modules/submodules-preprocess.cpp | 61 + test/Modules/submodules.cpp | 29 + test/Modules/submodules.m | 11 + test/Modules/wildcard-submodule-exports.cpp | 26 + test/PCH/Inputs/arc.h | 10 +- test/PCH/chain-categories2.m | 57 + test/PCH/chain-class-extension.m | 42 + test/PCH/chain-cxx.cpp | 13 +- test/PCH/chain-selectors.m | 8 +- test/PCH/cocoa.m | 7 + test/PCH/cxx-constexpr.cpp | 19 + test/PCH/cxx-exprs.cpp | 27 + test/PCH/cxx-functions.cpp | 10 + test/PCH/cxx-functions.h | 1 + test/PCH/cxx-templates.cpp | 6 + test/PCH/cxx-templates.h | 10 + test/PCH/cxx-trailing-return.cpp | 15 + test/PCH/cxx-traits.cpp | 9 +- test/PCH/cxx-traits.h | 5 + test/PCH/cxx0x-default-delete.cpp | 11 + test/PCH/cxx11-constexpr.cpp | 29 + test/PCH/cxx11-enum-template.cpp | 26 + test/PCH/cxx11-lambdas.mm | 48 + test/PCH/cxx11-user-defined-literals.cpp | 21 + test/PCH/designated-init.c | 7 + test/PCH/designated-init.c.h | 42 + test/PCH/exprs.h | 4 +- test/PCH/method-redecls.m | 4 +- test/PCH/method_pool.m | 6 +- test/PCH/modified-header-error.c | 3 +- test/PCH/ms-if-exists.cpp | 29 + test/PCH/objc_container.h | 26 + test/PCH/objc_container.m | 20 + test/PCH/objc_exprs.h | 8 + test/PCH/objc_exprs.m | 2 +- test/PCH/objc_literals.m | 66 + test/PCH/objc_literals.mm | 65 + test/PCH/pending-ids.m | 33 + test/PCH/rdar10830559.cpp | 35 + test/PCH/reloc.c | 6 +- test/PCH/replaced-decl.m | 22 + test/PCH/single-token-macro.c | 24 + test/PCH/subscripting-literals.m | 47 + test/PCH/typo.cpp | 4 +- test/Parser/DelayedTemplateParsing.cpp | 31 + test/Parser/MicrosoftExtensions.c | 11 +- test/Parser/MicrosoftExtensions.cpp | 34 + test/Parser/asm.c | 3 + test/Parser/asm.cpp | 8 + test/Parser/attr-availability.c | 10 +- test/Parser/attributes.c | 40 + test/Parser/bracket-crash.cpp | 4 +- test/Parser/check-syntax-1.m | 2 +- test/Parser/cxx-altivec.cpp | 2 +- test/Parser/cxx-class.cpp | 30 + test/Parser/cxx-condition.cpp | 8 +- test/Parser/cxx-decl.cpp | 32 +- test/Parser/cxx-default-delete.cpp | 12 +- test/Parser/cxx-ext-delete-default.cpp | 10 +- test/Parser/cxx-template-decl.cpp | 15 +- test/Parser/cxx-typeid.cpp | 2 +- test/Parser/cxx-typeof.cpp | 2 +- test/Parser/cxx-using-directive.cpp | 6 +- test/Parser/cxx0x-ambig.cpp | 127 + test/Parser/cxx0x-attributes.cpp | 32 +- test/Parser/cxx0x-condition.cpp | 37 + test/Parser/cxx0x-decl.cpp | 18 + test/Parser/cxx0x-for-range.cpp | 30 + test/Parser/cxx0x-in-cxx98.cpp | 13 + test/Parser/cxx0x-lambda-expressions.cpp | 38 +- test/Parser/cxx0x-literal-operators.cpp | 8 +- test/Parser/cxx11-type-specifier.cpp | 20 + test/Parser/cxx11-user-defined-literals.cpp | 112 + test/Parser/declarators.c | 3 + test/Parser/enhanced-proto-1.m | 2 +- test/Parser/method-def-in-class.m | 11 - test/Parser/missing-end-2.m | 12 +- test/Parser/missing-end-3.m | 4 +- test/Parser/missing-end-4.m | 51 + test/Parser/missing-end.m | 4 +- test/Parser/objc-category-neg-1.m | 2 +- test/Parser/objc-forcollection-neg-2.m | 4 +- test/Parser/objc-forcollection-neg.m | 2 +- test/Parser/objc-foreach-syntax.m | 2 +- test/Parser/objc-init.m | 6 +- test/Parser/objc-missing-impl.m | 2 +- test/Parser/objc-property-syntax.m | 2 +- test/Parser/objc-quirks.m | 6 +- test/Parser/objc-synthesized-recover.m | 2 +- test/Parser/objcxx-lambda-expressions-neg.mm | 2 +- test/Parser/objcxx0x-lambda-expressions.mm | 17 +- test/Parser/objcxx11-attributes.mm | 55 + test/Parser/objcxx11-user-defined-literal.mm | 3 + test/Parser/recovery.c | 4 +- test/Parser/recovery.cpp | 42 + test/Parser/skip-function-bodies.mm | 45 + test/Parser/statements.c | 8 +- test/Parser/warn-dangling-else.cpp | 55 + .../TestFramework.framework/.system_framework | 0 .../Headers/AnotherTestFramework.h | 3 + .../Headers/TestFramework.h | 6 + test/Preprocessor/_Pragma-in-macro-arg.c | 35 + test/Preprocessor/cxx_oper_keyword_ms_compat.cpp | 179 + test/Preprocessor/feature_tests.c | 5 +- test/Preprocessor/has_attribute.c | 26 + test/Preprocessor/init.c | 896 ++- test/Preprocessor/line-directive.c | 8 +- test/Preprocessor/macro_arg_directive.c | 20 + test/Preprocessor/macro_arg_directive.h | 9 + test/Preprocessor/macro_paste_c_block_comment.c | 6 +- test/Preprocessor/microsoft-import.c | 17 + test/Preprocessor/mmx.c | 13 + test/Preprocessor/optimize.c | 2 +- test/Preprocessor/pic.c | 43 +- test/Preprocessor/pp-record.c | 11 +- test/Preprocessor/pp-record.h | 2 + test/Preprocessor/pragma_microsoft.c | 43 + test/Preprocessor/predefined-macros.c | 27 +- test/Preprocessor/stdint.c | 219 +- test/Preprocessor/user_defined_system_framework.c | 8 + test/Preprocessor/warn-disabled-macro-expansion.c | 27 + test/Preprocessor/x86_target_features.c | 8 +- test/Rewriter/blockcast3.mm | 2 +- test/Rewriter/blockstruct.m | 2 +- test/Rewriter/crash.m | 2 +- test/Rewriter/finally.m | 4 +- test/Rewriter/func-in-impl.m | 30 + test/Rewriter/id-test-3.m | 2 +- test/Rewriter/inner-block-helper-funcs.mm | 2 +- test/Rewriter/instancetype-test.mm | 2 +- test/Rewriter/ivar-encoding-1.m | 2 +- test/Rewriter/ivar-encoding-2.m | 2 +- test/Rewriter/metadata-test-1.m | 2 +- test/Rewriter/metadata-test-2.m | 2 +- test/Rewriter/method-encoding-1.m | 2 +- test/Rewriter/objc-bool-literal-check-modern.mm | 29 + test/Rewriter/objc-bool-literal-modern-1.mm | 31 + test/Rewriter/objc-bool-literal-modern.mm | 23 + test/Rewriter/objc-encoding-bug-1.m | 2 +- test/Rewriter/objc-ivar-receiver-1.m | 4 +- test/Rewriter/objc-modern-class-init-hooks.mm | 36 + test/Rewriter/objc-modern-class-init.mm | 23 + test/Rewriter/objc-modern-container-subscript.mm | 48 + test/Rewriter/objc-modern-implicit-cast.mm | 33 + test/Rewriter/objc-modern-ivar-receiver-1.mm | 31 + test/Rewriter/objc-modern-linkage-spec.mm | 21 + test/Rewriter/objc-modern-metadata-visibility.mm | 40 + test/Rewriter/objc-modern-numeric-literal.mm | 69 + test/Rewriter/objc-modern-property-attributes.mm | 35 + test/Rewriter/objc-string-concat-1.m | 2 +- test/Rewriter/objc-super-test.m | 2 +- test/Rewriter/objc-synchronized-1.m | 2 +- test/Rewriter/properties.m | 2 +- test/Rewriter/property-dot-syntax.mm | 2 +- test/Rewriter/protocol-rewrite-1.m | 2 +- test/Rewriter/protocol-rewrite-2.m | 2 +- test/Rewriter/rewrite-anonymous-union.m | 2 +- test/Rewriter/rewrite-api-bug.m | 2 +- test/Rewriter/rewrite-block-argument.m | 2 +- test/Rewriter/rewrite-block-consts.mm | 2 +- test/Rewriter/rewrite-block-ivar-call.mm | 2 +- test/Rewriter/rewrite-block-literal-1.mm | 2 +- test/Rewriter/rewrite-block-literal.c | 80 - test/Rewriter/rewrite-block-literal.mm | 74 + test/Rewriter/rewrite-block-pointer.mm | 2 +- test/Rewriter/rewrite-block-property.m | 2 +- test/Rewriter/rewrite-byref-in-nested-blocks.mm | 2 +- test/Rewriter/rewrite-byref-vars.mm | 4 +- test/Rewriter/rewrite-cast-ivar-access.mm | 2 +- test/Rewriter/rewrite-cast-ivar-modern-access.mm | 46 + test/Rewriter/rewrite-cast-to-bool.mm | 2 +- test/Rewriter/rewrite-category-property.mm | 2 +- test/Rewriter/rewrite-constructor-init.mm | 2 +- test/Rewriter/rewrite-eh.m | 2 +- test/Rewriter/rewrite-elaborated-type.mm | 2 +- test/Rewriter/rewrite-extern-c.mm | 2 +- test/Rewriter/rewrite-foreach-1.m | 2 +- test/Rewriter/rewrite-foreach-2.m | 2 +- test/Rewriter/rewrite-foreach-3.m | 2 +- test/Rewriter/rewrite-foreach-4.m | 2 +- test/Rewriter/rewrite-foreach-5.m | 2 +- test/Rewriter/rewrite-foreach-6.m | 2 +- test/Rewriter/rewrite-foreach-7.m | 2 +- test/Rewriter/rewrite-foreach-in-block.mm | 2 +- test/Rewriter/rewrite-foreach-protocol-id.m | 2 +- test/Rewriter/rewrite-forward-class.m | 2 +- test/Rewriter/rewrite-forward-class.mm | 2 +- test/Rewriter/rewrite-function-decl.mm | 2 +- test/Rewriter/rewrite-implementation.mm | 5 +- test/Rewriter/rewrite-ivar-use.m | 5 +- test/Rewriter/rewrite-local-externs-in-block.mm | 2 +- test/Rewriter/rewrite-local-static-id.mm | 2 +- test/Rewriter/rewrite-message-expr.mm | 2 +- test/Rewriter/rewrite-modern-array-literal.mm | 27 + test/Rewriter/rewrite-modern-block-ivar-call.mm | 17 + test/Rewriter/rewrite-modern-block.mm | 23 + test/Rewriter/rewrite-modern-catch.m | 31 + test/Rewriter/rewrite-modern-class.mm | 70 + test/Rewriter/rewrite-modern-container-literal.mm | 55 + test/Rewriter/rewrite-modern-ivar-use.mm | 26 + test/Rewriter/rewrite-modern-ivars-1.mm | 89 + test/Rewriter/rewrite-modern-ivars-2.mm | 101 + test/Rewriter/rewrite-modern-ivars.mm | 64 + test/Rewriter/rewrite-modern-nested-ivar.mm | 33 + test/Rewriter/rewrite-modern-protocol.mm | 31 + test/Rewriter/rewrite-modern-struct-ivar.mm | 24 + test/Rewriter/rewrite-modern-synchronized.m | 35 + test/Rewriter/rewrite-modern-throw.m | 67 + test/Rewriter/rewrite-modern-try-catch-finally.m | 63 + test/Rewriter/rewrite-modern-try-finally.m | 40 + test/Rewriter/rewrite-nest.m | 2 +- test/Rewriter/rewrite-nested-blocks-1.mm | 2 +- test/Rewriter/rewrite-nested-blocks-2.mm | 2 +- test/Rewriter/rewrite-nested-blocks.mm | 2 +- test/Rewriter/rewrite-nested-ivar.mm | 4 +- test/Rewriter/rewrite-nested-property-in-blocks.mm | 2 +- test/Rewriter/rewrite-no-nextline.mm | 2 +- test/Rewriter/rewrite-property-attributes.mm | 2 +- test/Rewriter/rewrite-property-set-cfstring.mm | 2 +- test/Rewriter/rewrite-protocol-property.mm | 2 +- test/Rewriter/rewrite-protocol-qualified.mm | 2 +- test/Rewriter/rewrite-protocol-type-1.m | 2 +- test/Rewriter/rewrite-qualified-id.mm | 2 +- test/Rewriter/rewrite-rewritten-initializer.mm | 2 +- test/Rewriter/rewrite-static-block.mm | 2 +- test/Rewriter/rewrite-super-message.mm | 33 +- test/Rewriter/rewrite-trivial-constructor.mm | 2 +- test/Rewriter/rewrite-try-catch.m | 2 +- test/Rewriter/rewrite-typeof.mm | 2 +- test/Rewriter/rewrite-unique-block-api.mm | 2 +- test/Rewriter/rewrite-user-defined-accessors.mm | 2 +- test/Rewriter/rewrite-vararg.m | 2 +- test/Rewriter/rewrite-weak-attr.m | 2 +- test/Rewriter/static-type-protocol-1.m | 2 +- test/Rewriter/undecl-objc-h.m | 2 +- test/Rewriter/undeclared-method-1.m | 2 +- test/Rewriter/undef-field-reference-1.m | 2 +- test/Rewriter/unnamed-bf-modern-write.mm | 23 + test/Rewriter/va-method.m | 2 +- test/Rewriter/weak_byref_objects.m | 2 +- test/Sema/128bitint.c | 4 + test/Sema/Inputs/unused-expr-system-header.h | 23 + test/Sema/MicrosoftCompatibility.c | 16 + test/Sema/MicrosoftExtensions.c | 35 +- test/Sema/PR2963-enum-constant.c | 2 +- test/Sema/__try.c | 5 +- test/Sema/align-x86.c | 4 + test/Sema/anonymous-struct-union-c11.c | 19 + test/Sema/anonymous-struct-union.c | 6 + test/Sema/arm-neon-types.c | 10 +- test/Sema/array-bounds-ptr-arith.c | 7 + test/Sema/array-init.c | 19 +- test/Sema/asm.c | 2 +- test/Sema/atomic-ops.c | 176 +- test/Sema/atomic-type.c | 2 +- test/Sema/attr-availability-ios.c | 2 +- test/Sema/attr-availability-macosx.c | 14 + test/Sema/attr-availability.c | 21 +- test/Sema/attr-declspec-ignored.c | 12 + test/Sema/attr-deprecated.c | 6 +- test/Sema/attr-unavailable-message.c | 10 +- test/Sema/attr-visibility.c | 9 + test/Sema/block-explicit-noreturn-type.c | 15 + test/Sema/block-misc.c | 2 +- test/Sema/block-printf-attribute-1.c | 12 +- test/Sema/block-return.c | 19 +- test/Sema/block-sentinel-attribute.c | 3 +- test/Sema/builtins.c | 66 +- test/Sema/c11-typedef-redef.c | 18 + test/Sema/c89.c | 38 +- test/Sema/compare.c | 6 + test/Sema/complex-imag.c | 29 + test/Sema/complex-init-list.c | 3 + test/Sema/compound-literal.c | 2 +- test/Sema/conditional-expr.c | 17 + test/Sema/const-eval.c | 43 +- test/Sema/constant-conversion.c | 29 +- test/Sema/conversion-64-32.c | 4 + test/Sema/conversion.c | 72 + test/Sema/decl-in-prototype.c | 33 + test/Sema/default.c | 2 +- test/Sema/enum.c | 2 + test/Sema/fn-ptr-as-fn-prototype.c | 15 + test/Sema/format-strings-c90.c | 30 + test/Sema/format-strings-fixit-ssize_t.c | 18 + test/Sema/format-strings-fixit.c | 148 +- test/Sema/format-strings-int-typedefs.c | 37 + test/Sema/format-strings-no-fixit.c | 65 + test/Sema/format-strings-non-iso.c | 29 + test/Sema/format-strings-scanf.c | 93 +- test/Sema/format-strings-size_t.c | 15 + test/Sema/format-strings.c | 188 +- test/Sema/function.c | 9 +- test/Sema/gnu89.c | 2 + test/Sema/i-c-e.c | 24 +- test/Sema/implicit-builtin-decl.c | 2 +- test/Sema/implicit-builtin-redecl.c | 2 +- test/Sema/implicit-decl.c | 19 +- test/Sema/init.c | 15 +- test/Sema/invalid-struct-init.c | 2 - test/Sema/many-logical-ops.c | 2010 ++++++ test/Sema/ms_class_layout.cpp | 199 +- test/Sema/no-format-y2k-turnsoff-format.c | 2 +- test/Sema/offsetof.c | 4 + test/Sema/overloadable-complex.c | 4 +- test/Sema/overloadable.c | 2 +- test/Sema/paren-list-expr-type.cpp | 17 - test/Sema/pragma-ms_struct.c | 21 + test/Sema/pragma-pack-2.c | 58 +- test/Sema/pragma-pack-5.c | 45 + test/Sema/pragma-pack-apple.c | 10 + test/Sema/return.c | 11 +- test/Sema/statements.c | 2 +- test/Sema/static-array.c | 31 + test/Sema/static-init.c | 5 +- test/Sema/switch.c | 74 +- test/Sema/thread-specifier.c | 4 +- test/Sema/types.c | 14 + test/Sema/ucn-cstring.c | 3 +- test/Sema/uninit-variables.c | 10 +- test/Sema/unused-expr-system-header.c | 10 + test/Sema/variadic-incomplete-arg-type.c | 13 + test/Sema/vector-assign.c | 2 +- test/Sema/vector-cast.c | 2 +- test/Sema/vector-ops.c | 7 +- test/Sema/vla-2.c | 17 + test/Sema/vla.c | 5 + test/Sema/warn-cast-align.c | 2 +- test/Sema/warn-strncat-size.c | 71 + test/Sema/warn-unreachable.c | 8 +- test/Sema/weak-import-on-enum.c | 8 + test/Sema/x86-builtin-palignr.c | 4 +- test/SemaCXX/Inputs/array-bounds-system-header.h | 11 + test/SemaCXX/Inputs/warn-new-overaligned-3.h | 19 + test/SemaCXX/MicrosoftCompatibility-cxx98.cpp | 8 + test/SemaCXX/MicrosoftCompatibility.cpp | 198 +- test/SemaCXX/MicrosoftExtensions.cpp | 20 +- test/SemaCXX/PR10177.cpp | 40 + test/SemaCXX/PR10447.cpp | 22 + test/SemaCXX/PR11358.cpp | 51 + test/SemaCXX/PR12481.cpp | 17 + test/SemaCXX/PR8385.cpp | 7 + test/SemaCXX/PR9460.cpp | 6 +- test/SemaCXX/PR9461.cpp | 6 +- test/SemaCXX/PR9572.cpp | 2 +- test/SemaCXX/__null.cpp | 4 +- test/SemaCXX/access.cpp | 2 +- test/SemaCXX/addr-of-overloaded-function.cpp | 76 +- test/SemaCXX/aggregate-initialization.cpp | 22 +- test/SemaCXX/alias-template.cpp | 8 +- test/SemaCXX/altivec.cpp | 10 + test/SemaCXX/anonymous-struct.cpp | 5 + test/SemaCXX/array-bounds-ptr-arith.cpp | 2 +- test/SemaCXX/array-bounds-system-header.cpp | 9 + test/SemaCXX/array-bounds.cpp | 92 +- test/SemaCXX/atomic-type.cxx | 35 + test/SemaCXX/attr-cxx0x.cpp | 11 + test/SemaCXX/attr-declspec-ignored.cpp | 19 + test/SemaCXX/attr-deprecated.cpp | 4 +- test/SemaCXX/attr-sentinel.cpp | 17 + test/SemaCXX/auto-cxx98.cpp | 2 +- test/SemaCXX/blocks-1.cpp | 15 +- test/SemaCXX/c99-variable-length-array.cpp | 35 +- test/SemaCXX/c99.cpp | 4 +- test/SemaCXX/class-base-member-init.cpp | 24 +- test/SemaCXX/class.cpp | 44 +- test/SemaCXX/complex-overload.cpp | 2 +- test/SemaCXX/condition.cpp | 12 +- test/SemaCXX/conditional-expr.cpp | 4 +- test/SemaCXX/constant-expression-cxx11.cpp | 1246 ++++ test/SemaCXX/constant-expression.cpp | 34 +- test/SemaCXX/constexpr-ackermann.cpp | 8 + test/SemaCXX/constexpr-backtrace-limit.cpp | 34 + test/SemaCXX/constexpr-depth.cpp | 8 + test/SemaCXX/constexpr-factorial.cpp | 9 + test/SemaCXX/constexpr-nqueens.cpp | 73 + test/SemaCXX/constexpr-printing.cpp | 102 + test/SemaCXX/constexpr-strlen.cpp | 15 + test/SemaCXX/constexpr-turing.cpp | 55 + test/SemaCXX/constexpr-value-init.cpp | 37 + test/SemaCXX/constructor-initializer.cpp | 14 +- test/SemaCXX/conversion.cpp | 28 +- test/SemaCXX/copy-assignment.cpp | 9 +- test/SemaCXX/copy-initialization.cpp | 23 + test/SemaCXX/cxx0x-class.cpp | 19 +- test/SemaCXX/cxx0x-compat.cpp | 27 +- test/SemaCXX/cxx0x-cursory-default-delete.cpp | 6 + test/SemaCXX/cxx0x-defaulted-functions.cpp | 10 +- test/SemaCXX/cxx0x-deleted-default-ctor.cpp | 75 +- test/SemaCXX/cxx0x-initializer-aggregates.cpp | 89 + test/SemaCXX/cxx0x-initializer-constructor.cpp | 283 + test/SemaCXX/cxx0x-initializer-references.cpp | 87 + test/SemaCXX/cxx0x-initializer-scalars.cpp | 84 +- .../cxx0x-initializer-stdinitializerlist.cpp | 177 + test/SemaCXX/cxx0x-nontrivial-union.cpp | 104 +- test/SemaCXX/cxx0x-return-init-list.cpp | 10 +- test/SemaCXX/cxx11-ast-print.cpp | 41 + test/SemaCXX/cxx11-user-defined-literals.cpp | 137 + test/SemaCXX/cxx98-compat-flags.cpp | 35 + test/SemaCXX/cxx98-compat-pedantic.cpp | 23 + test/SemaCXX/cxx98-compat.cpp | 273 +- test/SemaCXX/dcl_init_aggr.cpp | 2 +- test/SemaCXX/decl-expr-ambiguity.cpp | 33 +- test/SemaCXX/decltype-crash.cpp | 2 +- test/SemaCXX/decltype.cpp | 9 +- test/SemaCXX/default1.cpp | 18 + test/SemaCXX/default2.cpp | 10 +- test/SemaCXX/defaulted-private-dtor.cpp | 56 + test/SemaCXX/deleted-function.cpp | 24 +- test/SemaCXX/deleted-operator.cpp | 5 + test/SemaCXX/dependent-auto.cpp | 2 +- test/SemaCXX/destructor.cpp | 2 +- test/SemaCXX/discrim-union.cpp | 118 + test/SemaCXX/dr1301.cpp | 67 + test/SemaCXX/empty-class-layout.cpp | 11 + test/SemaCXX/enum-bitfield.cpp | 2 +- test/SemaCXX/enum-scoped.cpp | 107 +- test/SemaCXX/enum-unscoped-nonexistent.cpp | 39 + test/SemaCXX/enum.cpp | 2 +- test/SemaCXX/exceptions.cpp | 28 +- test/SemaCXX/explicit.cpp | 19 +- test/SemaCXX/expression-traits.cpp | 4 +- test/SemaCXX/for-range-examples.cpp | 32 + test/SemaCXX/for-range-no-std.cpp | 7 +- test/SemaCXX/format-strings-0x.cpp | 15 + test/SemaCXX/format-strings.cpp | 77 + test/SemaCXX/friend-out-of-line.cpp | 12 + test/SemaCXX/friend.cpp | 8 + test/SemaCXX/function-extern-c.cpp | 38 + test/SemaCXX/function-redecl.cpp | 7 +- test/SemaCXX/function-type-qual.cpp | 14 +- test/SemaCXX/generalized-initializers.cpp | 207 - test/SemaCXX/gnu-case-ranges.cpp | 2 +- test/SemaCXX/goto.cpp | 22 + test/SemaCXX/i-c-e-cxx.cpp | 17 +- test/SemaCXX/if-empty-body.cpp | 35 - test/SemaCXX/implicit-exception-spec.cpp | 7 +- test/SemaCXX/incomplete-call.cpp | 2 +- test/SemaCXX/indirect-goto.cpp | 7 + test/SemaCXX/instantiate-blocks.cpp | 13 + test/SemaCXX/invalid-member-expr.cpp | 4 +- test/SemaCXX/issue547.cpp | 16 +- test/SemaCXX/lambda-expressions.cpp | 150 + test/SemaCXX/literal-operators.cpp | 8 +- test/SemaCXX/literal-type.cpp | 28 +- test/SemaCXX/member-class-11.cpp | 8 + test/SemaCXX/member-expr.cpp | 14 +- test/SemaCXX/member-init.cpp | 3 + test/SemaCXX/member-pointer.cpp | 2 +- test/SemaCXX/microsoft-cxx0x.cpp | 4 +- test/SemaCXX/missing-header.cpp | 4 +- ...issing-namespace-qualifier-typo-corrections.cpp | 59 +- test/SemaCXX/namespace-alias.cpp | 8 +- test/SemaCXX/nested-name-spec.cpp | 7 +- test/SemaCXX/new-delete-0x.cpp | 32 + test/SemaCXX/new-delete-cxx0x.cpp | 26 + test/SemaCXX/new-delete.cpp | 101 +- test/SemaCXX/null_in_arithmetic_ops.cpp | 2 +- test/SemaCXX/nullptr.cpp | 48 +- test/SemaCXX/offsetof.cpp | 7 + test/SemaCXX/overload-call.cpp | 62 +- test/SemaCXX/overload-member-call.cpp | 8 +- test/SemaCXX/overloaded-name.cpp | 5 +- test/SemaCXX/overloaded-operator.cpp | 11 +- test/SemaCXX/pragma-visibility.cpp | 23 + test/SemaCXX/pseudo-destructors.cpp | 14 +- test/SemaCXX/qual-id-test.cpp | 4 +- test/SemaCXX/qualified-id-lookup.cpp | 5 + test/SemaCXX/reinterpret-cast.cpp | 22 +- test/SemaCXX/reinterpret-fn-obj-pedantic.cpp | 4 +- test/SemaCXX/return-noreturn.cpp | 4 +- test/SemaCXX/runtimediag-ppe.cpp | 18 + test/SemaCXX/scope-check.cpp | 2 +- test/SemaCXX/statements.cpp | 2 +- test/SemaCXX/static-assert.cpp | 12 +- test/SemaCXX/string-plus-int.cpp | 66 + test/SemaCXX/switch.cpp | 23 +- test/SemaCXX/this.cpp | 4 +- test/SemaCXX/trailing-return-0x.cpp | 10 + test/SemaCXX/type-traits.cpp | 218 +- test/SemaCXX/typedef-redecl.cpp | 39 + test/SemaCXX/typeid.cpp | 2 +- test/SemaCXX/typo-correction.cpp | 163 +- test/SemaCXX/undefined-internal.cpp | 59 + test/SemaCXX/underlying_type.cpp | 6 + test/SemaCXX/uninit-variables.cpp | 2 +- test/SemaCXX/uninitialized.cpp | 52 +- test/SemaCXX/unknown-anytype-blocks.cpp | 11 + test/SemaCXX/unknown-anytype.cpp | 4 +- test/SemaCXX/value-initialization.cpp | 7 +- test/SemaCXX/vararg-non-pod.cpp | 7 +- test/SemaCXX/vector.cpp | 49 + test/SemaCXX/vla.cpp | 5 + test/SemaCXX/warn-bool-conversion.cpp | 12 +- test/SemaCXX/warn-empty-body.cpp | 271 + test/SemaCXX/warn-everthing.cpp | 13 + test/SemaCXX/warn-func-as-bool.cpp | 40 + test/SemaCXX/warn-large-by-value-copy.cpp | 5 + test/SemaCXX/warn-memset-bad-sizeof.cpp | 10 +- test/SemaCXX/warn-new-overaligned-2.cpp | 22 + test/SemaCXX/warn-new-overaligned-3.cpp | 33 + test/SemaCXX/warn-new-overaligned.cpp | 73 + test/SemaCXX/warn-thread-safety-analysis.cpp | 959 ++- test/SemaCXX/warn-thread-safety-parsing.cpp | 196 +- test/SemaCXX/warn-unreachable.cpp | 31 + test/SemaCXX/warn-unused-parameters.cpp | 10 +- test/SemaCXX/warn-unused-value.cpp | 19 + test/SemaCXX/warn-unused-variables.cpp | 42 + test/SemaCXX/warn-weak-vtables.cpp | 22 +- test/SemaCXX/zero-length-arrays.cpp | 26 + test/SemaObjC/ClassPropertyNotObject.m | 15 + test/SemaObjC/ContClassPropertyLookup.m | 22 +- test/SemaObjC/DoubleMethod.m | 6 +- test/SemaObjC/NSString-type.m | 10 + test/SemaObjC/alias-test-2.m | 6 +- test/SemaObjC/arc-bridged-cast.m | 7 +- test/SemaObjC/arc-cf.m | 31 +- test/SemaObjC/arc-decls.m | 18 +- test/SemaObjC/arc-invalid.m | 18 + test/SemaObjC/arc-jump-block.m | 15 +- test/SemaObjC/arc-no-runtime.m | 3 +- test/SemaObjC/arc-objc-lifetime.m | 42 + test/SemaObjC/arc-peformselector.m | 8 +- test/SemaObjC/arc-property-lifetime.m | 45 +- test/SemaObjC/arc-property.m | 11 +- test/SemaObjC/arc-readonly-property-ivar-1.m | 29 + test/SemaObjC/arc-readonly-property-ivar.m | 16 + test/SemaObjC/arc-retain-block-property.m | 2 +- test/SemaObjC/arc-setter-property-match.m | 2 +- test/SemaObjC/arc-type-conversion.m | 29 +- test/SemaObjC/arc-unavailable-for-weakref.m | 25 +- test/SemaObjC/arc-unbridged-cast.m | 67 +- test/SemaObjC/arc-unsafe-assigns.m | 2 +- test/SemaObjC/arc.m | 51 +- test/SemaObjC/assign-rvalue-message.m | 4 +- test/SemaObjC/atomoic-property-synnthesis-rules.m | 50 +- test/SemaObjC/attr-deprecated.m | 12 +- test/SemaObjC/attr-root-class.m | 16 + test/SemaObjC/autoreleasepool.m | 2 +- test/SemaObjC/bad-property-synthesis-crash.m | 2 +- test/SemaObjC/block-id-as-block-argtype.m | 27 + test/SemaObjC/block-on-method-param.m | 12 + test/SemaObjC/block-type-safety.m | 19 +- test/SemaObjC/blocks.m | 8 +- test/SemaObjC/builtin_objc_lib_functions.m | 18 +- test/SemaObjC/builtin_objc_nslog.m | 13 + test/SemaObjC/call-super-2.m | 4 +- test/SemaObjC/category-1.m | 14 +- test/SemaObjC/category-method-lookup.m | 2 +- test/SemaObjC/check-dup-decl-methods-1.m | 6 +- test/SemaObjC/check-dup-objc-decls-1.m | 2 +- test/SemaObjC/class-conforming-protocol-1.m | 7 +- test/SemaObjC/class-def-test-1.m | 4 +- .../class-extension-after-implementation.m | 2 +- test/SemaObjC/class-extension-dup-methods.m | 4 +- test/SemaObjC/class-getter-using-dotsyntax.m | 2 +- test/SemaObjC/class-impl-1.m | 4 +- test/SemaObjC/class-message-protocol-lookup.m | 4 +- test/SemaObjC/class-method-self.m | 2 +- test/SemaObjC/class-proto-1.m | 2 +- test/SemaObjC/class-protocol-method-match.m | 2 +- test/SemaObjC/cocoa-api-usage.m | 88 + test/SemaObjC/cocoa-api-usage.m.fixed | 88 + test/SemaObjC/compare-qualified-id.m | 4 +- .../SemaObjC/compatible-protocol-qualified-types.m | 2 +- test/SemaObjC/comptypes-1.m | 2 +- test/SemaObjC/comptypes-10.m | 2 +- test/SemaObjC/comptypes-7.m | 4 +- test/SemaObjC/comptypes-a.m | 2 +- test/SemaObjC/conditional-expr-3.m | 2 +- test/SemaObjC/conditional-expr-5.m | 2 +- test/SemaObjC/conditional-expr.m | 6 +- test/SemaObjC/conflict-nonfragile-abi2.m | 2 +- test/SemaObjC/conflicting-ivar-test-1.m | 2 +- test/SemaObjC/continuation-class-err.m | 11 +- test/SemaObjC/continuation-class-property.m | 24 +- test/SemaObjC/custom-atomic-property.m | 2 +- test/SemaObjC/debugger-cast-result-to-id.m | 16 + test/SemaObjC/default-synthesize-1.m | 2 +- test/SemaObjC/default-synthesize-2.m | 4 +- test/SemaObjC/default-synthesize-3.m | 41 + test/SemaObjC/default-synthesize.m | 33 +- test/SemaObjC/deref-interface.m | 4 +- test/SemaObjC/direct-synthesized-ivar-access.m | 2 +- test/SemaObjC/dist-object-modifiers.m | 2 +- test/SemaObjC/enhanced-proto-2.m | 4 +- test/SemaObjC/enum-fixed-type.m | 10 + test/SemaObjC/err-ivar-access-in-class-method.m | 26 + test/SemaObjC/error-property-gc-attr.m | 4 +- test/SemaObjC/exprs.m | 2 +- test/SemaObjC/foreach.m | 9 + test/SemaObjC/format-strings-objc.m | 131 +- test/SemaObjC/forward-class-1.m | 12 +- test/SemaObjC/forward-class-receiver.m | 2 +- test/SemaObjC/forward-class-redeclare.m | 29 + test/SemaObjC/gcc-cast-ext.m | 6 +- test/SemaObjC/ibaction.m | 2 +- test/SemaObjC/iboutletcollection-attr.m | 18 +- test/SemaObjC/id-isa-ref.m | 5 +- test/SemaObjC/idiomatic-parentheses.m | 2 +- test/SemaObjC/ignore-qualifier-on-qualified-id.m | 21 + test/SemaObjC/illegal-nonarc-bridged-cast.m | 44 + test/SemaObjC/incomplete-implementation.m | 19 +- test/SemaObjC/instancetype.m | 6 +- test/SemaObjC/interface-scope-2.m | 2 +- test/SemaObjC/invalid-code.m | 37 +- test/SemaObjC/invalid-objc-decls-1.m | 4 +- test/SemaObjC/ivar-access-tests.m | 2 +- test/SemaObjC/ivar-in-class-extension.m | 2 +- test/SemaObjC/ivar-in-implementations.m | 2 +- test/SemaObjC/ivar-lookup-resolution-builtin.m | 4 +- test/SemaObjC/ivar-lookup.m | 37 +- test/SemaObjC/ivar-ref-misuse.m | 2 +- test/SemaObjC/legacy-implementation-1.m | 2 +- test/SemaObjC/message.m | 2 +- test/SemaObjC/method-attributes.m | 35 +- test/SemaObjC/method-bad-param.m | 14 +- test/SemaObjC/method-conflict-1.m | 2 +- test/SemaObjC/method-conflict-2.m | 2 +- test/SemaObjC/method-conflict.m | 2 +- test/SemaObjC/method-def-1.m | 2 +- test/SemaObjC/method-lookup.m | 2 +- test/SemaObjC/method-not-defined.m | 2 +- test/SemaObjC/method-prototype-scope.m | 2 +- test/SemaObjC/method-typecheck-1.m | 2 +- test/SemaObjC/method-undef-category-warn-1.m | 52 +- test/SemaObjC/method-undef-extension-warn-1.m | 6 +- test/SemaObjC/method-undefined-warn-1.m | 2 +- test/SemaObjC/method-unused-attribute.m | 2 +- test/SemaObjC/missing-atend-metadata.m | 16 +- test/SemaObjC/missing-method-return-type.m | 6 +- test/SemaObjC/narrow-property-type-in-cont-class.m | 19 + test/SemaObjC/nested-typedef-decl.m | 4 +- test/SemaObjC/newproperty-class-method-1.m | 2 +- test/SemaObjC/no-gc-weak-test.m | 2 +- test/SemaObjC/no-ivar-access-control.m | 70 + test/SemaObjC/no-protocol-option-tests.m | 4 +- test/SemaObjC/no-warn-qual-mismatch.m | 2 +- test/SemaObjC/no-warn-synth-protocol-meth.m | 2 +- test/SemaObjC/no-warning-unavail-unimp.m | 2 +- test/SemaObjC/nonnull.m | 2 +- test/SemaObjC/nsobject-attribute-1.m | 2 +- test/SemaObjC/nsobject-attribute.m | 18 +- test/SemaObjC/objc-array-literal.m | 41 + test/SemaObjC/objc-buffered-methods.m | 2 +- test/SemaObjC/objc-container-subscripting-1.m | 23 + test/SemaObjC/objc-container-subscripting-2.m | 30 + test/SemaObjC/objc-container-subscripting-3.m | 25 + test/SemaObjC/objc-container-subscripting.m | 42 + test/SemaObjC/objc-cstyle-args-in-methods.m | 2 +- test/SemaObjC/objc-dictionary-literal.m | 34 + test/SemaObjC/objc-literal-nsnumber.m | 85 + test/SemaObjC/objc-literal-sig.m | 40 + test/SemaObjC/objc-qualified-property-lookup.m | 2 +- test/SemaObjC/pedantic-dynamic-test.m | 2 +- test/SemaObjC/pragma-pack.m | 16 + test/SemaObjC/property-10.m | 9 + test/SemaObjC/property-2.m | 2 +- test/SemaObjC/property-9.m | 13 +- test/SemaObjC/property-and-ivar-use.m | 2 +- test/SemaObjC/property-category-1.m | 4 +- test/SemaObjC/property-category-3.m | 2 +- test/SemaObjC/property-category-4.m | 2 +- test/SemaObjC/property-category-impl.m | 2 +- test/SemaObjC/property-dot-receiver.m | 4 +- test/SemaObjC/property-error-readonly-assign.m | 6 +- test/SemaObjC/property-expression-error.m | 2 +- test/SemaObjC/property-impl-misuse.m | 2 +- test/SemaObjC/property-in-class-extension.m | 4 +- test/SemaObjC/property-ivar-mismatch.m | 2 +- test/SemaObjC/property-lookup-in-id.m | 4 +- test/SemaObjC/property-method-lookup-impl.m | 2 +- test/SemaObjC/property-missing.m | 2 +- test/SemaObjC/property-not-lvalue.m | 2 +- .../property-ns-returns-not-retained-attr.m | 2 +- test/SemaObjC/property-redundant-decl-accessor.m | 2 +- test/SemaObjC/property-typecheck-1.m | 2 +- test/SemaObjC/property-user-setter.m | 6 +- test/SemaObjC/property.m | 18 +- test/SemaObjC/protocol-archane.m | 2 +- test/SemaObjC/protocol-id-test-1.m | 2 +- test/SemaObjC/protocol-id-test-2.m | 2 +- .../SemaObjC/protocol-implementing-class-methods.m | 6 +- test/SemaObjC/provisional-ivar-lookup.m | 2 +- .../SemaObjC/qualified-protocol-method-conflicts.m | 2 +- test/SemaObjC/receiver-forward-class.m | 19 + test/SemaObjC/related-result-type-inference.m | 13 +- test/SemaObjC/return.m | 2 +- test/SemaObjC/scope-check.m | 30 +- test/SemaObjC/selector-3.m | 2 +- test/SemaObjC/selector-error.m | 2 +- test/SemaObjC/self-assign.m | 2 +- test/SemaObjC/self-declared-in-block.m | 4 +- test/SemaObjC/severe-syntax-error.m | 23 + test/SemaObjC/sizeof-interface.m | 8 +- test/SemaObjC/special-dep-unavail-warning.m | 12 +- test/SemaObjC/stand-alone-implementation.m | 2 +- test/SemaObjC/super.m | 2 +- test/SemaObjC/synchronized.m | 2 +- test/SemaObjC/synth-provisional-ivars-1.m | 2 +- test/SemaObjC/synth-provisional-ivars.m | 2 +- test/SemaObjC/synthesize-setter-contclass.m | 2 +- test/SemaObjC/synthesized-ivar.m | 2 +- test/SemaObjC/transparent-union.m | 2 +- test/SemaObjC/try-catch.m | 2 +- test/SemaObjC/typedef-class.m | 4 +- test/SemaObjC/undeclared-selector.m | 2 +- test/SemaObjC/undef-protocol-methods-1.m | 22 +- test/SemaObjC/undef-superclass-1.m | 4 +- test/SemaObjC/undefined-protocol-type-1.m | 2 +- test/SemaObjC/unimplemented-protocol-prop.m | 2 +- test/SemaObjC/unknown-anytype.m | 29 + test/SemaObjC/unused.m | 2 +- test/SemaObjC/warn-deprecated-implementations.m | 10 +- test/SemaObjC/warn-forward-class-attr-deprecated.m | 24 + test/SemaObjC/warn-implicit-atomic-property.m | 6 +- test/SemaObjC/warn-missing-super.m | 11 +- test/SemaObjC/warn-retain-cycle.m | 36 +- test/SemaObjC/warn-strict-selector-match.m | 6 +- test/SemaObjC/warn-unreachable.m | 17 + test/SemaObjC/warn-weak-field.m | 4 +- test/SemaObjC/weak-property.m | 2 +- test/SemaObjC/weak-receiver-warn.m | 19 + test/SemaObjCXX/NSString-type.mm | 10 + test/SemaObjCXX/arc-0x.mm | 21 + test/SemaObjCXX/arc-overloading.mm | 2 +- test/SemaObjCXX/arc-ppe.mm | 16 + test/SemaObjCXX/arc-templates.mm | 4 +- test/SemaObjCXX/arc-type-conversion.mm | 5 +- test/SemaObjCXX/arc-type-traits.mm | 16 +- test/SemaObjCXX/arc-unavailable-for-weakref.mm | 9 +- test/SemaObjCXX/arc-unbridged-cast.mm | 110 + test/SemaObjCXX/blocks.mm | 2 +- test/SemaObjCXX/composite-objc-pointertype.mm | 2 +- test/SemaObjCXX/cstyle-block-pointer-cast.mm | 2 +- test/SemaObjCXX/cxxoperator-selector.mm | 2 +- test/SemaObjCXX/debugger-cast-result-to-id.mm | 17 + test/SemaObjCXX/fragile-abi-object-assign.m | 13 + test/SemaObjCXX/goto.mm | 2 +- test/SemaObjCXX/instantiate-expr.mm | 10 +- test/SemaObjCXX/instantiate-method-return.mm | 2 +- test/SemaObjCXX/ivar-construct.mm | 2 +- test/SemaObjCXX/ivar-lookup.mm | 2 +- test/SemaObjCXX/literals.mm | 187 + test/SemaObjCXX/message.mm | 2 +- test/SemaObjCXX/objc-container-subscripting.mm | 138 + test/SemaObjCXX/objc-decls-inside-namespace.mm | 2 +- test/SemaObjCXX/objc-extern-c.mm | 30 + test/SemaObjCXX/objc-pointer-conv.mm | 2 +- test/SemaObjCXX/overload.mm | 8 +- test/SemaObjCXX/propert-dot-error.mm | 4 +- test/SemaObjCXX/properties.mm | 88 +- test/SemaObjCXX/property-reference.mm | 6 +- test/SemaObjCXX/property-synthesis-error.mm | 6 +- test/SemaObjCXX/unknown-anytype.mm | 1 + test/SemaObjCXX/vararg-non-pod.mm | 2 +- test/SemaObjCXX/void_to_obj.mm | 2 +- test/SemaObjCXX/warn-strict-selector-match.mm | 4 +- test/SemaOpenCL/address-spaces.cl | 13 + test/SemaOpenCL/local.cl | 6 - test/SemaOpenCL/vec_compare.cl | 11 + test/SemaOpenCL/vector_literals_const.cl | 26 + test/SemaTemplate/alias-templates.cpp | 32 + test/SemaTemplate/atomics.cpp | 8 + test/SemaTemplate/canonical-expr-type-0x.cpp | 21 +- .../class-template-ctor-initializer.cpp | 2 +- test/SemaTemplate/class-template-decl.cpp | 21 + test/SemaTemplate/class-template-spec.cpp | 12 +- test/SemaTemplate/constexpr-instantiate.cpp | 77 + test/SemaTemplate/crash-10438657.cpp | 15 + test/SemaTemplate/deduction-crash.cpp | 2 +- test/SemaTemplate/delegating-constructors.cpp | 13 + test/SemaTemplate/enum-forward.cpp | 2 +- test/SemaTemplate/explicit-instantiation.cpp | 10 +- test/SemaTemplate/friend-template.cpp | 19 + test/SemaTemplate/friend.cpp | 2 +- test/SemaTemplate/instantiate-complete.cpp | 2 - test/SemaTemplate/instantiate-declref-ice.cpp | 2 +- test/SemaTemplate/instantiate-expr-1.cpp | 11 +- test/SemaTemplate/instantiate-expr-4.cpp | 10 + test/SemaTemplate/instantiate-expr-5.cpp | 2 +- test/SemaTemplate/instantiate-function-1.cpp | 2 +- test/SemaTemplate/instantiate-member-class.cpp | 22 + test/SemaTemplate/instantiate-self.cpp | 89 + test/SemaTemplate/instantiate-sizeof.cpp | 10 + test/SemaTemplate/instantiate-static-var.cpp | 3 +- test/SemaTemplate/instantiate-typeof.cpp | 10 + test/SemaTemplate/instantiation-depth.cpp | 4 +- test/SemaTemplate/instantiation-order.cpp | 15 + test/SemaTemplate/member-access-ambig.cpp | 10 + test/SemaTemplate/member-template-access-expr.cpp | 2 +- test/SemaTemplate/ms-if-exists.cpp | 68 + .../ms-lookup-template-base-classes.cpp | 116 +- test/SemaTemplate/nested-incomplete-class.cpp | 21 + test/SemaTemplate/nested-template.cpp | 13 + test/SemaTemplate/pragma-ms_struct.cpp | 10 + test/SemaTemplate/qualified-id.cpp | 9 + test/SemaTemplate/resolve-single-template-id.cpp | 4 +- test/SemaTemplate/temp_arg_template.cpp | 6 + test/SemaTemplate/temp_class_spec_neg.cpp | 2 +- test/SemaTemplate/temp_explicit.cpp | 8 +- test/SemaTemplate/temp_explicit_cxx0x.cpp | 2 +- test/SemaTemplate/template-id-expr.cpp | 14 + test/SemaTemplate/template-id-printing.cpp | 128 + test/Tooling/clang-check-pwd.cpp | 13 + test/Tooling/clang-check.cpp | 13 + test/lit.cfg | 49 +- tools/CMakeLists.txt | 1 + tools/Makefile | 7 +- tools/arcmt-test/CMakeLists.txt | 1 + tools/arcmt-test/Makefile | 2 +- tools/arcmt-test/arcmt-test.cpp | 39 +- tools/c-arcmt-test/Makefile | 2 +- tools/c-arcmt-test/c-arcmt-test.c | 36 +- tools/c-index-test/Makefile | 6 +- tools/c-index-test/c-index-test.c | 863 ++- tools/clang-check/CMakeLists.txt | 5 + tools/clang-check/ClangCheck.cpp | 62 + tools/clang-check/Makefile | 24 + tools/diagtool/ListWarnings.cpp | 34 +- tools/diagtool/Makefile | 5 +- tools/driver/CMakeLists.txt | 16 +- tools/driver/Makefile | 4 +- tools/driver/cc1_main.cpp | 22 +- tools/driver/cc1as_main.cpp | 80 +- tools/driver/driver.cpp | 38 +- tools/libclang/ARCMigrate.cpp | 43 +- tools/libclang/CIndex.cpp | 1407 ++-- tools/libclang/CIndexCXX.cpp | 5 +- tools/libclang/CIndexCodeCompletion.cpp | 81 +- tools/libclang/CIndexDiagnostic.cpp | 343 +- tools/libclang/CIndexDiagnostic.h | 137 +- tools/libclang/CIndexHigh.cpp | 184 +- tools/libclang/CIndexUSRs.cpp | 61 +- tools/libclang/CIndexer.cpp | 2 +- tools/libclang/CIndexer.h | 23 +- tools/libclang/CMakeLists.txt | 19 + tools/libclang/CXCursor.cpp | 261 +- tools/libclang/CXCursor.h | 27 +- tools/libclang/CXLoadedDiagnostic.cpp | 672 ++ tools/libclang/CXLoadedDiagnostic.h | 94 + tools/libclang/CXSourceLocation.cpp | 326 + tools/libclang/CXSourceLocation.h | 4 +- tools/libclang/CXStoredDiagnostic.cpp | 119 + tools/libclang/CXString.h | 2 +- tools/libclang/CXTranslationUnit.h | 22 +- tools/libclang/CXType.cpp | 203 +- tools/libclang/CursorVisitor.h | 259 + tools/libclang/IndexBody.cpp | 154 + tools/libclang/IndexDecl.cpp | 336 + tools/libclang/IndexTypeSourceInfo.cpp | 156 + tools/libclang/Index_Internal.h | 12 + tools/libclang/Indexing.cpp | 818 +++ tools/libclang/IndexingContext.cpp | 1080 +++ tools/libclang/IndexingContext.h | 556 ++ tools/libclang/Makefile | 3 +- tools/libclang/libclang.exports | 52 +- tools/scan-build/ccc-analyzer | 30 +- tools/scan-build/scan-build | 10 +- tools/scan-build/set-xcode-analyzer | 16 +- unittests/AST/APValueTest.cpp | 83 - unittests/AST/Makefile | 15 - unittests/Basic/Makefile | 2 +- unittests/Basic/SourceManagerTest.cpp | 296 + unittests/CMakeLists.txt | 19 +- unittests/Frontend/FrontendActionTest.cpp | 4 +- unittests/Frontend/Makefile | 2 +- unittests/Lex/LexerTest.cpp | 177 + unittests/Lex/Makefile | 15 + unittests/Lex/PreprocessingRecordTest.cpp | 139 + unittests/Makefile | 2 +- unittests/Tooling/CompilationDatabaseTest.cpp | 223 + unittests/Tooling/Makefile | 17 + unittests/Tooling/ToolingTest.cpp | 113 + utils/C++Tests/LLVM-Code-Compile/lit.local.cfg | 8 - utils/C++Tests/LLVM-Code-Symbols/lit.local.cfg | 8 - utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg | 8 - utils/FuzzTest | 18 +- utils/TableGen/CMakeLists.txt | 1 + utils/TableGen/ClangAttrEmitter.cpp | 318 +- utils/TableGen/ClangAttrEmitter.h | 39 + utils/TableGen/ClangDiagnosticsEmitter.cpp | 113 +- utils/TableGen/NeonEmitter.cpp | 91 +- utils/TableGen/NeonEmitter.h | 34 + utils/TableGen/TableGen.cpp | 26 +- utils/analyzer/CmpRuns.py | 33 +- utils/analyzer/SATestAdd.py | 41 +- utils/analyzer/SATestBuild.py | 262 +- utils/clangVisualizers.txt | 92 +- utils/find-unused-diagnostics.sh | 19 + www/OpenProjects.html | 6 +- www/UniversalDriver.html | 6 +- www/analyzer/annotations.html | 19 +- www/analyzer/available_checks.html | 122 +- www/analyzer/checker_dev_manual.html | 346 + www/analyzer/dev_cxx.html | 10 +- www/analyzer/filing_bugs.html | 4 +- www/analyzer/index.html | 75 +- www/analyzer/installation.html | 4 +- www/analyzer/latest_checker.html.incl | 2 +- www/analyzer/menu.html.incl | 1 + www/analyzer/release_notes.html | 88 +- www/analyzer/scan-build.html | 60 +- www/analyzer/xcode.html | 11 +- www/clang_video-05-25-2007.html | 6 +- www/clang_video-07-25-2007.html | 6 +- www/comparison.html | 7 +- www/compatibility.html | 33 +- www/cxx_compatibility.html | 6 +- www/cxx_status.html | 187 +- www/diagnostics.html | 152 +- www/features.html | 25 +- www/get_involved.html | 12 +- www/get_started.html | 65 +- www/hacking.html | 82 +- www/index.html | 2 +- www/performance-2008-10-31.html | 20 +- www/performance-2009-03-02.html | 16 +- www/performance.html | 16 +- www/related.html | 6 +- 2693 files changed, 183733 insertions(+), 54997 deletions(-) create mode 100644 bindings/python/tests/cindex/test_file.py create mode 100644 bindings/python/tests/cindex/util.py create mode 100644 docs/AddressSanitizer.html create mode 100644 docs/ObjectiveCLiterals.html create mode 100644 docs/ReleaseNotes.html delete mode 100644 examples/wpa/CMakeLists.txt delete mode 100644 examples/wpa/Makefile delete mode 100644 examples/wpa/clang-wpa.cpp create mode 100644 include/clang/AST/BuiltinTypes.def create mode 100644 include/clang/AST/DeclLookups.h create mode 100644 include/clang/AST/LambdaMangleContext.h create mode 100644 include/clang/AST/NSAPI.h delete mode 100644 include/clang/AST/UsuallyTinyPtrVector.h create mode 100644 include/clang/Analysis/Analyses/Dominators.h create mode 100644 include/clang/Analysis/Analyses/PostOrderCFGView.h create mode 100644 include/clang/Analysis/CallGraph.h delete mode 100644 include/clang/Analysis/Support/SaveAndRestore.h create mode 100644 include/clang/Basic/AllDiagnostics.h create mode 100644 include/clang/Basic/BuiltinsHexagon.def create mode 100644 include/clang/Basic/DiagnosticSerializationKinds.td create mode 100644 include/clang/Basic/Lambda.h create mode 100644 include/clang/Basic/Module.h create mode 100644 include/clang/Config/config.h.in delete mode 100644 include/clang/Driver/HostInfo.h create mode 100644 include/clang/Edit/Commit.h create mode 100644 include/clang/Edit/EditedSource.h create mode 100644 include/clang/Edit/EditsReceiver.h create mode 100644 include/clang/Edit/FileOffset.h create mode 100644 include/clang/Edit/Rewriters.h create mode 100644 include/clang/Frontend/ChainedIncludesSource.h create mode 100644 include/clang/Frontend/DiagnosticRenderer.h create mode 100644 include/clang/Frontend/LayoutOverrideSource.h create mode 100644 include/clang/Frontend/MigratorOptions.h create mode 100644 include/clang/Frontend/SerializedDiagnosticPrinter.h create mode 100644 include/clang/Frontend/TextDiagnostic.h delete mode 100644 include/clang/Index/CallGraph.h create mode 100644 include/clang/Index/GlobalCallGraph.h create mode 100644 include/clang/Lex/ModuleMap.h create mode 100644 include/clang/Sema/CMakeLists.txt create mode 100644 include/clang/Sema/Makefile delete mode 100644 include/clang/Sema/MultiInitializer.h delete mode 100644 include/clang/Serialization/ChainedIncludesSource.h create mode 100644 include/clang/Serialization/SerializationDiagnostic.h create mode 100644 include/clang/StaticAnalyzer/Checkers/CommonBugCategories.h delete mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState_Fwd.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h create mode 100644 include/clang/StaticAnalyzer/Core/PathSensitive/TaintTag.h create mode 100644 include/clang/Tooling/CompilationDatabase.h create mode 100644 include/clang/Tooling/Tooling.h create mode 100644 lib/ARCMigrate/ObjCMT.cpp create mode 100644 lib/ARCMigrate/TransGCAttrs.cpp create mode 100644 lib/ARCMigrate/TransGCCalls.cpp create mode 100644 lib/AST/LambdaMangleContext.cpp create mode 100644 lib/AST/NSAPI.cpp delete mode 100644 lib/Analysis/AnalysisContext.cpp create mode 100644 lib/Analysis/AnalysisDeclContext.cpp create mode 100644 lib/Analysis/CallGraph.cpp create mode 100644 lib/Analysis/Dominators.cpp create mode 100644 lib/Analysis/PostOrderCFGView.cpp create mode 100644 lib/Basic/Module.cpp delete mode 100644 lib/CodeGen/CGException.h delete mode 100644 lib/CodeGen/CGTemporaries.cpp delete mode 100644 lib/Driver/HostInfo.cpp create mode 100644 lib/Driver/WindowsToolChain.cpp create mode 100644 lib/Edit/CMakeLists.txt create mode 100644 lib/Edit/Commit.cpp create mode 100644 lib/Edit/EditedSource.cpp create mode 100644 lib/Edit/Makefile create mode 100644 lib/Edit/RewriteObjCFoundationAPI.cpp create mode 100644 lib/Frontend/ChainedDiagnosticConsumer.cpp create mode 100644 lib/Frontend/ChainedIncludesSource.cpp create mode 100644 lib/Frontend/DependencyGraph.cpp create mode 100644 lib/Frontend/DiagnosticRenderer.cpp create mode 100644 lib/Frontend/LayoutOverrideSource.cpp create mode 100644 lib/Frontend/SerializedDiagnosticPrinter.cpp create mode 100644 lib/Frontend/TextDiagnostic.cpp create mode 100644 lib/Headers/avx2intrin.h create mode 100644 lib/Headers/bmi2intrin.h create mode 100644 lib/Headers/bmiintrin.h create mode 100644 lib/Headers/cpuid.h create mode 100644 lib/Headers/fma4intrin.h create mode 100644 lib/Headers/lzcntintrin.h create mode 100644 lib/Headers/module.map create mode 100644 lib/Headers/popcntintrin.h create mode 100644 lib/Headers/unwind.h delete mode 100644 lib/Index/CallGraph.cpp create mode 100644 lib/Index/GlobalCallGraph.cpp create mode 100644 lib/Lex/ModuleMap.cpp create mode 100644 lib/Lex/PPCallbacks.cpp create mode 100644 lib/Rewrite/RewriteModernObjC.cpp delete mode 100644 lib/Sema/MultiInitializer.cpp create mode 100644 lib/Sema/SemaConsumer.cpp create mode 100644 lib/Sema/SemaLambda.cpp create mode 100644 lib/Sema/SemaPseudoObject.cpp delete mode 100644 lib/Serialization/ChainedIncludesSource.cpp create mode 100644 lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp create mode 100644 lib/StaticAnalyzer/Checkers/CommonBugCategories.cpp create mode 100644 lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/InterCheckerAPI.h create mode 100644 lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp create mode 100644 lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp delete mode 100644 lib/StaticAnalyzer/Core/AggExprVisitor.cpp create mode 100644 lib/StaticAnalyzer/Core/FunctionSummary.cpp create mode 100644 lib/StaticAnalyzer/Core/SubEngine.cpp create mode 100644 lib/Tooling/CMakeLists.txt create mode 100644 lib/Tooling/CompilationDatabase.cpp create mode 100644 lib/Tooling/Makefile create mode 100644 lib/Tooling/Tooling.cpp create mode 100644 test/ARCMT/GC-check-warn-nsalloc.m create mode 100644 test/ARCMT/GC-check.m create mode 100644 test/ARCMT/GC-no-arc-runtime.m create mode 100644 test/ARCMT/GC-no-arc-runtime.m.result create mode 100644 test/ARCMT/GC-no-finalize-removal.m create mode 100644 test/ARCMT/GC-no-finalize-removal.m.result create mode 100644 test/ARCMT/GC.h create mode 100644 test/ARCMT/GC.m create mode 100644 test/ARCMT/GC.m.result create mode 100644 test/ARCMT/check-with-serialized-diag.m create mode 100644 test/ARCMT/dispatch.m create mode 100644 test/ARCMT/dispatch.m.result create mode 100644 test/ARCMT/no-canceling-bridge-to-bridge-cast.m create mode 100644 test/ARCMT/objcmt-numeric-literals.m create mode 100644 test/ARCMT/objcmt-numeric-literals.m.result create mode 100644 test/ARCMT/objcmt-subscripting-literals.m create mode 100644 test/ARCMT/objcmt-subscripting-literals.m.result create mode 100644 test/Analysis/CFContainers.mm create mode 100644 test/Analysis/bool-assignment.cpp create mode 100644 test/Analysis/bool-assignment2.c create mode 100644 test/Analysis/check-deserialization.cpp create mode 100644 test/Analysis/coverage.c create mode 100644 test/Analysis/cstring-syntax-cxx.cpp create mode 100644 test/Analysis/cstring-syntax.c create mode 100644 test/Analysis/debug-CallGraph.c create mode 100644 test/Analysis/default-analyze.m create mode 100644 test/Analysis/domtest.c create mode 100644 test/Analysis/dynamic-cast.cpp create mode 100644 test/Analysis/global-region-invalidation.c create mode 100644 test/Analysis/html-diags-multifile.c create mode 100644 test/Analysis/html-diags-multifile.h create mode 100644 test/Analysis/html-diags.c create mode 100644 test/Analysis/inline-not-supported.c create mode 100644 test/Analysis/inline-plist.c create mode 100644 test/Analysis/inline-unique-reports.c create mode 100644 test/Analysis/lambdas.cpp create mode 100644 test/Analysis/malloc-annotations.c create mode 100644 test/Analysis/malloc-interprocedural.c create mode 100644 test/Analysis/malloc-plist.c create mode 100644 test/Analysis/malloc-sizeof.c create mode 100644 test/Analysis/malloc.cpp create mode 100644 test/Analysis/malloc.m create mode 100644 test/Analysis/malloc.mm create mode 100644 test/Analysis/method-call-intra-p.cpp create mode 100644 test/Analysis/objc-bool.m create mode 100644 test/Analysis/objc-method-coverage.m create mode 100644 test/Analysis/redefined_system.c create mode 100644 test/Analysis/retain-release-inline.m create mode 100644 test/Analysis/stats.c create mode 100644 test/Analysis/system-header-simulator-objc.h create mode 100644 test/Analysis/system-header-simulator.h create mode 100644 test/Analysis/taint-generic.c create mode 100644 test/Analysis/taint-tester.c create mode 100644 test/Analysis/taint-tester.cpp create mode 100644 test/Analysis/taint-tester.m create mode 100644 test/Analysis/virtualcall.cpp create mode 100644 test/CXX/basic/basic.start/basic.start.main/p2i.cpp create mode 100644 test/CXX/class.access/class.protected/p1-cxx11.cpp create mode 100644 test/CXX/class.derived/p1.cpp create mode 100644 test/CXX/class/class.base/class.base.init/p5-0x.cpp create mode 100644 test/CXX/class/class.friend/p1-cxx11.cpp create mode 100644 test/CXX/class/class.local/p1-0x.cpp create mode 100644 test/CXX/class/class.union/p2-0x.cpp create mode 100644 test/CXX/conv/conv.prom/p2.cpp create mode 100644 test/CXX/conv/conv.prom/p4.cpp create mode 100644 test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p6.cpp create mode 100644 test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp create mode 100644 test/CXX/dcl.dcl/dcl.spec/dcl.stc/p2.cpp create mode 100644 test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p5-cxx0x.cpp create mode 100644 test/CXX/dcl.dcl/p4-0x.cpp create mode 100644 test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p2.cpp create mode 100644 test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-cxx11-nowarn.cpp create mode 100644 test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp create mode 100644 test/CXX/dcl.decl/dcl.meaning/p1.cpp create mode 100644 test/CXX/expr/expr.ass/p9-cxx11.cpp create mode 100644 test/CXX/expr/expr.const/p3-0x-nowarn.cpp create mode 100644 test/CXX/expr/expr.const/p3-0x.cpp create mode 100644 test/CXX/expr/expr.const/p5-0x.cpp create mode 100644 test/CXX/expr/expr.post/expr.type.conv/p1-0x.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.general/p12-0x.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.general/p4-0x.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.general/p8-0x.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/default-arguments.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p10.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p11.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p12.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p13.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p15.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p16.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p2.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p20.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p21.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p23.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p4.mm create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p6.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp create mode 100644 test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp delete mode 100644 test/CXX/expr/expr.prim/p12-0x.cpp delete mode 100644 test/CXX/expr/expr.prim/p4-0x.cpp create mode 100644 test/CXX/expr/expr.unary/expr.new/p17-crash.cpp create mode 100644 test/CXX/expr/expr.unary/expr.new/p17.cpp create mode 100644 test/CXX/expr/expr.unary/expr.unary.op/p3.cpp create mode 100644 test/CXX/lex/lex.charset/p2-cxx11.cpp create mode 100644 test/CXX/lex/lex.charset/p2-cxx98.cpp create mode 100644 test/CXX/lex/lex.literal/lex.ext/p10.cpp create mode 100644 test/CXX/lex/lex.literal/lex.ext/p2.cpp create mode 100644 test/CXX/lex/lex.literal/lex.ext/p3.cpp create mode 100644 test/CXX/lex/lex.literal/lex.ext/p4.cpp create mode 100644 test/CXX/lex/lex.literal/lex.ext/p5.cpp create mode 100644 test/CXX/lex/lex.literal/lex.ext/p6.cpp create mode 100644 test/CXX/lex/lex.literal/lex.ext/p7.cpp create mode 100644 test/CXX/lex/lex.literal/lex.ext/p8.cpp create mode 100644 test/CXX/lex/lex.literal/lex.ext/p9.cpp create mode 100644 test/CXX/over/over.match/over.match.best/over.best.ics/over.ics.list/p6.cpp create mode 100644 test/CXX/over/over.match/over.match.funcs/over.match.copy/p1.cpp create mode 100644 test/CXX/over/over.oper/over.literal/p2.cpp create mode 100644 test/CXX/over/over.oper/over.literal/p3.cpp create mode 100644 test/CXX/over/over.oper/over.literal/p5.cpp create mode 100644 test/CXX/over/over.oper/over.literal/p6.cpp create mode 100644 test/CXX/over/over.oper/over.literal/p7.cpp create mode 100644 test/CXX/over/over.oper/over.literal/p8.cpp create mode 100644 test/CXX/special/class.copy/p13-0x.cpp create mode 100644 test/CXX/special/class.copy/p15-inclass.cpp create mode 100644 test/CXX/special/class.ctor/p6-0x.cpp create mode 100644 test/CXX/special/class.dtor/p10-0x.cpp create mode 100644 test/CXX/special/class.dtor/p5-0x.cpp create mode 100644 test/CXX/stmt.stmt/stmt.ambig/p1-0x.cpp create mode 100644 test/CXX/stmt.stmt/stmt.select/stmt.switch/p2-0x.cpp create mode 100644 test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp create mode 100644 test/CXX/temp/temp.decls/temp.class/temp.mem.enum/p1.cpp create mode 100644 test/CXX/temp/temp.decls/temp.variadic/fixed-expansion.cpp create mode 100644 test/CXX/temp/temp.param/p5.cpp create mode 100644 test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2-0x.cpp create mode 100644 test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2.cpp create mode 100644 test/CXX/temp/temp.spec/temp.inst/p1.cpp delete mode 100644 test/CodeGen/2005-05-06-CountBuiltins.c create mode 100644 test/CodeGen/3dnow-builtins.c create mode 100644 test/CodeGen/Inputs/stdio.h create mode 100644 test/CodeGen/address-safety-attr.cpp create mode 100644 test/CodeGen/align-param.c create mode 100644 test/CodeGen/alignment.c create mode 100644 test/CodeGen/arm-aapcs-zerolength-bitfield.c create mode 100644 test/CodeGen/atomic_ops.c create mode 100644 test/CodeGen/avx-builtins.c create mode 100644 test/CodeGen/avx2-builtins.c create mode 100644 test/CodeGen/bmi-builtins.c create mode 100644 test/CodeGen/bmi2-builtins.c create mode 100644 test/CodeGen/builtin-recursive.cc create mode 100644 test/CodeGen/builtinshufflevector2.c create mode 100644 test/CodeGen/count-builtins.c create mode 100644 test/CodeGen/debug-info-args.c create mode 100644 test/CodeGen/debug-info-block.c create mode 100644 test/CodeGen/debug-info-compilation-dir.c create mode 100644 test/CodeGen/debug-info-static.c create mode 100644 test/CodeGen/debug-line-1.c create mode 100644 test/CodeGen/decl-in-prototype.c create mode 100644 test/CodeGen/ext-vector-member-alignment.c create mode 100644 test/CodeGen/fma4-builtins.c delete mode 100644 test/CodeGen/kr-call.c create mode 100644 test/CodeGen/libcalls-fno-builtin.c create mode 100644 test/CodeGen/lifetime.c create mode 100644 test/CodeGen/link-bitcode-file.c create mode 100644 test/CodeGen/lzcnt-builtins.c create mode 100644 test/CodeGen/mips-clobber-reg.c create mode 100644 test/CodeGen/mips-constraint-regs.c create mode 100644 test/CodeGen/mips64-class-return.cpp create mode 100644 test/CodeGen/mips64-f128-literal.c create mode 100644 test/CodeGen/mips64-nontrivial-return.cpp create mode 100644 test/CodeGen/mips64-padding-arg.c create mode 100644 test/CodeGen/ms-declspecs.c create mode 100644 test/CodeGen/noinline.c create mode 100644 test/CodeGen/override-layout.c create mode 100644 test/CodeGen/packed-nest-unpacked.c create mode 100644 test/CodeGen/popcnt-builtins.c create mode 100644 test/CodeGen/powerpc_types.c create mode 100644 test/CodeGen/pr12251.c create mode 100644 test/CodeGen/redefine_extname.c create mode 100644 test/CodeGen/string-literal-unicode-conversion.c create mode 100644 test/CodeGen/tbaa-for-vptr.cpp create mode 100644 test/CodeGen/utf16-cfstrings.c delete mode 100644 test/CodeGen/va_list_test.c delete mode 100644 test/CodeGen/var-align.c create mode 100644 test/CodeGen/vla-4.c create mode 100644 test/CodeGen/vld_dup.c create mode 100644 test/CodeGen/x86_32-arguments-win32.c create mode 100644 test/CodeGenCXX/2011-12-19-init-list-ctor.cpp create mode 100644 test/CodeGenCXX/2012-02-06-VecInitialization.cpp create mode 100644 test/CodeGenCXX/2012-03-16-StoreAlign.cpp create mode 100644 test/CodeGenCXX/apple-kext.cpp create mode 100644 test/CodeGenCXX/atomic.cpp create mode 100644 test/CodeGenCXX/atomicinit.cpp create mode 100644 test/CodeGenCXX/block.cpp create mode 100644 test/CodeGenCXX/blocks-cxx11.cpp create mode 100644 test/CodeGenCXX/const-init-cxx11.cpp create mode 100644 test/CodeGenCXX/cxx0x-initializer-array.cpp create mode 100644 test/CodeGenCXX/cxx0x-initializer-references.cpp create mode 100644 test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-pr12086.cpp create mode 100644 test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp create mode 100644 test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp create mode 100644 test/CodeGenCXX/cxx11-unrestricted-union.cpp create mode 100644 test/CodeGenCXX/cxx11-user-defined-literal.cpp create mode 100644 test/CodeGenCXX/debug-info-artificial-arg.cpp create mode 100644 test/CodeGenCXX/debug-info-context.cpp create mode 100644 test/CodeGenCXX/debug-info-dup-fwd-decl.cpp create mode 100644 test/CodeGenCXX/debug-info-fwd-ref.cpp create mode 100644 test/CodeGenCXX/debug-info-limit-type.cpp create mode 100644 test/CodeGenCXX/debug-info-method2.cpp create mode 100644 test/CodeGenCXX/debug-info-static-fns.cpp create mode 100644 test/CodeGenCXX/debug-info-template-limit.cpp create mode 100644 test/CodeGenCXX/debug-info-template-member.cpp create mode 100644 test/CodeGenCXX/debug-info-template-recursive.cpp create mode 100644 test/CodeGenCXX/debug-info-use-after-free.cpp create mode 100644 test/CodeGenCXX/debug-lambda-expressions.cpp create mode 100644 test/CodeGenCXX/forward-enum.cpp create mode 100644 test/CodeGenCXX/inheriting-constructor.cpp create mode 100644 test/CodeGenCXX/init-invariant.cpp create mode 100644 test/CodeGenCXX/instantiate-temporaries.cpp create mode 100644 test/CodeGenCXX/lambda-expressions.cpp create mode 100644 test/CodeGenCXX/mangle-98.cpp create mode 100644 test/CodeGenCXX/mangle-lambdas.cpp create mode 100644 test/CodeGenCXX/mangle-nullptr-arg.cpp create mode 100644 test/CodeGenCXX/mangle-std-externc.cpp create mode 100644 test/CodeGenCXX/new-array-init-exceptions.cpp create mode 100644 test/CodeGenCXX/new-array-init.cpp create mode 100644 test/CodeGenCXX/override-layout.cpp create mode 100644 test/CodeGenCXX/pr11676.cpp create mode 100644 test/CodeGenCXX/pr11797.cpp create mode 100644 test/CodeGenCXX/pr12104.cpp create mode 100644 test/CodeGenCXX/pr12104.h create mode 100644 test/CodeGenCXX/pr12251.cpp create mode 100644 test/CodeGenCXX/pragma-pack-2.cpp create mode 100644 test/CodeGenCXX/regparm.cpp create mode 100644 test/CodeGenCXX/static-mutable.cpp create mode 100644 test/CodeGenCXX/switch-case-folding-1.cpp create mode 100644 test/CodeGenCXX/switch-case-folding-2.cpp create mode 100644 test/CodeGenCXX/switch-case-folding.cpp create mode 100644 test/CodeGenCXX/thiscall-struct-return.cpp create mode 100644 test/CodeGenCXX/thunk-use-after-free.cpp create mode 100644 test/CodeGenCXX/typeid-cxx11.cpp create mode 100644 test/CodeGenCXX/virtual-implicit-move-assignment.cpp create mode 100644 test/CodeGenCXX/weak-extern-typeinfo.cpp create mode 100644 test/CodeGenObjC/Inputs/literal-support.h create mode 100644 test/CodeGenObjC/arc-blocks.m create mode 100644 test/CodeGenObjC/arc-cond-stmt.m create mode 100644 test/CodeGenObjC/arc-exceptions.m create mode 100644 test/CodeGenObjC/arc-literals.m create mode 100644 test/CodeGenObjC/arc-no-arc-exceptions.m create mode 100644 test/CodeGenObjC/arc-property.m create mode 100644 test/CodeGenObjC/auto-property-synthesize-protocol.m create mode 100644 test/CodeGenObjC/catch-lexical-block.m create mode 100644 test/CodeGenObjC/complex-double-abi.m create mode 100644 test/CodeGenObjC/debug-info-fwddecl.m create mode 100644 test/CodeGenObjC/debug-info-impl.m create mode 100644 test/CodeGenObjC/debug-info-property3.m create mode 100644 test/CodeGenObjC/debug-info-property4.m create mode 100644 test/CodeGenObjC/debug-info-property5.m create mode 100644 test/CodeGenObjC/debug-info-synthesis.m create mode 100644 test/CodeGenObjC/fp2ret.m create mode 100644 test/CodeGenObjC/ivar-base-as-invariant-load.m create mode 100644 test/CodeGenObjC/ns_consume_null_check.m create mode 100644 test/CodeGenObjC/objc-arc-container-subscripting.m create mode 100644 test/CodeGenObjC/objc-container-subscripting-1.m create mode 100644 test/CodeGenObjC/objc-container-subscripting.m create mode 100644 test/CodeGenObjC/objc-dictionary-literal.m create mode 100644 test/CodeGenObjC/objc-literal-debugger-test.m create mode 100644 test/CodeGenObjC/objc-literal-tests.m create mode 100644 test/CodeGenObjC/optimized-setter.m create mode 100644 test/CodeGenObjC/selector-ref-invariance.m create mode 100644 test/CodeGenObjCXX/Inputs/literal-support.h create mode 100644 test/CodeGenObjCXX/address-safety-attr.mm create mode 100644 test/CodeGenObjCXX/arc-exceptions.mm create mode 100644 test/CodeGenObjCXX/debug-info.mm create mode 100644 test/CodeGenObjCXX/lambda-expressions.mm create mode 100644 test/CodeGenObjCXX/literals.mm create mode 100644 test/CodeGenObjCXX/lvalue-reference-getter.mm create mode 100644 test/CodeGenObjCXX/objc-container-subscripting-1.mm create mode 100644 test/CodeGenObjCXX/objc-container-subscripting.mm create mode 100644 test/CodeGenObjCXX/property-object-reference-1.mm create mode 100644 test/CodeGenObjCXX/property-object-reference-2.mm create mode 100644 test/CodeGenOpenCL/fpaccuracy.cl create mode 100644 test/CodeGenOpenCL/vector_literals_nested.cl create mode 100644 test/CodeGenOpenCL/vector_logops.cl create mode 100644 test/Driver/Inputs/basic_freebsd64_tree/lib/.keep create mode 100644 test/Driver/Inputs/basic_freebsd64_tree/usr/lib/.keep create mode 100644 test/Driver/Inputs/basic_freebsd64_tree/usr/lib/crt1.o create mode 100644 test/Driver/Inputs/basic_freebsd64_tree/usr/lib32/.keep create mode 100644 test/Driver/Inputs/basic_freebsd_tree/lib/.keep create mode 100644 test/Driver/Inputs/basic_freebsd_tree/usr/lib/.keep create mode 100644 test/Driver/Inputs/basic_freebsd_tree/usr/lib/crt1.o create mode 100644 test/Driver/Inputs/basic_freebsd_tree/usr/lib32/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/lib/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/lib/i386-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/lib/powerpc-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/lib/powerpc64-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/lib/x86_64-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/include/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/include/c++/4.5/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/include/c++/4.5/backward/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/include/c++/4.5/i686-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/include/c++/4.5/powerpc-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/include/c++/4.5/powerpc64-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/include/c++/4.5/x86_64-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/include/i386-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/include/powerpc-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/include/powerpc64-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/include/x86_64-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/lib/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/lib/gcc/i686-linux-gnu/4.5/crtbegin.o create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/lib/gcc/powerpc-linux-gnu/4.5/crtbegin.o create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/lib/gcc/powerpc64-linux-gnu/4.5/crtbegin.o create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.5/crtbegin.o create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/lib/i386-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/lib/powerpc-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/lib/powerpc64-linux-gnu/.keep create mode 100644 test/Driver/Inputs/debian_multiarch_tree/usr/lib/x86_64-linux-gnu/.keep create mode 100644 test/Driver/Inputs/multiarch_freebsd64_tree/lib/.keep create mode 100644 test/Driver/Inputs/multiarch_freebsd64_tree/usr/lib/.keep create mode 100644 test/Driver/Inputs/multiarch_freebsd64_tree/usr/lib/crt1.o create mode 100644 test/Driver/Inputs/multiarch_freebsd64_tree/usr/lib32/.keep create mode 100644 test/Driver/Inputs/multiarch_freebsd64_tree/usr/lib32/crt1.o create mode 100755 test/Driver/Inputs/prefixed_tools_tree/x86_64--linux-as create mode 100755 test/Driver/Inputs/prefixed_tools_tree/x86_64--linux-ld create mode 100644 test/Driver/Inputs/suse_10.3_ppc64_tree/lib/.keep create mode 100644 test/Driver/Inputs/suse_10.3_ppc64_tree/lib64/.keep create mode 100644 test/Driver/Inputs/suse_10.3_ppc64_tree/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64/crtbegin.o create mode 100644 test/Driver/Inputs/suse_10.3_ppc64_tree/usr/lib/gcc/powerpc64-suse-linux/4.1.2/crtbegin.o create mode 100644 test/Driver/Inputs/suse_10.3_ppc64_tree/usr/lib64/.keep create mode 100644 test/Driver/Inputs/ubuntu_11.04_multiarch_tree/lib/.keep create mode 100644 test/Driver/Inputs/ubuntu_11.04_multiarch_tree/lib/i386-linux-gnu/.keep create mode 100644 test/Driver/Inputs/ubuntu_11.04_multiarch_tree/usr/include/.keep create mode 100644 test/Driver/Inputs/ubuntu_11.04_multiarch_tree/usr/include/c++/4.5/.keep create mode 100644 test/Driver/Inputs/ubuntu_11.04_multiarch_tree/usr/include/c++/4.5/backward/.keep create mode 100644 test/Driver/Inputs/ubuntu_11.04_multiarch_tree/usr/include/c++/4.5/i686-linux-gnu/.keep create mode 100644 test/Driver/Inputs/ubuntu_11.04_multiarch_tree/usr/include/i386-linux-gnu/.keep create mode 100644 test/Driver/Inputs/ubuntu_11.04_multiarch_tree/usr/lib/.keep create mode 100644 test/Driver/Inputs/ubuntu_11.04_multiarch_tree/usr/lib/i386-linux-gnu/.keep create mode 100644 test/Driver/Inputs/ubuntu_11.04_multiarch_tree/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/crtbegin.o create mode 100644 test/Driver/altivec.cpp create mode 100644 test/Driver/arclite-link.c create mode 100644 test/Driver/arm-mfpmath.c create mode 100644 test/Driver/arm-mfpu.c create mode 100644 test/Driver/asan.c create mode 100644 test/Driver/cpp-precomp.c create mode 100644 test/Driver/debug-options-as.c create mode 100644 test/Driver/debug-options.c create mode 100644 test/Driver/debug.c create mode 100644 test/Driver/diagnostics.c create mode 100644 test/Driver/dwarf2-cfi-asm.c create mode 100644 test/Driver/fast-math.c create mode 100644 test/Driver/frame-pointer.c create mode 100644 test/Driver/gcc-toolchain.cpp create mode 100644 test/Driver/gold-lto.c create mode 100644 test/Driver/invalid-o-level.c create mode 100644 test/Driver/linker-opts.c create mode 100644 test/Driver/linux-as.c create mode 100644 test/Driver/linux-header-search.cpp create mode 100644 test/Driver/mips-as.c create mode 100644 test/Driver/mips-float.c create mode 100644 test/Driver/modules.m create mode 100644 test/Driver/modules.mm create mode 100644 test/Driver/no-objc-default-synthesize-properties.m create mode 100644 test/Driver/no-sibling-calls.c create mode 100644 test/Driver/noinline.c create mode 100644 test/Driver/output-file-cleanup.c create mode 100644 test/Driver/pic.c create mode 100644 test/Driver/prefixed-tools.c create mode 100644 test/Driver/redundant-args.c create mode 100644 test/Driver/rewrite-legacy-objc.m create mode 100644 test/Driver/stackrealign.c create mode 100644 test/Driver/target.c create mode 100644 test/Driver/tsan.c create mode 100644 test/Driver/unknown-arg.c create mode 100644 test/Driver/working-directory.c create mode 100644 test/FixIt/atomic-property.m create mode 100644 test/FixIt/fixit-cxx11-compat.cpp create mode 100644 test/FixIt/fixit-recompile.c create mode 100644 test/FixIt/fixit-recursive-block.c create mode 100644 test/FixIt/fixit-vexing-parse-cxx0x.cpp create mode 100644 test/FixIt/fixit-vexing-parse.cpp create mode 100644 test/FixIt/no-fixit.cpp create mode 100644 test/FixIt/objc-literals.m create mode 100644 test/Frontend/Inputs/TestFramework.framework/Headers/TestFramework.h create mode 100644 test/Frontend/Wno-everything.c delete mode 100644 test/Frontend/diagnostic-name.c create mode 100644 test/Frontend/iframework.c create mode 100644 test/Headers/wmmintrin.c create mode 100644 test/Index/Inputs/Frameworks/Framework.framework/Headers/Framework.h create mode 100644 test/Index/Inputs/Headers/a.h create mode 100644 test/Index/Inputs/Headers/a_extensions.h create mode 100644 test/Index/Inputs/Headers/crash.h create mode 100644 test/Index/Inputs/Headers/module.map create mode 100644 test/Index/Inputs/Headers/nested/module.map create mode 100644 test/Index/Inputs/Headers/nested/nested.h create mode 100644 test/Index/Inputs/pragma_disable_warning.h create mode 100644 test/Index/Inputs/redeclarations.h create mode 100644 test/Index/Inputs/reparse-instantiate.h create mode 100644 test/Index/annotate-literals.m create mode 100644 test/Index/annotate-subscripting.m create mode 100644 test/Index/annotate-toplevel-in-objccontainer.m create mode 100644 test/Index/annotate-toplevel-in-objccontainer.m.h create mode 100644 test/Index/asm-attribute.c create mode 100644 test/Index/complete-enums.cpp create mode 100644 test/Index/complete-in-invalid-method.m create mode 100644 test/Index/complete-ivar-access.m create mode 100644 test/Index/complete-lambdas.cpp create mode 100644 test/Index/complete-modules.m create mode 100644 test/Index/crash-recovery-modules.m create mode 100644 test/Index/cxx11-lambdas.cpp create mode 100644 test/Index/error-on-deserialized.c create mode 100644 test/Index/file-macro-refs.c create mode 100644 test/Index/file-refs-subscripting.m create mode 100644 test/Index/index-attrs.m create mode 100644 test/Index/index-decls.m create mode 100644 test/Index/index-invalid-code.m create mode 100644 test/Index/index-many-logical-ops.c create mode 100644 test/Index/index-refs.cpp create mode 100644 test/Index/index-subscripting-literals.m create mode 100644 test/Index/index-suppress-refs.cpp create mode 100644 test/Index/index-suppress-refs.h create mode 100644 test/Index/index-suppress-refs.hpp create mode 100644 test/Index/index-suppress-refs.m create mode 100644 test/Index/invalid-code-rdar10451854.m create mode 100644 test/Index/ms-if-exists.cpp delete mode 100644 test/Index/nested-macro-instantiations.cpp create mode 100644 test/Index/pch-opaque-value.cpp create mode 100644 test/Index/pch-with-errors.c create mode 100644 test/Index/pch-with-errors.m create mode 100644 test/Index/preamble-reparse-import.m create mode 100644 test/Index/preamble-reparse-import.m-1.h create mode 100644 test/Index/preamble-reparse-import.m-2.h create mode 100644 test/Index/preamble-reparse-import.m-3.h create mode 100644 test/Index/redeclarations.cpp create mode 100644 test/Index/reparse-instantiate.cpp create mode 100644 test/Index/targeted-annotation.c create mode 100644 test/Index/targeted-cursor.c create mode 100644 test/Index/targeted-cursor.m create mode 100644 test/Index/targeted-cursor.m.h create mode 100644 test/Index/targeted-fields.h create mode 100644 test/Index/targeted-file-refs.c create mode 100644 test/Index/targeted-nested1.h create mode 100644 test/Index/targeted-preamble.h create mode 100644 test/Index/targeted-top.h create mode 100644 test/Index/unmatched-braces.c create mode 100644 test/Index/unmatched-braces.m create mode 100644 test/Index/vector-types.c create mode 100644 test/Lexer/char-literal-encoding-error.c create mode 100644 test/Lexer/char-literal.cpp delete mode 100644 test/Lexer/has_attribute.cpp create mode 100644 test/Lexer/has_feature_address_sanitizer.cpp create mode 100644 test/Lexer/has_feature_modules.m create mode 100644 test/Lexer/ms-extensions.cpp create mode 100644 test/Lexer/newline-eof-c++11.cpp create mode 100644 test/Lexer/newline-eof-c++98-compat.cpp create mode 100644 test/Lexer/string-literal-encoding.c create mode 100644 test/Lexer/token-concat.cpp create mode 100644 test/Misc/diag-macro-backtrace.c create mode 100644 test/Misc/diag-verify.cpp create mode 100644 test/Misc/integer-literal-printing.cpp delete mode 100644 test/Misc/macro-backtrace-limit.c create mode 100644 test/Misc/macro-backtrace.c create mode 100644 test/Misc/pubnames.c create mode 100644 test/Misc/serialized-diags-no-category.c create mode 100644 test/Misc/serialized-diags-no-issue.c create mode 100644 test/Misc/serialized-diags-single-issue.c create mode 100644 test/Misc/serialized-diags.c create mode 100644 test/Misc/serialized-diags.h create mode 100644 test/Modules/Inputs/AlsoDependsOnModule.framework/Headers/AlsoDependsOnModule.h create mode 100644 test/Modules/Inputs/DependsOnModule.framework/Frameworks/SubFramework.framework/Headers/Other.h create mode 100644 test/Modules/Inputs/DependsOnModule.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h create mode 100644 test/Modules/Inputs/DependsOnModule.framework/Headers/cxx_other.h create mode 100644 test/Modules/Inputs/DependsOnModule.framework/Headers/other.h create mode 100644 test/Modules/Inputs/DependsOnModule.framework/PrivateHeaders/DependsOnModulePrivate.h create mode 100644 test/Modules/Inputs/DependsOnModule.framework/module.map create mode 100644 test/Modules/Inputs/DependsOnModule.framework/module_private.map create mode 100644 test/Modules/Inputs/MethodPoolA.h create mode 100644 test/Modules/Inputs/MethodPoolB.h create mode 100644 test/Modules/Inputs/Module.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h create mode 100644 test/Modules/Inputs/Module.framework/Headers/Buried/Treasure.h create mode 100644 test/Modules/Inputs/Module.framework/Headers/NotInModule.h create mode 100644 test/Modules/Inputs/Module.framework/Headers/Sub.h create mode 100644 test/Modules/Inputs/Module.framework/Headers/Sub2.h create mode 100644 test/Modules/Inputs/Module.framework/PrivateHeaders/ModulePrivate.h create mode 100644 test/Modules/Inputs/NoUmbrella.framework/Headers/A.h create mode 100644 test/Modules/Inputs/NoUmbrella.framework/Headers/B.h create mode 100644 test/Modules/Inputs/NoUmbrella.framework/Headers/Boom.h create mode 100644 test/Modules/Inputs/NoUmbrella.framework/Headers/SubDir/C.h create mode 100644 test/Modules/Inputs/NoUmbrella.framework/PrivateHeaders/A_Private.h create mode 100644 test/Modules/Inputs/NoUmbrella.framework/PrivateHeaders/B_Private.h create mode 100644 test/Modules/Inputs/NoUmbrella.framework/module.map create mode 100644 test/Modules/Inputs/NoUmbrella.framework/module_private.map create mode 100644 test/Modules/Inputs/System/usr/include/module.map create mode 100644 test/Modules/Inputs/System/usr/include/stdbool.h create mode 100644 test/Modules/Inputs/System/usr/include/stdint.h create mode 100644 test/Modules/Inputs/System/usr/include/stdio.h create mode 100644 test/Modules/Inputs/category_bottom.h create mode 100644 test/Modules/Inputs/category_left.h create mode 100644 test/Modules/Inputs/category_other.h create mode 100644 test/Modules/Inputs/category_right.h create mode 100644 test/Modules/Inputs/category_top.h create mode 100644 test/Modules/Inputs/decl.h create mode 100644 test/Modules/Inputs/decl2.h create mode 100644 test/Modules/Inputs/def-include.h create mode 100644 test/Modules/Inputs/def.h create mode 100644 test/Modules/Inputs/diamond.h create mode 100644 test/Modules/Inputs/irgen.h create mode 100644 test/Modules/Inputs/macros.h create mode 100644 test/Modules/Inputs/module.map create mode 100644 test/Modules/Inputs/module_private_left.h create mode 100644 test/Modules/Inputs/module_private_right.h create mode 100644 test/Modules/Inputs/namespaces-left.h create mode 100644 test/Modules/Inputs/namespaces-right.h create mode 100644 test/Modules/Inputs/namespaces-top.h create mode 100644 test/Modules/Inputs/normal-module-map/Umbrella/Umbrella.h create mode 100644 test/Modules/Inputs/normal-module-map/Umbrella/module.map create mode 100644 test/Modules/Inputs/normal-module-map/Umbrella/umbrella_sub.h create mode 100644 test/Modules/Inputs/normal-module-map/Umbrella2/Umbrella2.h create mode 100644 test/Modules/Inputs/normal-module-map/Umbrella2/module.map create mode 100644 test/Modules/Inputs/normal-module-map/a1.h create mode 100644 test/Modules/Inputs/normal-module-map/a2.h create mode 100644 test/Modules/Inputs/normal-module-map/b1.h create mode 100644 test/Modules/Inputs/normal-module-map/module.map create mode 100644 test/Modules/Inputs/normal-module-map/nested/module.map create mode 100644 test/Modules/Inputs/normal-module-map/nested/nested1.h create mode 100644 test/Modules/Inputs/normal-module-map/nested/nested2.h create mode 100644 test/Modules/Inputs/normal-module-map/nested_umbrella/a.h create mode 100644 test/Modules/Inputs/normal-module-map/nested_umbrella/b.h create mode 100644 test/Modules/Inputs/redecl-merge-bottom.h create mode 100644 test/Modules/Inputs/redecl-merge-left-left.h create mode 100644 test/Modules/Inputs/redecl-merge-left.h create mode 100644 test/Modules/Inputs/redecl-merge-right.h create mode 100644 test/Modules/Inputs/redecl-merge-top-explicit.h create mode 100644 test/Modules/Inputs/redecl-merge-top.h create mode 100644 test/Modules/Inputs/redecl_namespaces_left.h create mode 100644 test/Modules/Inputs/redecl_namespaces_right.h create mode 100644 test/Modules/Inputs/redeclarations_left.h create mode 100644 test/Modules/Inputs/redeclarations_right.h create mode 100644 test/Modules/Inputs/subdir/module.map create mode 100644 test/Modules/Inputs/subdir/subdir.h create mode 100644 test/Modules/Inputs/submodules/hash_map.h create mode 100644 test/Modules/Inputs/submodules/module.map create mode 100644 test/Modules/Inputs/submodules/type_traits.h create mode 100644 test/Modules/Inputs/submodules/vector.h create mode 100644 test/Modules/Inputs/wildcard-submodule-exports/A_one.h create mode 100644 test/Modules/Inputs/wildcard-submodule-exports/A_two.h create mode 100644 test/Modules/Inputs/wildcard-submodule-exports/B_one.h create mode 100644 test/Modules/Inputs/wildcard-submodule-exports/B_two.h create mode 100644 test/Modules/Inputs/wildcard-submodule-exports/C_one.h create mode 100644 test/Modules/Inputs/wildcard-submodule-exports/C_two.h create mode 100644 test/Modules/Inputs/wildcard-submodule-exports/module.map delete mode 100644 test/Modules/auto-module-import.c create mode 100644 test/Modules/auto-module-import.m create mode 100644 test/Modules/compiler_builtins.m create mode 100644 test/Modules/cstd.m create mode 100644 test/Modules/decldef.mm create mode 100644 test/Modules/diamond-pch.c create mode 100644 test/Modules/inferred-submodules.m create mode 100644 test/Modules/method_pool.m create mode 100644 test/Modules/namespaces.cpp create mode 100644 test/Modules/normal-module-map.cpp create mode 100644 test/Modules/redecl-merge.m create mode 100644 test/Modules/redecl-namespaces.mm create mode 100644 test/Modules/redeclarations.m create mode 100644 test/Modules/requires.m create mode 100644 test/Modules/subframeworks.m create mode 100644 test/Modules/submodules-preprocess.cpp create mode 100644 test/Modules/submodules.cpp create mode 100644 test/Modules/submodules.m create mode 100644 test/Modules/wildcard-submodule-exports.cpp create mode 100644 test/PCH/chain-categories2.m create mode 100644 test/PCH/chain-class-extension.m create mode 100644 test/PCH/cocoa.m create mode 100644 test/PCH/cxx-constexpr.cpp create mode 100644 test/PCH/cxx-exprs.cpp create mode 100644 test/PCH/cxx-functions.cpp create mode 100644 test/PCH/cxx-functions.h create mode 100644 test/PCH/cxx-trailing-return.cpp create mode 100644 test/PCH/cxx11-constexpr.cpp create mode 100644 test/PCH/cxx11-enum-template.cpp create mode 100644 test/PCH/cxx11-lambdas.mm create mode 100644 test/PCH/cxx11-user-defined-literals.cpp create mode 100644 test/PCH/designated-init.c create mode 100644 test/PCH/designated-init.c.h create mode 100644 test/PCH/ms-if-exists.cpp create mode 100644 test/PCH/objc_container.h create mode 100644 test/PCH/objc_container.m create mode 100644 test/PCH/objc_literals.m create mode 100644 test/PCH/objc_literals.mm create mode 100644 test/PCH/pending-ids.m create mode 100644 test/PCH/rdar10830559.cpp create mode 100644 test/PCH/replaced-decl.m create mode 100644 test/PCH/single-token-macro.c create mode 100644 test/PCH/subscripting-literals.m create mode 100644 test/Parser/asm.cpp create mode 100644 test/Parser/cxx0x-ambig.cpp create mode 100644 test/Parser/cxx0x-condition.cpp create mode 100644 test/Parser/cxx0x-decl.cpp create mode 100644 test/Parser/cxx0x-for-range.cpp create mode 100644 test/Parser/cxx11-type-specifier.cpp create mode 100644 test/Parser/cxx11-user-defined-literals.cpp create mode 100644 test/Parser/missing-end-4.m create mode 100644 test/Parser/objcxx11-attributes.mm create mode 100644 test/Parser/objcxx11-user-defined-literal.mm create mode 100644 test/Parser/recovery.cpp create mode 100644 test/Parser/skip-function-bodies.mm create mode 100644 test/Parser/warn-dangling-else.cpp create mode 100644 test/Preprocessor/Inputs/TestFramework.framework/.system_framework create mode 100644 test/Preprocessor/Inputs/TestFramework.framework/Frameworks/AnotherTestFramework.framework/Headers/AnotherTestFramework.h create mode 100644 test/Preprocessor/Inputs/TestFramework.framework/Headers/TestFramework.h create mode 100644 test/Preprocessor/_Pragma-in-macro-arg.c create mode 100644 test/Preprocessor/cxx_oper_keyword_ms_compat.cpp create mode 100644 test/Preprocessor/has_attribute.c create mode 100644 test/Preprocessor/macro_arg_directive.c create mode 100644 test/Preprocessor/macro_arg_directive.h create mode 100644 test/Preprocessor/microsoft-import.c create mode 100644 test/Preprocessor/mmx.c create mode 100644 test/Preprocessor/user_defined_system_framework.c create mode 100644 test/Preprocessor/warn-disabled-macro-expansion.c create mode 100644 test/Rewriter/func-in-impl.m create mode 100644 test/Rewriter/objc-bool-literal-check-modern.mm create mode 100644 test/Rewriter/objc-bool-literal-modern-1.mm create mode 100644 test/Rewriter/objc-bool-literal-modern.mm create mode 100644 test/Rewriter/objc-modern-class-init-hooks.mm create mode 100644 test/Rewriter/objc-modern-class-init.mm create mode 100644 test/Rewriter/objc-modern-container-subscript.mm create mode 100644 test/Rewriter/objc-modern-implicit-cast.mm create mode 100644 test/Rewriter/objc-modern-ivar-receiver-1.mm create mode 100644 test/Rewriter/objc-modern-linkage-spec.mm create mode 100644 test/Rewriter/objc-modern-metadata-visibility.mm create mode 100644 test/Rewriter/objc-modern-numeric-literal.mm create mode 100644 test/Rewriter/objc-modern-property-attributes.mm delete mode 100644 test/Rewriter/rewrite-block-literal.c create mode 100644 test/Rewriter/rewrite-block-literal.mm create mode 100644 test/Rewriter/rewrite-cast-ivar-modern-access.mm create mode 100644 test/Rewriter/rewrite-modern-array-literal.mm create mode 100644 test/Rewriter/rewrite-modern-block-ivar-call.mm create mode 100644 test/Rewriter/rewrite-modern-block.mm create mode 100644 test/Rewriter/rewrite-modern-catch.m create mode 100644 test/Rewriter/rewrite-modern-class.mm create mode 100644 test/Rewriter/rewrite-modern-container-literal.mm create mode 100644 test/Rewriter/rewrite-modern-ivar-use.mm create mode 100644 test/Rewriter/rewrite-modern-ivars-1.mm create mode 100644 test/Rewriter/rewrite-modern-ivars-2.mm create mode 100644 test/Rewriter/rewrite-modern-ivars.mm create mode 100644 test/Rewriter/rewrite-modern-nested-ivar.mm create mode 100644 test/Rewriter/rewrite-modern-protocol.mm create mode 100644 test/Rewriter/rewrite-modern-struct-ivar.mm create mode 100644 test/Rewriter/rewrite-modern-synchronized.m create mode 100644 test/Rewriter/rewrite-modern-throw.m create mode 100644 test/Rewriter/rewrite-modern-try-catch-finally.m create mode 100644 test/Rewriter/rewrite-modern-try-finally.m create mode 100644 test/Rewriter/unnamed-bf-modern-write.mm create mode 100644 test/Sema/Inputs/unused-expr-system-header.h create mode 100644 test/Sema/MicrosoftCompatibility.c create mode 100644 test/Sema/anonymous-struct-union-c11.c create mode 100644 test/Sema/attr-declspec-ignored.c create mode 100644 test/Sema/attr-visibility.c create mode 100644 test/Sema/block-explicit-noreturn-type.c create mode 100644 test/Sema/c11-typedef-redef.c create mode 100644 test/Sema/complex-imag.c create mode 100644 test/Sema/decl-in-prototype.c create mode 100644 test/Sema/fn-ptr-as-fn-prototype.c create mode 100644 test/Sema/format-strings-c90.c create mode 100644 test/Sema/format-strings-fixit-ssize_t.c create mode 100644 test/Sema/format-strings-int-typedefs.c create mode 100644 test/Sema/format-strings-no-fixit.c create mode 100644 test/Sema/format-strings-non-iso.c create mode 100644 test/Sema/format-strings-size_t.c create mode 100644 test/Sema/many-logical-ops.c delete mode 100644 test/Sema/paren-list-expr-type.cpp create mode 100644 test/Sema/pragma-pack-5.c create mode 100644 test/Sema/pragma-pack-apple.c create mode 100644 test/Sema/static-array.c create mode 100644 test/Sema/unused-expr-system-header.c create mode 100644 test/Sema/variadic-incomplete-arg-type.c create mode 100644 test/Sema/vla-2.c create mode 100644 test/Sema/warn-strncat-size.c create mode 100644 test/Sema/weak-import-on-enum.c create mode 100644 test/SemaCXX/Inputs/array-bounds-system-header.h create mode 100644 test/SemaCXX/Inputs/warn-new-overaligned-3.h create mode 100644 test/SemaCXX/MicrosoftCompatibility-cxx98.cpp create mode 100644 test/SemaCXX/PR10177.cpp create mode 100644 test/SemaCXX/PR10447.cpp create mode 100644 test/SemaCXX/PR11358.cpp create mode 100644 test/SemaCXX/PR12481.cpp create mode 100644 test/SemaCXX/PR8385.cpp create mode 100644 test/SemaCXX/array-bounds-system-header.cpp create mode 100644 test/SemaCXX/atomic-type.cxx create mode 100644 test/SemaCXX/attr-declspec-ignored.cpp create mode 100644 test/SemaCXX/constant-expression-cxx11.cpp create mode 100644 test/SemaCXX/constexpr-ackermann.cpp create mode 100644 test/SemaCXX/constexpr-backtrace-limit.cpp create mode 100644 test/SemaCXX/constexpr-depth.cpp create mode 100644 test/SemaCXX/constexpr-factorial.cpp create mode 100644 test/SemaCXX/constexpr-nqueens.cpp create mode 100644 test/SemaCXX/constexpr-printing.cpp create mode 100644 test/SemaCXX/constexpr-strlen.cpp create mode 100644 test/SemaCXX/constexpr-turing.cpp create mode 100644 test/SemaCXX/constexpr-value-init.cpp create mode 100644 test/SemaCXX/cxx0x-initializer-aggregates.cpp create mode 100644 test/SemaCXX/cxx0x-initializer-constructor.cpp create mode 100644 test/SemaCXX/cxx0x-initializer-references.cpp create mode 100644 test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp create mode 100644 test/SemaCXX/cxx11-ast-print.cpp create mode 100644 test/SemaCXX/cxx11-user-defined-literals.cpp create mode 100644 test/SemaCXX/cxx98-compat-flags.cpp create mode 100644 test/SemaCXX/defaulted-private-dtor.cpp create mode 100644 test/SemaCXX/discrim-union.cpp create mode 100644 test/SemaCXX/dr1301.cpp create mode 100644 test/SemaCXX/enum-unscoped-nonexistent.cpp create mode 100644 test/SemaCXX/format-strings-0x.cpp create mode 100644 test/SemaCXX/format-strings.cpp create mode 100644 test/SemaCXX/friend-out-of-line.cpp create mode 100644 test/SemaCXX/function-extern-c.cpp delete mode 100644 test/SemaCXX/generalized-initializers.cpp delete mode 100644 test/SemaCXX/if-empty-body.cpp create mode 100644 test/SemaCXX/indirect-goto.cpp create mode 100644 test/SemaCXX/lambda-expressions.cpp create mode 100644 test/SemaCXX/member-class-11.cpp create mode 100644 test/SemaCXX/new-delete-0x.cpp create mode 100644 test/SemaCXX/new-delete-cxx0x.cpp create mode 100644 test/SemaCXX/pragma-visibility.cpp create mode 100644 test/SemaCXX/runtimediag-ppe.cpp create mode 100644 test/SemaCXX/string-plus-int.cpp create mode 100644 test/SemaCXX/unknown-anytype-blocks.cpp create mode 100644 test/SemaCXX/vla.cpp create mode 100644 test/SemaCXX/warn-empty-body.cpp create mode 100644 test/SemaCXX/warn-everthing.cpp create mode 100644 test/SemaCXX/warn-func-as-bool.cpp create mode 100644 test/SemaCXX/warn-new-overaligned-2.cpp create mode 100644 test/SemaCXX/warn-new-overaligned-3.cpp create mode 100644 test/SemaCXX/warn-new-overaligned.cpp create mode 100644 test/SemaCXX/zero-length-arrays.cpp create mode 100644 test/SemaObjC/ClassPropertyNotObject.m create mode 100644 test/SemaObjC/NSString-type.m create mode 100644 test/SemaObjC/arc-invalid.m create mode 100644 test/SemaObjC/arc-objc-lifetime.m create mode 100644 test/SemaObjC/arc-readonly-property-ivar-1.m create mode 100644 test/SemaObjC/arc-readonly-property-ivar.m create mode 100644 test/SemaObjC/attr-root-class.m create mode 100644 test/SemaObjC/block-id-as-block-argtype.m create mode 100644 test/SemaObjC/block-on-method-param.m create mode 100644 test/SemaObjC/builtin_objc_nslog.m create mode 100644 test/SemaObjC/cocoa-api-usage.m create mode 100644 test/SemaObjC/cocoa-api-usage.m.fixed create mode 100644 test/SemaObjC/debugger-cast-result-to-id.m create mode 100644 test/SemaObjC/default-synthesize-3.m create mode 100644 test/SemaObjC/err-ivar-access-in-class-method.m create mode 100644 test/SemaObjC/forward-class-redeclare.m create mode 100644 test/SemaObjC/ignore-qualifier-on-qualified-id.m create mode 100644 test/SemaObjC/illegal-nonarc-bridged-cast.m create mode 100644 test/SemaObjC/narrow-property-type-in-cont-class.m create mode 100644 test/SemaObjC/no-ivar-access-control.m create mode 100644 test/SemaObjC/objc-array-literal.m create mode 100644 test/SemaObjC/objc-container-subscripting-1.m create mode 100644 test/SemaObjC/objc-container-subscripting-2.m create mode 100644 test/SemaObjC/objc-container-subscripting-3.m create mode 100644 test/SemaObjC/objc-container-subscripting.m create mode 100644 test/SemaObjC/objc-dictionary-literal.m create mode 100644 test/SemaObjC/objc-literal-nsnumber.m create mode 100644 test/SemaObjC/objc-literal-sig.m create mode 100644 test/SemaObjC/pragma-pack.m create mode 100644 test/SemaObjC/receiver-forward-class.m create mode 100644 test/SemaObjC/severe-syntax-error.m create mode 100644 test/SemaObjC/unknown-anytype.m create mode 100644 test/SemaObjC/warn-forward-class-attr-deprecated.m create mode 100644 test/SemaObjC/warn-unreachable.m create mode 100644 test/SemaObjC/weak-receiver-warn.m create mode 100644 test/SemaObjCXX/NSString-type.mm create mode 100644 test/SemaObjCXX/arc-ppe.mm create mode 100644 test/SemaObjCXX/arc-unbridged-cast.mm create mode 100644 test/SemaObjCXX/debugger-cast-result-to-id.mm create mode 100644 test/SemaObjCXX/fragile-abi-object-assign.m create mode 100644 test/SemaObjCXX/literals.mm create mode 100644 test/SemaObjCXX/objc-container-subscripting.mm create mode 100644 test/SemaObjCXX/objc-extern-c.mm create mode 100644 test/SemaOpenCL/address-spaces.cl delete mode 100644 test/SemaOpenCL/local.cl create mode 100644 test/SemaOpenCL/vec_compare.cl create mode 100644 test/SemaOpenCL/vector_literals_const.cl create mode 100644 test/SemaTemplate/constexpr-instantiate.cpp create mode 100644 test/SemaTemplate/crash-10438657.cpp create mode 100644 test/SemaTemplate/instantiate-self.cpp create mode 100644 test/SemaTemplate/instantiate-sizeof.cpp create mode 100644 test/SemaTemplate/instantiate-typeof.cpp create mode 100644 test/SemaTemplate/instantiation-order.cpp create mode 100644 test/SemaTemplate/ms-if-exists.cpp create mode 100644 test/SemaTemplate/nested-incomplete-class.cpp create mode 100644 test/SemaTemplate/pragma-ms_struct.cpp create mode 100644 test/Tooling/clang-check-pwd.cpp create mode 100644 test/Tooling/clang-check.cpp create mode 100644 tools/clang-check/CMakeLists.txt create mode 100644 tools/clang-check/ClangCheck.cpp create mode 100644 tools/clang-check/Makefile create mode 100644 tools/libclang/CXLoadedDiagnostic.cpp create mode 100644 tools/libclang/CXLoadedDiagnostic.h create mode 100644 tools/libclang/CXSourceLocation.cpp create mode 100644 tools/libclang/CXStoredDiagnostic.cpp create mode 100644 tools/libclang/CursorVisitor.h create mode 100644 tools/libclang/IndexBody.cpp create mode 100644 tools/libclang/IndexDecl.cpp create mode 100644 tools/libclang/IndexTypeSourceInfo.cpp create mode 100644 tools/libclang/Indexing.cpp create mode 100644 tools/libclang/IndexingContext.cpp create mode 100644 tools/libclang/IndexingContext.h delete mode 100644 unittests/AST/APValueTest.cpp delete mode 100644 unittests/AST/Makefile create mode 100644 unittests/Basic/SourceManagerTest.cpp create mode 100644 unittests/Lex/LexerTest.cpp create mode 100644 unittests/Lex/Makefile create mode 100644 unittests/Lex/PreprocessingRecordTest.cpp create mode 100644 unittests/Tooling/CompilationDatabaseTest.cpp create mode 100644 unittests/Tooling/Makefile create mode 100644 unittests/Tooling/ToolingTest.cpp create mode 100644 utils/find-unused-diagnostics.sh create mode 100644 www/analyzer/checker_dev_manual.html diff --git a/CMakeLists.txt b/CMakeLists.txt index 019168f5a9155..1197610f7b1fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,7 +204,8 @@ macro(add_clang_library name) endif(MSVC) install(TARGETS ${name} LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} + RUNTIME DESTINATION bin) set_target_properties(${name} PROPERTIES FOLDER "Clang libraries") endmacro(add_clang_library) @@ -223,6 +224,7 @@ install(DIRECTORY include/ FILES_MATCHING PATTERN "*.def" PATTERN "*.h" + PATTERN "config.h" EXCLUDE PATTERN ".svn" EXCLUDE ) @@ -233,7 +235,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ PATTERN "*.inc" ) -add_definitions( -D_GNU_SOURCE -DHAVE_CLANG_CONFIG_H ) +add_definitions( -D_GNU_SOURCE ) # Clang version information set(CLANG_EXECUTABLE_VERSION @@ -246,10 +248,8 @@ mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION) add_subdirectory(utils/TableGen) -option(CLANG_BUILD_EXAMPLES "Build CLANG example programs." OFF) -if(CLANG_BUILD_EXAMPLES) - add_subdirectory(examples) -endif () +option(CLANG_BUILD_EXAMPLES "Build CLANG example programs by default." OFF) +add_subdirectory(examples) add_subdirectory(include) add_subdirectory(lib) diff --git a/INPUTS/all-std-headers.cpp b/INPUTS/all-std-headers.cpp index bddf4ec163c40..5b5f4eca97918 100644 --- a/INPUTS/all-std-headers.cpp +++ b/INPUTS/all-std-headers.cpp @@ -44,8 +44,43 @@ #include #include #include -#include +#if __has_include() +#include +#endif #include #include #include #include + +#if __cplusplus >= 201103 || defined(__GXX_EXPERIMENTAL_CXX0X__) +#include +#if __has_include() +#include +#endif +#include +#if __has_include() +#include +#endif +#include +#include +#if __has_include() +#include +#endif +#include +#include +#include +#include +#include +#if __has_include() +#include +#endif +#include +#include +#include +#include +#if __has_include() +#include +#endif +#include +#include +#endif diff --git a/LICENSE.TXT b/LICENSE.TXT index 91895eba029d6..6c224f84c5bbe 100644 --- a/LICENSE.TXT +++ b/LICENSE.TXT @@ -4,7 +4,7 @@ LLVM Release License University of Illinois/NCSA Open Source License -Copyright (c) 2007-2011 University of Illinois at Urbana-Champaign. +Copyright (c) 2007-2012 University of Illinois at Urbana-Champaign. All rights reserved. Developed by: diff --git a/NOTES.txt b/NOTES.txt index 9f7ed4b9591c4..ca46d1cae478c 100644 --- a/NOTES.txt +++ b/NOTES.txt @@ -101,3 +101,14 @@ only if the non-reachability is not due to macro or template metaprogramming. //===---------------------------------------------------------------------===// + +We can still apply a modified version of the constructor/destructor +delegation optimization in cases of virtual inheritance where: + - there is no function-try-block, + - the constructor signature is not variadic, and + - the parameter variables can safely be copied and repassed + to the base constructor because either + - they have not had their addresses taken by the vbase initializers or + - they were passed indirectly. + +//===---------------------------------------------------------------------===// diff --git a/bindings/python/clang/cindex.py b/bindings/python/clang/cindex.py index 7cc9ddaf76467..b4563eb0c6240 100644 --- a/bindings/python/clang/cindex.py +++ b/bindings/python/clang/cindex.py @@ -63,6 +63,7 @@ call is efficient. # o implement additional SourceLocation, SourceRange, and File methods. from ctypes import * +import collections def get_cindex_library(): # FIXME: It's probably not the case that the library is actually found in @@ -111,10 +112,21 @@ class SourceLocation(Structure): if self._data is None: f, l, c, o = c_object_p(), c_uint(), c_uint(), c_uint() SourceLocation_loc(self, byref(f), byref(l), byref(c), byref(o)) - f = File(f) if f else None + if f: + f = File(f) + else: + f = None self._data = (f, int(l.value), int(c.value), int(o.value)) return self._data + @staticmethod + def from_position(tu, file, line, column): + """ + Retrieve the source location associated with a given file/line/column in + a particular translation unit. + """ + return SourceLocation_getLocation(tu, file, line, column) + @property def file(self): """Get the file represented by this source location.""" @@ -135,9 +147,19 @@ class SourceLocation(Structure): """Get the file offset represented by this source location.""" return self._get_instantiation()[3] + def __eq__(self, other): + return SourceLocation_equalLocations(self, other) + + def __ne__(self, other): + return not self.__eq__(other) + def __repr__(self): + if self.file: + filename = self.file.name + else: + filename = None return "" % ( - self.file.name if self.file else None, self.line, self.column) + filename, self.line, self.column) class SourceRange(Structure): """ @@ -171,6 +193,12 @@ class SourceRange(Structure): """ return SourceRange_end(self) + def __eq__(self, other): + return SourceRange_equalRanges(self, other) + + def __ne__(self, other): + return not self.__eq__(other) + def __repr__(self): return "" % (self.start, self.end) @@ -215,8 +243,8 @@ class Diagnostic(object): return int(_clang_getDiagnosticNumRanges(self.diag)) def __getitem__(self, key): - if (key >= len(self)): - raise IndexError + if (key >= len(self)): + raise IndexError return _clang_getDiagnosticRange(self.diag, key) return RangeIterator(self) @@ -240,6 +268,29 @@ class Diagnostic(object): return FixItIterator(self) + @property + def category_number(self): + """The category number for this diagnostic.""" + return _clang_getDiagnosticCategory(self) + + @property + def category_name(self): + """The string name of the category for this diagnostic.""" + return _clang_getDiagnosticCategoryName(self.category_number) + + @property + def option(self): + """The command-line option that enables this diagnostic.""" + return _clang_getDiagnosticOption(self, None) + + @property + def disable_option(self): + """The command-line option that disables this diagnostic.""" + disable = _CXString() + _clang_getDiagnosticOption(self, byref(disable)) + + return _CXString_getCString(disable) + def __repr__(self): return "" % ( self.severity, self.location, self.spelling) @@ -329,6 +380,18 @@ class CursorKind(object): """Test if this is an invalid kind.""" return CursorKind_is_inv(self) + def is_translation_unit(self): + """Test if this is a translation unit kind.""" + return CursorKind_is_translation_unit(self) + + def is_preprocessing(self): + """Test if this is a preprocessing kind.""" + return CursorKind_is_preprocessing(self) + + def is_unexposed(self): + """Test if this is an unexposed kind.""" + return CursorKind_is_unexposed(self) + def __repr__(self): return 'CursorKind.%s' % (self.name,) @@ -592,7 +655,7 @@ CursorKind.ADDR_LABEL_EXPR = CursorKind(120) # This is the GNU Statement Expression extension: ({int X=4; X;}) CursorKind.StmtExpr = CursorKind(121) -# Represents a C1X generic selection. +# Represents a C11 generic selection. CursorKind.GENERIC_SELECTION_EXPR = CursorKind(122) # Implements the GNU __null extension, which is a name for a null @@ -801,6 +864,11 @@ CursorKind.IB_ACTION_ATTR = CursorKind(401) CursorKind.IB_OUTLET_ATTR = CursorKind(402) CursorKind.IB_OUTLET_COLLECTION_ATTR = CursorKind(403) +CursorKind.CXX_FINAL_ATTR = CursorKind(404) +CursorKind.CXX_OVERRIDE_ATTR = CursorKind(405) +CursorKind.ANNOTATE_ATTR = CursorKind(406) +CursorKind.ASM_LABEL_ATTR = CursorKind(407) + ### # Preprocessing CursorKind.PREPROCESSING_DIRECTIVE = CursorKind(500) @@ -817,11 +885,15 @@ class Cursor(Structure): """ _fields_ = [("_kind_id", c_int), ("xdata", c_int), ("data", c_void_p * 3)] + @staticmethod + def from_location(tu, location): + return Cursor_get(tu, location) + def __eq__(self, other): return Cursor_eq(self, other) def __ne__(self, other): - return not Cursor_eq(self, other) + return not self.__eq__(other) def is_definition(self): """ @@ -903,13 +975,54 @@ class Cursor(Structure): @property def type(self): """ - Retrieve the type (if any) of of the entity pointed at by the - cursor. + Retrieve the Type (if any) of the entity pointed at by the cursor. """ if not hasattr(self, '_type'): self._type = Cursor_type(self) return self._type + @property + def underlying_typedef_type(self): + """Return the underlying type of a typedef declaration. + + Returns a Type for the typedef this cursor is a declaration for. If + the current cursor is not a typedef, this raises. + """ + if not hasattr(self, '_underlying_type'): + assert self.kind.is_declaration() + self._underlying_type = Cursor_underlying_type(self) + + return self._underlying_type + + @property + def enum_type(self): + """Return the integer type of an enum declaration. + + Returns a Type corresponding to an integer. If the cursor is not for an + enum, this raises. + """ + if not hasattr(self, '_enum_type'): + assert self.kind == CursorKind.ENUM_DECL + self._enum_type = Cursor_enum_type(self) + + return self._enum_type + + @property + def objc_type_encoding(self): + """Return the Objective-C type encoding as a str.""" + if not hasattr(self, '_objc_type_encoding'): + self._objc_type_encoding = Cursor_objc_type_encoding(self) + + return self._objc_type_encoding + + @property + def hash(self): + """Returns a hash of the cursor as an int.""" + if not hasattr(self, '_hash'): + self._hash = Cursor_hash(self) + + return self._hash + def get_children(self): """Return an iterator for accessing the children of this cursor.""" @@ -969,7 +1082,7 @@ class TypeKind(object): @staticmethod def from_id(id): if id >= len(TypeKind._kinds) or TypeKind._kinds[id] is None: - raise ValueError,'Unknown cursor kind' + raise ValueError,'Unknown type kind %d' % id return TypeKind._kinds[id] def __repr__(self): @@ -1020,6 +1133,7 @@ TypeKind.OBJCOBJECTPOINTER = TypeKind(109) TypeKind.FUNCTIONNOPROTO = TypeKind(110) TypeKind.FUNCTIONPROTO = TypeKind(111) TypeKind.CONSTANTARRAY = TypeKind(112) +TypeKind.VECTOR = TypeKind(113) class Type(Structure): """ @@ -1032,6 +1146,71 @@ class Type(Structure): """Return the kind of this type.""" return TypeKind.from_id(self._kind_id) + def argument_types(self): + """Retrieve a container for the non-variadic arguments for this type. + + The returned object is iterable and indexable. Each item in the + container is a Type instance. + """ + class ArgumentsIterator(collections.Sequence): + def __init__(self, parent): + self.parent = parent + self.length = None + + def __len__(self): + if self.length is None: + self.length = Type_get_num_arg_types(self.parent) + + return self.length + + def __getitem__(self, key): + # FIXME Support slice objects. + if not isinstance(key, int): + raise TypeError("Must supply a non-negative int.") + + if key < 0: + raise IndexError("Only non-negative indexes are accepted.") + + if key >= len(self): + raise IndexError("Index greater than container length: " + "%d > %d" % ( key, len(self) )) + + result = Type_get_arg_type(self.parent, key) + if result.kind == TypeKind.INVALID: + raise IndexError("Argument could not be retrieved.") + + return result + + assert self.kind == TypeKind.FUNCTIONPROTO + return ArgumentsIterator(self) + + @property + def element_type(self): + """Retrieve the Type of elements within this Type. + + If accessed on a type that is not an array, complex, or vector type, an + exception will be raised. + """ + result = Type_get_element_type(self) + if result.kind == TypeKind.INVALID: + raise Exception('Element type not available on this type.') + + return result + + @property + def element_count(self): + """Retrieve the number of elements in this type. + + Returns an int. + + If the Type is not an array or vector, this raises. + """ + result = Type_get_num_elements(self) + if result < 0: + raise Exception('Type does not have elements.') + + return result + @staticmethod def from_result(res, fn, args): assert isinstance(res, Type) @@ -1050,29 +1229,39 @@ class Type(Structure): return Type_get_canonical(self) def is_const_qualified(self): - """ - Determine whether a Type has the "const" qualifier set, - without looking through typedefs that may have added "const" + """Determine whether a Type has the "const" qualifier set. + + This does not look through typedefs that may have added "const" at a different level. """ return Type_is_const_qualified(self) def is_volatile_qualified(self): - """ - Determine whether a Type has the "volatile" qualifier set, - without looking through typedefs that may have added - "volatile" at a different level. + """Determine whether a Type has the "volatile" qualifier set. + + This does not look through typedefs that may have added "volatile" + at a different level. """ return Type_is_volatile_qualified(self) def is_restrict_qualified(self): - """ - Determine whether a Type has the "restrict" qualifier set, - without looking through typedefs that may have added - "restrict" at a different level. + """Determine whether a Type has the "restrict" qualifier set. + + This does not look through typedefs that may have added "restrict" at + a different level. """ return Type_is_restrict_qualified(self) + def is_function_variadic(self): + """Determine whether this function Type is a variadic function type.""" + assert self.kind == TypeKind.FUNCTIONPROTO + + return Type_is_variadic(self) + + def is_pod(self): + """Determine whether this Type represents plain old data (POD).""" + return Type_is_pod(self) + def get_pointee(self): """ For pointer types, returns the type of the pointee. @@ -1091,6 +1280,27 @@ class Type(Structure): """ return Type_get_result(self) + def get_array_element_type(self): + """ + Retrieve the type of the elements of the array type. + """ + return Type_get_array_element(self) + + def get_array_size(self): + """ + Retrieve the size of the constant array. + """ + return Type_get_array_size(self) + + def __eq__(self, other): + if type(other) != type(self): + return False + + return Type_equal(self, other) + + def __ne__(self, other): + return not self.__eq__(other) + ## CIndex Objects ## # CIndex objects (derived from ClangObject) are essentially lightweight @@ -1157,6 +1367,20 @@ _clang_getDiagnosticFixIt.argtypes = [Diagnostic, c_uint, POINTER(SourceRange)] _clang_getDiagnosticFixIt.restype = _CXString _clang_getDiagnosticFixIt.errcheck = _CXString.from_result +_clang_getDiagnosticCategory = lib.clang_getDiagnosticCategory +_clang_getDiagnosticCategory.argtypes = [Diagnostic] +_clang_getDiagnosticCategory.restype = c_uint + +_clang_getDiagnosticCategoryName = lib.clang_getDiagnosticCategoryName +_clang_getDiagnosticCategoryName.argtypes = [c_uint] +_clang_getDiagnosticCategoryName.restype = _CXString +_clang_getDiagnosticCategoryName.errcheck = _CXString.from_result + +_clang_getDiagnosticOption = lib.clang_getDiagnosticOption +_clang_getDiagnosticOption.argtypes = [Diagnostic, POINTER(_CXString)] +_clang_getDiagnosticOption.restype = _CXString +_clang_getDiagnosticOption.errcheck = _CXString.from_result + ### class CompletionChunk: @@ -1350,7 +1574,9 @@ class Index(ClangObject): def read(self, path): """Load the translation unit from the given AST file.""" ptr = TranslationUnit_read(self, path) - return TranslationUnit(ptr) if ptr else None + if ptr: + return TranslationUnit(ptr) + return None def parse(self, path, args = [], unsaved_files = [], options = 0): """ @@ -1383,7 +1609,9 @@ class Index(ClangObject): ptr = TranslationUnit_parse(self, path, arg_array, len(args), unsaved_files_array, len(unsaved_files), options) - return TranslationUnit(ptr) if ptr else None + if ptr: + return TranslationUnit(ptr) + return None class TranslationUnit(ClangObject): @@ -1502,8 +1730,9 @@ class TranslationUnit(ClangObject): unsaved_files_array, len(unsaved_files), options) - return CodeCompletionResults(ptr) if ptr else None - + if ptr: + return CodeCompletionResults(ptr) + return None class File(ClangObject): """ @@ -1511,6 +1740,11 @@ class File(ClangObject): translation unit. """ + @staticmethod + def from_name(translation_unit, file_name): + """Retrieve a file handle within the given translation unit.""" + return File(File_getFile(translation_unit, file_name)) + @property def name(self): """Return the complete file and path name of the file.""" @@ -1521,6 +1755,12 @@ class File(ClangObject): """Return the last modification time of the file.""" return File_time(self) + def __str__(self): + return self.name + + def __repr__(self): + return "" % (self.name) + class FileInclusion(object): """ The FileInclusion class represents the inclusion of one source file by @@ -1557,6 +1797,14 @@ SourceLocation_loc.argtypes = [SourceLocation, POINTER(c_object_p), POINTER(c_uint), POINTER(c_uint), POINTER(c_uint)] +SourceLocation_getLocation = lib.clang_getLocation +SourceLocation_getLocation.argtypes = [TranslationUnit, File, c_uint, c_uint] +SourceLocation_getLocation.restype = SourceLocation + +SourceLocation_equalLocations = lib.clang_equalLocations +SourceLocation_equalLocations.argtypes = [SourceLocation, SourceLocation] +SourceLocation_equalLocations.restype = bool + # Source Range Functions SourceRange_getRange = lib.clang_getRange SourceRange_getRange.argtypes = [SourceLocation, SourceLocation] @@ -1570,6 +1818,10 @@ SourceRange_end = lib.clang_getRangeEnd SourceRange_end.argtypes = [SourceRange] SourceRange_end.restype = SourceLocation +SourceRange_equalRanges = lib.clang_equalRanges +SourceRange_equalRanges.argtypes = [SourceRange, SourceRange] +SourceRange_equalRanges.restype = bool + # CursorKind Functions CursorKind_is_decl = lib.clang_isDeclaration CursorKind_is_decl.argtypes = [CursorKind] @@ -1595,6 +1847,18 @@ CursorKind_is_inv = lib.clang_isInvalid CursorKind_is_inv.argtypes = [CursorKind] CursorKind_is_inv.restype = bool +CursorKind_is_translation_unit = lib.clang_isTranslationUnit +CursorKind_is_translation_unit.argtypes = [CursorKind] +CursorKind_is_translation_unit.restype = bool + +CursorKind_is_preprocessing = lib.clang_isPreprocessing +CursorKind_is_preprocessing.argtypes = [CursorKind] +CursorKind_is_preprocessing.restype = bool + +CursorKind_is_unexposed = lib.clang_isUnexposed +CursorKind_is_unexposed.argtypes = [CursorKind] +CursorKind_is_unexposed.restype = bool + # Cursor Functions # TODO: Implement this function Cursor_get = lib.clang_getCursor @@ -1620,7 +1884,11 @@ Cursor_def.errcheck = Cursor.from_result Cursor_eq = lib.clang_equalCursors Cursor_eq.argtypes = [Cursor, Cursor] -Cursor_eq.restype = c_uint +Cursor_eq.restype = bool + +Cursor_hash = lib.clang_hashCursor +Cursor_hash.argtypes = [Cursor] +Cursor_hash.restype = c_uint Cursor_spelling = lib.clang_getCursorSpelling Cursor_spelling.argtypes = [Cursor] @@ -1650,6 +1918,21 @@ Cursor_type.argtypes = [Cursor] Cursor_type.restype = Type Cursor_type.errcheck = Type.from_result +Cursor_underlying_type = lib.clang_getTypedefDeclUnderlyingType +Cursor_underlying_type.argtypes = [Cursor] +Cursor_underlying_type.restype = Type +Cursor_underlying_type.errcheck = Type.from_result + +Cursor_enum_type = lib.clang_getEnumDeclIntegerType +Cursor_enum_type.argtypes = [Cursor] +Cursor_enum_type.restype = Type +Cursor_enum_type.errcheck = Type.from_result + +Cursor_objc_type_encoding = lib.clang_getDeclObjCTypeEncoding +Cursor_objc_type_encoding.argtypes = [Cursor] +Cursor_objc_type_encoding.restype = _CXString +Cursor_objc_type_encoding.errcheck = _CXString.from_result + Cursor_visit_callback = CFUNCTYPE(c_int, Cursor, Cursor, py_object) Cursor_visit = lib.clang_visitChildren Cursor_visit.argtypes = [Cursor, Cursor_visit_callback, py_object] @@ -1673,6 +1956,14 @@ Type_is_restrict_qualified = lib.clang_isRestrictQualifiedType Type_is_restrict_qualified.argtypes = [Type] Type_is_restrict_qualified.restype = bool +Type_is_pod = lib.clang_isPODType +Type_is_pod.argtypes = [Type] +Type_is_pod.restype = bool + +Type_is_variadic = lib.clang_isFunctionTypeVariadic +Type_is_variadic.argtypes = [Type] +Type_is_variadic.restype = bool + Type_get_pointee = lib.clang_getPointeeType Type_get_pointee.argtypes = [Type] Type_get_pointee.restype = Type @@ -1688,6 +1979,36 @@ Type_get_result.argtypes = [Type] Type_get_result.restype = Type Type_get_result.errcheck = Type.from_result +Type_get_num_arg_types = lib.clang_getNumArgTypes +Type_get_num_arg_types.argtypes = [Type] +Type_get_num_arg_types.restype = c_uint + +Type_get_arg_type = lib.clang_getArgType +Type_get_arg_type.argtypes = [Type, c_uint] +Type_get_arg_type.restype = Type +Type_get_arg_type.errcheck = Type.from_result +Type_get_element_type = lib.clang_getElementType + +Type_get_element_type.argtypes = [Type] +Type_get_element_type.restype = Type +Type_get_element_type.errcheck = Type.from_result + +Type_get_num_elements = lib.clang_getNumElements +Type_get_num_elements.argtypes = [Type] +Type_get_num_elements.restype = c_longlong + +Type_get_array_element = lib.clang_getArrayElementType +Type_get_array_element.argtypes = [Type] +Type_get_array_element.restype = Type +Type_get_array_element.errcheck = Type.from_result + +Type_get_array_size = lib.clang_getArraySize +Type_get_array_size.argtype = [Type] +Type_get_array_size.restype = c_longlong + +Type_equal = lib.clang_equalTypes +Type_equal.argtypes = [Type, Type] +Type_equal.restype = bool # Index Functions Index_create = lib.clang_createIndex @@ -1739,6 +2060,10 @@ TranslationUnit_includes.argtypes = [TranslationUnit, py_object] # File Functions +File_getFile = lib.clang_getFile +File_getFile.argtypes = [TranslationUnit, c_char_p] +File_getFile.restype = c_object_p + File_name = lib.clang_getFileName File_name.argtypes = [File] File_name.restype = _CXString diff --git a/bindings/python/tests/cindex/test_cursor.py b/bindings/python/tests/cindex/test_cursor.py index 3dde891a9c264..9f02bb2a76863 100644 --- a/bindings/python/tests/cindex/test_cursor.py +++ b/bindings/python/tests/cindex/test_cursor.py @@ -1,4 +1,7 @@ -from clang.cindex import Index, CursorKind, TypeKind +from clang.cindex import CursorKind +from clang.cindex import TypeKind +from .util import get_cursor +from .util import get_tu kInput = """\ // FIXME: Find nicer way to drop builtins and other cruft. @@ -24,9 +27,8 @@ void f0(int a0, int a1) { """ def test_get_children(): - index = Index.create() - tu = index.parse('t.c', unsaved_files = [('t.c',kInput)]) - + tu = get_tu(kInput) + # Skip until past start_decl. it = tu.cursor.get_children() while it.next().spelling != 'start_decl': @@ -36,12 +38,14 @@ def test_get_children(): assert len(tu_nodes) == 3 + assert tu_nodes[0] != tu_nodes[1] assert tu_nodes[0].kind == CursorKind.STRUCT_DECL assert tu_nodes[0].spelling == 's0' assert tu_nodes[0].is_definition() == True assert tu_nodes[0].location.file.name == 't.c' assert tu_nodes[0].location.line == 4 assert tu_nodes[0].location.column == 8 + assert tu_nodes[0].hash > 0 s0_nodes = list(tu_nodes[0].get_children()) assert len(s0_nodes) == 2 @@ -61,3 +65,28 @@ def test_get_children(): assert tu_nodes[2].spelling == 'f0' assert tu_nodes[2].displayname == 'f0(int, int)' assert tu_nodes[2].is_definition() == True + +def test_underlying_type(): + tu = get_tu('typedef int foo;') + typedef = get_cursor(tu, 'foo') + assert typedef is not None + + assert typedef.kind.is_declaration() + underlying = typedef.underlying_typedef_type + assert underlying.kind == TypeKind.INT + +def test_enum_type(): + tu = get_tu('enum TEST { FOO=1, BAR=2 };') + enum = get_cursor(tu, 'TEST') + assert enum is not None + + assert enum.kind == CursorKind.ENUM_DECL + enum_type = enum.enum_type + assert enum_type.kind == TypeKind.UINT + +def test_objc_type_encoding(): + tu = get_tu('int i;', lang='objc') + i = get_cursor(tu, 'i') + + assert i is not None + assert i.objc_type_encoding == 'i' diff --git a/bindings/python/tests/cindex/test_cursor_kind.py b/bindings/python/tests/cindex/test_cursor_kind.py index d7a1cfad8f946..f8466e5e0d1d6 100644 --- a/bindings/python/tests/cindex/test_cursor_kind.py +++ b/bindings/python/tests/cindex/test_cursor_kind.py @@ -16,6 +16,15 @@ def test_kind_groups(): assert CursorKind.UNEXPOSED_STMT.is_statement() assert CursorKind.INVALID_FILE.is_invalid() + assert CursorKind.TRANSLATION_UNIT.is_translation_unit() + assert not CursorKind.TYPE_REF.is_translation_unit() + + assert CursorKind.PREPROCESSING_DIRECTIVE.is_preprocessing() + assert not CursorKind.TYPE_REF.is_preprocessing() + + assert CursorKind.UNEXPOSED_DECL.is_unexposed() + assert not CursorKind.TYPE_REF.is_unexposed() + for k in CursorKind.get_all_kinds(): group = [n for n in ('is_declaration', 'is_reference', 'is_expression', 'is_statement', 'is_invalid', 'is_attribute') diff --git a/bindings/python/tests/cindex/test_diagnostics.py b/bindings/python/tests/cindex/test_diagnostics.py index 98f97d3bd3b13..48ab6176fd1df 100644 --- a/bindings/python/tests/cindex/test_diagnostics.py +++ b/bindings/python/tests/cindex/test_diagnostics.py @@ -1,14 +1,10 @@ from clang.cindex import * - -def tu_from_source(source): - index = Index.create() - tu = index.parse('INPUT.c', unsaved_files = [('INPUT.c', source)]) - return tu +from .util import get_tu # FIXME: We need support for invalid translation units to test better. def test_diagnostic_warning(): - tu = tu_from_source("""int f0() {}\n""") + tu = get_tu('int f0() {}\n') assert len(tu.diagnostics) == 1 assert tu.diagnostics[0].severity == Diagnostic.Warning assert tu.diagnostics[0].location.line == 1 @@ -18,8 +14,7 @@ def test_diagnostic_warning(): def test_diagnostic_note(): # FIXME: We aren't getting notes here for some reason. - index = Index.create() - tu = tu_from_source("""#define A x\nvoid *A = 1;\n""") + tu = get_tu('#define A x\nvoid *A = 1;\n') assert len(tu.diagnostics) == 1 assert tu.diagnostics[0].severity == Diagnostic.Warning assert tu.diagnostics[0].location.line == 2 @@ -31,8 +26,7 @@ def test_diagnostic_note(): # assert tu.diagnostics[1].spelling == 'instantiated from' def test_diagnostic_fixit(): - index = Index.create() - tu = tu_from_source("""struct { int f0; } x = { f0 : 1 };""") + tu = get_tu('struct { int f0; } x = { f0 : 1 };') assert len(tu.diagnostics) == 1 assert tu.diagnostics[0].severity == Diagnostic.Warning assert tu.diagnostics[0].location.line == 1 @@ -46,8 +40,7 @@ def test_diagnostic_fixit(): 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; }""") + tu = get_tu('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 @@ -65,5 +58,25 @@ def test_diagnostic_range(): assert True else: assert False - +def test_diagnostic_category(): + """Ensure that category properties work.""" + tu = get_tu('int f(int i) { return 7; }', all_warnings=True) + assert len(tu.diagnostics) == 1 + d = tu.diagnostics[0] + + assert d.severity == Diagnostic.Warning + assert d.location.line == 1 + assert d.location.column == 11 + + assert d.category_number == 2 + assert d.category_name == 'Semantic Issue' + +def test_diagnostic_option(): + """Ensure that category option properties work.""" + tu = get_tu('int f(int i) { return 7; }', all_warnings=True) + assert len(tu.diagnostics) == 1 + d = tu.diagnostics[0] + + assert d.option == '-Wunused-parameter' + assert d.disable_option == '-Wno-unused-parameter' diff --git a/bindings/python/tests/cindex/test_file.py b/bindings/python/tests/cindex/test_file.py new file mode 100644 index 0000000000000..146e8c5705287 --- /dev/null +++ b/bindings/python/tests/cindex/test_file.py @@ -0,0 +1,9 @@ +from clang.cindex import Index, File + +def test_file(): + index = Index.create() + tu = index.parse('t.c', unsaved_files = [('t.c', "")]) + file = File.from_name(tu, "t.c") + assert str(file) == "t.c" + assert file.name == "t.c" + assert repr(file) == "" diff --git a/bindings/python/tests/cindex/test_location.py b/bindings/python/tests/cindex/test_location.py index 47c1c6021f554..528676ef14b57 100644 --- a/bindings/python/tests/cindex/test_location.py +++ b/bindings/python/tests/cindex/test_location.py @@ -1,4 +1,9 @@ -from clang.cindex import Index +from clang.cindex import Cursor +from clang.cindex import File +from clang.cindex import SourceLocation +from clang.cindex import SourceRange +from .util import get_cursor +from .util import get_tu baseInput="int one;\nint two;\n" @@ -8,43 +13,74 @@ def assert_location(loc, line, column, offset): assert loc.offset == offset def test_location(): - index = Index.create() - tu = index.parse('t.c', unsaved_files = [('t.c',baseInput)]) + tu = get_tu(baseInput) + one = get_cursor(tu, 'one') + two = get_cursor(tu, 'two') - for n in tu.cursor.get_children(): - if n.spelling == 'one': - assert_location(n.location,line=1,column=5,offset=4) - if n.spelling == 'two': - assert_location(n.location,line=2,column=5,offset=13) + assert one is not None + assert two is not None + + assert_location(one.location,line=1,column=5,offset=4) + assert_location(two.location,line=2,column=5,offset=13) # adding a linebreak at top should keep columns same - tu = index.parse('t.c', unsaved_files = [('t.c',"\n"+baseInput)]) + tu = get_tu('\n' + baseInput) + one = get_cursor(tu, 'one') + two = get_cursor(tu, 'two') + + assert one is not None + assert two is not None - for n in tu.cursor.get_children(): - if n.spelling == 'one': - assert_location(n.location,line=2,column=5,offset=5) - if n.spelling == 'two': - assert_location(n.location,line=3,column=5,offset=14) + assert_location(one.location,line=2,column=5,offset=5) + assert_location(two.location,line=3,column=5,offset=14) # adding a space should affect column on first line only - tu = index.parse('t.c', unsaved_files = [('t.c'," "+baseInput)]) + tu = get_tu(' ' + baseInput) + one = get_cursor(tu, 'one') + two = get_cursor(tu, 'two') + + assert_location(one.location,line=1,column=6,offset=5) + assert_location(two.location,line=2,column=5,offset=14) + + # define the expected location ourselves and see if it matches + # the returned location + tu = get_tu(baseInput) + + file = File.from_name(tu, 't.c') + location = SourceLocation.from_position(tu, file, 1, 5) + cursor = Cursor.from_location(tu, location) + + one = get_cursor(tu, 'one') + assert one is not None + assert one == cursor - for n in tu.cursor.get_children(): - if n.spelling == 'one': - assert_location(n.location,line=1,column=6,offset=5) - if n.spelling == 'two': - assert_location(n.location,line=2,column=5,offset=14) + # Ensure locations referring to the same entity are equivalent. + location2 = SourceLocation.from_position(tu, file, 1, 5) + assert location == location2 + location3 = SourceLocation.from_position(tu, file, 1, 4) + assert location2 != location3 def test_extent(): - index = Index.create() - tu = index.parse('t.c', unsaved_files = [('t.c',baseInput)]) - - for n in tu.cursor.get_children(): - if n.spelling == 'one': - assert_location(n.extent.start,line=1,column=1,offset=0) - assert_location(n.extent.end,line=1,column=8,offset=7) - assert baseInput[n.extent.start.offset:n.extent.end.offset] == "int one" - if n.spelling == 'two': - assert_location(n.extent.start,line=2,column=1,offset=9) - assert_location(n.extent.end,line=2,column=8,offset=16) - assert baseInput[n.extent.start.offset:n.extent.end.offset] == "int two" + tu = get_tu(baseInput) + one = get_cursor(tu, 'one') + two = get_cursor(tu, 'two') + + assert_location(one.extent.start,line=1,column=1,offset=0) + assert_location(one.extent.end,line=1,column=8,offset=7) + assert baseInput[one.extent.start.offset:one.extent.end.offset] == "int one" + + assert_location(two.extent.start,line=2,column=1,offset=9) + assert_location(two.extent.end,line=2,column=8,offset=16) + assert baseInput[two.extent.start.offset:two.extent.end.offset] == "int two" + + file = File.from_name(tu, 't.c') + location1 = SourceLocation.from_position(tu, file, 1, 1) + location2 = SourceLocation.from_position(tu, file, 1, 8) + + range1 = SourceRange.from_locations(location1, location2) + range2 = SourceRange.from_locations(location1, location2) + assert range1 == range2 + + location3 = SourceLocation.from_position(tu, file, 1, 6) + range3 = SourceRange.from_locations(location1, location3) + assert range1 != range3 diff --git a/bindings/python/tests/cindex/test_type.py b/bindings/python/tests/cindex/test_type.py index 35c7bbbfa2fa7..ed852103b94ae 100644 --- a/bindings/python/tests/cindex/test_type.py +++ b/bindings/python/tests/cindex/test_type.py @@ -1,4 +1,9 @@ -from clang.cindex import Index, CursorKind, TypeKind +from clang.cindex import CursorKind +from clang.cindex import Index +from clang.cindex import TypeKind +from nose.tools import raises +from .util import get_cursor +from .util import get_tu kInput = """\ @@ -18,63 +23,55 @@ struct teststruct { """ def test_a_struct(): - index = Index.create() - tu = index.parse('t.c', unsaved_files = [('t.c',kInput)]) + tu = get_tu(kInput) - for n in tu.cursor.get_children(): - if n.spelling == 'teststruct': - fields = list(n.get_children()) + teststruct = get_cursor(tu, 'teststruct') + assert teststruct is not None, "Could not find teststruct." + fields = list(teststruct.get_children()) + assert all(x.kind == CursorKind.FIELD_DECL for x in fields) - assert all(x.kind == CursorKind.FIELD_DECL for x in fields) + assert fields[0].spelling == 'a' + assert not fields[0].type.is_const_qualified() + assert fields[0].type.kind == TypeKind.INT + assert fields[0].type.get_canonical().kind == TypeKind.INT - assert fields[0].spelling == 'a' - assert not fields[0].type.is_const_qualified() - assert fields[0].type.kind == TypeKind.INT - assert fields[0].type.get_canonical().kind == TypeKind.INT + assert fields[1].spelling == 'b' + assert not fields[1].type.is_const_qualified() + assert fields[1].type.kind == TypeKind.TYPEDEF + assert fields[1].type.get_canonical().kind == TypeKind.INT + assert fields[1].type.get_declaration().spelling == 'I' - assert fields[1].spelling == 'b' - assert not fields[1].type.is_const_qualified() - assert fields[1].type.kind == TypeKind.TYPEDEF - assert fields[1].type.get_canonical().kind == TypeKind.INT - assert fields[1].type.get_declaration().spelling == 'I' + assert fields[2].spelling == 'c' + assert not fields[2].type.is_const_qualified() + assert fields[2].type.kind == TypeKind.LONG + assert fields[2].type.get_canonical().kind == TypeKind.LONG - assert fields[2].spelling == 'c' - assert not fields[2].type.is_const_qualified() - assert fields[2].type.kind == TypeKind.LONG - assert fields[2].type.get_canonical().kind == TypeKind.LONG + assert fields[3].spelling == 'd' + assert not fields[3].type.is_const_qualified() + assert fields[3].type.kind == TypeKind.ULONG + assert fields[3].type.get_canonical().kind == TypeKind.ULONG - assert fields[3].spelling == 'd' - assert not fields[3].type.is_const_qualified() - assert fields[3].type.kind == TypeKind.ULONG - assert fields[3].type.get_canonical().kind == TypeKind.ULONG + assert fields[4].spelling == 'e' + assert not fields[4].type.is_const_qualified() + assert fields[4].type.kind == TypeKind.LONG + assert fields[4].type.get_canonical().kind == TypeKind.LONG - assert fields[4].spelling == 'e' - assert not fields[4].type.is_const_qualified() - assert fields[4].type.kind == TypeKind.LONG - assert fields[4].type.get_canonical().kind == TypeKind.LONG + assert fields[5].spelling == 'f' + assert fields[5].type.is_const_qualified() + assert fields[5].type.kind == TypeKind.INT + assert fields[5].type.get_canonical().kind == TypeKind.INT - assert fields[5].spelling == 'f' - assert fields[5].type.is_const_qualified() - assert fields[5].type.kind == TypeKind.INT - assert fields[5].type.get_canonical().kind == TypeKind.INT - - assert fields[6].spelling == 'g' - assert not fields[6].type.is_const_qualified() - assert fields[6].type.kind == TypeKind.POINTER - assert fields[6].type.get_pointee().kind == TypeKind.INT - - assert fields[7].spelling == 'h' - assert not fields[7].type.is_const_qualified() - assert fields[7].type.kind == TypeKind.POINTER - assert fields[7].type.get_pointee().kind == TypeKind.POINTER - assert fields[7].type.get_pointee().get_pointee().kind == TypeKind.POINTER - assert fields[7].type.get_pointee().get_pointee().get_pointee().kind == TypeKind.INT - - break - - else: - assert False, "Didn't find teststruct??" + assert fields[6].spelling == 'g' + assert not fields[6].type.is_const_qualified() + assert fields[6].type.kind == TypeKind.POINTER + assert fields[6].type.get_pointee().kind == TypeKind.INT + assert fields[7].spelling == 'h' + assert not fields[7].type.is_const_qualified() + assert fields[7].type.kind == TypeKind.POINTER + assert fields[7].type.get_pointee().kind == TypeKind.POINTER + assert fields[7].type.get_pointee().get_pointee().kind == TypeKind.POINTER + assert fields[7].type.get_pointee().get_pointee().get_pointee().kind == TypeKind.INT constarrayInput=""" struct teststruct { @@ -82,14 +79,191 @@ struct teststruct { }; """ def testConstantArray(): - index = Index.create() - tu = index.parse('t.c', unsaved_files = [('t.c',constarrayInput)]) - - for n in tu.cursor.get_children(): - if n.spelling == 'teststruct': - fields = list(n.get_children()) - assert fields[0].spelling == 'A' - assert fields[0].type.kind == TypeKind.CONSTANTARRAY - break - else: - assert False, "Didn't find teststruct??" + tu = get_tu(constarrayInput) + + teststruct = get_cursor(tu, 'teststruct') + assert teststruct is not None, "Didn't find teststruct??" + fields = list(teststruct.get_children()) + assert fields[0].spelling == 'A' + assert fields[0].type.kind == TypeKind.CONSTANTARRAY + assert fields[0].type.get_array_element_type() is not None + assert fields[0].type.get_array_element_type().kind == TypeKind.POINTER + assert fields[0].type.get_array_size() == 2 + +def test_equal(): + """Ensure equivalence operators work on Type.""" + source = 'int a; int b; void *v;' + tu = get_tu(source) + + a = get_cursor(tu, 'a') + b = get_cursor(tu, 'b') + v = get_cursor(tu, 'v') + + assert a is not None + assert b is not None + assert v is not None + + assert a.type == b.type + assert a.type != v.type + + assert a.type != None + assert a.type != 'foo' + +def test_function_argument_types(): + """Ensure that Type.argument_types() works as expected.""" + tu = get_tu('void f(int, int);') + f = get_cursor(tu, 'f') + assert f is not None + + args = f.type.argument_types() + assert args is not None + assert len(args) == 2 + + t0 = args[0] + assert t0 is not None + assert t0.kind == TypeKind.INT + + t1 = args[1] + assert t1 is not None + assert t1.kind == TypeKind.INT + + args2 = list(args) + assert len(args2) == 2 + assert t0 == args2[0] + assert t1 == args2[1] + +@raises(TypeError) +def test_argument_types_string_key(): + """Ensure that non-int keys raise a TypeError.""" + tu = get_tu('void f(int, int);') + f = get_cursor(tu, 'f') + assert f is not None + + args = f.type.argument_types() + assert len(args) == 2 + + args['foo'] + +@raises(IndexError) +def test_argument_types_negative_index(): + """Ensure that negative indexes on argument_types Raises an IndexError.""" + tu = get_tu('void f(int, int);') + f = get_cursor(tu, 'f') + args = f.type.argument_types() + + args[-1] + +@raises(IndexError) +def test_argument_types_overflow_index(): + """Ensure that indexes beyond the length of Type.argument_types() raise.""" + tu = get_tu('void f(int, int);') + f = get_cursor(tu, 'f') + args = f.type.argument_types() + + args[2] + +@raises(Exception) +def test_argument_types_invalid_type(): + """Ensure that obtaining argument_types on a Type without them raises.""" + tu = get_tu('int i;') + i = get_cursor(tu, 'i') + assert i is not None + + i.type.argument_types() + +def test_is_pod(): + """Ensure Type.is_pod() works.""" + tu = get_tu('int i; void f();') + i = get_cursor(tu, 'i') + f = get_cursor(tu, 'f') + + assert i is not None + assert f is not None + + assert i.type.is_pod() + assert not f.type.is_pod() + +def test_function_variadic(): + """Ensure Type.is_function_variadic works.""" + + source =""" +#include + +void foo(int a, ...); +void bar(int a, int b); +""" + + tu = get_tu(source) + foo = get_cursor(tu, 'foo') + bar = get_cursor(tu, 'bar') + + assert foo is not None + assert bar is not None + + assert isinstance(foo.type.is_function_variadic(), bool) + assert foo.type.is_function_variadic() + assert not bar.type.is_function_variadic() + +def test_element_type(): + """Ensure Type.element_type works.""" + tu = get_tu('int i[5];') + i = get_cursor(tu, 'i') + assert i is not None + + assert i.type.kind == TypeKind.CONSTANTARRAY + assert i.type.element_type.kind == TypeKind.INT + +@raises(Exception) +def test_invalid_element_type(): + """Ensure Type.element_type raises if type doesn't have elements.""" + tu = get_tu('int i;') + i = get_cursor(tu, 'i') + assert i is not None + i.element_type + +def test_element_count(): + """Ensure Type.element_count works.""" + tu = get_tu('int i[5]; int j;') + i = get_cursor(tu, 'i') + j = get_cursor(tu, 'j') + + assert i is not None + assert j is not None + + assert i.type.element_count == 5 + + try: + j.type.element_count + assert False + except: + assert True + +def test_is_volatile_qualified(): + """Ensure Type.is_volatile_qualified works.""" + + tu = get_tu('volatile int i = 4; int j = 2;') + + i = get_cursor(tu, 'i') + j = get_cursor(tu, 'j') + + assert i is not None + assert j is not None + + assert isinstance(i.type.is_volatile_qualified(), bool) + assert i.type.is_volatile_qualified() + assert not j.type.is_volatile_qualified() + +def test_is_restrict_qualified(): + """Ensure Type.is_restrict_qualified works.""" + + tu = get_tu('struct s { void * restrict i; void * j };') + + i = get_cursor(tu, 'i') + j = get_cursor(tu, 'j') + + assert i is not None + assert j is not None + + assert isinstance(i.type.is_restrict_qualified(), bool) + assert i.type.is_restrict_qualified() + assert not j.type.is_restrict_qualified() diff --git a/bindings/python/tests/cindex/util.py b/bindings/python/tests/cindex/util.py new file mode 100644 index 0000000000000..388b269489982 --- /dev/null +++ b/bindings/python/tests/cindex/util.py @@ -0,0 +1,65 @@ +# This file provides common utility functions for the test suite. + +from clang.cindex import Cursor +from clang.cindex import Index + +def get_tu(source, lang='c', all_warnings=False): + """Obtain a translation unit from source and language. + + By default, the translation unit is created from source file "t." + where is the default file extension for the specified language. By + default it is C, so "t.c" is the default file name. + + Supported languages are {c, cpp, objc}. + + all_warnings is a convenience argument to enable all compiler warnings. + """ + name = 't.c' + if lang == 'cpp': + name = 't.cpp' + elif lang == 'objc': + name = 't.m' + elif lang != 'c': + raise Exception('Unknown language: %s' % lang) + + args = [] + if all_warnings: + args = ['-Wall', '-Wextra'] + + index = Index.create() + tu = index.parse(name, args=args, unsaved_files=[(name, source)]) + assert tu is not None + return tu + +def get_cursor(source, spelling): + """Obtain a cursor from a source object. + + This provides a convenient search mechanism to find a cursor with specific + spelling within a source. The first argument can be either a + TranslationUnit or Cursor instance. + + If the cursor is not found, None is returned. + """ + children = [] + if isinstance(source, Cursor): + children = source.get_children() + else: + # Assume TU + children = source.cursor.get_children() + + for cursor in children: + if cursor.spelling == spelling: + return cursor + + # Recurse into children. + result = get_cursor(cursor, spelling) + if result is not None: + return result + + return None + + +__all__ = [ + 'get_cursor', + 'get_tu', +] diff --git a/docs/AddressSanitizer.html b/docs/AddressSanitizer.html new file mode 100644 index 0000000000000..c1dc91bf4c88e --- /dev/null +++ b/docs/AddressSanitizer.html @@ -0,0 +1,139 @@ + + + + + + AddressSanitizer, a fast memory error detector + + + + + + + + +
+ +

AddressSanitizer

+ + +

Introduction

+AddressSanitizer is a fast memory error detector. +It consists of a compiler instrumentation module and a run-time library. +The tool can detect the following types of bugs: +
  • Out-of-bounds accesses to heap, stack and globals +
  • Use-after-free +
  • Use-after-return (to some extent) +
  • Double-free, invalid free +
+Typical slowdown introduced by AddressSanitizer is 2x. + +

How to build

+Follow the clang build instructions.
+Note: CMake build does not work yet. +See bug 12272. + +

Usage

+Simply compile and link your program with -faddress-sanitizer flag.
+To get a reasonable performance add -O1 or higher.
+To get nicer stack traces in error messages add +-fno-omit-frame-pointer.
+To get perfect stack traces you may need to disable inlining (just use -O1) and tail call +elimination (-fno-optimize-sibling-calls). + +
+% cat example_UseAfterFree.cc
+int main(int argc, char **argv) {
+  int *array = new int[100];
+  delete [] array;
+  return array[argc];  // BOOM
+}
+
+ +
+% clang -O1 -g -faddress-sanitizer -fno-omit-frame-pointer example_UseAfterFree.cc
+
+ +If a bug is detected, the program will print an error message to stderr and exit with a +non-zero exit code. +Currently, AddressSanitizer does not symbolize its output, so you may need to use a +separate script to symbolize the result offline (this will be fixed in future). +
+% ./a.out 2> log
+% projects/compiler-rt/lib/asan/scripts/asan_symbolize.py / < log | c++filt
+==9442== ERROR: AddressSanitizer heap-use-after-free on address 0x7f7ddab8c084 at pc 0x403c8c bp 0x7fff87fb82d0 sp 0x7fff87fb82c8
+READ of size 4 at 0x7f7ddab8c084 thread T0
+    #0 0x403c8c in main example_UseAfterFree.cc:4
+    #1 0x7f7ddabcac4d in __libc_start_main ??:0
+0x7f7ddab8c084 is located 4 bytes inside of 400-byte region [0x7f7ddab8c080,0x7f7ddab8c210)
+freed by thread T0 here:
+    #0 0x404704 in operator delete[](void*) ??:0
+    #1 0x403c53 in main example_UseAfterFree.cc:4
+    #2 0x7f7ddabcac4d in __libc_start_main ??:0
+previously allocated by thread T0 here:
+    #0 0x404544 in operator new[](unsigned long) ??:0
+    #1 0x403c43 in main example_UseAfterFree.cc:2
+    #2 0x7f7ddabcac4d in __libc_start_main ??:0
+==9442== ABORTING
+
+ +

__has_feature(address_sanitizer)

+In some cases one may need to execute different code depending on whether +AddressSanitizer is enabled. +__has_feature +can be used for this purpose. +
+#if defined(__has_feature) && __has_feature(address_sanitizer)
+  code that runs only under AddressSanitizer
+#else
+  code that does not run under AddressSanitizer
+#endif
+
+ +

Supported Platforms

+AddressSanitizer is supported on +
  • Linux x86_64 (tested on Ubuntu 10.04). +
  • MacOS 10.6 i386/x86_64. +
+Support for Linux i386/ARM and MacOS 10.7 is in progress +(it may work, but is not guaranteed too). + + +

Limitations

+
    +
  • AddressSanitizer uses more real memory than a native run. + How much -- depends on the allocations sizes. The smaller the + allocations you make the bigger the overhead. +
  • On 64-bit platforms AddressSanitizer maps (but not reserves) + 16+ Terabytes of virtual address space. + This means that tools like ulimit may not work as usually expected. +
  • Static linking is not supported. +
+ + +

Current Status

+AddressSanitizer is fully functional on supported platforms in LLVM head. +However, the test suite is not fully integrated yet and we lack the testing +process (buildbots). + +

More Information

+http://code.google.com/p/address-sanitizer. + + +
+ + diff --git a/docs/AnalyzerRegions.html b/docs/AnalyzerRegions.html index 35708d57c9701..f9d3337920452 100644 --- a/docs/AnalyzerRegions.html +++ b/docs/AnalyzerRegions.html @@ -1,3 +1,5 @@ + Static Analyzer Design Document: Memory Regions @@ -59,7 +61,7 @@ of structures) then the StoreManager can simply return 'unknown' (represented by concerns not only isolates the core analysis engine from the details of reasoning about program memory but also facilities the option of a client of the path-sensitive engine to easily swap in different StoreManager implementations -that internally reason about program memory in very different ways. +that internally reason about program memory in very different ways.

The rest of this document is divided into two parts. We first discuss region taxonomy and the semantics of regions. We then discuss the StoreManager @@ -102,7 +104,7 @@ typedef struct s my_type; void *p; int *q = (int*) p; char *r = (char*) p; -

Thus we need to canonicalize the MemRegion which is used in binding and retrieving.

diff --git a/docs/AutomaticReferenceCounting.html b/docs/AutomaticReferenceCounting.html index bc784578e4cff..1416df58e45ef 100644 --- a/docs/AutomaticReferenceCounting.html +++ b/docs/AutomaticReferenceCounting.html @@ -1,8 +1,10 @@ + Objective-C Automatic Reference Counting (ARC) - - + + - @@ -106,7 +106,7 @@ int foo(int *p, int *q) {

Running scan-build over this source produces the following output:

- +example attribute nonnull

Mac OS X API Annotations

@@ -139,7 +139,7 @@ object that the caller is responsible for releasing (via sending a

Placing on Objective-C methods: For Objective-C methods, this annotation essentially tells the analyzer to treat the method as if its name -begins with "alloc" or "new" or contais the word +begins with "alloc" or "new" or contains the word "copy".

Placing on C functions: For C functions returning Cocoa objects, the @@ -192,7 +192,7 @@ use 'cf_returns_retained'.

Running scan-build on this source file produces the following output:

- +example returns retained

Attribute 'ns_returns_not_retained' (Clang-specific)

@@ -242,7 +242,7 @@ Cocoa object. This distinction is important for two reasons:

  • Because Core Foundation is a C API, the analyzer cannot always tell that a pointer return value refers to a Core Foundation object. In contrast, it is trivial for the analyzer to recognize if a pointer refers to a Cocoa object - (given the Objective-C type system).

    + (given the Objective-C type system).

    Placing on C functions: When placing the attribute @@ -311,16 +311,16 @@ CFDateRef returnsRetainedCFDate() {

    Running scan-build on this example produces the following output:

    - +example returns retained -

    When the above code is compiled using Objective-C garbage collection (i.e., +

    When the above code is compiled using Objective-C garbage collection (i.e., code is compiled with the flag -fobjc-gc or -fobjc-gc-only), scan-build produces both the above error (with slightly different text to indicate the code uses garbage collection) as well as the following warning, which indicates a leak that occurs only when using garbage collection:

    - +example returns retained gc

    Attribute 'cf_returns_not_retained' (Clang-specific)

    @@ -590,6 +590,7 @@ the use of preprocessor macros.

    #else #define CLANG_ANALYZER_NORETURN #endif +#endif void my_assert_rtn(const char *, const char *, int, const char *) CLANG_ANALYZER_NORETURN; diff --git a/www/analyzer/available_checks.html b/www/analyzer/available_checks.html index 7af0865065065..3f40d323f0362 100644 --- a/www/analyzer/available_checks.html +++ b/www/analyzer/available_checks.html @@ -3,9 +3,12 @@ Available Checks - - + + + @@ -16,10 +19,117 @@

    Available Checks

    -

    This page is slated to contain a list of the current checks the analyzer -performs along with some self-contained code examples. In the meantime, please -check out any of the following writeups about the analyzer that contain examples -of some of the bugs that it finds:

    +

    The list of the checks the analyzer performs by default

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    core.AdjustedReturnValueCheck to see if the return value of a function call is different than the caller expects (e.g., from calls through function pointers).
    core.AttributeNonNullCheck for null pointers passed as arguments to a function whose arguments are marked with the 'nonnull' attribute.
    core.CallAndMessageCheck for logical errors for function calls and Objective-C message expressions (e.g., uninitialized arguments, null function pointers).
    core.DivideZeroCheck for division by zero.
    core.NullDereferenceCheck for dereferences of null pointers.
    core.StackAddressEscapeCheck that addresses to stack memory do not escape the function.
    core.UndefinedBinaryOperatorResultCheck for undefined results of binary operators.
    core.VLASizeCheck for declarations of VLA of undefined or zero size.
    core.builtin.BuiltinFunctionsEvaluate compiler builtin functions (e.g., alloca()).
    core.builtin.NoReturnFunctionsEvaluate "panic" functions that are known to not return to the caller.
    core.uninitialized.ArraySubscriptCheck for uninitialized values used as array subscripts.
    core.uninitialized.AssignCheck for assigning uninitialized values.
    core.uninitialized.BranchCheck for uninitialized values used as branch conditions.
    core.uninitialized.CapturedBlockVariableCheck for blocks that capture uninitialized values.
    core.uninitialized.UndefReturnCheck for uninitialized values being returned to the caller.
    deadcode.DeadStoresCheck for values stored to variables that are never read afterwards.
    deadcode.IdempotentOperationsWarn about idempotent operations.
    osx.APICheck for proper uses of various Mac OS X APIs.
    osx.AtomicCASEvaluate calls to OSAtomic functions.
    osx.SecKeychainAPICheck for proper uses of Secure Keychain APIs.
    osx.cocoa.AtSyncCheck for null pointers used as mutexes for @synchronized.
    osx.cocoa.ClassReleaseCheck for sending 'retain', 'release', or 'autorelease' directly to a Class.
    osx.cocoa.IncompatibleMethodTypesWarn about Objective-C method signatures with type incompatibilities.
    osx.cocoa.NSAutoreleasePoolWarn for suboptimal uses of NSAutoreleasePool in Objective-C GC mode.
    osx.cocoa.NSErrorCheck usage of NSError** parameters.
    osx.cocoa.NilArgCheck for prohibited nil arguments to ObjC method calls.
    osx.cocoa.RetainCountCheck for leaks and improper reference count management.
    osx.cocoa.UnusedIvarsWarn about private ivars that are never used.
    osx.cocoa.VariadicMethodTypesCheck for passing non-Objective-C types to variadic methods that expect only Objective-C types.
    osx.coreFoundation.CFErrorCheck usage of CFErrorRef* parameters.
    osx.coreFoundation.CFNumberCheck for proper uses of CFNumberCreate.
    osx.coreFoundation.CFRetainReleaseCheck for null arguments to CFRetain/CFRelease.
    unix.APICheck calls to various UNIX/Posix functions.
    + +

    In addition to these the analyzer contains numerous experimental (beta) checkers.

    + +

    Writeups with examples of some of the bugs that the analyzer finds

    • Bug Finding With Clang: 5 Resources To Get You Started
    • diff --git a/www/analyzer/checker_dev_manual.html b/www/analyzer/checker_dev_manual.html new file mode 100644 index 0000000000000..fc9adf371ef0d --- /dev/null +++ b/www/analyzer/checker_dev_manual.html @@ -0,0 +1,346 @@ + + + + Checker Developer Manual + + + + + + +
      + + +
      + +

      This Page Is Under Construction

      + +

      Checker Developer Manual

      + +

      The static analyzer engine performs symbolic execution of the program and +relies on a set of checkers to implement the logic for detecting and +constructing bug reports. This page provides hints and guidelines for anyone +who is interested in implementing their own checker. The static analyzer is a +part of the Clang project, so consult Hacking on Clang +and LLVM Programmer's Manual +for general developer guidelines and information.

      + + + +

      Getting Started

      +
        +
      • To check out the source code and build the project, follow steps 1-4 of + the Clang Getting Started + page.
      • + +
      • The analyzer source code is located under the Clang source tree: +
        + $ cd llvm/tools/clang + +
        See: include/clang/StaticAnalyzer, lib/StaticAnalyzer, + test/Analysis.
      • + +
      • The analyzer regression tests can be executed from the Clang's build + directory: +
        + $ cd ../../../; cd build/tools/clang; TESTDIRS=Analysis make test +
      • + +
      • Analyze a file with the specified checker: +
        + $ clang -cc1 -analyze -analyzer-checker=core.DivideZero test.c +
      • + +
      • List the available checkers: +
        + $ clang -cc1 -analyzer-checker-help +
      • + +
      • See the analyzer help for different output formats, fine tuning, and + debug options: +
        + $ clang -cc1 -help | grep "analyzer" +
      • + +
      + +

      Static Analyzer Overview

      + The analyzer core performs symbolic execution of the given program. All the + input values are represented with symbolic values; further, the engine deduces + the values of all the expressions in the program based on the input symbols + and the path. The execution is path sensitive and every possible path through + the program is explored. The explored execution traces are represented with + ExplidedGraph object. + Each node of the graph is + ExplodedNode, + which consists of a ProgramPoint and a ProgramState. +

      + ProgramPoint + represents the corresponding location in the program (or the CFG graph). + ProgramPoint is also used to record additional information on + when/how the state was added. For example, PostPurgeDeadSymbolsKind + kind means that the state is the result of purging dead symbols - the + analyzer's equivalent of garbage collection. +

      + ProgramState + represents abstract state of the program. It consists of: +

        +
      • Environment - a mapping from source code expressions to symbolic + values +
      • Store - a mapping from memory locations to symbolic values +
      • GenericDataMap - constraints on symbolic values +
      + +

      Interaction with Checkers

      + Checkers are not merely passive receivers of the analyzer core changes - they + actively participate in the ProgramState construction through the + GenericDataMap which can be used to store the checker-defined part + of the state. Each time the analyzer engine explores a new statement, it + notifies each checker registered to listen for that statement, giving it an + opportunity to either report a bug or modify the state. (As a rule of thumb, + the checker itself should be stateless.) The checkers are called one after another + in the predefined order; thus, calling all the checkers adds a chain to the + ExplodedGraph. + +

      Representing Values

      + During symbolic execution, SVal + objects are used to represent the semantic evaluation of expressions. They can + represent things like concrete integers, symbolic values, or memory locations + (which are memory regions). They are a discriminated union of "values", + symbolic and otherwise. +

      + SymExpr (symbol) + is meant to represent abstract, but named, symbolic value. + Symbolic values can have constraints associated with them. Symbols represent + an actual (immutable) value. We might not know what its specific value is, but + we can associate constraints with that value as we analyze a path. +

      + + MemRegion is similar to a symbol. + It is used to provide a lexicon of how to describe abstract memory. Regions can + layer on top of other regions, providing a layered approach to representing memory. + For example, a struct object on the stack might be represented by a VarRegion, + but a FieldRegion which is a subregion of the VarRegion could + be used to represent the memory associated with a specific field of that object. + So how do we represent symbolic memory regions? That's what SymbolicRegion + is for. It is a MemRegion that has an associated symbol. Since the + symbol is unique and has a unique name; that symbol names the region. +

      + Let's see how the analyzer processes the expressions in the following example: +

      +

      +  int foo(int x) {
      +     int y = x * 2;
      +     int z = x;
      +     ...
      +  }
      +  
      +

      +Let's look at how x*2 gets evaluated. When x is evaluated, +we first construct an SVal that represents the lvalue of x, in +this case it is an SVal that references the MemRegion for x. +Afterwards, when we do the lvalue-to-rvalue conversion, we get a new SVal, +which references the value currently bound to x. That value is +symbolic; it's whatever x was bound to at the start of the function. +Let's call that symbol $0. Similarly, we evaluate the expression for 2, +and get an SVal that references the concrete number 2. When +we evaluate x*2, we take the two SVals of the subexpressions, +and create a new SVal that represents their multiplication (which in +this case is a new symbolic expression, which we might call $1). When we +evaluate the assignment to y, we again compute its lvalue (a MemRegion), +and then bind the SVal for the RHS (which references the symbolic value $1) +to the MemRegion in the symbolic store. +
      +The second line is similar. When we evaluate x again, we do the same +dance, and create an SVal that references the symbol $0. Note, two SVals +might reference the same underlying values. + +

      +To summarize, MemRegions are unique names for blocks of memory. Symbols are +unique names for abstract symbolic values. Some MemRegions represents abstract +symbolic chunks of memory, and thus are also based on symbols. SVals are just +references to values, and can reference either MemRegions, Symbols, or concrete +values (e.g., the number 1). + + +

      Idea for a Checker

      + Here are several questions which you should consider when evaluating your + checker idea: +
        +
      • Can the check be effectively implemented without path-sensitive + analysis? See AST Visitors.
      • + +
      • How high the false positive rate is going to be? Looking at the occurrences + of the issue you want to write a checker for in the existing code bases might + give you some ideas.
      • + +
      • How the current limitations of the analysis will effect the false alarm + rate? Currently, the analyzer only reasons about one procedure at a time (no + inter-procedural analysis). Also, it uses a simple range tracking based + solver to model symbolic execution.
      • + +
      • Consult the Bugzilla database + to get some ideas for new checkers and consider starting with improving/fixing + bugs in the existing checkers.
      • +
      + +

      Checker Registration

      + All checker implementation files are located in clang/lib/StaticAnalyzer/Checkers + folder. Follow the steps below to register a new checker with the analyzer. +
        +
      1. Create a new checker implementation file, for example ./lib/StaticAnalyzer/Checkers/NewChecker.cpp +
        +using namespace clang;
        +using namespace ento;
        +
        +namespace {
        +class NewChecker: public Checker< check::PreStmt<CallExpr> > {
        +public:
        +  void checkPreStmt(const CallExpr *CE, CheckerContext &Ctx) const {}
        +}
        +}
        +void ento::registerNewChecker(CheckerManager &mgr) {
        +  mgr.registerChecker<NewChecker>();
        +}
        +
        + +
      2. Pick the package name for your checker and add the registration code to +./lib/StaticAnalyzer/Checkers/Checkers.td. Note, all checkers should +first be developed as experimental. Suppose our new checker performs security +related checks, then we should add the following lines under +SecurityExperimental package: +
        +let ParentPackage = SecurityExperimental in {
        +...
        +def NewChecker : Checker<"NewChecker">,
        +  HelpText<"This text should give a short description of the checks performed.">,
        +  DescFile<"NewChecker.cpp">;
        +...
        +} // end "security.experimental"
        +
        + +
      3. Make the source code file visible to CMake by adding it to +./lib/StaticAnalyzer/Checkers/CMakeLists.txt. + +
      4. Compile and see your checker in the list of available checkers by running:
        +$clang -cc1 -analyzer-checker-help +
      + + +

      Checker Skeleton

      + There are two main decisions you need to make: +
        +
      • Which events the checker should be tracking. + See CheckerDocumentation + for the list of available checker callbacks.
      • +
      • What data you want to store as part of the checker-specific program + state. Try to minimize the checker state as much as possible.
      • +
      + +

      Bug Reports

      + +

      AST Visitors

      + Some checks might not require path-sensitivity to be effective. Simple AST walk + might be sufficient. If that is the case, consider implementing a Clang + compiler warning. On the other hand, a check might not be acceptable as a compiler + warning; for example, because of a relatively high false positive rate. In this + situation, AST callbacks checkASTDecl and + checkASTCodeBody are your best friends. + +

      Testing

      + Every patch should be well tested with Clang regression tests. The checker tests + live in clang/test/Analysis folder. To run all of the analyzer tests, + execute the following from the clang build directory: +
      +    $ TESTDIRS=Analysis make test
      +    
      + +

      Useful Commands/Debugging Hints

      +
        +
      • +While investigating a checker-related issue, instruct the analyzer to only +execute a single checker: +
        +$ clang -cc1 -analyze -analyzer-checker=osx.KeychainAPI test.c + +
      • +
      • +To dump AST: +
        +$ clang -cc1 -ast-dump test.c + +
      • +
      • +To view/dump CFG use debug.ViewCFG or debug.DumpCFG checkers: +
        +$ clang -cc1 -analyze -analyzer-checker=debug.ViewCFG test.c + +
      • +
      • +To see all available debug checkers: +
        +$ clang -cc1 -analyzer-checker-help | grep "debug" + +
      • +
      • +To see which function is failing while processing a large file use +-analyzer-display-progress option. +
      • +
      • +While debugging execute clang -cc1 -analyze -analyzer-checker=core +instead of clang --analyze, as the later would call the compiler +in a separate process. +
      • +
      • +To view ExplodedGraph (the state graph explored by the analyzer) while +debugging, goto a frame that has clang::ento::ExprEngine object and +execute: +
        +(gdb) p ViewGraph(0) + +
      • +
      • +To see the ProgramState while debugging use the following command. +
        +(gdb) p State->dump() + +
      • +
      • +To see clang::Expr while debugging use the following command. If you +pass in a SourceManager object, it will also dump the corresponding line in the +source code. +
        +(gdb) p E->dump() + +
      • +
      • +To dump AST of a method that the current ExplodedNode belongs to: +
        +(gdb) p C.getPredecessor()->getCodeDecl().getBody()->dump() +(gdb) p C.getPredecessor()->getCodeDecl().getBody()->dump(getContext().getSourceManager()) + +
      • +
      + +
      +
      + + diff --git a/www/analyzer/dev_cxx.html b/www/analyzer/dev_cxx.html index b5ef2b10919fb..39dbf7b4af8fd 100644 --- a/www/analyzer/dev_cxx.html +++ b/www/analyzer/dev_cxx.html @@ -3,8 +3,8 @@ Analyzer Development: C++ Support - - + + @@ -31,18 +31,20 @@ decent analysis of C++. This list is also not complete; new tasks will be added as deemed necessary.

        -
      • Control-Flow Graph Enhancements:
      • +
      • Control-Flow Graph Enhancements:
        • Model C++ destructors
        • Model C++ initializers (in constructors)
        -
      • Path-Sensitive Analysis Engine (GRExprEngine):
      • + +
      • Path-Sensitive Analysis Engine (GRExprEngine):
        • Model C++ casts
        • Model C++ constructors
        • Model C++ destructors
        • Model new and delete
        +
      diff --git a/www/analyzer/filing_bugs.html b/www/analyzer/filing_bugs.html index 460ef815c39c0..f32a8ab20a6c8 100644 --- a/www/analyzer/filing_bugs.html +++ b/www/analyzer/filing_bugs.html @@ -3,8 +3,8 @@ Filing Bugs and Feature Requests - - + + diff --git a/www/analyzer/index.html b/www/analyzer/index.html index 7d99ac9621e48..18bafd0562880 100644 --- a/www/analyzer/index.html +++ b/www/analyzer/index.html @@ -3,38 +3,10 @@ Clang Static Analyzer - - + + - - - -
      - -
      - - - - +reports. - - - @@ -217,12 +216,12 @@ $ scan-build make interposing on the compiler. This interposition is currently done by scan-build temporarily setting the environment variable CC to ccc-analyzer. The program ccc-analyzer acts like a fake -compiler, forwarding its command line arguments over to gcc to perform +compiler, forwarding its command line arguments over to the compiler to perform regular compilation and clang to perform static analysis.

      Running configure typically generates makefiles that have hardwired paths to the compiler, and by running configure through -scan-build that path is set to ccc-analyzer. +scan-build that path is set to ccc-analyzer.

      - + 2007 LLVM Developer's Meeting - - + + diff --git a/www/clang_video-07-25-2007.html b/www/clang_video-07-25-2007.html index 179e499651a49..0fee7bcb6d12c 100644 --- a/www/clang_video-07-25-2007.html +++ b/www/clang_video-07-25-2007.html @@ -2,10 +2,10 @@ - + LLVM 2.0 and Beyond! - - + + diff --git a/www/comparison.html b/www/comparison.html index 4b72a85271794..2898ce8407f60 100644 --- a/www/comparison.html +++ b/www/comparison.html @@ -3,10 +3,10 @@ - + Comparing clang to other open source compilers - - + + @@ -183,6 +183,7 @@ inefficient code and does not support many important targets.
    • Like Elsa, PCC's does not have an integrated preprocessor, making it extremely difficult to use it for source analysis tools.
    • + diff --git a/www/compatibility.html b/www/compatibility.html index 2102ccca7e1db..725c52ff4bbc6 100644 --- a/www/compatibility.html +++ b/www/compatibility.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Language Compatibility - - + + @@ -47,7 +47,7 @@
    • C variables in @class or @protocol
    • -
    • C++ compatibility +
    • C++ compatibility
    • -
    • C++11 compatibility +
    • C++11 compatibility
    • -
    • Objective-C++ compatibility +
    • Objective-C++ compatibility @@ -77,7 +77,7 @@ -

      C compatibility

      +

      C compatibility

      @@ -318,7 +318,7 @@ add $4, (%rax) this makes your code more clear and is compatible with both GCC and Clang.

      -

      Objective-C compatibility

      +

      Objective-C compatibility

      @@ -409,7 +409,7 @@ extern int c; // allowed -

      C++ compatibility

      +

      C++ compatibility

      @@ -761,7 +761,7 @@ void f(int a, int a);

      Clang diagnoses this error (where the parameter name has been redeclared). To fix this problem, rename one of the parameters.

      -

      C++11 compatibility

      +

      C++11 compatibility

      @@ -769,7 +769,7 @@ void f(int a, int a);

      In C++11, the explicit declaration of a move constructor or a move -assignment operator within a class disables the implicit declaration +assignment operator within a class deletes the implicit declaration of the copy constructor and copy assignment operator. This change came fairly late in the C++11 standardization process, so early implementations of C++11 (including Clang before 3.0, GCC before 4.7, @@ -778,22 +778,23 @@ accept this ill-formed code:

       struct X {
      -  X(X&&); // suppresses implicit copy constructor
      +  X(X&&); // deletes implicit copy constructor:
      +  // X(const X&) = delete;
       };
       
       void f(X x);
       void g(X x) {
      -  f(x); // error: X has no copy constructor
      +  f(x); // error: X has a deleted copy constructor
       }
       
      -

      This affects some C++11 code, including Boost's popular This affects some early C++11 code, including Boost's popular shared_ptr up to version 1.47.0. The fix for Boost's shared_ptr is available here.

      -

      Objective-C++ compatibility

      +

      Objective-C++ compatibility

      @@ -859,7 +860,7 @@ int cls; @implementation I - (int) Meth { return I.class; } @end -
      +

      Use explicit message-send syntax instead, i.e. [I class].

      diff --git a/www/cxx_compatibility.html b/www/cxx_compatibility.html index 6aa0bbf4bed57..5351a02aabe8b 100644 --- a/www/cxx_compatibility.html +++ b/www/cxx_compatibility.html @@ -3,10 +3,10 @@ - + Clang - C++ Compatibility - - + + diff --git a/www/cxx_status.html b/www/cxx_status.html index 3fb1ef614bd06..1b7d8140a252f 100644 --- a/www/cxx_status.html +++ b/www/cxx_status.html @@ -3,17 +3,15 @@ - Clang - C++ and C++'11 Status + Clang - C++98 and C++11 Status @@ -23,18 +21,20 @@
      -

      C++ and C++'11 Support in Clang

      +

      C++98 and C++11 Support in Clang

      -

      Last updated: $Date: 2011-10-15 01:35:48 +0200 (Sat, 15 Oct 2011) $

      +

      Last updated: $Date: 2012-04-13 03:02:19 +0200 (Fri, 13 Apr 2012) $

      + +

      C++98 implementation status

      Clang currently implements all of the ISO C++ 1998 standard (including the defects addressed in the ISO C++ 2003 standard) - except for 'export' (which has been removed in C++'11) + except for 'export' (which has been removed in C++11) and is considered a production-quality C++ compiler. The LLVM bug tracker contains a Clang C++ component that tracks known Clang C++ bugs.

      -

      C++11 Implementation status

      +

      C++11 implementation status

      Clang provides support for a number of features included in the new ISO C++ Standard, ISO/IEC 14882:2011. The following table describes which C++11 features have been implemented in Clang and in which Clang versions they became available.

      @@ -45,327 +45,336 @@ with clang; other versions have not been tested.

    • - -

      Clang Static Analyzer

      - -

      The Clang Static Analyzer is source code analysis tool that find bugs in C -and Objective-C programs.

      - -

      Currently it can be run either as a standalone -tool or within Xcode. The standalone tool is -invoked from the command-line, and is intended to be run in tandem with a build -of a codebase.

      - -

      The analyzer is 100% open source and is part of the Clang project. Like the rest of Clang, the -analyzer is implemented as a C++ library that can be used by other tools and -applications.

      - -

      Download

      - - + - + + + +
      + +
      + + + +
      + +

      Clang Static Analyzer

      + +

      The Clang Static Analyzer is source code analysis tool that find bugs in C +and Objective-C programs.

      + +

      Currently it can be run either as a standalone +tool or within Xcode. The standalone tool is +invoked from the command-line, and is intended to be run in tandem with a build +of a codebase.

      + +

      The analyzer is 100% open source and is part of the Clang project. Like the rest of Clang, the +analyzer is implemented as a C++ library that can be used by other tools and +applications.

      + +

      Download

      @@ -101,7 +98,7 @@ applications.

    • Latest build (Intel-only binary, 10.5+):
    • -
    • Release notes
    • +
    • Release notes
    • This build can be used both from the command line and from within Xcode
    • Installation and usage
    • @@ -140,10 +137,10 @@ applications.

      - -
      Viewing static analyzer results in Xcode 3.2
      - -
      Viewing static analyzer results in a web browser
      +analyzer in xcode +
      Viewing static analyzer results in Xcode 3.2
      +analyzer in browser +
      Viewing static analyzer results in a web browser

      What is Static Analysis?

      @@ -198,7 +195,7 @@ bugs require in the worst case exponential time.

      The Clang Static Analyzer runs in a reasonable amount of time by both bounding the amount of checking work it will do as well as using clever -algorithms to reduce the amount of work it must do to find bugs.

      +algorithms to reduce the amount of work it must do to find bugs.

      False Positives

      diff --git a/www/analyzer/installation.html b/www/analyzer/installation.html index b0e56f82c420f..ebccd071cdce4 100644 --- a/www/analyzer/installation.html +++ b/www/analyzer/installation.html @@ -3,8 +3,8 @@ Obtaining the Static Analyzer - - + + diff --git a/www/analyzer/latest_checker.html.incl b/www/analyzer/latest_checker.html.incl index 8d7b58de215dc..d1b0d06d5ce4f 100644 --- a/www/analyzer/latest_checker.html.incl +++ b/www/analyzer/latest_checker.html.incl @@ -1 +1 @@ -checker-258.tar.bz2 (built October 13, 2011) +checker-263.tar.bz2 (built March 22, 2012) diff --git a/www/analyzer/menu.html.incl b/www/analyzer/menu.html.incl index a06eb58b0e9ca..53a4276672342 100644 --- a/www/analyzer/menu.html.incl +++ b/www/analyzer/menu.html.incl @@ -25,6 +25,7 @@
    • Development
    • diff --git a/www/analyzer/release_notes.html b/www/analyzer/release_notes.html index 311c5aecd5c8c..42de9ddae27fb 100644 --- a/www/analyzer/release_notes.html +++ b/www/analyzer/release_notes.html @@ -3,8 +3,8 @@ Release notes for checker-XXX builds - - + + @@ -15,10 +15,78 @@

      Release notes for checker-XXX builds

      +

      checker-263

      + +

      built: March 22, 2012
      + download: checker-263.tar.bz2

      +

      highlights:

      + +
        +
      • Fixes several serious bugs with inter-procedural analysis, including a case where retain/releases would be "double-counted".
      • +
      + +

      checker-262

      + +

      built: March 15, 2012
      + download: checker-262.tar.bz2

      +

      highlights:

      + +
        +
      • Enables experimental interprocedural analysis (within a file), which greatly amplifies the analyzer's ability to find issues.
      • +
      • Many bug fixes to the malloc/free checker.
      • +
      • Support for new Objective-C NSArray/NSDictionary/NSNumber literals syntax, and Objective-C container subscripting.
      • +
      + +

      NOTE: This build contains new interprocedural analysis that allows the analyzer to find more complicated bugs that span function boundaries. It may have problems, performance issues, etc. We'd like to hear about them. + +

      checker-261

      + +

      built: February 22, 2012
      +download: checker-261.tar.bz2

      +

      highlights:

      + +
        +
      • Contains a new experimental malloc/free checker.
      • +
      • Better support for projects using ARC.
      • +
      • Warns about null pointers passed as arguments to C string functions.
      • +
      • Warns about common anti-patterns in 'strncat' size argument, which can lead to buffer overflows.
      • +
      • set-xcode-analyzer now supports self-contained Xcode.app (Xcode 4.3 and later).
      • +
      • Contains a newer version of the analyzer than Xcode 4.3.
      • +
      • Misc. bug fixes and performance work.
      • +
      + +

      checker-260

      + +

      built: January 25, 2012
      +download: checker-260.tar.bz2

      +

      highlights:

      + +

      This is essentially the same as checker-259, but enables the following experimental checkers (please provide feedback):

      + +
        +
      • Warns about unsafe uses of CFArrayCreate, CFSetCreate, and CFDictionaryCreate
      • +
      • Warns about unsafe uses of getpw, gets, which are sources of buffer overflows
      • +
      • Warns about unsafe uses of mktemp and mktemps, which can lead to insecure temporary files
      • +
      • Warns about unsafe uses of vfork, which is insecure to use
      • +
      • Warns about not checking the return values of setuid, setgid, seteuid, setegid, setreuid, setregid (another security issue)
      • +
      + +

      checker-259

      + +

      built: January 25, 2012
      +download: checker-259.tar.bz2

      +

      highlights:

      + +
        +
      • Contains a newer version of the analyzer than the one shipped in Xcode 4.2.
      • +
      • Significant performance optimizations to reduce memory usage of the analyzer.
      • +
      • Tweaks to scan-build to have it work more easily with Xcode projects using Clang.
      • +
      • Numerous bug fixes to better support code using ARC.
      • +
      +

      checker-258

      -

      built:October 13, 2011
      -download: checker-258.tar.bz2

      +

      built: October 13, 2011

      highlights:

        @@ -30,8 +98,7 @@

        checker-257

        -

        built:May 25, 2011
        -download: checker-257.tar.bz2

        +

        built: May 25, 2011

        highlights:

          @@ -43,8 +110,7 @@

          checker-256

          -

          built:April 13, 2011
          -download: checker-256.tar.bz2

          +

          built: April 13, 2011

          highlights:

            @@ -93,8 +159,7 @@ $ find . | grep xcspec | grep Clang

            checker-255

            -

            built: February 11, 2011
            -download: checker-255.tar.bz2

            +

            built: February 11, 2011

            highlights:

              @@ -106,8 +171,7 @@ $ find . | grep xcspec | grep Clang

              checker-254

              -

              built: January 27, 2011
              -download: checker-254.tar.bz2

              +

              built: January 27, 2011

              highlights:

                diff --git a/www/analyzer/scan-build.html b/www/analyzer/scan-build.html index 6c2833e7991f9..710fa0f4958f8 100644 --- a/www/analyzer/scan-build.html +++ b/www/analyzer/scan-build.html @@ -3,8 +3,8 @@ scan-build: running the analyzer from the command line - - + + @@ -16,7 +16,7 @@

                scan-build: running the analyzer from the command line

                - +
                -

                What is it?

                @@ -35,9 +35,9 @@ web browser.

                scan-build has little or no knowledge about how you build your code. It works by overriding the CC and CXX environment variables to (hopefully) change your build to use a "fake" compiler instead of the -one that would normally build your project. By default, this fake compiler -executes gcc to compile your code (assuming that gcc is your -compiler) and then executes the static analyzer to analyze your code.

                +one that would normally build your project. This fake compiler executes either +clang or gcc (depending on the platform) to compile your +code and then executes the static analyzer to analyze your code.

                This "poor man's interposition" works amazingly well in many cases and falls down in others. Please consult the information on this page on making @@ -45,11 +45,10 @@ the best use of scan-build, which includes getting it to work when the aforementioned hack fails to work.

                -
                -
                - -
                Viewing static analyzer results in a web browser
                +
                + scan-build
                + analyzer in browser +
                Viewing static analyzer results in a web browser

                Contents

                @@ -77,8 +76,8 @@ aforementioned hack fails to work.

                The scan-build command can be used to analyze an entire project by essentially interposing on a project's build process. This means that to run the analyzer using scan-build, you will use scan-build to analyze -the source files compiled by gcc during a project build. This means -that any files that are not compiled will also not be analyzed.

                +the source files compiled by gcc/clang during a project build. +This means that any files that are not compiled will also not be analyzed.

                Basic Usage

                @@ -101,7 +100,7 @@ $ scan-build [scan-build options]

                Operationally, scan-build literally runs <command> with all of the -subsequent options passed to it. For example, one can pass -j4 to +subsequent options passed to it. For example, one can pass -j4 to make get a parallel build over 4 cores:

                @@ -141,17 +140,17 @@ options prefix the build command. For example:

      -oTarget directory for HTML report files. Subdirectories will be created as needed to represent separate "runs" of the analyzer. If this option is not specified, a directory is created in /tmp to store the -reports.
      -h
      (or no arguments)
      Display all +
      -h
      (or no arguments)
      Display all scan-build options.
      -k
      --keep-going
      Add a "keep on +
      -k
      --keep-going
      Add a "keep on going" option to the specified build command.

      This option currently supports make and xcodebuild.

      This is a convenience option; one can specify this behavior directly using build options.

      -vVerbose output from scan-build and the analyzer. A +
      -vVerbose output from scan-build and the analyzer. A second and third "-v" increases verbosity, and is useful for filing bug reports against the analyzer.
      - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + - + - + - + - - + + - + - + - + - + - +
      N3206 +
      N3272 + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
      Language FeatureC++0x ProposalAvailable in Clang?Language FeatureC++11 ProposalAvailable in Clang?
      Rvalue references N2118Clang 2.9Clang 2.9
          Rvalue references for *this N2439Clang 2.9
      Clang 2.9
      Initialization of class objects by rvalues N1610Clang 2.9Clang 2.9
      Non-static data member initializers N2756Clang 3.0Clang 3.0
      Variadic templates N2242Clang 2.9Clang 2.9
          Extending variadic template template parameters N2555Clang 2.9Clang 2.9
      Initializer lists N2672NoSVN
      Static assertions N1720Clang 2.9Clang 2.9
      auto-typed variables N1984Clang 2.9Clang 2.9
          Multi-declarator auto N1737Clang 2.9Clang 2.9
          Removal of auto as a storage-class specifier N2546Clang 2.9Clang 2.9
          New function declarator syntax N2541Clang 2.9Clang 2.9
      New wording for C++0x lambdasLambda expressions N2927NoSVN
      Declared type of an expression N2343Clang 2.9Clang 2.9
          Incomplete return typesN3276SVN
      Right angle brackets N1757Clang 2.9Clang 2.9
      Default template arguments for function templates DR226Clang 2.9Clang 2.9
      Solving the SFINAE problem for expressions DR339Clang 2.9Clang 2.9
      Alias templates N2258Clang 3.0Clang 3.0
      Extern templates N1987Clang 2.9Clang 2.9
      Null pointer constant N2431Clang 3.0Clang 3.0
      Strongly-typed enums N2347Clang 2.9Clang 2.9
      Forward declarations for enums - N2764 - NoN2764 +
      DR1206
      SVN
      Generalized attributes N2761NoNo
      Generalized constant expressions N2235NoSVN
      Alignment support N2341Clang 3.0Clang 3.0
      Delegating constructors N1986Clang 3.0
      Clang 3.0
      Inheriting constructors N2540NoNo
      Explicit conversion operators N2437Clang 3.0Clang 3.0
      New character types N2249Clang 2.9Clang 2.9
      Unicode string literals N2442Clang 3.0Clang 3.0
      Raw string literals N2442Clang 3.0Clang 3.0
      Universal character name literalsUniversal character names in literals N2170NoSVN
      User-defined literals N2765NoSVN
      Standard Layout Types N2342Clang 3.0Clang 3.0
      Defaulted functionsN2346Clang 3.0
      Defaulted and deleted functionsDeleted functions N2346Clang 2.9Clang 2.9
      Extended friend declarations N1791Clang 2.9Clang 2.9
      Extending sizeofN2253NoN2253 +
      DR850
      SVN
      Inline namespaces N2535Clang 2.9Clang 2.9
      Unrestricted unions N2544NoSVN
      Local and unnamed types as template arguments N2657Clang 2.9Clang 2.9
      Range-based for N2930Clang 3.0Clang 3.0
      Explicit virtual overrides N2928 -
      N3206 -
      N3272
      Clang 3.0Clang 3.0
      Minimal support for garbage collection and reachability-based leak detection N2670NoN/A
      Allowing move constructors to throw [noexcept]N3050Clang 3.0N3050Clang 3.0
      Defining move special member functionsN3053Clang 3.0N3053Clang 3.0
      ConcurrencyConcurrency
      Sequence points N2239NoNo
      Atomic operations N2427NoSVN
      Strong Compare and Exchange N2748NoNo
      Bidirectional Fences N2752NoSVN
      Memory model N2429NoNo
      Data-dependency ordering: atomics and memory model N2664NoNo
      Propagating exceptions N2179Clang 2.9Clang 2.9
      Abandoning a process and at_quick_exit N2440NoN/A
      Allow atomics use in signal handlers N2547NoSVN
      Thread-local storage N2659NoNo
      Dynamic initialization and destruction with concurrency N2660NoNo
      C99 Features in C++0xC99 Features in C++11
      __func__ predefined identifier N2340Clang 2.9Clang 2.9
      C99 preprocessor N1653Clang 2.9Clang 2.9
      long long N1811Clang 2.9Clang 2.9
      Extended integral types N1988NoNo
      -
      diff --git a/www/diagnostics.html b/www/diagnostics.html index b3b168b888368..45f69074bcfdd 100644 --- a/www/diagnostics.html +++ b/www/diagnostics.html @@ -4,10 +4,14 @@ Clang - Expressive Diagnostics - - + + + .warn { color:magenta; } + .err { color:red; } + .snip { color:darkgreen; } + .point { color:blue; } + @@ -35,14 +39,14 @@ that embed Clang and extract equivalent information through internal APIs.-->

      First, all diagnostics produced by clang include full column number information. The clang command-line compiler driver uses this information -to print "caret diagnostics". +to print "point diagnostics". (IDEs can use the information to display in-line error markup.) Precise error location in the source is a feature provided by many commercial compilers, but is generally missing from open source compilers. This is nice because it makes it very easy to understand exactly what is wrong in a particular piece of code

      -

      The caret (the blue "^" character) exactly shows where the problem is, even +

      The point (the blue "^" character) exactly shows where the problem is, even inside of a string. This makes it really easy to jump to the problem and helps when multiple instances of the same character occur on a line. (We'll revisit this more in following examples.)

      @@ -51,9 +55,9 @@ revisit this more in following examples.)

      $ gcc-4.2 -fsyntax-only -Wformat format-strings.c format-strings.c:91: warning: too few arguments for format $ clang -fsyntax-only format-strings.c - format-strings.c:91:13: warning: '.*' specified field precision is missing a matching 'int' argument - printf("%.*d"); - ^ + format-strings.c:91:13: warning: '.*' specified field precision is missing a matching 'int' argument + printf("%.*d"); + ^

      Range Highlighting for Related Text

      @@ -63,7 +67,7 @@ statements, and other constructs in your program and uses this to make diagnostics highlight related information. In the following somewhat nonsensical example you can see that you don't even need to see the original source code to understand what is wrong based on the Clang error. Because clang prints a -caret, you know exactly which plus it is complaining about. The range +point, you know exactly which plus it is complaining about. The range information highlights the left and right side of the plus which makes it immediately obvious what the compiler is talking about. Range information is very useful for @@ -73,9 +77,9 @@ cases involving precedence issues and many other cases.

      $ gcc-4.2 -fsyntax-only t.c t.c:7: error: invalid operands to binary + (have 'int' and 'struct A') $ clang -fsyntax-only t.c - t.c:7:39: error: invalid operands to binary expression ('int' and 'struct A') - return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X); - ~~~~~~~~~~~~~~ ^ ~~~~~ + t.c:7:39: error: invalid operands to binary expression ('int' and 'struct A') + return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X); + ~~~~~~~~~~~~~~ ^ ~~~~~

      Precision in Wording

      @@ -84,7 +88,7 @@ cases involving precedence issues and many other cases.

      out of clang contain exactly the pertinent information about what is wrong and why. In the example above, we tell you what the inferred types are for the left and right hand sides, and we don't repeat what is obvious from the -caret (e.g., that this is a "binary +").

      +point (e.g., that this is a "binary +").

      Many other examples abound. In the following example, not only do we tell you that there is a problem with the * and point to it, we say exactly why and tell you what the type is (in case it is @@ -96,9 +100,9 @@ quickly.

      $ gcc-4.2 -fsyntax-only t.c t.c:5: error: invalid type argument of 'unary *' $ clang -fsyntax-only t.c - t.c:5:11: error: indirection requires pointer operand ('int' invalid) - int y = *SomeA.X; - ^~~~~~~~ + t.c:5:11: error: indirection requires pointer operand ('int' invalid) + int y = *SomeA.X; + ^~~~~~~~

      No Pretty Printing of Expressions in Diagnostics

      @@ -111,9 +115,9 @@ it tries to do this. In this example P and Q have type "int*":

      $ gcc-4.2 -fsyntax-only t.c #'exact_div_expr' not supported by pp_c_expression#'t.c:12: error: called object is not a function $ clang -fsyntax-only t.c - t.c:12:8: error: called object type 'int' is not a function or function pointer - (P-Q)(); - ~~~~~^ + t.c:12:8: error: called object type 'int' is not a function or function pointer + (P-Q)(); + ~~~~~^

      This can be particularly bad in G++, which often emits errors @@ -136,9 +140,9 @@ it tries to do this. In this example P and Q have type "int*":

      t.cc:9: error: no match for 'operator+' in '(((a*)P) + (*(long int*)(P->foo::<anonymous>.a::_vptr$a + -0x00000000000000020)))->a::bar() + * P' t.cc:9: error: return-statement with a value, in function returning 'void' $ clang t.cc - t.cc:9:18: error: invalid operands to binary expression ('int' and 'foo') - return P->bar() + *P; - ~~~~~~~~ ^ ~~ + t.cc:9:18: error: invalid operands to binary expression ('int' and 'foo') + return P->bar() + *P; + ~~~~~~~~ ^ ~~ @@ -160,9 +164,9 @@ message would be ugly just because it was long and hard to read.

      $ gcc-4.2 -fsyntax-only t.c t.c:15: error: invalid operands to binary / (have 'float __vector__' and 'const int *') $ clang -fsyntax-only t.c - t.c:15:11: error: can't convert between vector values of different size ('__m128' and 'int const *') - myvec[1]/P; - ~~~~~~~~^~ + t.c:15:11: error: can't convert between vector values of different size ('__m128' and 'int const *') + myvec[1]/P; + ~~~~~~~~^~

      The following example shows where it is useful for the compiler to expose @@ -173,9 +177,9 @@ system "pid_t" typedef is defined, Clang helpfully displays it with "aka".

      $ gcc-4.2 -fsyntax-only t.c t.c:13: error: request for member 'x' in something not a structure or union $ clang -fsyntax-only t.c - t.c:13:9: error: member reference base type 'pid_t' (aka 'int') is not a structure or union - myvar = myvar.x; - ~~~~~ ^ + t.c:13:9: error: member reference base type 'pid_t' (aka 'int') is not a structure or union + myvar = myvar.x; + ~~~~~ ^

      In C++, type preservation includes retaining any qualification written into type names. For example, if we take a small snippet of code such as: @@ -204,9 +208,9 @@ void addHTTPService(servers::Server const &server, ::services::WebService co $ g++-4.2 -fsyntax-only t.cpp t.cpp:9: error: no match for 'operator+=' in 'server += http' $ clang -fsyntax-only t.cpp - t.cpp:9:10: error: invalid operands to binary expression ('servers::Server const' and '::services::WebService const *') - server += http; - ~~~~~~ ^ ~~~~ + t.cpp:9:10: error: invalid operands to binary expression ('servers::Server const' and '::services::WebService const *') + server += http; + ~~~~~~ ^ ~~~~

      Naturally, type preservation extends to uses of templates, and Clang retains information about how a particular template specialization (like std::vector<Real>) was spelled within the source code. For example:

      @@ -215,9 +219,9 @@ void addHTTPService(servers::Server const &server, ::services::WebService co $ g++-4.2 -fsyntax-only t.cpp t.cpp:12: error: no match for 'operator=' in 'str = vec' $ clang -fsyntax-only t.cpp - t.cpp:12:7: error: incompatible type assigning 'vector<Real>', expected 'std::string' (aka 'class std::basic_string<char>') - str = vec; - ^ ~~~ + t.cpp:12:7: error: incompatible type assigning 'vector<Real>', expected 'std::string' (aka 'class std::basic_string<char>') + str = vec; + ^ ~~~

      Fix-it Hints

      @@ -230,18 +234,18 @@ specific guidance in the form of a code transformation to correct the problem. In the following example, Clang warns about the use of a GCC extension that has been considered obsolete since 1993. The underlined code should be removed, then replaced with the code below the -caret line (".x =" or ".y =", respectively).

      +point line (".x =" or ".y =", respectively).

         $ clang t.c
      -  t.c:5:28: warning: use of GNU old-style field designator extension
      -  struct point origin = { x: 0.0, y: 0.0 };
      -                          ~~ ^
      -                          .x = 
      -  t.c:5:36: warning: use of GNU old-style field designator extension
      -  struct point origin = { x: 0.0, y: 0.0 };
      -                                  ~~ ^
      -                                  .y = 
      +  t.c:5:28: warning: use of GNU old-style field designator extension
      +  struct point origin = { x: 0.0, y: 0.0 };
      +                          ~~ ^
      +                          .x = 
      +  t.c:5:36: warning: use of GNU old-style field designator extension
      +  struct point origin = { x: 0.0, y: 0.0 };
      +                                  ~~ ^
      +                                  .y = 
       

      "Fix-it" hints are most useful for @@ -253,10 +257,10 @@ diagnostic.

         $ clang t.cpp
      -  t.cpp:9:3: error: template specialization requires 'template<>'
      +  t.cpp:9:3: error: template specialization requires 'template<>'
           struct iterator_traits<file_iterator> {
      -    ^
      -    template<> 
      +    ^
      +    template<> 
       

      Automatic Macro Expansion

      @@ -273,12 +277,12 @@ and also shows how some of the other pieces work in a bigger example.

      t.c: In function 'test': t.c:80: error: invalid operands to binary < (have 'struct mystruct' and 'float') $ clang -fsyntax-only t.c - t.c:80:3: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) - X = MYMAX(P, F); - ^~~~~~~~~~~ + t.c:80:3: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) + X = MYMAX(P, F); + ^~~~~~~~~~~ t.c:76:94: note: instantiated from: - #define MYMAX(A,B) __extension__ ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) - ~~~ ^ ~~~ + #define MYMAX(A,B) __extension__ ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) + ~~~ ^ ~~~

      Here's another real world warning that occurs in the "window" Unix package (which @@ -286,15 +290,15 @@ implements the "wwopen" class of APIs):

         $ clang -fsyntax-only t.c
      -  t.c:22:2: warning: type specifier missing, defaults to 'int'
      -          ILPAD();
      -          ^
      +  t.c:22:2: warning: type specifier missing, defaults to 'int'
      +          ILPAD();
      +          ^
         t.c:17:17: note: instantiated from:
      -  #define ILPAD() PAD((NROW - tt.tt_row) * 10)    /* 1 ms per char */
      -                  ^
      +  #define ILPAD() PAD((NROW - tt.tt_row) * 10)    /* 1 ms per char */
      +                  ^
         t.c:14:2: note: instantiated from:
      -          register i; \
      -          ^
      +          register i; \
      +          ^
       

      In practice, we've found that Clang's treatment of macros is actually more useful in multiply nested @@ -308,7 +312,7 @@ little things add up over time and contribute to a great user experience.

      The following example shows a trivial little tweak, where we tell you to put the semicolon at the end of the line that is missing it (line 4) instead of at the beginning of the following line (line 5). This is particularly important with fixit hints -and caret diagnostics, because otherwise you don't get the important context. +and point diagnostics, because otherwise you don't get the important context.

      @@ -316,10 +320,10 @@ and caret diagnostics, because otherwise you don't get the important context.
         t.c: In function 'foo':
         t.c:5: error: expected ';' before '}' token
         $ clang t.c
      -  t.c:4:8: error: expected ';' after expression
      -    bar()
      -         ^
      -         ;
      +  t.c:4:8: error: expected ';' after expression
      +    bar()
      +         ^
      +         ;
       

      The following example shows much better error recovery than GCC. The message coming out @@ -330,9 +334,9 @@ and produces a much more useful diagnosis of the problem.

      $ gcc-4.2 t.c t.c:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token $ clang t.c - t.c:3:1: error: unknown type name 'foo_t' - foo_t *P = 0; - ^ + t.c:3:1: error: unknown type name 'foo_t' + foo_t *P = 0; + ^

      The following example shows that we recover from the simple case of @@ -352,14 +356,14 @@ forgetting a ; after a struct definition much better than GCC.

      t.cc:4: error: invalid type in declaration before ';' token t.cc:6: error: expected unqualified-id at end of input $ clang t.cc - t.cc:2:11: error: expected ';' after class - class a {} - ^ - ; - t.cc:6:2: error: expected ';' after struct - } - ^ - ; + t.cc:2:11: error: expected ';' after class + class a {} + ^ + ; + t.cc:6:2: error: expected ';' after struct + } + ^ + ;

      While each of these details is minor, we feel that they all add up to provide diff --git a/www/features.html b/www/features.html index 9e342ea0eca54..d55391a34fb48 100644 --- a/www/features.html +++ b/www/features.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Features and Goals - - + + @@ -71,7 +71,8 @@ options for performance analysis.

      is significantly quicker than gcc and uses less memory For example, when compiling "Carbon.h" on Mac OS/X, we see that clang is 2.5x faster than GCC:

      - +Time to parse carbon.h: -fsyntax-only

      Carbon.h is a monster: it transitively includes 558 files, 12.3M of code, declares 10000 functions, has 2000 struct definitions, 8000 fields, 20000 enum @@ -94,7 +95,8 @@ memory use is even moreso: the less memory the code takes the more code you can fit into memory at a time (useful for whole program analysis tools, for example).

      - +Space

      Here we see a huge advantage of clang: its ASTs take 5x less memory than GCC's syntax trees, despite the fact that clang's ASTs capture far more @@ -107,7 +109,8 @@ architecture that makes it relatively easy to adapt it and build new tools with it. This means that it is often possible to apply out-of-the-box thinking and novel techniques to improve compilation in various ways.

      - +Preprocessor Speeds: GCC 4.2 vs clang-all

      This slide shows how the clang preprocessor can be used to make "distcc" parallelization 3x more scalable than when using the GCC preprocessor. @@ -149,8 +152,8 @@ GCC and Clang diagnostic:

      t.c:7: error: invalid operands to binary + (have 'int' and 'struct A') $ clang -fsyntax-only t.c t.c:7:39: error: invalid operands to binary expression ('int' and 'struct A') - return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X); - ~~~~~~~~~~~~~~ ^ ~~~~~ + return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X); + ~~~~~~~~~~~~~~ ^ ~~~~~

      Here you can see that you don't even need to see the original source code to @@ -200,13 +203,13 @@ and uses. In addition, the library-based approach encourages good interfaces and makes it easier for new developers to get involved (because they only need to understand small pieces of the big picture).

      -
      +

      "The world needs better compiler tools, tools which are built as libraries. This design point allows reuse of the tools in new and novel ways. However, building the tools as libraries isn't enough: they must have clean APIs, be as decoupled from each other as possible, and be easy to modify/extend. This requires clean layering, decent design, and keeping the libraries independent of -any specific client."

      +any specific client."

      Currently, clang is divided into the following libraries and tool: @@ -295,7 +298,7 @@ hard, and we don't always get it right the first time, but we fix any problems when we realize we made a mistake.

      -

      Integration with IDEs

      +

      Integration with IDEs

      diff --git a/www/get_involved.html b/www/get_involved.html index eb9a97945b060..9ed2d470c1bd2 100644 --- a/www/get_involved.html +++ b/www/get_involved.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Get Involved - - + + @@ -32,8 +32,8 @@ interests. The two clang lists are:

      - This list is for patch submission/discussion.
    • cfe-dev - -This list is for everything else clang related (questions and answers, bug -reports, etc).
    • +This list is for everything else Clang related (questions and answers, design +discussions, etc).
    @@ -56,7 +56,7 @@ discussions or follow the list development on the web if you prefer.

    If you're looking for something to work on, check out our Open Projects page or go look through the Bugzilla bug database.

    -

    Contributing Extensions to Clang

    +

    Contributing Extensions to Clang

    Clang has always been designed as a platform for experimentation, allowing programmers to easily extend the compiler to support great diff --git a/www/get_started.html b/www/get_started.html index 515cd57ce259e..d819532f0dbd1 100644 --- a/www/get_started.html +++ b/www/get_started.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Getting Started - - + + @@ -45,17 +45,27 @@ follows:

    http://www.python.org/download
  • -
  • Checkout LLVM:
  • +
  • Checkout LLVM:
    • Change directory to where you want the llvm directory placed.
    • svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
    -
  • Checkout Clang:
  • + +
  • Checkout Clang:
    • cd llvm/tools
    • svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
    -
  • Build LLVM and Clang:
  • + +
  • Checkout Compiler-RT: +
      +
    • cd ../.. (back to where you started)
    • +
    • cd llvm/projects +
    • svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk + compiler-rt
    • +
    +
  • +
  • Build LLVM and Clang:
    • cd ../.. (back to where you started)
    • mkdir build (for building without polluting the source dir) @@ -66,15 +76,15 @@ follows:

    • This builds both LLVM and Clang for debug mode.
    • Note: For subsequent Clang development, you can just do make at the clang directory level.
    • +
    • It is also possible to use CMake instead of the makefiles. With CMake + it is also possible to generate project files for several IDEs: Eclipse + CDT4, CodeBlocks, Qt-Creator (use the CodeBlocks generator), KDevelop3.
    - -

    It is also possible to use CMake instead of the makefiles. With CMake it - is also possible to generate project files for several IDEs: Eclipse CDT4, - CodeBlocks, Qt-Creator (use the CodeBlocks generator), KDevelop3.

    +
  • If you intend to work on Clang C++ support, you may need to tell it how to find your C++ standard library headers. If Clang cannot find your - system libstdc++ headers, please follow these instructions:
  • + system libstdc++ headers, please follow these instructions:
    • 'gcc -v -x c++ /dev/null -fsyntax-only' to get the path.
    • @@ -82,7 +92,8 @@ follows:

      hard-coded paths" in clang/lib/Frontend/InitHeaderSearch.cpp and change the lines below to include that path.
    -
  • Try it out (assuming you add llvm/Debug+Asserts/bin to your path):
  • + +
  • Try it out (assuming you add llvm/Debug+Asserts/bin to your path):
    • clang --help
    • clang file.c -fsyntax-only (check for correctness)
    • @@ -90,6 +101,7 @@ follows:

    • clang file.c -S -emit-llvm -o - -O3
    • clang file.c -S -O3 -o - (output native machine code)
    +
  • Note that the C front-end uses LLVM, but does not depend on llvm-gcc. If you @@ -116,7 +128,7 @@ to subversion.

    Visual Studio:

      -
    1. Get the required tools:
    2. +
    3. Get the required tools: +
    4. -
    5. Checkout LLVM:
    6. +
    7. Checkout LLVM:
      • svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
      -
    8. Checkout Clang:
    9. + +
    10. Checkout Clang:
      • cd llvm\tools
      • svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
      -
    11. Run cmake to generate the Visual Studio solution and project files:
    12. + +
    13. Run cmake to generate the Visual Studio solution and project files:
      • cd ..\.. (back to where you started)
      • mkdir build (for building without polluting the source dir)
      • cd build
      • -
      • If you are using Visual Studio 2005: cmake -G "Visual Studio 8 2005" ..\llvm
      • -
      • Or if you are using Visual Studio 2008: cmake -G "Visual Studio 9 2008" ..\llvm
      • +
      • If you are using Visual Studio 2008: cmake -G "Visual Studio 9 2008" ..\llvm
      • Or if you are using Visual Studio 2010: cmake -G "Visual Studio 10" ..\llvm
      • By default, cmake will target LLVM to X86. If you want all targets (needed if you want to run the LLVM tests), add the -DLLVM_TARGETS_TO_BUILD=all option to the @@ -163,16 +177,17 @@ Visual Studio:

        definition in CMakeLists.txt.
      • See the LLVM CMake guide for more information on other configuration options for cmake.
      • -
      • The above, if successful, will have created an LLVM.sln file in the build directory.
      -
    14. Build Clang:
    15. + +
    16. Build Clang:
      • Open LLVM.sln in Visual Studio.
      • Build the "clang" project for just the compiler driver and front end, or the "ALL_BUILD" project to build everything, including tools.
      +
    17. Try it out (assuming you added llvm/debug/bin to your path). (See the running examples from above.)
    18. See @@ -184,7 +199,7 @@ Visual Studio:

      to the latest code base, use the svn update command in both the llvm and llvm\tools\clang directories, as they are separate repositories.

      -

      Clang Compiler Driver (Drop-in Substitute for GCC)

      +

      Clang Compiler Driver (Drop-in Substitute for GCC)

      The clang tool is the compiler driver and front-end, which is designed to be a drop-in replacement for the gcc command. Here are @@ -243,9 +258,9 @@ $ clang -fsyntax-only ~/t.c

       $ clang -fsyntax-only ~/t.c -pedantic
      -/Users/sabre/t.c:2:17: warning: extension used
      -typedef float V __attribute__((vector_size(16)));
      -                ^
      +/Users/sabre/t.c:2:17: warning: extension used
      +typedef float V __attribute__((vector_size(16)));
      +                ^
       1 diagnostic generated.
       
      diff --git a/www/hacking.html b/www/hacking.html index b65768c9873a8..2c11ce1896d2c 100644 --- a/www/hacking.html +++ b/www/hacking.html @@ -3,10 +3,13 @@ - + Hacking on clang - - + + + @@ -22,18 +25,19 @@
    19. Coding Standards
    20. Developer Documentation
    21. Debugging
    22. -
    23. Testing
    24. +
    25. Testing +
    26. Creating Patch Files
    27. LLVM IR Generation
    28. -

      Coding Standards

      +

      Coding Standards

      Clang follows the @@ -100,7 +104,7 @@

    29. Edit your local autoexp.dat (make sure you make a backup first!), located in Visual Studio Directory\Common7\Packages\Debugger and append the contents of clangVisuailzers.txt to it. This method should work for - Visual Studio 2005 and above. + Visual Studio 2008 and above.
    30. @@ -139,7 +143,7 @@

      During the run of make test, the terminal output will display a line similar to the following:

      -
        --- Running clang tests for i686-pc-linux-gnu ---
      +
      --- Running clang tests for i686-pc-linux-gnu ---

      followed by a line continually overwritten with the current test file being compiled, and an overall completion percentage.

      @@ -150,12 +154,12 @@ Failing Tests (count): message will be followed by a list of the test source file paths that failed. For example:

      -
      +  
         Failing Tests (3):
             /home/john/llvm/tools/clang/test/SemaCXX/member-name-lookup.cpp
             /home/john/llvm/tools/clang/test/SemaCXX/namespace-alias.cpp
             /home/john/llvm/tools/clang/test/SemaCXX/using-directive.cpp
      -  
      +

      If you used the make VERBOSE=1 option, the terminal output will reflect the error messages from the compiler and @@ -210,42 +214,57 @@

      To run all the tests from the command line, execute a command like the following:

      - - python (path to llvm)/llvm/utils/lit/lit.py -sv --no-progress-bar - (path to llvm)/llvm/tools/clang/test - +
      +  python (path to llvm)\llvm\utils\lit\lit.py -sv
      +  --param=build_mode=Win32 --param=build_config=Debug
      +  --param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg
      + (path to llvm)\llvm\tools\clang\test
      +

      For CMake builds e.g. on Windows with Visual Studio, you will need to specify your build configuration (Debug, Release, etc.) via - --param=build_config=(build config).

      + --param=build_config=(build config). You may also need to specify + the build mode (Win32, etc) via --param=build_mode=(build mode).

      + +

      Additionally, you will need to specify the lit site configuration which + lives in (build dir)\tools\clang\test, via + --param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg. +

      To run a single test:

      - - python (path to llvm)/llvm/utils/lit/lit.py -sv --no-progress-bar - (path to llvm)/llvm/tools/clang/test/(dir)/(test) - +
      +  python (path to llvm)\llvm\utils\lit\lit.py -sv
      +  --param=build_mode=Win32 --param=build_config=Debug
      +  --param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg
      +  (path to llvm)\llvm\tools\clang\test\(dir)\(test)
      +

      For example:

      - - python C:/Tools/llvm/utils/lit/lit.py -sv --no-progress-bar - C:/Tools/llvm/tools/clang/test/Sema/wchar.c - +
      +  python C:\Tool\llvm\utils\lit\lit.py -sv
      +  --param=build_mode=Win32 --param=build_config=Debug
      +  --param=clang_site_config=c:\Tools\build\tools\clang\test\lit.site.cfg
      +  C:\Tools\llvm\tools\clang\test\Sema\wchar.c
      +

      The -sv option above tells the runner to show the test output if any tests failed, to help you determine the cause of failure.

      +

      You can also pass in the --no-progress-bar option if you wish to disable + progress indications while the tests are running.

      +

      Your output might look something like this:

      -
      lit.py: lit.cfg:152: note: using clang: 'C:/Tools/llvm/bin/Release\\clang.EXE'
      +  
      lit.py: lit.cfg:152: note: using clang: 'C:\Tools\llvm\bin\Release\clang.EXE'
       -- Testing: Testing: 2534 tests, 4 threads --
       Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
       Testing Time: 81.52s
         Expected Passes    : 2503
         Expected Failures  : 28
         Unsupported Tests  : 3
      -
      +

      The statistic, "Unexpected Failures" (not shown if all tests pass), is the important one.

      @@ -255,24 +274,23 @@ Testing Time: 81.52s

      To return changes to the Clang team, unless you have checkin privileges, the preferred way is to send patch files to the - cfe-commits mailing list, with an explanation of what the patch is for. - Or, if you have questions, or want to have a wider discussion of what - you are doing, such as if you are new to Clang development, you can use - the cfe-dev mailing list also. -

      + cfe-commits mailing list, with an explanation of what the patch is + for. If your patch requires a wider discussion (for example, + because it is an architectural change), you can use the cfe-dev + mailing list.

      To create these patch files, change directory to the llvm/tools/clang root and run:

      -
        svn diff (relative path) >(patch file name)
      +
      svn diff (relative path) >(patch file name)

      For example, for getting the diffs of all of clang:

      -
        svn diff . >~/mypatchfile.patch
      +
      svn diff . >~/mypatchfile.patch

      For example, for getting the diffs of a single file:

      -
        svn diff lib/Parse/ParseDeclCXX.cpp >~/ParseDeclCXX.patch
      +
      svn diff lib/Parse/ParseDeclCXX.cpp >~/ParseDeclCXX.patch

      Note that the paths embedded in the patch depend on where you run it, so changing directory to the llvm/tools/clang directory is recommended.

      diff --git a/www/index.html b/www/index.html index 095eed790df82..6455262a461a4 100644 --- a/www/index.html +++ b/www/index.html @@ -94,7 +94,7 @@ targeting X86-32, X86-64, and ARM (other targets may have caveats, but are usually easy to fix). If you are looking for source analysis or source-to-source transformation tools, clang is probably a great - solution for you. Clang does not support C++'11 yet, please see the C++ status page for more information.

      diff --git a/www/performance-2008-10-31.html b/www/performance-2008-10-31.html index 5246ac30b8576..b2876670d3b1f 100644 --- a/www/performance-2008-10-31.html +++ b/www/performance-2008-10-31.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Performance - - + + @@ -20,7 +20,7 @@

      This page tracks the compile time performance of Clang on two -interesting benchmarks: +interesting benchmarks:

      • Sketch: The Objective-C example application shipped on Mac OS X as part of Xcode. Sketch is indicative of a @@ -37,7 +37,6 @@ interesting benchmarks: dependencies. This stresses the back-end's performance on generating assembly code and debug information.
      -

      Experiments

      @@ -46,7 +45,7 @@ interesting benchmarks:

      Measurements are done by serially processing each file in the respective benchmark, using Clang, gcc, and llvm-gcc as compilers. In order to track the performance of various subsystems the timings have -been broken down into separate stages where possible: +been broken down into separate stages where possible:

      • -Eonly: This option runs the preprocessor but does not @@ -65,7 +64,6 @@ been broken down into separate stages where possible:
      • -S -O0 -g: This adds emission of debug information to the assembly output.
      -

      This set of stages is chosen to be approximately additive, that is each subsequent stage simply adds some additional processing. The @@ -94,9 +92,9 @@ compile time here.

      2008-10-31

      -

      Sketch

      +

      Sketch

      Sketch Timings + src="timing-data/2008-10-31/sketch.png" alt="Sketch Timings">

      This shows Clang's substantial performance improvements in preprocessing and semantic analysis; over 90% faster on @@ -112,9 +110,9 @@ with PCH; about 4x in wall time. Unfortunately, Clang does not yet have an implementation of PCH-style optimizations, but we are actively working to address this.

      -

      176.gcc

      +

      176.gcc

      176.gcc Timings + src="timing-data/2008-10-31/176.gcc.png" alt="176.gcc Timings">

      Unlike the Sketch timings, compilation of 176.gcc involves a large amount of code generation. The time spent in Clang's diff --git a/www/performance-2009-03-02.html b/www/performance-2009-03-02.html index f76fc7a0094d8..3e8c411105363 100644 --- a/www/performance-2009-03-02.html +++ b/www/performance-2009-03-02.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Performance - - + + @@ -20,7 +20,7 @@

      This page shows the compile time performance of Clang on two -interesting benchmarks: +interesting benchmarks:

      • Sketch: The Objective-C example application shipped on Mac OS X as part of Xcode. Sketch is indicative of a @@ -37,7 +37,6 @@ interesting benchmarks: dependencies. This stresses the back-end's performance on generating assembly code and debug information.
      -

      For previous performance numbers, please @@ -57,7 +56,7 @@ in order to evaluate the overhead of the driver itself.

      have been broken down into separate stages where possible. This is done by over-riding the CC environment variable used during the build to point to one of a few simple shell scripts which may skip part of -the build. +the build.

      • non-compiler: The overhead of the build system itself; @@ -78,7 +77,6 @@ the build.
      • + assembler: Add assembler time to generate .o files.
      • + linker: Add linker time.
      -

      This set of stages is chosen to be approximately additive, that is each subsequent stage simply adds some additional processing. The @@ -99,12 +97,12 @@ analysis (and preprocessing/parsing, in the case of gcc).

      Sketch Timings + src="timing-data/2009-03-02/sketch.png" alt="Sketch Timings"> 176.gcc Timings + src="timing-data/2009-03-02/176.gcc.png" alt="176.gcc Timings"> diff --git a/www/performance.html b/www/performance.html index 2bb8fe272f2d5..e85f19185544f 100644 --- a/www/performance.html +++ b/www/performance.html @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/strict.dtd"> - + Clang - Performance - - + + @@ -20,7 +20,7 @@

      This page shows the compile time performance of Clang on two -interesting benchmarks: +interesting benchmarks:

      • Sketch: The Objective-C example application shipped on Mac OS X as part of Xcode. Sketch is indicative of a @@ -37,7 +37,6 @@ interesting benchmarks: dependencies. This stresses the back-end's performance on generating assembly code and debug information.
      -

      For previous performance numbers, please @@ -56,7 +55,7 @@ compilers.

      have been broken down into separate stages where possible. This is done by over-riding the CC environment variable used during the build to point to one of a few simple shell scripts which may skip part of -the build. +the build.

      • non-compiler: The overhead of the build system itself; @@ -73,7 +72,6 @@ the build.
      • + assembler: Add assembler time to generate .o files.
      • + linker: Add linker time.
      -

      This set of stages is chosen to be approximately additive, that is each subsequent stage simply adds some additional processing. The timings measure the @@ -93,12 +91,12 @@ semantic analysis after PCH generation is done.

      Sketch Timings + src="timing-data/2009-06-26/sketch.png" alt="Sketch Timings"> 176.gcc Timings + src="timing-data/2009-06-26/176.gcc.png" alt="176.gcc Timings"> diff --git a/www/related.html b/www/related.html index 9fcd390d23997..a1ff79b67de26 100644 --- a/www/related.html +++ b/www/related.html @@ -3,10 +3,10 @@ - + Clang Related Projects - - + + -- cgit v1.2.3