diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 8e32a69f69353..640c52096c4a1 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -390,6 +390,11 @@ Improvements to Clang's diagnostics suppressed for use of reserved names in a system header. - ``-Winteger-overflow`` will diagnose overflow in more cases. This fixes `Issue 58944 `_. +- Clang has an internal limit of 2GB of preprocessed source code per + compilation, including source reachable through imported AST files such as + PCH or modules. When Clang hits this limit, it now produces notes mentioning + which header and source files are consuming large amounts of this space. + ``#pragma clang __debug sloc_usage`` can also be used to request this report. Non-comprehensive list of changes in this release ------------------------------------------------- diff --git a/clang/include/clang/Basic/DiagnosticCommonKinds.td b/clang/include/clang/Basic/DiagnosticCommonKinds.td index 38cc8821f4701..c8a1bae487d8c 100644 --- a/clang/include/clang/Basic/DiagnosticCommonKinds.td +++ b/clang/include/clang/Basic/DiagnosticCommonKinds.td @@ -345,6 +345,17 @@ def err_unable_to_rename_temp : Error< "unable to rename temporary '%0' to output file '%1': '%2'">; def err_unable_to_make_temp : Error< "unable to make temporary file: %0">; +def remark_sloc_usage : Remark< + "source manager location address space usage:">, + InGroup>, DefaultRemark, ShowInSystemHeader; +def note_total_sloc_usage : Note< + "%0B in local locations, %1B in locations loaded from AST files, for a total " + "of %2B (%3%% of available space)">; +def note_file_sloc_usage : Note< + "file entered %0 time%s0 using %1B of space" + "%plural{0:|: plus %2B for macro expansions}2">; +def note_file_misc_sloc_usage : Note< + "%0 additional files entered using a total of %1B of space">; // Modules def err_module_format_unhandled : Error< diff --git a/clang/include/clang/Basic/DiagnosticLexKinds.td b/clang/include/clang/Basic/DiagnosticLexKinds.td index fd5398fa0409b..908f4489d9a31 100644 --- a/clang/include/clang/Basic/DiagnosticLexKinds.td +++ b/clang/include/clang/Basic/DiagnosticLexKinds.td @@ -648,10 +648,14 @@ def warn_pragma_diagnostic_unknown_warning : ExtWarn<"unknown warning group '%0', ignored">, InGroup; // - #pragma __debug +def warn_pragma_debug_missing_command : Warning< + "missing debug command">, InGroup; def warn_pragma_debug_unexpected_command : Warning< "unexpected debug command '%0'">, InGroup; def warn_pragma_debug_missing_argument : Warning< "missing argument to debug command '%0'">, InGroup; +def warn_pragma_debug_unexpected_argument : Warning< + "unexpected argument to debug command">, InGroup; def warn_pragma_debug_unknown_module : Warning< "unknown module '%0'">, InGroup; // #pragma module diff --git a/clang/include/clang/Basic/SourceManager.h b/clang/include/clang/Basic/SourceManager.h index d5d5af461fc31..8ab519f8431f0 100644 --- a/clang/include/clang/Basic/SourceManager.h +++ b/clang/include/clang/Basic/SourceManager.h @@ -710,7 +710,7 @@ class SourceManager : public RefCountedBase { /// not have been loaded, so that value would be unknown. SourceLocation::UIntTy CurrentLoadedOffset; - /// The highest possible offset is 2^32-1 (2^63-1 for 64-bit source + /// The highest possible offset is 2^31-1 (2^63-1 for 64-bit source /// locations), so CurrentLoadedOffset starts at 2^31 (2^63 resp.). static const SourceLocation::UIntTy MaxLoadedOffset = 1ULL << (8 * sizeof(SourceLocation::UIntTy) - 1); @@ -1691,6 +1691,10 @@ class SourceManager : public RefCountedBase { void dump() const; + // Produce notes describing the current source location address space usage. + void noteSLocAddressSpaceUsage(DiagnosticsEngine &Diag, + Optional MaxNotes = 32) const; + /// Get the number of local SLocEntries we have. unsigned local_sloc_entry_size() const { return LocalSLocEntryTable.size(); } diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index caa557314ba8e..ecb771a48e64d 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/lib/Basic/SourceManager.cpp @@ -17,6 +17,7 @@ #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManagerInternals.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/MapVector.h" #include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" @@ -615,6 +616,7 @@ FileID SourceManager::createFileIDImpl(ContentCache &File, StringRef Filename, if (!(NextLocalOffset + FileSize + 1 > NextLocalOffset && NextLocalOffset + FileSize + 1 <= CurrentLoadedOffset)) { Diag.Report(IncludePos, diag::err_include_too_large); + noteSLocAddressSpaceUsage(Diag); return FileID(); } LocalSLocEntryTable.push_back( @@ -671,6 +673,7 @@ SourceManager::createExpansionLocImpl(const ExpansionInfo &Info, return SourceLocation::getMacroLoc(LoadedOffset); } LocalSLocEntryTable.push_back(SLocEntry::get(NextLocalOffset, Info)); + // FIXME: Produce a proper diagnostic for this case. assert(NextLocalOffset + Length + 1 > NextLocalOffset && NextLocalOffset + Length + 1 <= CurrentLoadedOffset && "Ran out of source locations!"); @@ -2230,6 +2233,94 @@ LLVM_DUMP_METHOD void SourceManager::dump() const { } } +void SourceManager::noteSLocAddressSpaceUsage( + DiagnosticsEngine &Diag, Optional MaxNotes) const { + struct Info { + // A location where this file was entered. + SourceLocation Loc; + // Number of times this FileEntry was entered. + unsigned Inclusions = 0; + // Size usage from the file itself. + uint64_t DirectSize = 0; + // Total size usage from the file and its macro expansions. + uint64_t TotalSize = 0; + }; + using UsageMap = llvm::MapVector; + + UsageMap Usage; + uint64_t CountedSize = 0; + + auto AddUsageForFileID = [&](FileID ID) { + // The +1 here is because getFileIDSize doesn't include the extra byte for + // the one-past-the-end location. + unsigned Size = getFileIDSize(ID) + 1; + + // Find the file that used this address space, either directly or by + // macro expansion. + SourceLocation FileStart = getFileLoc(getComposedLoc(ID, 0)); + FileID FileLocID = getFileID(FileStart); + const FileEntry *Entry = getFileEntryForID(FileLocID); + + Info &EntryInfo = Usage[Entry]; + if (EntryInfo.Loc.isInvalid()) + EntryInfo.Loc = FileStart; + if (ID == FileLocID) { + ++EntryInfo.Inclusions; + EntryInfo.DirectSize += Size; + } + EntryInfo.TotalSize += Size; + CountedSize += Size; + }; + + // Loaded SLocEntries have indexes counting downwards from -2. + for (size_t Index = 0; Index != LoadedSLocEntryTable.size(); ++Index) { + AddUsageForFileID(FileID::get(-2 - Index)); + } + // Local SLocEntries have indexes counting upwards from 0. + for (size_t Index = 0; Index != LocalSLocEntryTable.size(); ++Index) { + AddUsageForFileID(FileID::get(Index)); + } + + // Sort the usage by size from largest to smallest. Break ties by raw source + // location. + auto SortedUsage = Usage.takeVector(); + auto Cmp = [](const UsageMap::value_type &A, const UsageMap::value_type &B) { + return A.second.TotalSize > B.second.TotalSize || + (A.second.TotalSize == B.second.TotalSize && + A.second.Loc < B.second.Loc); + }; + auto SortedEnd = SortedUsage.end(); + if (MaxNotes && SortedUsage.size() > *MaxNotes) { + SortedEnd = SortedUsage.begin() + *MaxNotes; + std::nth_element(SortedUsage.begin(), SortedEnd, SortedUsage.end(), Cmp); + } + std::sort(SortedUsage.begin(), SortedEnd, Cmp); + + // Produce note on sloc address space usage total. + uint64_t LocalUsage = NextLocalOffset; + uint64_t LoadedUsage = MaxLoadedOffset - CurrentLoadedOffset; + int UsagePercent = static_cast(100.0 * double(LocalUsage + LoadedUsage) / + MaxLoadedOffset); + Diag.Report(SourceLocation(), diag::note_total_sloc_usage) + << LocalUsage << LoadedUsage << (LocalUsage + LoadedUsage) << UsagePercent; + + // Produce notes on sloc address space usage for each file with a high usage. + uint64_t ReportedSize = 0; + for (auto &[Entry, FileInfo] : + llvm::make_range(SortedUsage.begin(), SortedEnd)) { + Diag.Report(FileInfo.Loc, diag::note_file_sloc_usage) + << FileInfo.Inclusions << FileInfo.DirectSize + << (FileInfo.TotalSize - FileInfo.DirectSize); + ReportedSize += FileInfo.TotalSize; + } + + // Describe any remaining usage not reported in the per-file usage. + if (ReportedSize != CountedSize) { + Diag.Report(SourceLocation(), diag::note_file_misc_sloc_usage) + << (SortedUsage.end() - SortedEnd) << CountedSize - ReportedSize; + } +} + ExternalSLocEntrySource::~ExternalSLocEntrySource() = default; /// Return the amount of memory used by memory buffers, breaking down diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp index fb4f2dc457581..747447e3ab39a 100644 --- a/clang/lib/Lex/Pragma.cpp +++ b/clang/lib/Lex/Pragma.cpp @@ -1043,7 +1043,7 @@ struct PragmaDebugHandler : public PragmaHandler { Token Tok; PP.LexUnexpandedToken(Tok); if (Tok.isNot(tok::identifier)) { - PP.Diag(Tok, diag::warn_pragma_diagnostic_invalid); + PP.Diag(Tok, diag::warn_pragma_debug_missing_command); return; } IdentifierInfo *II = Tok.getIdentifierInfo(); @@ -1181,6 +1181,23 @@ struct PragmaDebugHandler : public PragmaHandler { PP.Diag(Tok, diag::warn_pragma_debug_unexpected_command) << DumpII->getName(); } + } else if (II->isStr("sloc_usage")) { + // An optional integer literal argument specifies the number of files to + // specifically report information about. + Optional MaxNotes; + Token ArgToken; + PP.Lex(ArgToken); + uint64_t Value; + if (ArgToken.is(tok::numeric_constant) && + PP.parseSimpleIntegerLiteral(ArgToken, Value)) { + MaxNotes = Value; + } else if (ArgToken.isNot(tok::eod)) { + PP.Diag(ArgToken, diag::warn_pragma_debug_unexpected_argument); + } + + PP.Diag(Tok, diag::remark_sloc_usage); + PP.getSourceManager().noteSLocAddressSpaceUsage(PP.getDiagnostics(), + MaxNotes); } else { PP.Diag(Tok, diag::warn_pragma_debug_unexpected_command) << II->getName(); diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index af361dfe8511f..7b3d0592f8c04 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -3401,9 +3401,14 @@ llvm::Error ASTReader::ReadASTBlock(ModuleFile &F, std::tie(F.SLocEntryBaseID, F.SLocEntryBaseOffset) = SourceMgr.AllocateLoadedSLocEntries(F.LocalNumSLocEntries, SLocSpaceSize); - if (!F.SLocEntryBaseID) + if (!F.SLocEntryBaseID) { + if (!Diags.isDiagnosticInFlight()) { + Diags.Report(SourceLocation(), diag::remark_sloc_usage); + SourceMgr.noteSLocAddressSpaceUsage(Diags); + } return llvm::createStringError(std::errc::invalid_argument, "ran out of source locations"); + } // Make our entry in the range map. BaseID is negative and growing, so // we invert it. Because we invert it, though, we need the other end of // the range. diff --git a/clang/test/Lexer/Inputs/inc2.h b/clang/test/Lexer/Inputs/inc2.h index a827dc7fc0d0a..7ad031658f9c3 100644 --- a/clang/test/Lexer/Inputs/inc2.h +++ b/clang/test/Lexer/Inputs/inc2.h @@ -1,1000 +1,1000 @@ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ -/*...............................................................................................*/ +/*................................................................................................. +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +................................................................................................... +.................................................................................................*/ diff --git a/clang/test/Lexer/SourceLocationsOverflow.c b/clang/test/Lexer/SourceLocationsOverflow.c index d2313ea4324d7..2b838ca4e861d 100644 --- a/clang/test/Lexer/SourceLocationsOverflow.c +++ b/clang/test/Lexer/SourceLocationsOverflow.c @@ -3,6 +3,19 @@ // CHECK-NEXT: inc1.h{{.*}}: fatal error: sorry, this include generates a translation unit too large for Clang to process. // CHECK-NEXT: #include "inc2.h" // CHECK-NEXT: ^ +// CHECK-NEXT: note: 214{{.......}}B in local locations, 0B in locations loaded from AST files, for a total of 214{{.......}}B (99% of available space) +// CHECK-NEXT: {{.*}}inc2.h:1:1: note: file entered 214{{..}} times using 214{{.......}}B of space +// CHECK-NEXT: /*................................................................................................. +// CHECK-NEXT: ^ +// CHECK-NEXT: {{.*}}inc1.h:1:1: note: file entered 15 times using 39{{....}}B of space +// CHECK-NEXT: #include "inc2.h" +// CHECK-NEXT: ^ +// CHECK-NEXT: :1:1: note: file entered {{.*}} times using {{.*}}B of space +// CHECK-NEXT: # {{.*}} +// CHECK-NEXT: ^ +// CHECK-NEXT: {{.*}}SourceLocationsOverflow.c:1:1: note: file entered 1 time using {{.*}}B of space +// CHECK-NEXT: // RUN: not %clang %s -S -o - 2>&1 | FileCheck %s +// CHECK-NEXT: ^ // CHECK-NEXT: 1 error generated. #include "Inputs/inc1.h" #include "Inputs/inc1.h" diff --git a/clang/test/Misc/Inputs/include.h b/clang/test/Misc/Inputs/include.h index 72835e90a551d..fe179e9a3a2e9 100644 --- a/clang/test/Misc/Inputs/include.h +++ b/clang/test/Misc/Inputs/include.h @@ -1,3 +1,8 @@ #define EQUALS(a,b) a == b +// It's important for sloc_usage.cpp that this file does not have proper +// include guards. +#ifndef FOO_DEFINED +#define FOO_DEFINED int foo(int x) { return x; } +#endif diff --git a/clang/test/Misc/sloc-usage.cpp b/clang/test/Misc/sloc-usage.cpp new file mode 100644 index 0000000000000..18bd94f8b9dc3 --- /dev/null +++ b/clang/test/Misc/sloc-usage.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -include %S/Inputs/include.h + +#include "Inputs/include.h" +#include "Inputs/include.h" + +#define FOO(x) x + x +int k = FOO(FOO(123)); +bool b = EQUALS(k, k); + +#pragma clang __debug sloc_usage // expected-remark {{address space usage}} +// expected-note@* {{(0% of available space)}} +// (this file) expected-note-re@1 {{file entered 1 time using {{.*}}B of space plus 51B for macro expansions}} +// (included file) expected-note-re@Inputs/include.h:1 {{file entered 3 times using {{.*}}B of space{{$}}}} +// (builtins file) expected-note@* {{file entered}} diff --git a/clang/test/Misc/warning-flags-enabled.c b/clang/test/Misc/warning-flags-enabled.c index b809465a0ebff..9f210674b126e 100644 --- a/clang/test/Misc/warning-flags-enabled.c +++ b/clang/test/Misc/warning-flags-enabled.c @@ -8,7 +8,7 @@ // CHECK: warn_null_arg -// RUN: diagtool show-enabled -Wno-everything %s | count 0 +// RUN: diagtool show-enabled -Wno-everything -Rno-everything %s | count 0 // RUN: diagtool show-enabled -Wno-everything -Wobjc-root-class %s | FileCheck -check-prefix CHECK-WARN %s @@ -21,9 +21,9 @@ // RUN: diagtool show-enabled --no-levels -Wno-everything -Wobjc-root-class %s | FileCheck -check-prefix CHECK-NO-LEVELS %s // -// CHECK-NO-LEVELS-NOT: W -// CHECK-NO-LEVELS-NOT: E -// CHECK-NO-LEVELS-NOT: F +// CHECK-NO-LEVELS-NOT: {{^W }} +// CHECK-NO-LEVELS-NOT: {{^E }} +// CHECK-NO-LEVELS-NOT: {{^F }} // CHECK-NO-LEVELS: warn_objc_root_class_missing [-Wobjc-root-class] // Test if EnumConversion is a subgroup of -Wconversion.