<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>The amount of churn this patches introduces is very large for a very small gain.</div><div>Other than basically causing to every downstream consumer with private clang changes a large amount of pain, it also introduced a bug (which shows up only on lldb bots).</div><div>I really think we should have a policy that these commits shouldn’t be encouraged. At some point I and Chandler discussed this on IRC, but I’m not sure this went anywhere.</div><div><br class=""></div><div>In general, large refactoring of code not properly understood is causing more harm to the project than good. We’re going to revert this now, and I would like to kick off a discussion about this in the future.</div><div><br class=""></div><div>Thanks,</div><div><br class=""></div><div>—</div><div>Davide</div><div><br class=""></div><div><blockquote type="cite" class=""><div class="">On Apr 13, 2018, at 18:36, Vedant Kumar <<a href="mailto:vsk@apple.com" class="">vsk@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">+ Davide<div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 13, 2018, at 6:36 PM, Vedant Kumar via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">This is breaking the lldb bots with assertion failures:<div class=""><br class=""></div><div class=""><a href="http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/" class="">http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/</a></div><div class=""><a href="http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/6341/" class="">http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/6341/</a></div><div class=""><br class=""></div><div class=""><div class="">stderr: Assertion failed: (M && "imported decl from no module file"), function loadPendingDeclChain, file /Users/vsk/src/<a href="http://llvm.org/" class="">llvm.org</a>-lldbsan/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp, line 3861.</div><div class="">Stack dump:</div><div class="">0.<span class="Apple-tab-span" style="white-space:pre"> </span>Program arguments: /Users/vsk/src/builds/<a href="http://llvm.org/" class="">llvm.org</a>-lldbsan-RA/bin/clang-7 -cc1 -triple x86_64-apple-macosx10.13.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -main-file-name main.m -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu penryn -dwarf-column-info -dwarf-ext-refs -fmodule-format=obj -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb -target-linker-version 405.15 -coverage-notes-file /Users/vsk/src/builds/<a href="http://llvm.org/" class="">llvm.org</a>-lldbsan-RA/lldb-test-build.noindex/lang/objc/forward-decl/TestForwardDecl.test_expr_gmodules/main.gcno -resource-dir /Users/vsk/src/builds/<a href="http://llvm.org/" class="">llvm.org</a>-lldbsan-RA/lib/clang/7.0.0 -include /Users/vsk/src/<a href="http://llvm.org/" class="">llvm.org</a>-lldbsan/llvm/tools/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/../../../make/test_common.h -isysroot /Volumes/Xcode10A144_m18A232_i16A233_t16J228_w16R229_XcodeInternals_ASan_30GB/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I /Users/vsk/src/<a href="http://llvm.org/" class="">llvm.org</a>-lldbsan/llvm/tools/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/../../../make/../../../../../include -I /Users/vsk/src/<a href="http://llvm.org/" class="">llvm.org</a>-lldbsan/llvm/tools/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/ -I /Users/vsk/src/<a href="http://llvm.org/" class="">llvm.org</a>-lldbsan/llvm/tools/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/../../../make/ -O0 -fdebug-compilation-dir /Users/vsk/src/builds/<a href="http://llvm.org/" class="">llvm.org</a>-lldbsan-RA/lldb-test-build.noindex/lang/objc/forward-decl/TestForwardDecl.test_expr_gmodules -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fno-builtin -fblocks -fencode-extended-block-signature -fmodules -fimplicit-module-maps -fmodules-cache-path=module-cache -fobjc-runtime=macosx-10.13.0 -fobjc-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -o main.o -x objective-c /Users/vsk/src/<a href="http://llvm.org/" class="">llvm.org</a>-lldbsan/llvm/tools/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/main.m </div><div class="">1.<span class="Apple-tab-span" style="white-space:pre"> </span>/Users/vsk/src/<a href="http://llvm.org/" class="">llvm.org</a>-lldbsan/llvm/tools/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.h:10:10: current parser token ';'</div><div class="">0 clang-7 0x000000010f38bf18 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40</div><div class="">1 clang-7 0x000000010f38c5a6 SignalHandler(int) + 422</div><div class="">2 libsystem_platform.dylib 0x00007fff72cc6f5a _sigtramp + 26</div><div class="">3 libsystem_platform.dylib 000000000000000000 _sigtramp + 2368966848</div><div class="">4 libsystem_c.dylib 0x00007fff72af1312 abort + 127</div><div class="">5 libsystem_c.dylib 0x00007fff72ab9368 basename_r + 0</div><div class="">6 clang-7 0x000000011005cfe1 clang::ASTReader::loadPendingDeclChain(clang::Decl*, unsigned long long) + 817</div><div class="">7 clang-7 0x0000000110012bcf clang::ASTReader::finishPendingActions() + 831</div><div class="">8 clang-7 0x000000011001f2b9 clang::ASTReader::FinishedDeserializing() + 1097</div><div class="">9 clang-7 0x0000000110059f96 clang::ASTReader::ReadDeclRecord(unsigned int) + 4230</div><div class="">10 clang-7 0x0000000110023cbe clang::ASTReader::GetLocalDecl(clang::serialization::ModuleFile&, unsigned int) + 238</div><div class="">11 clang-7 0x000000010ffd20c4 clang::serialization::reader::ASTSelectorLookupTrait::ReadData(clang::Selector, unsigned char const*, unsigned int) + 372</div><div class="">12 clang-7 0x000000011002cd5c clang::serialization::ReadMethodPoolVisitor::operator()(clang::serialization::ModuleFile&) + 348</div><div class="">13 clang-7 0x00000001101403bb clang::serialization::ModuleManager::visit(llvm::function_ref<bool (clang::serialization::ModuleFile&)>, llvm::SmallPtrSetImpl<clang::serialization::ModuleFile*>*) + 1627</div><div class="">14 clang-7 0x000000011000d5f5 clang::ASTReader::ReadMethodPool(clang::Selector) + 229</div><div class="">15 clang-7 0x000000011040a99b (anonymous namespace)::OverrideSearch::OverrideSearch(clang::Sema&, clang::ObjCMethodDecl*) + 411</div><div class="">16 clang-7 0x0000000110409f6a clang::Sema::CheckObjCMethodOverrides(clang::ObjCMethodDecl*, clang::ObjCInterfaceDecl*, clang::Sema::ResultTypeCompatibilityKind) + 74</div><div class="">17 clang-7 0x000000011040bfef clang::Sema::ActOnMethodDeclaration(clang::Scope*, clang::SourceLocation, clang::SourceLocation, clang::tok::TokenKind, clang::ObjCDeclSpec&, clang::OpaquePtr<clang::QualType>, llvm::ArrayRef<clang::SourceLocation>, clang::Selector, clang::Sema::ObjCArgInfo*, clang::DeclaratorChunk::ParamInfo*, unsigned int, clang::AttributeList*, clang::tok::ObjCKeywordKind, bool, bool) + 5311</div><div class="">18 clang-7 0x000000010ff7b8f9 clang::Parser::ParseObjCMethodDecl(clang::SourceLocation, clang::tok::TokenKind, clang::tok::ObjCKeywordKind, bool) + 1465</div><div class="">19 clang-7 0x000000010ff792e2 clang::Parser::ParseObjCInterfaceDeclList(clang::tok::ObjCKeywordKind, clang::Decl*) + 258</div><div class="">20 clang-7 0x000000010ff7588b clang::Parser::ParseObjCAtInterfaceDeclaration(clang::SourceLocation, clang::ParsedAttributes&) + 2587</div><div class="">21 clang-7 0x000000010ff747d8 clang::Parser::ParseObjCAtDirectives(clang::Parser::ParsedAttributesWithRange&) + 312</div><div class="">22 clang-7 0x000000010ffbd4a7 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) + 967</div><div class="">23 clang-7 0x000000010ffbc9e2 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 626</div><div class="">24 clang-7 0x000000010ff18c76 clang::ParseAST(clang::Sema&, bool, bool) + 438</div><div class="">25 clang-7 0x000000010fa402dc clang::FrontendAction::Execute() + 76</div><div class="">26 clang-7 0x000000010f9e3521 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1345</div><div class="">27 clang-7 0x000000010fa8f411 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1441</div><div class="">28 clang-7 0x000000010e16466d cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1437</div><div class="">29 clang-7 0x000000010e162552 main + 10882</div><div class="">30 libdyld.dylib 0x00007fff72a45115 start + 1</div><div class="">31 libdyld.dylib 0x0000000000000045 start + 2371596081</div><div class="">clang-7: error: unable to execute command: Abort trap: 6</div><div class="">clang-7: error: clang frontend command failed due to signal (use -v to see invocation)</div><div class="">clang version 7.0.0 (trunk 330077) (llvm/trunk 330079)</div><div class="">Target: x86_64-apple-darwin17.4.0</div><div class="">Thread model: posix</div><div class="">InstalledDir: /Users/vsk/src/builds/<a href="http://llvm.org/" class="">llvm.org</a>-lldbsan-RA/bin</div><div class="">clang-7: note: diagnostic msg: PLEASE submit a bug report to <a href="https://bugs.llvm.org/" class="">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source, and associated run script.</div><div class="">clang-7: note: diagnostic msg: </div><div class="">********************</div><div class=""><br class=""></div></div><div class="">vedant</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 13, 2018, at 2:12 PM, Eugene Zelenko via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Author: eugenezelenko<br class="">Date: Fri Apr 13 14:12:33 2018<br class="">New Revision: 330068<br class=""><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=330068&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=330068&view=rev</a><br class="">Log:<br class="">[Serialization] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).<br class=""><br class="">Modified:<br class=""> cfe/trunk/lib/Serialization/ASTReader.cpp<br class=""><br class="">Modified: cfe/trunk/lib/Serialization/ASTReader.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=330068&r1=330067&r2=330068&view=diff" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=330068&r1=330067&r2=330068&view=diff</a><br class="">==============================================================================<br class="">--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)<br class="">+++ cfe/trunk/lib/Serialization/ASTReader.cpp Fri Apr 13 14:12:33 2018<br class="">@@ -71,6 +71,7 @@<br class=""> #include "clang/Lex/Preprocessor.h"<br class=""> #include "clang/Lex/PreprocessorOptions.h"<br class=""> #include "clang/Lex/Token.h"<br class="">+#include "clang/Sema/DeclSpec.h"<br class=""> #include "clang/Sema/ObjCMethodList.h"<br class=""> #include "clang/Sema/Scope.h"<br class=""> #include "clang/Sema/Sema.h"<br class="">@@ -97,11 +98,11 @@<br class=""> #include "llvm/ADT/SmallPtrSet.h"<br class=""> #include "llvm/ADT/SmallString.h"<br class=""> #include "llvm/ADT/SmallVector.h"<br class="">-#include "llvm/ADT/StringExtras.h"<br class=""> #include "llvm/ADT/StringMap.h"<br class=""> #include "llvm/ADT/StringRef.h"<br class=""> #include "llvm/ADT/Triple.h"<br class=""> #include "llvm/ADT/iterator_range.h"<br class="">+#include "llvm/Bitcode/BitCodes.h"<br class=""> #include "llvm/Bitcode/BitstreamReader.h"<br class=""> #include "llvm/Support/Casting.h"<br class=""> #include "llvm/Support/Compression.h"<br class="">@@ -133,8 +134,8 @@<br class=""> #include <vector><br class=""><br class=""> using namespace clang;<br class="">-using namespace clang::serialization;<br class="">-using namespace clang::serialization::reader;<br class="">+using namespace serialization;<br class="">+using namespace reader;<br class=""> using llvm::BitstreamCursor;<br class=""><br class=""> //===----------------------------------------------------------------------===//<br class="">@@ -463,7 +464,7 @@ static bool checkDiagnosticGroupMappings<br class=""> // errors because of options like -Werror.<br class=""> DiagnosticsEngine *MappingSources[] = { &Diags, &StoredDiags };<br class=""><br class="">- for (DiagnosticsEngine *MappingSource : MappingSources) {<br class="">+ for (auto *MappingSource : MappingSources) {<br class=""> for (auto DiagIDMappingPair : MappingSource->getDiagnosticMappings()) {<br class=""> diag::kind DiagID = DiagIDMappingPair.first;<br class=""> Level CurLevel = Diags.getDiagnosticLevel(DiagID, SourceLocation());<br class="">@@ -581,9 +582,9 @@ static void<br class=""> collectMacroDefinitions(const PreprocessorOptions &PPOpts,<br class=""> MacroDefinitionsMap &Macros,<br class=""> SmallVectorImpl<StringRef> *MacroNames = nullptr) {<br class="">- for (unsigned I = 0, N = PPOpts.Macros.size(); I != N; ++I) {<br class="">- StringRef Macro = PPOpts.Macros[I].first;<br class="">- bool IsUndef = PPOpts.Macros[I].second;<br class="">+ for (const auto &I : PPOpts.Macros) {<br class="">+ StringRef Macro = I.first;<br class="">+ bool IsUndef = I.second;<br class=""><br class=""> std::pair<StringRef, StringRef> MacroPair = Macro.split('=');<br class=""> StringRef MacroName = MacroPair.first;<br class="">@@ -634,9 +635,8 @@ static bool checkPreprocessorOptions(con<br class=""> SmallVector<StringRef, 4> ExistingMacroNames;<br class=""> collectMacroDefinitions(ExistingPPOpts, ExistingMacros, &ExistingMacroNames);<br class=""><br class="">- for (unsigned I = 0, N = ExistingMacroNames.size(); I != N; ++I) {<br class="">+ for (auto MacroName : ExistingMacroNames) {<br class=""> // Dig out the macro definition in the existing preprocessor options.<br class="">- StringRef MacroName = ExistingMacroNames[I];<br class=""> std::pair<StringRef, bool> Existing = ExistingMacros[MacroName];<br class=""><br class=""> // Check whether we know anything about this macro name or not.<br class="">@@ -702,8 +702,7 @@ static bool checkPreprocessorOptions(con<br class=""> }<br class=""><br class=""> // Compute the #include and #include_macros lines we need.<br class="">- for (unsigned I = 0, N = ExistingPPOpts.Includes.size(); I != N; ++I) {<br class="">- StringRef File = ExistingPPOpts.Includes[I];<br class="">+ for (const auto &File : ExistingPPOpts.Includes) {<br class=""> if (File == ExistingPPOpts.ImplicitPCHInclude)<br class=""> continue;<br class=""><br class="">@@ -716,8 +715,7 @@ static bool checkPreprocessorOptions(con<br class=""> SuggestedPredefines += "\"\n";<br class=""> }<br class=""><br class="">- for (unsigned I = 0, N = ExistingPPOpts.MacroIncludes.size(); I != N; ++I) {<br class="">- StringRef File = ExistingPPOpts.MacroIncludes[I];<br class="">+ for (const auto &File : ExistingPPOpts.MacroIncludes) {<br class=""> if (std::find(PPOpts.MacroIncludes.begin(), PPOpts.MacroIncludes.end(),<br class=""> File)<br class=""> != PPOpts.MacroIncludes.end())<br class="">@@ -855,14 +853,14 @@ ASTSelectorLookupTrait::ReadData(Selecto<br class=""><br class=""> // Load instance methods<br class=""> for (unsigned I = 0; I != NumInstanceMethods; ++I) {<br class="">- if (ObjCMethodDecl *Method = Reader.GetLocalDeclAs<ObjCMethodDecl>(<br class="">+ if (auto *Method = Reader.GetLocalDeclAs<ObjCMethodDecl>(<br class=""> F, endian::readNext<uint32_t, little, unaligned>(d)))<br class=""> Result.Instance.push_back(Method);<br class=""> }<br class=""><br class=""> // Load factory methods<br class=""> for (unsigned I = 0; I != NumFactoryMethods; ++I) {<br class="">- if (ObjCMethodDecl *Method = Reader.GetLocalDeclAs<ObjCMethodDecl>(<br class="">+ if (auto *Method = Reader.GetLocalDeclAs<ObjCMethodDecl>(<br class=""> F, endian::readNext<uint32_t, little, unaligned>(d)))<br class=""> Result.Factory.push_back(Method);<br class=""> }<br class="">@@ -1087,7 +1085,7 @@ ASTDeclContextNameLookupTrait::internal_<br class=""> ASTDeclContextNameLookupTrait::ReadKey(const unsigned char *d, unsigned) {<br class=""> using namespace llvm::support;<br class=""><br class="">- auto Kind = (DeclarationName::NameKind)*d++;<br class="">+ auto Kind = static_cast<DeclarationName::NameKind>(*d++);<br class=""> uint64_t Data;<br class=""> switch (Kind) {<br class=""> case DeclarationName::Identifier:<br class="">@@ -1246,8 +1244,7 @@ bool ASTReader::ParseLineTable(ModuleFil<br class=""> unsigned FileOffset = Record[Idx++];<br class=""> unsigned LineNo = Record[Idx++];<br class=""> int FilenameID = FileIDs[Record[Idx++]];<br class="">- SrcMgr::CharacteristicKind FileKind<br class="">- = (SrcMgr::CharacteristicKind)Record[Idx++];<br class="">+ auto FileKind = static_cast<SrcMgr::CharacteristicKind>(Record[Idx++]);<br class=""> unsigned IncludeOffset = Record[Idx++];<br class=""> Entries.push_back(LineEntry::get(FileOffset, LineNo, FilenameID,<br class=""> FileKind, IncludeOffset));<br class="">@@ -1427,12 +1424,11 @@ bool ASTReader::ReadSLocEntry(int ID) {<br class=""> // This is the module's main file.<br class=""> IncludeLoc = getImportLocation(F);<br class=""> }<br class="">- SrcMgr::CharacteristicKind<br class="">- FileCharacter = (SrcMgr::CharacteristicKind)Record[2];<br class="">+ auto FileCharacter = static_cast<SrcMgr::CharacteristicKind>(Record[2]);<br class=""> FileID FID = SourceMgr.createFileID(File, IncludeLoc, FileCharacter,<br class=""> ID, BaseOffset + Record[0]);<br class="">- SrcMgr::FileInfo &FileInfo =<br class="">- const_cast<SrcMgr::FileInfo&>(SourceMgr.getSLocEntry(FID).getFile());<br class="">+ auto &FileInfo =<br class="">+ const_cast<SrcMgr::FileInfo &>(SourceMgr.getSLocEntry(FID).getFile());<br class=""> FileInfo.NumCreatedFIDs = Record[5];<br class=""> if (Record[3])<br class=""> FileInfo.setHasLineDirectives();<br class="">@@ -1462,8 +1458,7 @@ bool ASTReader::ReadSLocEntry(int ID) {<br class=""> case SM_SLOC_BUFFER_ENTRY: {<br class=""> const char *Name = Blob.data();<br class=""> unsigned Offset = Record[0];<br class="">- SrcMgr::CharacteristicKind<br class="">- FileCharacter = (SrcMgr::CharacteristicKind)Record[2];<br class="">+ auto FileCharacter = static_cast<SrcMgr::CharacteristicKind>(Record[2]);<br class=""> SourceLocation IncludeLoc = ReadSourceLocation(*F, Record[1]);<br class=""> if (IncludeLoc.isInvalid() && F->isModule()) {<br class=""> IncludeLoc = getImportLocation(F);<br class="">@@ -1592,8 +1587,8 @@ MacroInfo *ASTReader::ReadMacroRecord(Mo<br class=""><br class=""> // Read a record.<br class=""> Record.clear();<br class="">- PreprocessorRecordTypes RecType =<br class="">- (PreprocessorRecordTypes)Stream.readRecord(Entry.ID, Record);<br class="">+ auto RecType = static_cast<PreprocessorRecordTypes>(<br class="">+ Stream.readRecord(Entry.ID, Record));<br class=""> switch (RecType) {<br class=""> case PP_MODULE_MACRO:<br class=""> case PP_MACRO_DIRECTIVE_HISTORY:<br class="">@@ -1644,7 +1639,7 @@ MacroInfo *ASTReader::ReadMacroRecord(Mo<br class=""> PreprocessingRecord &PPRec = *PP.getPreprocessingRecord();<br class=""> PreprocessingRecord::PPEntityID PPID =<br class=""> PPRec.getPPEntityID(GlobalID - 1, /*isLoaded=*/true);<br class="">- MacroDefinitionRecord *PPDef = cast_or_null<MacroDefinitionRecord>(<br class="">+ auto *PPDef = cast_or_null<MacroDefinitionRecord>(<br class=""> PPRec.getPreprocessedEntity(PPID));<br class=""> if (PPDef)<br class=""> PPRec.RegisterMacroDefinition(Macro, PPDef);<br class="">@@ -1721,8 +1716,9 @@ std::pair<unsigned, unsigned><br class=""> HeaderFileInfoTrait::ReadKeyDataLength(const unsigned char*& d) {<br class=""> using namespace llvm::support;<br class=""><br class="">- unsigned KeyLen = (unsigned) endian::readNext<uint16_t, little, unaligned>(d);<br class="">- unsigned DataLen = (unsigned) *d++;<br class="">+ auto KeyLen = static_cast<unsigned>(<br class="">+ endian::readNext<uint16_t, little, unaligned>(d));<br class="">+ auto DataLen = static_cast<unsigned>(*d++);<br class=""> return std::make_pair(KeyLen, DataLen);<br class=""> }<br class=""><br class="">@@ -1808,7 +1804,7 @@ void ASTReader::ReadDefinedMacros() {<br class=""> // Note that we are loading defined macros.<br class=""> Deserializing Macros(this);<br class=""><br class="">- for (ModuleFile &I : llvm::reverse(ModuleMgr)) {<br class="">+ for (auto &I : llvm::reverse(ModuleMgr)) {<br class=""> BitstreamCursor &MacroCursor = I.MacroCursor;<br class=""><br class=""> // If there was no preprocessor block, skip this file.<br class="">@@ -1880,8 +1876,8 @@ namespace {<br class=""> if (M.Generation <= PriorGeneration)<br class=""> return true;<br class=""><br class="">- ASTIdentifierLookupTable *IdTable<br class="">- = (ASTIdentifierLookupTable *)M.IdentifierLookupTable;<br class="">+ auto *IdTable =<br class="">+ static_cast<ASTIdentifierLookupTable *>(M.IdentifierLookupTable);<br class=""> if (!IdTable)<br class=""> return false;<br class=""><br class="">@@ -2002,7 +1998,7 @@ void ASTReader::resolvePendingMacro(Iden<br class=""> llvm::SmallVector<ModuleMacro*, 8> Overrides;<br class=""> for (auto &MMR : ModuleMacros) {<br class=""> Overrides.clear();<br class="">- for (unsigned ModID : MMR.Overrides) {<br class="">+ for (auto ModID : MMR.Overrides) {<br class=""> Module *Mod = getSubmodule(ModID);<br class=""> auto *Macro = PP.getModuleMacro(Mod, II);<br class=""> assert(Macro && "missing definition for overridden macro");<br class="">@@ -2026,7 +2022,7 @@ void ASTReader::resolvePendingMacro(Iden<br class=""> while (Idx < N) {<br class=""> MacroDirective *MD = nullptr;<br class=""> SourceLocation Loc = ReadSourceLocation(M, Record, Idx);<br class="">- MacroDirective::Kind K = (MacroDirective::Kind)Record[Idx++];<br class="">+ auto K = static_cast<MacroDirective::Kind>(Record[Idx++]);<br class=""> switch (K) {<br class=""> case MacroDirective::MD_Define: {<br class=""> MacroInfo *MI = getMacro(getGlobalMacroID(M, Record[Idx++]));<br class="">@@ -2082,6 +2078,7 @@ ASTReader::readInputFileInfo(ModuleFile<br class=""> }<br class=""><br class=""> static unsigned moduleKindForDiagnostic(ModuleKind Kind);<br class="">+<br class=""> InputFile ASTReader::getInputFile(ModuleFile &F, unsigned ID, bool Complain) {<br class=""> // If this ID is bogus, just return an empty input file.<br class=""> if (ID == 0 || ID > F.InputFilesLoaded.size())<br class="">@@ -2520,14 +2517,14 @@ ASTReader::ReadControlBlock(ModuleFile &<br class=""> unsigned Idx = 0, N = Record.size();<br class=""> while (Idx < N) {<br class=""> // Read information about the AST file.<br class="">- ModuleKind ImportedKind = (ModuleKind)Record[Idx++];<br class="">+ auto ImportedKind = static_cast<ModuleKind>(Record[Idx++]);<br class=""> // The import location will be the local one for now; we will adjust<br class=""> // all import locations of module imports after the global source<br class=""> // location info are setup, in ReadAST.<br class=""> SourceLocation ImportLoc =<br class=""> ReadUntranslatedSourceLocation(Record[Idx++]);<br class="">- off_t StoredSize = (off_t)Record[Idx++];<br class="">- time_t StoredModTime = (time_t)Record[Idx++];<br class="">+ auto StoredSize = static_cast<off_t>(Record[Idx++]);<br class="">+ auto StoredModTime = static_cast<time_t>(Record[Idx++]);<br class=""> ASTFileSignature StoredSignature = {<br class=""> {{(uint32_t)Record[Idx++], (uint32_t)Record[Idx++],<br class=""> (uint32_t)Record[Idx++], (uint32_t)Record[Idx++],<br class="">@@ -2604,7 +2601,6 @@ ASTReader::ReadControlBlock(ModuleFile &<br class=""> // failure.<br class=""> if (ASTReadResult Result = readUnhashedControlBlockOnce())<br class=""> return Result;<br class="">-<br class=""> break;<br class=""><br class=""> case MODULE_DIRECTORY: {<br class="">@@ -3485,7 +3481,8 @@ void ASTReader::ReadModuleOffsetMap(Modu<br class=""> assert(!F.ModuleOffsetMap.empty() && "no module offset map to read");<br class=""><br class=""> // Additional remapping information.<br class="">- const unsigned char *Data = (const unsigned char*)F.ModuleOffsetMap.data();<br class="">+ const auto *Data =<br class="">+ reinterpret_cast<const unsigned char *>(F.ModuleOffsetMap.data());<br class=""> const unsigned char *DataEnd = Data + F.ModuleOffsetMap.size();<br class=""> F.ModuleOffsetMap = StringRef();<br class=""><br class="">@@ -3511,8 +3508,8 @@ void ASTReader::ReadModuleOffsetMap(Modu<br class=""> // start fixing this with prebuilt and explicit modules and see how it<br class=""> // goes...<br class=""> using namespace llvm::support;<br class="">- ModuleKind Kind = static_cast<ModuleKind>(<br class="">- endian::readNext<uint8_t, little, unaligned>(Data));<br class="">+ auto Kind = static_cast<ModuleKind>(<br class="">+ endian::readNext<uint8_t, little, unaligned>(Data));<br class=""> uint16_t Len = endian::readNext<uint16_t, little, unaligned>(Data);<br class=""> StringRef Name = StringRef((const char*)Data, Len);<br class=""> Data += Len;<br class="">@@ -3640,7 +3637,7 @@ ASTReader::ReadModuleMapFileBlock(Record<br class=""> // Check any additional module map files (e.g. module.private.modulemap)<br class=""> // that are not in the pcm.<br class=""> if (auto *AdditionalModuleMaps = Map.getAdditionalModuleMapFiles(M)) {<br class="">- for (const FileEntry *ModMap : *AdditionalModuleMaps) {<br class="">+ for (const auto *ModMap : *AdditionalModuleMaps) {<br class=""> // Remove files that match<br class=""> // Note: SmallPtrSet::erase is really remove<br class=""> if (!AdditionalStoredMaps.erase(ModMap)) {<br class="">@@ -3654,7 +3651,7 @@ ASTReader::ReadModuleMapFileBlock(Record<br class=""><br class=""> // Check any additional module map files that are in the pcm, but not<br class=""> // found in header search. Cases that match are already removed.<br class="">- for (const FileEntry *ModMap : AdditionalStoredMaps) {<br class="">+ for (const auto *ModMap : AdditionalStoredMaps) {<br class=""> if ((ClientLoadCapabilities & ARR_OutOfDate) == 0)<br class=""> Diag(diag::err_module_different_modmap)<br class=""> << F.ModuleName << /*not new*/1 << ModMap->getName();<br class="">@@ -3698,15 +3695,13 @@ static void moveMethodToBackOfGlobalList<br class=""><br class=""> void ASTReader::makeNamesVisible(const HiddenNames &Names, Module *Owner) {<br class=""> assert(Owner->NameVisibility != Module::Hidden && "nothing to make visible?");<br class="">- for (Decl *D : Names) {<br class="">+ for (auto *D : Names) {<br class=""> bool wasHidden = D->isHidden();<br class=""> D->setVisibleDespiteOwningModule();<br class=""><br class="">- if (wasHidden && SemaObj) {<br class="">- if (ObjCMethodDecl *Method = dyn_cast<ObjCMethodDecl>(D)) {<br class="">+ if (wasHidden && SemaObj)<br class="">+ if (auto *Method = dyn_cast<ObjCMethodDecl>(D))<br class=""> moveMethodToBackOfGlobalList(*SemaObj, Method);<br class="">- }<br class="">- }<br class=""> }<br class=""> }<br class=""><br class="">@@ -3747,12 +3742,9 @@ void ASTReader::makeModuleVisible(Module<br class=""> // Push any exported modules onto the stack to be marked as visible.<br class=""> SmallVector<Module *, 16> Exports;<br class=""> Mod->getExportedModules(Exports);<br class="">- for (SmallVectorImpl<Module *>::iterator<br class="">- I = Exports.begin(), E = Exports.end(); I != E; ++I) {<br class="">- Module *Exported = *I;<br class="">+ for (auto *Exported : Exports)<br class=""> if (Visited.insert(Exported).second)<br class=""> Stack.push_back(Exported);<br class="">- }<br class=""> }<br class=""> }<br class=""><br class="">@@ -3879,7 +3871,7 @@ ASTReader::ASTReadResult ASTReader::Read<br class=""> case ConfigurationMismatch:<br class=""> case HadErrors: {<br class=""> llvm::SmallPtrSet<ModuleFile *, 4> LoadedSet;<br class="">- for (const ImportedModule &IM : Loaded)<br class="">+ for (const auto &IM : Loaded)<br class=""> LoadedSet.insert(IM.Mod);<br class=""><br class=""> ModuleMgr.removeModules(ModuleMgr.begin() + NumModules, LoadedSet,<br class="">@@ -3900,10 +3892,8 @@ ASTReader::ASTReadResult ASTReader::Read<br class=""> // Here comes stuff that we only do once the entire chain is loaded.<br class=""><br class=""> // Load the AST blocks of all of the modules that we loaded.<br class="">- for (SmallVectorImpl<ImportedModule>::iterator M = Loaded.begin(),<br class="">- MEnd = Loaded.end();<br class="">- M != MEnd; ++M) {<br class="">- ModuleFile &F = *M->Mod;<br class="">+ for (auto &M : Loaded) {<br class="">+ ModuleFile &F = *M.Mod;<br class=""><br class=""> // Read the AST block.<br class=""> if (ASTReadResult Result = ReadASTBlock(F, ClientLoadCapabilities))<br class="">@@ -3922,8 +3912,8 @@ ASTReader::ASTReadResult ASTReader::Read<br class=""> GlobalBitOffsetsMap.insert(std::make_pair(F.GlobalBitOffset, &F));<br class=""><br class=""> // Preload SLocEntries.<br class="">- for (unsigned I = 0, N = F.PreloadSLocEntries.size(); I != N; ++I) {<br class="">- int Index = int(F.PreloadSLocEntries[I] - 1) + F.SLocEntryBaseID;<br class="">+ for (const auto PreloadSLocEntry : F.PreloadSLocEntries) {<br class="">+ int Index = int(PreloadSLocEntry - 1) + F.SLocEntryBaseID;<br class=""> // Load it through the SourceManager and don't call ReadSLocEntry()<br class=""> // directly because the entry may have already been loaded in which case<br class=""> // calling ReadSLocEntry() directly would trigger an assertion in<br class="">@@ -3941,7 +3931,7 @@ ASTReader::ASTReadResult ASTReader::Read<br class=""> // Preload all the pending interesting identifiers by marking them out of<br class=""> // date.<br class=""> for (auto Offset : F.PreloadIdentifierOffsets) {<br class="">- const unsigned char *Data = reinterpret_cast<const unsigned char *>(<br class="">+ const auto *Data = reinterpret_cast<const unsigned char *>(<br class=""> F.IdentifierTableData + Offset);<br class=""><br class=""> ASTIdentifierLookupTrait Trait(*this, F);<br class="">@@ -3962,10 +3952,8 @@ ASTReader::ASTReadResult ASTReader::Read<br class=""><br class=""> // Setup the import locations and notify the module manager that we've<br class=""> // committed to these module files.<br class="">- for (SmallVectorImpl<ImportedModule>::iterator M = Loaded.begin(),<br class="">- MEnd = Loaded.end();<br class="">- M != MEnd; ++M) {<br class="">- ModuleFile &F = *M->Mod;<br class="">+ for (auto &M : Loaded) {<br class="">+ ModuleFile &F = *M.Mod;<br class=""><br class=""> ModuleMgr.moduleFileAccepted(&F);<br class=""><br class="">@@ -3973,10 +3961,10 @@ ASTReader::ASTReadResult ASTReader::Read<br class=""> F.DirectImportLoc = ImportLoc;<br class=""> // FIXME: We assume that locations from PCH / preamble do not need<br class=""> // any translation.<br class="">- if (!M->ImportedBy)<br class="">- F.ImportLoc = M->ImportLoc;<br class="">+ if (!M.ImportedBy)<br class="">+ F.ImportLoc = M.ImportLoc;<br class=""> else<br class="">- F.ImportLoc = TranslateSourceLocation(*M->ImportedBy, M->ImportLoc);<br class="">+ F.ImportLoc = TranslateSourceLocation(*M.ImportedBy, M.ImportLoc);<br class=""> }<br class=""><br class=""> if (!PP.getLangOpts().CPlusPlus ||<br class="">@@ -3989,18 +3977,15 @@ ASTReader::ASTReadResult ASTReader::Read<br class=""> // For C++ modules, we don't need information on many identifiers (just<br class=""> // those that provide macros or are poisoned), so we mark all of<br class=""> // the interesting ones via PreloadIdentifierOffsets.<br class="">- for (IdentifierTable::iterator Id = PP.getIdentifierTable().begin(),<br class="">- IdEnd = PP.getIdentifierTable().end();<br class="">- Id != IdEnd; ++Id)<br class="">- Id->second->setOutOfDate(true);<br class="">+ for (auto &Id : PP.getIdentifierTable())<br class="">+ Id.second->setOutOfDate(true);<br class=""> }<br class=""> // Mark selectors as out of date.<br class=""> for (auto Sel : SelectorGeneration)<br class=""> SelectorOutOfDate[Sel.first] = true;<br class=""><br class=""> // Resolve any unresolved module exports.<br class="">- for (unsigned I = 0, N = UnresolvedModuleRefs.size(); I != N; ++I) {<br class="">- UnresolvedModuleRef &Unresolved = UnresolvedModuleRefs[I];<br class="">+ for (auto &Unresolved : UnresolvedModuleRefs) {<br class=""> SubmoduleID GlobalID = getGlobalSubmoduleID(*Unresolved.File,Unresolved.ID);<br class=""> Module *ResolvedMod = getSubmodule(GlobalID);<br class=""><br class="">@@ -4059,13 +4044,10 @@ ASTReader::ASTReadResult ASTReader::Read<br class=""><br class=""> // For any Objective-C class definitions we have already loaded, make sure<br class=""> // that we load any additional categories.<br class="">- if (ContextObj) {<br class="">- for (unsigned I = 0, N = ObjCClassesLoaded.size(); I != N; ++I) {<br class="">- loadObjCCategories(ObjCClassesLoaded[I]->getGlobalID(),<br class="">- ObjCClassesLoaded[I],<br class="">+ if (ContextObj)<br class="">+ for (auto *ObjCClassLoaded : ObjCClassesLoaded)<br class="">+ loadObjCCategories(ObjCClassLoaded->getGlobalID(), ObjCClassLoaded,<br class=""> PreviousGeneration);<br class="">- }<br class="">- }<br class=""><br class=""> if (PP.getHeaderSearchInfo()<br class=""> .getHeaderSearchOpts()<br class="">@@ -4074,12 +4056,9 @@ ASTReader::ASTReadResult ASTReader::Read<br class=""> // up to date. Create or update timestamp files for modules that are<br class=""> // located in the module cache (not for PCH files that could be anywhere<br class=""> // in the filesystem).<br class="">- for (unsigned I = 0, N = Loaded.size(); I != N; ++I) {<br class="">- ImportedModule &M = Loaded[I];<br class="">- if (M.Mod->Kind == MK_ImplicitModule) {<br class="">+ for (auto &M : Loaded)<br class="">+ if (M.Mod->Kind == MK_ImplicitModule)<br class=""> updateModuleTimestamp(*M.Mod);<br class="">- }<br class="">- }<br class=""> }<br class=""><br class=""> return Success;<br class="">@@ -4462,10 +4441,10 @@ void ASTReader::InitializeContext() {<br class=""> }<br class=""><br class=""> if (!Context.FILEDecl) {<br class="">- if (const TypedefType *Typedef = FileType->getAs<TypedefType>())<br class="">+ if (const auto *Typedef = FileType->getAs<TypedefType>())<br class=""> Context.setFILEDecl(Typedef->getDecl());<br class=""> else {<br class="">- const TagType *Tag = FileType->getAs<TagType>();<br class="">+ const auto *Tag = FileType->getAs<TagType>();<br class=""> if (!Tag) {<br class=""> Error("Invalid FILE type in AST file");<br class=""> return;<br class="">@@ -4483,10 +4462,10 @@ void ASTReader::InitializeContext() {<br class=""> }<br class=""><br class=""> if (!Context.jmp_bufDecl) {<br class="">- if (const TypedefType *Typedef = Jmp_bufType->getAs<TypedefType>())<br class="">+ if (const auto *Typedef = Jmp_bufType->getAs<TypedefType>())<br class=""> Context.setjmp_bufDecl(Typedef->getDecl());<br class=""> else {<br class="">- const TagType *Tag = Jmp_bufType->getAs<TagType>();<br class="">+ const auto *Tag = Jmp_bufType->getAs<TagType>();<br class=""> if (!Tag) {<br class=""> Error("Invalid jmp_buf type in AST file");<br class=""> return;<br class="">@@ -4504,10 +4483,10 @@ void ASTReader::InitializeContext() {<br class=""> }<br class=""><br class=""> if (!Context.sigjmp_bufDecl) {<br class="">- if (const TypedefType *Typedef = Sigjmp_bufType->getAs<TypedefType>())<br class="">+ if (const auto *Typedef = Sigjmp_bufType->getAs<TypedefType>())<br class=""> Context.setsigjmp_bufDecl(Typedef->getDecl());<br class=""> else {<br class="">- const TagType *Tag = Sigjmp_bufType->getAs<TagType>();<br class="">+ const auto *Tag = Sigjmp_bufType->getAs<TagType>();<br class=""> assert(Tag && "Invalid sigjmp_buf type in AST file");<br class=""> Context.setsigjmp_bufDecl(Tag->getDecl());<br class=""> }<br class="">@@ -4540,10 +4519,10 @@ void ASTReader::InitializeContext() {<br class=""> }<br class=""><br class=""> if (!Context.ucontext_tDecl) {<br class="">- if (const TypedefType *Typedef = Ucontext_tType->getAs<TypedefType>())<br class="">+ if (const auto *Typedef = Ucontext_tType->getAs<TypedefType>())<br class=""> Context.setucontext_tDecl(Typedef->getDecl());<br class=""> else {<br class="">- const TagType *Tag = Ucontext_tType->getAs<TagType>();<br class="">+ const auto *Tag = Ucontext_tType->getAs<TagType>();<br class=""> assert(Tag && "Invalid ucontext_t type in AST file");<br class=""> Context.setucontext_tDecl(Tag->getDecl());<br class=""> }<br class="">@@ -4583,18 +4562,18 @@ void ASTReader::finalizeForWriting() {<br class=""> static ASTFileSignature readASTFileSignature(StringRef PCH) {<br class=""> BitstreamCursor Stream(PCH);<br class=""> if (!startsWithASTFileMagic(Stream))<br class="">- return ASTFileSignature();<br class="">+ return {};<br class=""><br class=""> // Scan for the UNHASHED_CONTROL_BLOCK_ID block.<br class=""> if (SkipCursorToBlock(Stream, UNHASHED_CONTROL_BLOCK_ID))<br class="">- return ASTFileSignature();<br class="">+ return {};<br class=""><br class=""> // Scan for SIGNATURE inside the diagnostic options block.<br class=""> ASTReader::RecordData Record;<br class=""> while (true) {<br class=""> llvm::BitstreamEntry Entry = Stream.advanceSkippingSubblocks();<br class=""> if (Entry.Kind != llvm::BitstreamEntry::Record)<br class="">- return ASTFileSignature();<br class="">+ return {};<br class=""><br class=""> Record.clear();<br class=""> StringRef Blob;<br class="">@@ -4615,7 +4594,7 @@ std::string ASTReader::getOriginalSource<br class=""> if (!Buffer) {<br class=""> Diags.Report(diag::err_fe_unable_to_read_pch_file)<br class=""> << ASTFileName << Buffer.getError().message();<br class="">- return std::string();<br class="">+ return {};<br class=""> }<br class=""><br class=""> // Initialize the stream<br class="">@@ -4624,13 +4603,13 @@ std::string ASTReader::getOriginalSource<br class=""> // Sniff for the signature.<br class=""> if (!startsWithASTFileMagic(Stream)) {<br class=""> Diags.Report(diag::err_fe_not_a_pch_file) << ASTFileName;<br class="">- return std::string();<br class="">+ return {};<br class=""> }<br class=""><br class=""> // Scan for the CONTROL_BLOCK_ID block.<br class=""> if (SkipCursorToBlock(Stream, CONTROL_BLOCK_ID)) {<br class=""> Diags.Report(diag::err_fe_pch_malformed_block) << ASTFileName;<br class="">- return std::string();<br class="">+ return {};<br class=""> }<br class=""><br class=""> // Scan for ORIGINAL_FILE inside the control block.<br class="">@@ -4638,11 +4617,11 @@ std::string ASTReader::getOriginalSource<br class=""> while (true) {<br class=""> llvm::BitstreamEntry Entry = Stream.advanceSkippingSubblocks();<br class=""> if (Entry.Kind == llvm::BitstreamEntry::EndBlock)<br class="">- return std::string();<br class="">+ return {};<br class=""><br class=""> if (Entry.Kind != llvm::BitstreamEntry::Record) {<br class=""> Diags.Report(diag::err_fe_pch_malformed_block) << ASTFileName;<br class="">- return std::string();<br class="">+ return {};<br class=""> }<br class=""><br class=""> Record.clear();<br class="">@@ -4810,7 +4789,8 @@ bool ASTReader::readASTFileControlBlock(<br class=""><br class=""> unsigned NumInputFiles = Record[0];<br class=""> unsigned NumUserFiles = Record[1];<br class="">- const uint64_t *InputFileOffs = (const uint64_t *)Blob.data();<br class="">+ const auto *InputFileOffs =<br class="">+ reinterpret_cast<const uint64_t *>(Blob.data());<br class=""> for (unsigned I = 0; I != NumInputFiles; ++I) {<br class=""> // Go find this input file.<br class=""> bool isSystemFile = I >= NumUserFiles;<br class="">@@ -4828,7 +4808,7 @@ bool ASTReader::readASTFileControlBlock(<br class=""> bool shouldContinue = false;<br class=""> switch ((InputFileRecordTypes)Cursor.readRecord(Code, Record, &Blob)) {<br class=""> case INPUT_FILE:<br class="">- bool Overridden = static_cast<bool>(Record[3]);<br class="">+ auto Overridden = static_cast<bool>(Record[3]);<br class=""> std::string Filename = Blob;<br class=""> ResolveImportedPath(Filename, ModuleDir);<br class=""> shouldContinue = Listener.visitInputFile(<br class="">@@ -4989,7 +4969,7 @@ ASTReader::ReadSubmoduleBlock(ModuleFile<br class=""> unsigned Idx = 0;<br class=""> SubmoduleID GlobalID = getGlobalSubmoduleID(F, Record[Idx++]);<br class=""> SubmoduleID Parent = getGlobalSubmoduleID(F, Record[Idx++]);<br class="">- Module::ModuleKind Kind = (Module::ModuleKind)Record[Idx++];<br class="">+ auto Kind = static_cast<Module::ModuleKind>(Record[Idx++]);<br class=""> bool IsFramework = Record[Idx++];<br class=""> bool IsExplicit = Record[Idx++];<br class=""> bool IsSystem = Record[Idx++];<br class="">@@ -5233,7 +5213,7 @@ bool ASTReader::ParseLanguageOptions(con<br class=""> for (unsigned N = Record[Idx++]; N; --N)<br class=""> LangOpts.ModuleFeatures.push_back(ReadString(Record, Idx));<br class=""><br class="">- ObjCRuntime::Kind runtimeKind = (ObjCRuntime::Kind) Record[Idx++];<br class="">+ auto runtimeKind = static_cast<ObjCRuntime::Kind>(Record[Idx++]);<br class=""> VersionTuple runtimeVersion = ReadVersionTuple(Record, Idx);<br class=""> LangOpts.ObjCRuntime = ObjCRuntime(runtimeKind, runtimeVersion);<br class=""><br class="">@@ -5311,8 +5291,7 @@ bool ASTReader::ParseHeaderSearchOptions<br class=""> // Include entries.<br class=""> for (unsigned N = Record[Idx++]; N; --N) {<br class=""> std::string Path = ReadString(Record, Idx);<br class="">- frontend::IncludeDirGroup Group<br class="">- = static_cast<frontend::IncludeDirGroup>(Record[Idx++]);<br class="">+ auto Group = static_cast<frontend::IncludeDirGroup>(Record[Idx++]);<br class=""> bool IsFramework = Record[Idx++];<br class=""> bool IgnoreSysRoot = Record[Idx++];<br class=""> HSOpts.UserEntries.emplace_back(std::move(Path), Group, IsFramework,<br class="">@@ -5446,9 +5425,8 @@ PreprocessedEntity *ASTReader::ReadPrepr<br class=""> PreprocessingRecord &PPRec = *PP.getPreprocessingRecord();<br class=""> StringRef Blob;<br class=""> RecordData Record;<br class="">- PreprocessorDetailRecordTypes RecType =<br class="">- (PreprocessorDetailRecordTypes)M.PreprocessorDetailCursor.readRecord(<br class="">- Entry.ID, Record, &Blob);<br class="">+ auto RecType = static_cast<PreprocessorDetailRecordTypes>(<br class="">+ M.PreprocessorDetailCursor.readRecord(Entry.ID, Record, &Blob));<br class=""> switch (RecType) {<br class=""> case PPD_MACRO_EXPANSION: {<br class=""> bool isBuiltin = Record[0];<br class="">@@ -5476,7 +5454,7 @@ PreprocessedEntity *ASTReader::ReadPrepr<br class=""> // Decode the identifier info and then check again; if the macro is<br class=""> // still defined and associated with the identifier,<br class=""> IdentifierInfo *II = getLocalIdentifier(M, Record[0]);<br class="">- MacroDefinitionRecord *MD = new (PPRec) MacroDefinitionRecord(II, Range);<br class="">+ auto *MD = new (PPRec) MacroDefinitionRecord(II, Range);<br class=""><br class=""> if (DeserializationListener)<br class=""> DeserializationListener->MacroDefinitionRead(PPID, MD);<br class="">@@ -5492,10 +5470,9 @@ PreprocessedEntity *ASTReader::ReadPrepr<br class=""> File = PP.getFileManager().getFile(FullFileName);<br class=""><br class=""> // FIXME: Stable encoding<br class="">- InclusionDirective::InclusionKind Kind<br class="">- = static_cast<InclusionDirective::InclusionKind>(Record[2]);<br class="">- InclusionDirective *ID<br class="">- = new (PPRec) InclusionDirective(PPRec, Kind,<br class="">+ auto Kind = static_cast<InclusionDirective::InclusionKind>(Record[2]);<br class="">+ auto *ID =<br class="">+ new (PPRec) InclusionDirective(PPRec, Kind,<br class=""> StringRef(Blob.data(), Record[0]),<br class=""> Record[1], Record[3],<br class=""> File,<br class="">@@ -5657,8 +5634,8 @@ namespace {<br class=""> explicit HeaderFileInfoVisitor(const FileEntry *FE) : FE(FE) {}<br class=""><br class=""> bool operator()(ModuleFile &M) {<br class="">- HeaderFileInfoLookupTable *Table<br class="">- = static_cast<HeaderFileInfoLookupTable *>(M.HeaderFileInfoTable);<br class="">+ auto *Table =<br class="">+ static_cast<HeaderFileInfoLookupTable *>(M.HeaderFileInfoTable);<br class=""> if (!Table)<br class=""> return false;<br class=""><br class="">@@ -5689,7 +5666,7 @@ void ASTReader::ReadPragmaDiagnosticMapp<br class=""> using DiagState = DiagnosticsEngine::DiagState;<br class=""> SmallVector<DiagState *, 32> DiagStates;<br class=""><br class="">- for (ModuleFile &F : ModuleMgr) {<br class="">+ for (auto &F : ModuleMgr) {<br class=""> unsigned Idx = 0;<br class=""> auto &Record = F.PragmaDiagMappings;<br class=""> if (Record.empty())<br class="">@@ -5865,7 +5842,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_EXT_QUAL: {<br class=""> if (Record.size() != 2) {<br class=""> Error("Incorrect encoding of extended qualifier type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType Base = readType(*Loc.F, Record, Idx);<br class=""> Qualifiers Quals = Qualifiers::fromOpaqueValue(Record[Idx++]);<br class="">@@ -5875,7 +5852,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_COMPLEX: {<br class=""> if (Record.size() != 1) {<br class=""> Error("Incorrect encoding of complex type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType ElemType = readType(*Loc.F, Record, Idx);<br class=""> return Context.getComplexType(ElemType);<br class="">@@ -5884,7 +5861,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_POINTER: {<br class=""> if (Record.size() != 1) {<br class=""> Error("Incorrect encoding of pointer type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType PointeeType = readType(*Loc.F, Record, Idx);<br class=""> return Context.getPointerType(PointeeType);<br class="">@@ -5893,7 +5870,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_DECAYED: {<br class=""> if (Record.size() != 1) {<br class=""> Error("Incorrect encoding of decayed type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType OriginalType = readType(*Loc.F, Record, Idx);<br class=""> QualType DT = Context.getAdjustedParameterType(OriginalType);<br class="">@@ -5905,7 +5882,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_ADJUSTED: {<br class=""> if (Record.size() != 2) {<br class=""> Error("Incorrect encoding of adjusted type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType OriginalTy = readType(*Loc.F, Record, Idx);<br class=""> QualType AdjustedTy = readType(*Loc.F, Record, Idx);<br class="">@@ -5915,7 +5892,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_BLOCK_POINTER: {<br class=""> if (Record.size() != 1) {<br class=""> Error("Incorrect encoding of block pointer type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType PointeeType = readType(*Loc.F, Record, Idx);<br class=""> return Context.getBlockPointerType(PointeeType);<br class="">@@ -5924,7 +5901,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_LVALUE_REFERENCE: {<br class=""> if (Record.size() != 2) {<br class=""> Error("Incorrect encoding of lvalue reference type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType PointeeType = readType(*Loc.F, Record, Idx);<br class=""> return Context.getLValueReferenceType(PointeeType, Record[1]);<br class="">@@ -5933,7 +5910,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_RVALUE_REFERENCE: {<br class=""> if (Record.size() != 1) {<br class=""> Error("Incorrect encoding of rvalue reference type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType PointeeType = readType(*Loc.F, Record, Idx);<br class=""> return Context.getRValueReferenceType(PointeeType);<br class="">@@ -5942,19 +5919,19 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_MEMBER_POINTER: {<br class=""> if (Record.size() != 2) {<br class=""> Error("Incorrect encoding of member pointer type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType PointeeType = readType(*Loc.F, Record, Idx);<br class=""> QualType ClassType = readType(*Loc.F, Record, Idx);<br class=""> if (PointeeType.isNull() || ClassType.isNull())<br class="">- return QualType();<br class="">+ return {};<br class=""><br class=""> return Context.getMemberPointerType(PointeeType, ClassType.getTypePtr());<br class=""> }<br class=""><br class=""> case TYPE_CONSTANT_ARRAY: {<br class=""> QualType ElementType = readType(*Loc.F, Record, Idx);<br class="">- ArrayType::ArraySizeModifier ASM = (ArrayType::ArraySizeModifier)Record[1];<br class="">+ auto ASM = static_cast<ArrayType::ArraySizeModifier>(Record[1]);<br class=""> unsigned IndexTypeQuals = Record[2];<br class=""> unsigned Idx = 3;<br class=""> llvm::APInt Size = ReadAPInt(Record, Idx);<br class="">@@ -5964,14 +5941,14 @@ QualType ASTReader::readTypeRecord(unsig<br class=""><br class=""> case TYPE_INCOMPLETE_ARRAY: {<br class=""> QualType ElementType = readType(*Loc.F, Record, Idx);<br class="">- ArrayType::ArraySizeModifier ASM = (ArrayType::ArraySizeModifier)Record[1];<br class="">+ auto ASM = static_cast<ArrayType::ArraySizeModifier>(Record[1]);<br class=""> unsigned IndexTypeQuals = Record[2];<br class=""> return Context.getIncompleteArrayType(ElementType, ASM, IndexTypeQuals);<br class=""> }<br class=""><br class=""> case TYPE_VARIABLE_ARRAY: {<br class=""> QualType ElementType = readType(*Loc.F, Record, Idx);<br class="">- ArrayType::ArraySizeModifier ASM = (ArrayType::ArraySizeModifier)Record[1];<br class="">+ auto ASM = static_cast<ArrayType::ArraySizeModifier>(Record[1]);<br class=""> unsigned IndexTypeQuals = Record[2];<br class=""> SourceLocation LBLoc = ReadSourceLocation(*Loc.F, Record[3]);<br class=""> SourceLocation RBLoc = ReadSourceLocation(*Loc.F, Record[4]);<br class="">@@ -5983,7 +5960,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_VECTOR: {<br class=""> if (Record.size() != 3) {<br class=""> Error("incorrect encoding of vector type in AST file");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""><br class=""> QualType ElementType = readType(*Loc.F, Record, Idx);<br class="">@@ -5996,7 +5973,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_EXT_VECTOR: {<br class=""> if (Record.size() != 3) {<br class=""> Error("incorrect encoding of extended vector type in AST file");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""><br class=""> QualType ElementType = readType(*Loc.F, Record, Idx);<br class="">@@ -6007,7 +5984,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_FUNCTION_NO_PROTO: {<br class=""> if (Record.size() != 8) {<br class=""> Error("incorrect encoding of no-proto function type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType ResultType = readType(*Loc.F, Record, Idx);<br class=""> FunctionType::ExtInfo Info(Record[1], Record[2], Record[3],<br class="">@@ -6065,10 +6042,10 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_TYPEDEF: {<br class=""> if (Record.size() != 2) {<br class=""> Error("incorrect encoding of typedef type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> unsigned Idx = 0;<br class="">- TypedefNameDecl *Decl = ReadDeclAs<TypedefNameDecl>(*Loc.F, Record, Idx);<br class="">+ auto *Decl = ReadDeclAs<TypedefNameDecl>(*Loc.F, Record, Idx);<br class=""> QualType Canonical = readType(*Loc.F, Record, Idx);<br class=""> if (!Canonical.isNull())<br class=""> Canonical = Context.getCanonicalType(Canonical);<br class="">@@ -6081,7 +6058,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_TYPEOF: {<br class=""> if (Record.size() != 1) {<br class=""> Error("incorrect encoding of typeof(type) in AST file");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType UnderlyingType = readType(*Loc.F, Record, Idx);<br class=""> return Context.getTypeOfType(UnderlyingType);<br class="">@@ -6095,13 +6072,13 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_UNARY_TRANSFORM: {<br class=""> QualType BaseType = readType(*Loc.F, Record, Idx);<br class=""> QualType UnderlyingType = readType(*Loc.F, Record, Idx);<br class="">- UnaryTransformType::UTTKind UKind = (UnaryTransformType::UTTKind)Record[2];<br class="">+ auto UKind = static_cast<UnaryTransformType::UTTKind>(Record[2]);<br class=""> return Context.getUnaryTransformType(BaseType, UnderlyingType, UKind);<br class=""> }<br class=""><br class=""> case TYPE_AUTO: {<br class=""> QualType Deduced = readType(*Loc.F, Record, Idx);<br class="">- AutoTypeKeyword Keyword = (AutoTypeKeyword)Record[Idx++];<br class="">+ auto Keyword = static_cast<AutoTypeKeyword>(Record[Idx++]);<br class=""> bool IsDependent = Deduced.isNull() ? Record[Idx++] : false;<br class=""> return Context.getAutoType(Deduced, Keyword, IsDependent);<br class=""> }<br class="">@@ -6117,11 +6094,11 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_RECORD: {<br class=""> if (Record.size() != 2) {<br class=""> Error("incorrect encoding of record type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> unsigned Idx = 0;<br class=""> bool IsDependent = Record[Idx++];<br class="">- RecordDecl *RD = ReadDeclAs<RecordDecl>(*Loc.F, Record, Idx);<br class="">+ auto *RD = ReadDeclAs<RecordDecl>(*Loc.F, Record, Idx);<br class=""> RD = cast_or_null<RecordDecl>(RD->getCanonicalDecl());<br class=""> QualType T = Context.getRecordType(RD);<br class=""> const_cast<Type*>(T.getTypePtr())->setDependent(IsDependent);<br class="">@@ -6131,7 +6108,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_ENUM: {<br class=""> if (Record.size() != 2) {<br class=""> Error("incorrect encoding of enum type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> unsigned Idx = 0;<br class=""> bool IsDependent = Record[Idx++];<br class="">@@ -6144,18 +6121,18 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_ATTRIBUTED: {<br class=""> if (Record.size() != 3) {<br class=""> Error("incorrect encoding of attributed type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType modifiedType = readType(*Loc.F, Record, Idx);<br class=""> QualType equivalentType = readType(*Loc.F, Record, Idx);<br class="">- AttributedType::Kind kind = static_cast<AttributedType::Kind>(Record[2]);<br class="">+ auto kind = static_cast<AttributedType::Kind>(Record[2]);<br class=""> return Context.getAttributedType(kind, modifiedType, equivalentType);<br class=""> }<br class=""><br class=""> case TYPE_PAREN: {<br class=""> if (Record.size() != 1) {<br class=""> Error("incorrect encoding of paren type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType InnerType = readType(*Loc.F, Record, Idx);<br class=""> return Context.getParenType(InnerType);<br class="">@@ -6164,11 +6141,11 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_PACK_EXPANSION: {<br class=""> if (Record.size() != 2) {<br class=""> Error("incorrect encoding of pack expansion type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType Pattern = readType(*Loc.F, Record, Idx);<br class=""> if (Pattern.isNull())<br class="">- return QualType();<br class="">+ return {};<br class=""> Optional<unsigned> NumExpansions;<br class=""> if (Record[1])<br class=""> NumExpansions = Record[1] - 1;<br class="">@@ -6177,7 +6154,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""><br class=""> case TYPE_ELABORATED: {<br class=""> unsigned Idx = 0;<br class="">- ElaboratedTypeKeyword Keyword = (ElaboratedTypeKeyword)Record[Idx++];<br class="">+ auto Keyword = static_cast<ElaboratedTypeKeyword>(Record[Idx++]);<br class=""> NestedNameSpecifier *NNS = ReadNestedNameSpecifier(*Loc.F, Record, Idx);<br class=""> QualType NamedType = readType(*Loc.F, Record, Idx);<br class=""> return Context.getElaboratedType(Keyword, NNS, NamedType);<br class="">@@ -6185,15 +6162,13 @@ QualType ASTReader::readTypeRecord(unsig<br class=""><br class=""> case TYPE_OBJC_INTERFACE: {<br class=""> unsigned Idx = 0;<br class="">- ObjCInterfaceDecl *ItfD<br class="">- = ReadDeclAs<ObjCInterfaceDecl>(*Loc.F, Record, Idx);<br class="">+ auto *ItfD = ReadDeclAs<ObjCInterfaceDecl>(*Loc.F, Record, Idx);<br class=""> return Context.getObjCInterfaceType(ItfD->getCanonicalDecl());<br class=""> }<br class=""><br class=""> case TYPE_OBJC_TYPE_PARAM: {<br class=""> unsigned Idx = 0;<br class="">- ObjCTypeParamDecl *Decl<br class="">- = ReadDeclAs<ObjCTypeParamDecl>(*Loc.F, Record, Idx);<br class="">+ auto *Decl = ReadDeclAs<ObjCTypeParamDecl>(*Loc.F, Record, Idx);<br class=""> unsigned NumProtos = Record[Idx++];<br class=""> SmallVector<ObjCProtocolDecl*, 4> Protos;<br class=""> for (unsigned I = 0; I != NumProtos; ++I)<br class="">@@ -6241,7 +6216,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> }<br class=""><br class=""> case TYPE_INJECTED_CLASS_NAME: {<br class="">- CXXRecordDecl *D = ReadDeclAs<CXXRecordDecl>(*Loc.F, Record, Idx);<br class="">+ auto *D = ReadDeclAs<CXXRecordDecl>(*Loc.F, Record, Idx);<br class=""> QualType TST = readType(*Loc.F, Record, Idx); // probably derivable<br class=""> // FIXME: ASTContext::getInjectedClassNameType is not currently suitable<br class=""> // for AST reading, too much interdependencies.<br class="">@@ -6265,14 +6240,13 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> unsigned Depth = Record[Idx++];<br class=""> unsigned Index = Record[Idx++];<br class=""> bool Pack = Record[Idx++];<br class="">- TemplateTypeParmDecl *D<br class="">- = ReadDeclAs<TemplateTypeParmDecl>(*Loc.F, Record, Idx);<br class="">+ auto *D = ReadDeclAs<TemplateTypeParmDecl>(*Loc.F, Record, Idx);<br class=""> return Context.getTemplateTypeParmType(Depth, Index, Pack, D);<br class=""> }<br class=""><br class=""> case TYPE_DEPENDENT_NAME: {<br class=""> unsigned Idx = 0;<br class="">- ElaboratedTypeKeyword Keyword = (ElaboratedTypeKeyword)Record[Idx++];<br class="">+ auto Keyword = static_cast<ElaboratedTypeKeyword>(Record[Idx++]);<br class=""> NestedNameSpecifier *NNS = ReadNestedNameSpecifier(*Loc.F, Record, Idx);<br class=""> const IdentifierInfo *Name = GetIdentifierInfo(*Loc.F, Record, Idx);<br class=""> QualType Canon = readType(*Loc.F, Record, Idx);<br class="">@@ -6283,7 +6257,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""><br class=""> case TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION: {<br class=""> unsigned Idx = 0;<br class="">- ElaboratedTypeKeyword Keyword = (ElaboratedTypeKeyword)Record[Idx++];<br class="">+ auto Keyword = static_cast<ElaboratedTypeKeyword>(Record[Idx++]);<br class=""> NestedNameSpecifier *NNS = ReadNestedNameSpecifier(*Loc.F, Record, Idx);<br class=""> const IdentifierInfo *Name = GetIdentifierInfo(*Loc.F, Record, Idx);<br class=""> unsigned NumArgs = Record[Idx++];<br class="">@@ -6300,8 +6274,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""><br class=""> // ArrayType<br class=""> QualType ElementType = readType(*Loc.F, Record, Idx);<br class="">- ArrayType::ArraySizeModifier ASM<br class="">- = (ArrayType::ArraySizeModifier)Record[Idx++];<br class="">+ auto ASM = static_cast<ArrayType::ArraySizeModifier>(Record[Idx++]);<br class=""> unsigned IndexTypeQuals = Record[Idx++];<br class=""><br class=""> // DependentSizedArrayType<br class="">@@ -6331,7 +6304,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_ATOMIC: {<br class=""> if (Record.size() != 1) {<br class=""> Error("Incorrect encoding of atomic type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""> QualType ValueType = readType(*Loc.F, Record, Idx);<br class=""> return Context.getAtomicType(ValueType);<br class="">@@ -6340,7 +6313,7 @@ QualType ASTReader::readTypeRecord(unsig<br class=""> case TYPE_PIPE: {<br class=""> if (Record.size() != 2) {<br class=""> Error("Incorrect encoding of pipe type");<br class="">- return QualType();<br class="">+ return {};<br class=""> }<br class=""><br class=""> // Reading the pipe element type.<br class="">@@ -6380,8 +6353,7 @@ void ASTReader::readExceptionSpec(Module<br class=""> SmallVectorImpl<QualType> &Exceptions,<br class=""> FunctionProtoType::ExceptionSpecInfo &ESI,<br class=""> const RecordData &Record, unsigned &Idx) {<br class="">- ExceptionSpecificationType EST =<br class="">- static_cast<ExceptionSpecificationType>(Record[Idx++]);<br class="">+ auto EST = static_cast<ExceptionSpecificationType>(Record[Idx++]);<br class=""> ESI.Type = EST;<br class=""> if (EST == EST_Dynamic) {<br class=""> for (unsigned I = 0, N = Record[Idx++]; I != N; ++I)<br class="">@@ -6749,7 +6721,7 @@ QualType ASTReader::GetType(TypeID ID) {<br class=""> QualType T;<br class=""> switch ((PredefinedTypeIDs)Index) {<br class=""> case PREDEF_TYPE_NULL_ID:<br class="">- return QualType();<br class="">+ return {};<br class=""> case PREDEF_TYPE_VOID_ID:<br class=""> T = Context.VoidTy;<br class=""> break;<br class="">@@ -6897,7 +6869,7 @@ QualType ASTReader::GetType(TypeID ID) {<br class=""> if (TypesLoaded[Index].isNull()) {<br class=""> TypesLoaded[Index] = readTypeRecord(Index);<br class=""> if (TypesLoaded[Index].isNull())<br class="">- return QualType();<br class="">+ return {};<br class=""><br class=""> TypesLoaded[Index]->setFromAST();<br class=""> if (DeserializationListener)<br class="">@@ -6962,7 +6934,7 @@ ASTReader::GetTemplateArgumentLocInfo(Mo<br class=""> case TemplateArgument::NullPtr:<br class=""> case TemplateArgument::Pack:<br class=""> // FIXME: Is this right?<br class="">- return TemplateArgumentLocInfo();<br class="">+ return {};<br class=""> }<br class=""> llvm_unreachable("unexpected template argument loc");<br class=""> }<br class="">@@ -7089,7 +7061,7 @@ CXXBaseSpecifier *ASTReader::GetExternal<br class=""> unsigned Idx = 0;<br class=""> unsigned NumBases = Record[Idx++];<br class=""> void *Mem = Context.Allocate(sizeof(CXXBaseSpecifier) * NumBases);<br class="">- CXXBaseSpecifier *Bases = new (Mem) CXXBaseSpecifier [NumBases];<br class="">+ auto *Bases = new (Mem) CXXBaseSpecifier [NumBases];<br class=""> for (unsigned I = 0; I != NumBases; ++I)<br class=""> Bases[I] = ReadCXXBaseSpecifier(*Loc.F, Record, Idx);<br class=""> return Bases;<br class="">@@ -7130,13 +7102,13 @@ ModuleFile *ASTReader::getOwningModuleFi<br class=""><br class=""> SourceLocation ASTReader::getSourceLocationForDeclID(GlobalDeclID ID) {<br class=""> if (ID < NUM_PREDEF_DECL_IDS)<br class="">- return SourceLocation();<br class="">+ return {};<br class=""><br class=""> unsigned Index = ID - NUM_PREDEF_DECL_IDS;<br class=""><br class=""> if (Index > DeclsLoaded.size()) {<br class=""> Error("declaration ID out-of-range for AST file");<br class="">- return SourceLocation();<br class="">+ return {};<br class=""> }<br class=""><br class=""> if (Decl *D = DeclsLoaded[Index])<br class="">@@ -7430,8 +7402,8 @@ ASTReader::FindExternalVisibleDeclsByNam<br class=""><br class=""> // Load the list of declarations.<br class=""> SmallVector<NamedDecl *, 64> Decls;<br class="">- for (DeclID ID : It->second.Table.find(Name)) {<br class="">- NamedDecl *ND = cast<NamedDecl>(GetDecl(ID));<br class="">+ for (auto ID : It->second.Table.find(Name)) {<br class="">+ auto *ND = cast<NamedDecl>(GetDecl(ID));<br class=""> if (ND->getDeclName() == Name)<br class=""> Decls.push_back(ND);<br class=""> }<br class="">@@ -7451,16 +7423,15 @@ void ASTReader::completeVisibleDeclsMap(<br class=""><br class=""> DeclsMap Decls;<br class=""><br class="">- for (DeclID ID : It->second.Table.findAll()) {<br class="">- NamedDecl *ND = cast<NamedDecl>(GetDecl(ID));<br class="">+ for (auto ID : It->second.Table.findAll()) {<br class="">+ auto *ND = cast<NamedDecl>(GetDecl(ID));<br class=""> Decls[ND->getDeclName()].push_back(ND);<br class=""> }<br class=""><br class=""> ++NumVisibleDeclContextsRead;<br class=""><br class="">- for (DeclsMap::iterator I = Decls.begin(), E = Decls.end(); I != E; ++I) {<br class="">- SetExternalVisibleDeclsForName(DC, I->first, I->second);<br class="">- }<br class="">+ for (auto &I : Decls)<br class="">+ SetExternalVisibleDeclsForName(DC, I.first, I.second);<br class=""> const_cast<DeclContext *>(DC)->setHasExternalVisibleStorage(false);<br class=""> }<br class=""><br class="">@@ -7485,7 +7456,7 @@ static void PassObjCImplDeclToConsumer(O<br class=""> }<br class=""><br class=""> void ASTReader::PassInterestingDeclToConsumer(Decl *D) {<br class="">- if (ObjCImplDecl *ImplD = dyn_cast<ObjCImplDecl>(D))<br class="">+ if (auto *ImplD = dyn_cast<ObjCImplDecl>(D))<br class=""> PassObjCImplDeclToConsumer(ImplD, Consumer);<br class=""> else<br class=""> Consumer->HandleInterestingDecl(DeclGroupRef(D));<br class="">@@ -7603,14 +7574,9 @@ dumpModuleIDMap(StringRef Name,<br class=""> if (Map.begin() == Map.end())<br class=""> return;<br class=""><br class="">- using MapType = ContinuousRangeMap<Key, ModuleFile *, InitialCapacity>;<br class="">-<br class=""> llvm::errs() << Name << ":\n";<br class="">- for (typename MapType::const_iterator I = Map.begin(), IEnd = Map.end();<br class="">- I != IEnd; ++I) {<br class="">- llvm::errs() << " " << I->first << " -> " << I->second->FileName<br class="">- << "\n";<br class="">- }<br class="">+ for (const auto &I : Map)<br class="">+ llvm::errs() << " " << I.first << " -> " << I.second->FileName << "\n";<br class=""> }<br class=""><br class=""> LLVM_DUMP_METHOD void ASTReader::dump() {<br class="">@@ -7627,14 +7593,14 @@ LLVM_DUMP_METHOD void ASTReader::dump()<br class=""> GlobalPreprocessedEntityMap);<br class=""><br class=""> llvm::errs() << "\n*** PCH/Modules Loaded:";<br class="">- for (ModuleFile &M : ModuleMgr)<br class="">+ for (auto &M : ModuleMgr)<br class=""> M.dump();<br class=""> }<br class=""><br class=""> /// Return the amount of memory used by memory buffers, breaking down<br class=""> /// by heap-backed versus mmap'ed memory.<br class=""> void ASTReader::getMemoryBufferSizes(MemoryBufferSizes &sizes) const {<br class="">- for (ModuleFile &I : ModuleMgr) {<br class="">+ for (auto &I : ModuleMgr) {<br class=""> if (llvm::MemoryBuffer *buf = I.Buffer) {<br class=""> size_t bytes = buf->getBufferSize();<br class=""> switch (buf->getBufferKind()) {<br class="">@@ -7655,8 +7621,8 @@ void ASTReader::InitializeSema(Sema &S)<br class=""><br class=""> // Makes sure any declarations that were deserialized "too early"<br class=""> // still get added to the identifier's declaration chains.<br class="">- for (uint64_t ID : PreloadedDeclIDs) {<br class="">- NamedDecl *D = cast<NamedDecl>(GetDecl(ID));<br class="">+ for (auto ID : PreloadedDeclIDs) {<br class="">+ auto *D = cast<NamedDecl>(GetDecl(ID));<br class=""> pushExternalDeclIntoScope(D, D->getDeclName());<br class=""> }<br class=""> PreloadedDeclIDs.clear();<br class="">@@ -7812,15 +7778,15 @@ StringRef ASTIdentifierIterator::Next()<br class=""> while (Current == End) {<br class=""> // If we have exhausted all of our AST files, we're done.<br class=""> if (Index == 0)<br class="">- return StringRef();<br class="">+ return {};<br class=""><br class=""> --Index;<br class=""> ModuleFile &F = Reader.ModuleMgr[Index];<br class=""> if (SkipModules && F.isModule())<br class=""> continue;<br class=""><br class="">- ASTIdentifierLookupTable *IdTable =<br class="">- (ASTIdentifierLookupTable *)F.IdentifierLookupTable;<br class="">+ auto *IdTable =<br class="">+ static_cast<ASTIdentifierLookupTable *>(F.IdentifierLookupTable);<br class=""> Current = IdTable->key_begin();<br class=""> End = IdTable->key_end();<br class=""> }<br class="">@@ -7846,7 +7812,7 @@ public:<br class=""><br class=""> StringRef Next() override {<br class=""> if (!Current)<br class="">- return StringRef();<br class="">+ return {};<br class=""><br class=""> StringRef result = Current->Next();<br class=""> if (!result.empty())<br class="">@@ -7902,8 +7868,8 @@ namespace serialization {<br class=""> return true;<br class=""><br class=""> ++Reader.NumMethodPoolTableLookups;<br class="">- ASTSelectorLookupTable *PoolTable<br class="">- = (ASTSelectorLookupTable*)M.SelectorLookupTable;<br class="">+ auto *PoolTable =<br class="">+ static_cast<ASTSelectorLookupTable *>(M.SelectorLookupTable);<br class=""> ASTSelectorLookupTable::iterator Pos = PoolTable->find(Sel);<br class=""> if (Pos == PoolTable->end())<br class=""> return false;<br class="">@@ -7953,9 +7919,8 @@ namespace serialization {<br class=""> /// \brief Add the given set of methods to the method list.<br class=""> static void addMethodsToPool(Sema &S, ArrayRef<ObjCMethodDecl *> Methods,<br class=""> ObjCMethodList &List) {<br class="">- for (unsigned I = 0, N = Methods.size(); I != N; ++I) {<br class="">- S.addMethodToGlobalList(&List, Methods[I]);<br class="">- }<br class="">+ for (auto *Method : Methods)<br class="">+ S.addMethodToGlobalList(&List, Method);<br class=""> }<br class=""><br class=""> void ASTReader::ReadMethodPool(Selector Sel) {<br class="">@@ -8004,17 +7969,16 @@ void ASTReader::ReadKnownNamespaces(<br class=""> SmallVectorImpl<NamespaceDecl *> &Namespaces) {<br class=""> Namespaces.clear();<br class=""><br class="">- for (unsigned I = 0, N = KnownNamespaces.size(); I != N; ++I) {<br class="">- if (NamespaceDecl *Namespace<br class="">- = dyn_cast_or_null<NamespaceDecl>(GetDecl(KnownNamespaces[I])))<br class="">+ for (auto KnownNamespace : KnownNamespaces)<br class="">+ if (auto *Namespace =<br class="">+ dyn_cast_or_null<NamespaceDecl>(GetDecl(KnownNamespace)))<br class=""> Namespaces.push_back(Namespace);<br class="">- }<br class=""> }<br class=""><br class=""> void ASTReader::ReadUndefinedButUsed(<br class=""> llvm::MapVector<NamedDecl *, SourceLocation> &Undefined) {<br class=""> for (unsigned Idx = 0, N = UndefinedButUsed.size(); Idx != N;) {<br class="">- NamedDecl *D = cast<NamedDecl>(GetDecl(UndefinedButUsed[Idx++]));<br class="">+ auto *D = cast<NamedDecl>(GetDecl(UndefinedButUsed[Idx++]));<br class=""> SourceLocation Loc =<br class=""> SourceLocation::getFromRawEncoding(UndefinedButUsed[Idx++]);<br class=""> Undefined.insert(std::make_pair(D, Loc));<br class="">@@ -8025,7 +7989,7 @@ void ASTReader::ReadMismatchingDeleteExp<br class=""> FieldDecl *, llvm::SmallVector<std::pair<SourceLocation, bool>, 4>> &<br class=""> Exprs) {<br class=""> for (unsigned Idx = 0, N = DelayedDeleteExprs.size(); Idx != N;) {<br class="">- FieldDecl *FD = cast<FieldDecl>(GetDecl(DelayedDeleteExprs[Idx++]));<br class="">+ auto *FD = cast<FieldDecl>(GetDecl(DelayedDeleteExprs[Idx++]));<br class=""> uint64_t Count = DelayedDeleteExprs[Idx++];<br class=""> for (uint64_t C = 0; C < Count; ++C) {<br class=""> SourceLocation DeleteLoc =<br class="">@@ -8038,8 +8002,8 @@ void ASTReader::ReadMismatchingDeleteExp<br class=""><br class=""> void ASTReader::ReadTentativeDefinitions(<br class=""> SmallVectorImpl<VarDecl *> &TentativeDefs) {<br class="">- for (unsigned I = 0, N = TentativeDefinitions.size(); I != N; ++I) {<br class="">- VarDecl *Var = dyn_cast_or_null<VarDecl>(GetDecl(TentativeDefinitions[I]));<br class="">+ for (auto TentativeDefinition : TentativeDefinitions) {<br class="">+ auto *Var = dyn_cast_or_null<VarDecl>(GetDecl(TentativeDefinition));<br class=""> if (Var)<br class=""> TentativeDefs.push_back(Var);<br class=""> }<br class="">@@ -8048,9 +8012,8 @@ void ASTReader::ReadTentativeDefinitions<br class=""><br class=""> void ASTReader::ReadUnusedFileScopedDecls(<br class=""> SmallVectorImpl<const DeclaratorDecl *> &Decls) {<br class="">- for (unsigned I = 0, N = UnusedFileScopedDecls.size(); I != N; ++I) {<br class="">- DeclaratorDecl *D<br class="">- = dyn_cast_or_null<DeclaratorDecl>(GetDecl(UnusedFileScopedDecls[I]));<br class="">+ for (auto UnusedFileScopedDecl : UnusedFileScopedDecls) {<br class="">+ auto *D = dyn_cast_or_null<DeclaratorDecl>(GetDecl(UnusedFileScopedDecl));<br class=""> if (D)<br class=""> Decls.push_back(D);<br class=""> }<br class="">@@ -8059,9 +8022,8 @@ void ASTReader::ReadUnusedFileScopedDecl<br class=""><br class=""> void ASTReader::ReadDelegatingConstructors(<br class=""> SmallVectorImpl<CXXConstructorDecl *> &Decls) {<br class="">- for (unsigned I = 0, N = DelegatingCtorDecls.size(); I != N; ++I) {<br class="">- CXXConstructorDecl *D<br class="">- = dyn_cast_or_null<CXXConstructorDecl>(GetDecl(DelegatingCtorDecls[I]));<br class="">+ for (auto DelegatingCtorDecl : DelegatingCtorDecls) {<br class="">+ auto *D = dyn_cast_or_null<CXXConstructorDecl>(GetDecl(DelegatingCtorDecl));<br class=""> if (D)<br class=""> Decls.push_back(D);<br class=""> }<br class="">@@ -8069,9 +8031,8 @@ void ASTReader::ReadDelegatingConstructo<br class=""> }<br class=""><br class=""> void ASTReader::ReadExtVectorDecls(SmallVectorImpl<TypedefNameDecl *> &Decls) {<br class="">- for (unsigned I = 0, N = ExtVectorDecls.size(); I != N; ++I) {<br class="">- TypedefNameDecl *D<br class="">- = dyn_cast_or_null<TypedefNameDecl>(GetDecl(ExtVectorDecls[I]));<br class="">+ for (auto ExtVectorDecl : ExtVectorDecls) {<br class="">+ auto *D = dyn_cast_or_null<TypedefNameDecl>(GetDecl(ExtVectorDecl));<br class=""> if (D)<br class=""> Decls.push_back(D);<br class=""> }<br class="">@@ -8080,10 +8041,10 @@ void ASTReader::ReadExtVectorDecls(Small<br class=""><br class=""> void ASTReader::ReadUnusedLocalTypedefNameCandidates(<br class=""> llvm::SmallSetVector<const TypedefNameDecl *, 4> &Decls) {<br class="">- for (unsigned I = 0, N = UnusedLocalTypedefNameCandidates.size(); I != N;<br class="">- ++I) {<br class="">- TypedefNameDecl *D = dyn_cast_or_null<TypedefNameDecl>(<br class="">- GetDecl(UnusedLocalTypedefNameCandidates[I]));<br class="">+ for (auto UnusedLocalTypedefNameCandidate : UnusedLocalTypedefNameCandidates)<br class="">+ {<br class="">+ auto *D = dyn_cast_or_null<TypedefNameDecl>(<br class="">+ GetDecl(UnusedLocalTypedefNameCandidate));<br class=""> if (D)<br class=""> Decls.insert(D);<br class=""> }<br class="">@@ -8143,7 +8104,7 @@ void ASTReader::ReadUsedVTables(SmallVec<br class=""> void ASTReader::ReadPendingInstantiations(<br class=""> SmallVectorImpl<std::pair<ValueDecl *, SourceLocation>> &Pending) {<br class=""> for (unsigned Idx = 0, N = PendingInstantiations.size(); Idx < N;) {<br class="">- ValueDecl *D = cast<ValueDecl>(GetDecl(PendingInstantiations[Idx++]));<br class="">+ auto *D = cast<ValueDecl>(GetDecl(PendingInstantiations[Idx++]));<br class=""> SourceLocation Loc<br class=""> = SourceLocation::getFromRawEncoding(PendingInstantiations[Idx++]);<br class=""><br class="">@@ -8157,7 +8118,7 @@ void ASTReader::ReadLateParsedTemplates(<br class=""> &LPTMap) {<br class=""> for (unsigned Idx = 0, N = LateParsedTemplates.size(); Idx < N;<br class=""> /* In loop */) {<br class="">- FunctionDecl *FD = cast<FunctionDecl>(GetDecl(LateParsedTemplates[Idx++]));<br class="">+ auto *FD = cast<FunctionDecl>(GetDecl(LateParsedTemplates[Idx++]));<br class=""><br class=""> auto LT = llvm::make_unique<LateParsedTemplate>();<br class=""> LT->D = GetDecl(LateParsedTemplates[Idx++]);<br class="">@@ -8214,16 +8175,16 @@ ASTReader::SetGloballyVisibleDecls(Ident<br class=""> return;<br class=""> }<br class=""><br class="">- for (unsigned I = 0, N = DeclIDs.size(); I != N; ++I) {<br class="">+ for (auto DeclID : DeclIDs) {<br class=""> if (!SemaObj) {<br class=""> // Queue this declaration so that it will be added to the<br class=""> // translation unit scope and identifier's declaration chain<br class=""> // once a Sema object is known.<br class="">- PreloadedDeclIDs.push_back(DeclIDs[I]);<br class="">+ PreloadedDeclIDs.push_back(DeclID);<br class=""> continue;<br class=""> }<br class=""><br class="">- NamedDecl *D = cast<NamedDecl>(GetDecl(DeclIDs[I]));<br class="">+ auto *D = cast<NamedDecl>(GetDecl(DeclID));<br class=""><br class=""> // If we're simply supposed to record the declarations, do so now.<br class=""> if (Decls) {<br class="">@@ -8427,11 +8388,11 @@ Selector ASTReader::getLocalSelector(Mod<br class=""><br class=""> Selector ASTReader::DecodeSelector(serialization::SelectorID ID) {<br class=""> if (ID == 0)<br class="">- return Selector();<br class="">+ return {};<br class=""><br class=""> if (ID > SelectorsLoaded.size()) {<br class=""> Error("selector ID out of range in AST file");<br class="">- return Selector();<br class="">+ return {};<br class=""> }<br class=""><br class=""> if (SelectorsLoaded[ID - 1].getAsOpaquePtr() == nullptr) {<br class="">@@ -8479,7 +8440,7 @@ DeclarationName<br class=""> ASTReader::ReadDeclarationName(ModuleFile &F,<br class=""> const RecordData &Record, unsigned &Idx) {<br class=""> ASTContext &Context = getContext();<br class="">- DeclarationName::NameKind Kind = (DeclarationName::NameKind)Record[Idx++];<br class="">+ auto Kind = static_cast<DeclarationName::NameKind>(Record[Idx++]);<br class=""> switch (Kind) {<br class=""> case DeclarationName::Identifier:<br class=""> return DeclarationName(GetIdentifierInfo(F, Record, Idx));<br class="">@@ -8580,7 +8541,7 @@ TemplateName<br class=""> ASTReader::ReadTemplateName(ModuleFile &F, const RecordData &Record,<br class=""> unsigned &Idx) {<br class=""> ASTContext &Context = getContext();<br class="">- TemplateName::NameKind Kind = (TemplateName::NameKind)Record[Idx++];<br class="">+ auto Kind = static_cast<TemplateName::NameKind>(Record[Idx++]);<br class=""> switch (Kind) {<br class=""> case TemplateName::Template:<br class=""> return TemplateName(ReadDeclAs<TemplateDecl>(F, Record, Idx));<br class="">@@ -8597,7 +8558,7 @@ ASTReader::ReadTemplateName(ModuleFile &<br class=""> case TemplateName::QualifiedTemplate: {<br class=""> NestedNameSpecifier *NNS = ReadNestedNameSpecifier(F, Record, Idx);<br class=""> bool hasTemplKeyword = Record[Idx++];<br class="">- TemplateDecl *Template = ReadDeclAs<TemplateDecl>(F, Record, Idx);<br class="">+ auto *Template = ReadDeclAs<TemplateDecl>(F, Record, Idx);<br class=""> return Context.getQualifiedTemplateName(NNS, hasTemplKeyword, Template);<br class=""> }<br class=""><br class="">@@ -8612,22 +8573,21 @@ ASTReader::ReadTemplateName(ModuleFile &<br class=""> }<br class=""><br class=""> case TemplateName::SubstTemplateTemplateParm: {<br class="">- TemplateTemplateParmDecl *param<br class="">- = ReadDeclAs<TemplateTemplateParmDecl>(F, Record, Idx);<br class="">- if (!param) return TemplateName();<br class="">- TemplateName replacement = ReadTemplateName(F, Record, Idx);<br class="">- return Context.getSubstTemplateTemplateParm(param, replacement);<br class="">+ auto *Param = ReadDeclAs<TemplateTemplateParmDecl>(F, Record, Idx);<br class="">+ if (!Param)<br class="">+ return {};<br class="">+ TemplateName Replacement = ReadTemplateName(F, Record, Idx);<br class="">+ return Context.getSubstTemplateTemplateParm(Param, Replacement);<br class=""> }<br class=""><br class=""> case TemplateName::SubstTemplateTemplateParmPack: {<br class="">- TemplateTemplateParmDecl *Param<br class="">- = ReadDeclAs<TemplateTemplateParmDecl>(F, Record, Idx);<br class="">+ auto *Param = ReadDeclAs<TemplateTemplateParmDecl>(F, Record, Idx);<br class=""> if (!Param)<br class="">- return TemplateName();<br class="">+ return {};<br class=""><br class=""> TemplateArgument ArgPack = ReadTemplateArgument(F, Record, Idx);<br class=""> if (ArgPack.getKind() != TemplateArgument::Pack)<br class="">- return TemplateName();<br class="">+ return {};<br class=""><br class=""> return Context.getSubstTemplateTemplateParmPack(Param, ArgPack);<br class=""> }<br class="">@@ -8650,14 +8610,14 @@ TemplateArgument ASTReader::ReadTemplate<br class=""> return Context.getCanonicalTemplateArgument(Arg);<br class=""> }<br class=""><br class="">- TemplateArgument::ArgKind Kind = (TemplateArgument::ArgKind)Record[Idx++];<br class="">+ auto Kind = static_cast<TemplateArgument::ArgKind>(Record[Idx++]);<br class=""> switch (Kind) {<br class=""> case TemplateArgument::Null:<br class="">- return TemplateArgument();<br class="">+ return {};<br class=""> case TemplateArgument::Type:<br class=""> return TemplateArgument(readType(F, Record, Idx));<br class=""> case TemplateArgument::Declaration: {<br class="">- ValueDecl *D = ReadDeclAs<ValueDecl>(F, Record, Idx);<br class="">+ auto *D = ReadDeclAs<ValueDecl>(F, Record, Idx);<br class=""> return TemplateArgument(D, readType(F, Record, Idx));<br class=""> }<br class=""> case TemplateArgument::NullPtr:<br class="">@@ -8680,7 +8640,7 @@ TemplateArgument ASTReader::ReadTemplate<br class=""> return TemplateArgument(ReadExpr(F));<br class=""> case TemplateArgument::Pack: {<br class=""> unsigned NumArgs = Record[Idx++];<br class="">- TemplateArgument *Args = new (Context) TemplateArgument[NumArgs];<br class="">+ auto *Args = new (Context) TemplateArgument[NumArgs];<br class=""> for (unsigned I = 0; I != NumArgs; ++I)<br class=""> Args[I] = ReadTemplateArgument(F, Record, Idx);<br class=""> return TemplateArgument(llvm::makeArrayRef(Args, NumArgs));<br class="">@@ -8727,7 +8687,7 @@ void ASTReader::ReadUnresolvedSet(Module<br class=""> Set.reserve(getContext(), NumDecls);<br class=""> while (NumDecls--) {<br class=""> DeclID ID = ReadDeclID(F, Record, Idx);<br class="">- AccessSpecifier AS = (AccessSpecifier)Record[Idx++];<br class="">+ auto AS = static_cast<AccessSpecifier>(Record[Idx++]);<br class=""> Set.addLazyDecl(getContext(), ID, AS);<br class=""> }<br class=""> }<br class="">@@ -8735,10 +8695,10 @@ void ASTReader::ReadUnresolvedSet(Module<br class=""> CXXBaseSpecifier<br class=""> ASTReader::ReadCXXBaseSpecifier(ModuleFile &F,<br class=""> const RecordData &Record, unsigned &Idx) {<br class="">- bool isVirtual = static_cast<bool>(Record[Idx++]);<br class="">- bool isBaseOfClass = static_cast<bool>(Record[Idx++]);<br class="">- AccessSpecifier AS = static_cast<AccessSpecifier>(Record[Idx++]);<br class="">- bool inheritConstructors = static_cast<bool>(Record[Idx++]);<br class="">+ auto isVirtual = static_cast<bool>(Record[Idx++]);<br class="">+ auto isBaseOfClass = static_cast<bool>(Record[Idx++]);<br class="">+ auto AS = static_cast<AccessSpecifier>(Record[Idx++]);<br class="">+ auto inheritConstructors = static_cast<bool>(Record[Idx++]);<br class=""> TypeSourceInfo *TInfo = GetTypeSourceInfo(F, Record, Idx);<br class=""> SourceRange Range = ReadSourceRange(F, Record, Idx);<br class=""> SourceLocation EllipsisLoc = ReadSourceLocation(F, Record, Idx);<br class="">@@ -8754,14 +8714,14 @@ ASTReader::ReadCXXCtorInitializers(Modul<br class=""> ASTContext &Context = getContext();<br class=""> unsigned NumInitializers = Record[Idx++];<br class=""> assert(NumInitializers && "wrote ctor initializers but have no inits");<br class="">- auto **CtorInitializers = new (Context) CXXCtorInitializer*[NumInitializers];<br class="">+ auto **CtorInitializers = new (Context) CXXCtorInitializer *[NumInitializers];<br class=""> for (unsigned i = 0; i != NumInitializers; ++i) {<br class=""> TypeSourceInfo *TInfo = nullptr;<br class=""> bool IsBaseVirtual = false;<br class=""> FieldDecl *Member = nullptr;<br class=""> IndirectFieldDecl *IndirectMember = nullptr;<br class=""><br class="">- CtorInitializerType Type = (CtorInitializerType)Record[Idx++];<br class="">+ auto Type = static_cast<CtorInitializerType>(Record[Idx++]);<br class=""> switch (Type) {<br class=""> case CTOR_INITIALIZER_BASE:<br class=""> TInfo = GetTypeSourceInfo(F, Record, Idx);<br class="">@@ -8821,8 +8781,7 @@ ASTReader::ReadNestedNameSpecifier(Modul<br class=""> unsigned N = Record[Idx++];<br class=""> NestedNameSpecifier *NNS = nullptr, *Prev = nullptr;<br class=""> for (unsigned I = 0; I != N; ++I) {<br class="">- NestedNameSpecifier::SpecifierKind Kind<br class="">- = (NestedNameSpecifier::SpecifierKind)Record[Idx++];<br class="">+ auto Kind = static_cast<NestedNameSpecifier::SpecifierKind>(Record[Idx++]);<br class=""> switch (Kind) {<br class=""> case NestedNameSpecifier::Identifier: {<br class=""> IdentifierInfo *II = GetIdentifierInfo(F, Record, Idx);<br class="">@@ -8831,13 +8790,13 @@ ASTReader::ReadNestedNameSpecifier(Modul<br class=""> }<br class=""><br class=""> case NestedNameSpecifier::Namespace: {<br class="">- NamespaceDecl *NS = ReadDeclAs<NamespaceDecl>(F, Record, Idx);<br class="">+ auto *NS = ReadDeclAs<NamespaceDecl>(F, Record, Idx);<br class=""> NNS = NestedNameSpecifier::Create(Context, Prev, NS);<br class=""> break;<br class=""> }<br class=""><br class=""> case NestedNameSpecifier::NamespaceAlias: {<br class="">- NamespaceAliasDecl *Alias =ReadDeclAs<NamespaceAliasDecl>(F, Record, Idx);<br class="">+ auto *Alias = ReadDeclAs<NamespaceAliasDecl>(F, Record, Idx);<br class=""> NNS = NestedNameSpecifier::Create(Context, Prev, Alias);<br class=""> break;<br class=""> }<br class="">@@ -8859,7 +8818,7 @@ ASTReader::ReadNestedNameSpecifier(Modul<br class=""> break;<br class=""><br class=""> case NestedNameSpecifier::Super: {<br class="">- CXXRecordDecl *RD = ReadDeclAs<CXXRecordDecl>(F, Record, Idx);<br class="">+ auto *RD = ReadDeclAs<CXXRecordDecl>(F, Record, Idx);<br class=""> NNS = NestedNameSpecifier::SuperSpecifier(Context, RD);<br class=""> break;<br class=""> }<br class="">@@ -8876,8 +8835,7 @@ ASTReader::ReadNestedNameSpecifierLoc(Mo<br class=""> unsigned N = Record[Idx++];<br class=""> NestedNameSpecifierLocBuilder Builder;<br class=""> for (unsigned I = 0; I != N; ++I) {<br class="">- NestedNameSpecifier::SpecifierKind Kind<br class="">- = (NestedNameSpecifier::SpecifierKind)Record[Idx++];<br class="">+ auto Kind = static_cast<NestedNameSpecifier::SpecifierKind>(Record[Idx++]);<br class=""> switch (Kind) {<br class=""> case NestedNameSpecifier::Identifier: {<br class=""> IdentifierInfo *II = GetIdentifierInfo(F, Record, Idx);<br class="">@@ -8887,14 +8845,14 @@ ASTReader::ReadNestedNameSpecifierLoc(Mo<br class=""> }<br class=""><br class=""> case NestedNameSpecifier::Namespace: {<br class="">- NamespaceDecl *NS = ReadDeclAs<NamespaceDecl>(F, Record, Idx);<br class="">+ auto *NS = ReadDeclAs<NamespaceDecl>(F, Record, Idx);<br class=""> SourceRange Range = ReadSourceRange(F, Record, Idx);<br class=""> Builder.Extend(Context, NS, Range.getBegin(), Range.getEnd());<br class=""> break;<br class=""> }<br class=""><br class=""> case NestedNameSpecifier::NamespaceAlias: {<br class="">- NamespaceAliasDecl *Alias =ReadDeclAs<NamespaceAliasDecl>(F, Record, Idx);<br class="">+ auto *Alias = ReadDeclAs<NamespaceAliasDecl>(F, Record, Idx);<br class=""> SourceRange Range = ReadSourceRange(F, Record, Idx);<br class=""> Builder.Extend(Context, Alias, Range.getBegin(), Range.getEnd());<br class=""> break;<br class="">@@ -8905,7 +8863,7 @@ ASTReader::ReadNestedNameSpecifierLoc(Mo<br class=""> bool Template = Record[Idx++];<br class=""> TypeSourceInfo *T = GetTypeSourceInfo(F, Record, Idx);<br class=""> if (!T)<br class="">- return NestedNameSpecifierLoc();<br class="">+ return {};<br class=""> SourceLocation ColonColonLoc = ReadSourceLocation(F, Record, Idx);<br class=""><br class=""> // FIXME: 'template' keyword location not saved anywhere, so we fake it.<br class="">@@ -8922,7 +8880,7 @@ ASTReader::ReadNestedNameSpecifierLoc(Mo<br class=""> }<br class=""><br class=""> case NestedNameSpecifier::Super: {<br class="">- CXXRecordDecl *RD = ReadDeclAs<CXXRecordDecl>(F, Record, Idx);<br class="">+ auto *RD = ReadDeclAs<CXXRecordDecl>(F, Record, Idx);<br class=""> SourceRange Range = ReadSourceRange(F, Record, Idx);<br class=""> Builder.MakeSuper(Context, RD, Range.getBegin(), Range.getEnd());<br class=""> break;<br class="">@@ -8993,7 +8951,7 @@ VersionTuple ASTReader::ReadVersionTuple<br class=""> CXXTemporary *ASTReader::ReadCXXTemporary(ModuleFile &F,<br class=""> const RecordData &Record,<br class=""> unsigned &Idx) {<br class="">- CXXDestructorDecl *Decl = ReadDeclAs<CXXDestructorDecl>(F, Record, Idx);<br class="">+ auto *Decl = ReadDeclAs<CXXDestructorDecl>(F, Record, Idx);<br class=""> return CXXTemporary::Create(getContext(), Decl);<br class=""> }<br class=""><br class="">@@ -9032,14 +8990,10 @@ void ASTReader::ClearSwitchCaseIDs() {<br class=""> void ASTReader::ReadComments() {<br class=""> ASTContext &Context = getContext();<br class=""> std::vector<RawComment *> Comments;<br class="">- for (SmallVectorImpl<std::pair<BitstreamCursor,<br class="">- serialization::ModuleFile *>>::iterator<br class="">- I = CommentsCursors.begin(),<br class="">- E = CommentsCursors.end();<br class="">- I != E; ++I) {<br class="">+ for (auto &I : CommentsCursors) {<br class=""> Comments.clear();<br class="">- BitstreamCursor &Cursor = I->first;<br class="">- serialization::ModuleFile &F = *I->second;<br class="">+ BitstreamCursor &Cursor = I.first;<br class="">+ serialization::ModuleFile &F = *I.second;<br class=""> SavedStreamPosition SavedPosition(Cursor);<br class=""><br class=""> RecordData Record;<br class="">@@ -9065,8 +9019,7 @@ void ASTReader::ReadComments() {<br class=""> case COMMENTS_RAW_COMMENT: {<br class=""> unsigned Idx = 0;<br class=""> SourceRange SR = ReadSourceRange(F, Record, Idx);<br class="">- RawComment::CommentKind Kind =<br class="">- (RawComment::CommentKind) Record[Idx++];<br class="">+ auto Kind = static_cast<RawComment::CommentKind>(Record[Idx++]);<br class=""> bool IsTrailingComment = Record[Idx++];<br class=""> bool IsAlmostTrailingComment = Record[Idx++];<br class=""> Comments.push_back(new (Context) RawComment(<br class="">@@ -9147,22 +9100,20 @@ void ASTReader::finishPendingActions() {<br class=""><br class=""> // For each decl chain that we wanted to complete while deserializing, mark<br class=""> // it as "still needs to be completed".<br class="">- for (unsigned I = 0; I != PendingIncompleteDeclChains.size(); ++I) {<br class="">- markIncompleteDeclChain(PendingIncompleteDeclChains[I]);<br class="">- }<br class="">+ for (auto *PendingIncompleteDeclChain : PendingIncompleteDeclChains)<br class="">+ markIncompleteDeclChain(PendingIncompleteDeclChain);<br class=""> PendingIncompleteDeclChains.clear();<br class=""><br class=""> // Load pending declaration chains.<br class="">- for (unsigned I = 0; I != PendingDeclChains.size(); ++I)<br class="">- loadPendingDeclChain(PendingDeclChains[I].first, PendingDeclChains[I].second);<br class="">+ for (const auto &I : PendingDeclChains)<br class="">+ loadPendingDeclChain(I.first, I.second);<br class=""> PendingDeclChains.clear();<br class=""><br class=""> // Make the most recent of the top-level declarations visible.<br class="">- for (TopLevelDeclsMap::iterator TLD = TopLevelDecls.begin(),<br class="">- TLDEnd = TopLevelDecls.end(); TLD != TLDEnd; ++TLD) {<br class="">- IdentifierInfo *II = TLD->first;<br class="">- for (unsigned I = 0, N = TLD->second.size(); I != N; ++I) {<br class="">- pushExternalDeclIntoScope(cast<NamedDecl>(TLD->second[I]), II);<br class="">+ for (auto &TLD : TopLevelDecls) {<br class="">+ IdentifierInfo *II = TLD.first;<br class="">+ for (unsigned I = 0, N = TLD.second.size(); I != N; ++I) {<br class="">+ pushExternalDeclIntoScope(cast<NamedDecl>(TLD.second[I]), II);<br class=""> }<br class=""> }<br class=""><br class="">@@ -9193,8 +9144,8 @@ void ASTReader::finishPendingActions() {<br class=""> while (!PendingDeclContextInfos.empty()) {<br class=""> PendingDeclContextInfo Info = PendingDeclContextInfos.front();<br class=""> PendingDeclContextInfos.pop_front();<br class="">- DeclContext *SemaDC = cast<DeclContext>(GetDecl(Info.SemaDC));<br class="">- DeclContext *LexicalDC = cast<DeclContext>(GetDecl(Info.LexicalDC));<br class="">+ auto *SemaDC = cast<DeclContext>(GetDecl(Info.SemaDC));<br class="">+ auto *LexicalDC = cast<DeclContext>(GetDecl(Info.LexicalDC));<br class=""> Info.D->setDeclContextsImpl(SemaDC, LexicalDC, getContext());<br class=""> }<br class=""><br class="">@@ -9215,14 +9166,14 @@ void ASTReader::finishPendingActions() {<br class=""> // Objective-C protocol definitions, or any redeclarable templates, make sure<br class=""> // that all redeclarations point to the definitions. Note that this can only<br class=""> // happen now, after the redeclaration chains have been fully wired.<br class="">- for (Decl *D : PendingDefinitions) {<br class="">- if (TagDecl *TD = dyn_cast<TagDecl>(D)) {<br class="">- if (const TagType *TagT = dyn_cast<TagType>(TD->getTypeForDecl())) {<br class="">+ for (auto *D : PendingDefinitions) {<br class="">+ if (auto *TD = dyn_cast<TagDecl>(D)) {<br class="">+ if (const auto *TagT = dyn_cast<TagType>(TD->getTypeForDecl())) {<br class=""> // Make sure that the TagType points at the definition.<br class=""> const_cast<TagType*>(TagT)->decl = TD;<br class=""> }<br class=""><br class="">- if (auto RD = dyn_cast<CXXRecordDecl>(D)) {<br class="">+ if (auto *RD = dyn_cast<CXXRecordDecl>(D)) {<br class=""> for (auto *R = getMostRecentExistingDecl(RD); R;<br class=""> R = R->getPreviousDecl()) {<br class=""> assert((R == D) ==<br class="">@@ -9235,7 +9186,7 @@ void ASTReader::finishPendingActions() {<br class=""> continue;<br class=""> }<br class=""><br class="">- if (auto ID = dyn_cast<ObjCInterfaceDecl>(D)) {<br class="">+ if (auto *ID = dyn_cast<ObjCInterfaceDecl>(D)) {<br class=""> // Make sure that the ObjCInterfaceType points at the definition.<br class=""> const_cast<ObjCInterfaceType *>(cast<ObjCInterfaceType>(ID->TypeForDecl))<br class=""> ->Decl = ID;<br class="">@@ -9246,14 +9197,14 @@ void ASTReader::finishPendingActions() {<br class=""> continue;<br class=""> }<br class=""><br class="">- if (auto PD = dyn_cast<ObjCProtocolDecl>(D)) {<br class="">+ if (auto *PD = dyn_cast<ObjCProtocolDecl>(D)) {<br class=""> for (auto *R = getMostRecentExistingDecl(PD); R; R = R->getPreviousDecl())<br class=""> cast<ObjCProtocolDecl>(R)->Data = PD->Data;<br class=""><br class=""> continue;<br class=""> }<br class=""><br class="">- auto RTD = cast<RedeclarableTemplateDecl>(D)->getCanonicalDecl();<br class="">+ auto *RTD = cast<RedeclarableTemplateDecl>(D)->getCanonicalDecl();<br class=""> for (auto *R = getMostRecentExistingDecl(RTD); R; R = R->getPreviousDecl())<br class=""> cast<RedeclarableTemplateDecl>(R)->Common = RTD->Common;<br class=""> }<br class="">@@ -9263,17 +9214,15 @@ void ASTReader::finishPendingActions() {<br class=""> // this now (delayed) so that we can be sure that the declaration chains<br class=""> // have been fully wired up (hasBody relies on this).<br class=""> // FIXME: We shouldn't require complete redeclaration chains here.<br class="">- for (PendingBodiesMap::iterator PB = PendingBodies.begin(),<br class="">- PBEnd = PendingBodies.end();<br class="">- PB != PBEnd; ++PB) {<br class="">- if (FunctionDecl *FD = dyn_cast<FunctionDecl>(PB->first)) {<br class="">+ for (auto &PB : PendingBodies) {<br class="">+ if (auto *FD = dyn_cast<FunctionDecl>(PB.first)) {<br class=""> // FIXME: Check for =delete/=default?<br class=""> // FIXME: Complain about ODR violations here?<br class=""> const FunctionDecl *Defn = nullptr;<br class=""> if (!getContext().getLangOpts().Modules || !FD->hasBody(Defn)) {<br class="">- FD->setLazyBody(PB->second);<br class="">+ FD->setLazyBody(PB.second);<br class=""> } else {<br class="">- auto *NonConstDefn = const_cast<FunctionDecl*>(Defn);<br class="">+ auto *NonConstDefn = const_cast<FunctionDecl *>(Defn);<br class=""> mergeDefinitionVisibility(NonConstDefn, FD);<br class=""><br class=""> if (!FD->isLateTemplateParsed() &&<br class="">@@ -9285,9 +9234,9 @@ void ASTReader::finishPendingActions() {<br class=""> continue;<br class=""> }<br class=""><br class="">- ObjCMethodDecl *MD = cast<ObjCMethodDecl>(PB->first);<br class="">+ auto *MD = cast<ObjCMethodDecl>(PB.first);<br class=""> if (!getContext().getLangOpts().Modules || !MD->hasBody())<br class="">- MD->setLazyBody(PB->second);<br class="">+ MD->setLazyBody(PB.second);<br class=""> }<br class=""> PendingBodies.clear();<br class=""><br class="">@@ -9407,10 +9356,10 @@ void ASTReader::diagnoseOdrViolations()<br class=""> Diag(cast<Decl>(CanonDef)->getLocation(),<br class=""> diag::note_module_odr_violation_no_possible_decls) << D;<br class=""> else {<br class="">- for (unsigned I = 0, N = Candidates.size(); I != N; ++I)<br class="">- Diag(Candidates[I]->getLocation(),<br class="">+ for (auto *Candidate : Candidates)<br class="">+ Diag(Candidate->getLocation(),<br class=""> diag::note_module_odr_violation_possible_decl)<br class="">- << Candidates[I];<br class="">+ << Candidate;<br class=""> }<br class=""><br class=""> DiagnosedOdrMergeFailures.insert(CanonDef);<br class="">@@ -9631,8 +9580,8 @@ void ASTReader::diagnoseOdrViolations()<br class=""> << SecondModule << Range << DiffType;<br class=""> };<br class=""><br class="">- const NamedDecl* FirstDecl = cast<NamedDecl>(FirstIt->first);<br class="">- const NamedDecl* SecondDecl = cast<NamedDecl>(SecondIt->first);<br class="">+ const auto *FirstDecl = cast<NamedDecl>(FirstIt->first);<br class="">+ const auto *SecondDecl = cast<NamedDecl>(SecondIt->first);<br class=""><br class=""> assert(FirstDecl->getKind() == SecondDecl->getKind() &&<br class=""> "Parameter Decl's should be the same kind.");<br class="">@@ -9980,8 +9929,8 @@ void ASTReader::diagnoseOdrViolations()<br class=""> llvm_unreachable("Invalid diff type");<br class=""><br class=""> case StaticAssert: {<br class="">- StaticAssertDecl *FirstSA = cast<StaticAssertDecl>(FirstDecl);<br class="">- StaticAssertDecl *SecondSA = cast<StaticAssertDecl>(SecondDecl);<br class="">+ auto *FirstSA = cast<StaticAssertDecl>(FirstDecl);<br class="">+ auto *SecondSA = cast<StaticAssertDecl>(SecondDecl);<br class=""><br class=""> Expr *FirstExpr = FirstSA->getAssertExpr();<br class=""> Expr *SecondExpr = SecondSA->getAssertExpr();<br class="">@@ -10036,8 +9985,8 @@ void ASTReader::diagnoseOdrViolations()<br class=""> break;<br class=""> }<br class=""> case Field: {<br class="">- FieldDecl *FirstField = cast<FieldDecl>(FirstDecl);<br class="">- FieldDecl *SecondField = cast<FieldDecl>(SecondDecl);<br class="">+ auto *FirstField = cast<FieldDecl>(FirstDecl);<br class="">+ auto *SecondField = cast<FieldDecl>(SecondDecl);<br class=""> IdentifierInfo *FirstII = FirstField->getIdentifier();<br class=""> IdentifierInfo *SecondII = SecondField->getIdentifier();<br class=""> if (FirstII->getName() != SecondII->getName()) {<br class="">@@ -10152,8 +10101,8 @@ void ASTReader::diagnoseOdrViolations()<br class=""> if (isa<CXXDestructorDecl>(D)) return DiagDestructor;<br class=""> return DiagMethod;<br class=""> };<br class="">- const CXXMethodDecl *FirstMethod = cast<CXXMethodDecl>(FirstDecl);<br class="">- const CXXMethodDecl *SecondMethod = cast<CXXMethodDecl>(SecondDecl);<br class="">+ const auto *FirstMethod = cast<CXXMethodDecl>(FirstDecl);<br class="">+ const auto *SecondMethod = cast<CXXMethodDecl>(SecondDecl);<br class=""> FirstMethodType = GetMethodTypeForDiagnostics(FirstMethod);<br class=""> SecondMethodType = GetMethodTypeForDiagnostics(SecondMethod);<br class=""> auto FirstName = FirstMethod->getDeclName();<br class="">@@ -10281,7 +10230,7 @@ void ASTReader::diagnoseOdrViolations()<br class=""> if (FirstParamType != SecondParamType &&<br class=""> ComputeQualTypeODRHash(FirstParamType) !=<br class=""> ComputeQualTypeODRHash(SecondParamType)) {<br class="">- if (const DecayedType *ParamDecayedType =<br class="">+ if (const auto *ParamDecayedType =<br class=""> FirstParamType->getAs<DecayedType>()) {<br class=""> ODRDiagError(FirstMethod->getLocation(),<br class=""> FirstMethod->getSourceRange(), MethodParameterType)<br class="">@@ -10294,7 +10243,7 @@ void ASTReader::diagnoseOdrViolations()<br class=""> << false;<br class=""> }<br class=""><br class="">- if (const DecayedType *ParamDecayedType =<br class="">+ if (const auto *ParamDecayedType =<br class=""> SecondParamType->getAs<DecayedType>()) {<br class=""> ODRDiagNote(SecondMethod->getLocation(),<br class=""> SecondMethod->getSourceRange(), MethodParameterType)<br class="">@@ -10370,8 +10319,8 @@ void ASTReader::diagnoseOdrViolations()<br class=""> }<br class=""> case TypeAlias:<br class=""> case TypeDef: {<br class="">- TypedefNameDecl *FirstTD = cast<TypedefNameDecl>(FirstDecl);<br class="">- TypedefNameDecl *SecondTD = cast<TypedefNameDecl>(SecondDecl);<br class="">+ auto *FirstTD = cast<TypedefNameDecl>(FirstDecl);<br class="">+ auto *SecondTD = cast<TypedefNameDecl>(SecondDecl);<br class=""> auto FirstName = FirstTD->getDeclName();<br class=""> auto SecondName = SecondTD->getDeclName();<br class=""> if (FirstName != SecondName) {<br class="">@@ -10401,8 +10350,8 @@ void ASTReader::diagnoseOdrViolations()<br class=""> break;<br class=""> }<br class=""> case Var: {<br class="">- VarDecl *FirstVD = cast<VarDecl>(FirstDecl);<br class="">- VarDecl *SecondVD = cast<VarDecl>(SecondDecl);<br class="">+ auto *FirstVD = cast<VarDecl>(FirstDecl);<br class="">+ auto *SecondVD = cast<VarDecl>(SecondDecl);<br class=""> auto FirstName = FirstVD->getDeclName();<br class=""> auto SecondName = SecondVD->getDeclName();<br class=""> if (FirstName != SecondName) {<br class="">@@ -10472,8 +10421,8 @@ void ASTReader::diagnoseOdrViolations()<br class=""> break;<br class=""> }<br class=""> case Friend: {<br class="">- FriendDecl *FirstFriend = cast<FriendDecl>(FirstDecl);<br class="">- FriendDecl *SecondFriend = cast<FriendDecl>(SecondDecl);<br class="">+ auto *FirstFriend = cast<FriendDecl>(FirstDecl);<br class="">+ auto *SecondFriend = cast<FriendDecl>(SecondDecl);<br class=""><br class=""> NamedDecl *FirstND = FirstFriend->getFriendDecl();<br class=""> NamedDecl *SecondND = SecondFriend->getFriendDecl();<br class="">@@ -10562,7 +10511,6 @@ void ASTReader::diagnoseOdrViolations()<br class=""><br class=""> bool Diagnosed = false;<br class=""> for (auto &SecondFunction : Merge.second) {<br class="">-<br class=""> if (FirstFunction == SecondFunction)<br class=""> continue;<br class=""><br class="">@@ -10624,7 +10572,7 @@ void ASTReader::diagnoseOdrViolations()<br class=""> if (FirstParamType != SecondParamType &&<br class=""> ComputeQualTypeODRHash(FirstParamType) !=<br class=""> ComputeQualTypeODRHash(SecondParamType)) {<br class="">- if (const DecayedType *ParamDecayedType =<br class="">+ if (const auto *ParamDecayedType =<br class=""> FirstParamType->getAs<DecayedType>()) {<br class=""> ODRDiagError(FirstParam->getLocation(),<br class=""> FirstParam->getSourceRange(), ParameterType)<br class="">@@ -10636,7 +10584,7 @@ void ASTReader::diagnoseOdrViolations()<br class=""> << (I + 1) << FirstParamType << false;<br class=""> }<br class=""><br class="">- if (const DecayedType *ParamDecayedType =<br class="">+ if (const auto *ParamDecayedType =<br class=""> SecondParamType->getAs<DecayedType>()) {<br class=""> ODRDiagNote(SecondParam->getLocation(),<br class=""> SecondParam->getSourceRange(), ParameterType)<br class=""><br class=""><br class="">_______________________________________________<br class="">cfe-commits mailing list<br class=""><a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br class=""></div></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">cfe-commits mailing list<br class=""><a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></body></html>