diff options
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r-- | clang/lib/Frontend/ASTUnit.cpp | 32 | ||||
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 12 | ||||
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Frontend/DiagnosticRenderer.cpp | 14 | ||||
-rw-r--r-- | clang/lib/Frontend/FrontendAction.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Frontend/FrontendActions.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Frontend/LayoutOverrideSource.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Frontend/PCHContainerOperations.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Frontend/Rewrite/FixItRewriter.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Frontend/SerializedDiagnosticPrinter.cpp | 72 | ||||
-rw-r--r-- | clang/lib/Frontend/TextDiagnostic.cpp | 34 | ||||
-rw-r--r-- | clang/lib/Frontend/TextDiagnosticPrinter.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Frontend/VerifyDiagnosticConsumer.cpp | 10 |
14 files changed, 98 insertions, 98 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index 1247e8219ff..9b672d97551 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -151,7 +151,7 @@ static bool moveOnNoError(llvm::ErrorOr<T> Val, T &Output) { return true; } -/// \brief Get a source buffer for \p MainFilePath, handling all file-to-file +/// Get a source buffer for \p MainFilePath, handling all file-to-file /// and file-to-buffer remappings inside \p Invocation. static std::unique_ptr<llvm::MemoryBuffer> getBufferForFileHandlingRemapping(const CompilerInvocation &Invocation, @@ -226,13 +226,13 @@ void ASTUnit::clearFileLevelDecls() { llvm::DeleteContainerSeconds(FileDecls); } -/// \brief After failing to build a precompiled preamble (due to +/// After failing to build a precompiled preamble (due to /// errors in the source that occurs in the preamble), the number of /// reparses during which we'll skip even trying to precompile the /// preamble. const unsigned DefaultPreambleRebuildInterval = 5; -/// \brief Tracks the number of ASTUnit objects that are currently active. +/// Tracks the number of ASTUnit objects that are currently active. /// /// Used for debugging purposes only. static std::atomic<unsigned> ActiveASTUnitObjects; @@ -274,7 +274,7 @@ void ASTUnit::setPreprocessor(std::shared_ptr<Preprocessor> PP) { this->PP = std::move(PP); } -/// \brief Determine the set of code-completion contexts in which this +/// Determine the set of code-completion contexts in which this /// declaration should be shown. static unsigned getDeclShowContexts(const NamedDecl *ND, const LangOptions &LangOpts, @@ -504,7 +504,7 @@ void ASTUnit::ClearCachedCompletionResults() { namespace { -/// \brief Gathers information from ASTReader that will be used to initialize +/// Gathers information from ASTReader that will be used to initialize /// a Preprocessor. class ASTInfoCollector : public ASTReaderListener { Preprocessor &PP; @@ -601,7 +601,7 @@ private: } }; -/// \brief Diagnostic consumer that saves each diagnostic it is given. +/// Diagnostic consumer that saves each diagnostic it is given. class StoredDiagnosticConsumer : public DiagnosticConsumer { SmallVectorImpl<StoredDiagnostic> *StoredDiags; SmallVectorImpl<ASTUnit::StandaloneDiagnostic> *StandaloneDiags; @@ -628,7 +628,7 @@ public: const Diagnostic &Info) override; }; -/// \brief RAII object that optionally captures diagnostics, if +/// RAII object that optionally captures diagnostics, if /// there is no diagnostic client to capture them already. class CaptureDroppedDiagnostics { DiagnosticsEngine &Diags; @@ -715,7 +715,7 @@ ASTUnit::getBufferForFile(StringRef Filename, std::string *ErrorStr) { return nullptr; } -/// \brief Configure the diagnostics object for use with ASTUnit. +/// Configure the diagnostics object for use with ASTUnit. void ASTUnit::ConfigureDiags(IntrusiveRefCntPtr<DiagnosticsEngine> Diags, ASTUnit &AST, bool CaptureDiagnostics) { assert(Diags.get() && "no DiagnosticsEngine was provided"); @@ -837,14 +837,14 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile( return AST; } -/// \brief Add the given macro to the hash of all top-level entities. +/// Add the given macro to the hash of all top-level entities. static void AddDefinedMacroToHash(const Token &MacroNameTok, unsigned &Hash) { Hash = llvm::djbHash(MacroNameTok.getIdentifierInfo()->getName(), Hash); } namespace { -/// \brief Preprocessor callback class that updates a hash value with the names +/// Preprocessor callback class that updates a hash value with the names /// of all macros that have been defined by the translation unit. class MacroDefinitionTrackerPPCallbacks : public PPCallbacks { unsigned &Hash; @@ -860,7 +860,7 @@ public: } // namespace -/// \brief Add the given declaration to the hash of all top-level entities. +/// Add the given declaration to the hash of all top-level entities. static void AddTopLevelDeclarationToHash(Decl *D, unsigned &Hash) { if (!D) return; @@ -1248,7 +1248,7 @@ makeStandaloneDiagnostic(const LangOptions &LangOpts, return OutDiag; } -/// \brief Attempt to build or re-use a precompiled preamble when (re-)parsing +/// Attempt to build or re-use a precompiled preamble when (re-)parsing /// the source file. /// /// This routine will compute the preamble of the main source file. If a @@ -1852,7 +1852,7 @@ void ASTUnit::ResetForParse() { namespace { - /// \brief Code completion consumer that combines the cached code-completion + /// Code completion consumer that combines the cached code-completion /// results from an ASTUnit with the code-completion results provided to it, /// then passes the result on to class AugmentedCodeCompleteConsumer : public CodeCompleteConsumer { @@ -1909,7 +1909,7 @@ namespace { } // namespace -/// \brief Helper function that computes which global names are hidden by the +/// Helper function that computes which global names are hidden by the /// local code-completion results. static void CalculateHiddenNames(const CodeCompletionContext &Context, CodeCompletionResult *Results, @@ -2459,7 +2459,7 @@ SourceLocation ASTUnit::getLocation(const FileEntry *File, return SM.getMacroArgExpandedLocation(FileLoc.getLocWithOffset(Offset)); } -/// \brief If \arg Loc is a loaded location from the preamble, returns +/// If \arg Loc is a loaded location from the preamble, returns /// the corresponding local location of the main file, otherwise it returns /// \arg Loc. SourceLocation ASTUnit::mapLocationFromPreamble(SourceLocation Loc) const { @@ -2480,7 +2480,7 @@ SourceLocation ASTUnit::mapLocationFromPreamble(SourceLocation Loc) const { return Loc; } -/// \brief If \arg Loc is a local location of the main file but inside the +/// If \arg Loc is a local location of the main file but inside the /// preamble chunk, returns the corresponding loaded location from the /// preamble, otherwise it returns \arg Loc. SourceLocation ASTUnit::mapLocationToPreamble(SourceLocation Loc) const { diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 2ec8e8c1652..859560d938f 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1042,7 +1042,7 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) { return !getDiagnostics().getClient()->getNumErrors(); } -/// \brief Determine the appropriate source input kind based on language +/// Determine the appropriate source input kind based on language /// options. static InputKind::Language getLanguageFromOptions(const LangOptions &LangOpts) { if (LangOpts.OpenCL) @@ -1054,7 +1054,7 @@ static InputKind::Language getLanguageFromOptions(const LangOptions &LangOpts) { return LangOpts.CPlusPlus ? InputKind::CXX : InputKind::C; } -/// \brief Compile a module file for the given module, using the options +/// Compile a module file for the given module, using the options /// provided by the importing compiler instance. Returns true if the module /// was built without errors. static bool @@ -1201,7 +1201,7 @@ static const FileEntry *getPublicModuleMap(const FileEntry *File, return FileMgr.getFile(PublicFilename); } -/// \brief Compile a module file for the given module, using the options +/// Compile a module file for the given module, using the options /// provided by the importing compiler instance. Returns true if the module /// was built without errors. static bool compileModuleImpl(CompilerInstance &ImportingInstance, @@ -1350,7 +1350,7 @@ static bool compileAndLoadModule(CompilerInstance &ImportingInstance, } } -/// \brief Diagnose differences between the current definition of the given +/// Diagnose differences between the current definition of the given /// configuration macro and the definition provided on the command line. static void checkConfigMacro(Preprocessor &PP, StringRef ConfigMacro, Module *Mod, SourceLocation ImportLoc) { @@ -1408,13 +1408,13 @@ static void checkConfigMacro(Preprocessor &PP, StringRef ConfigMacro, } } -/// \brief Write a new timestamp file with the given path. +/// Write a new timestamp file with the given path. static void writeTimestampFile(StringRef TimestampFile) { std::error_code EC; llvm::raw_fd_ostream Out(TimestampFile.str(), EC, llvm::sys::fs::F_None); } -/// \brief Prune the module cache of modules that haven't been accessed in +/// Prune the module cache of modules that haven't been accessed in /// a long time. static void pruneModuleCache(const HeaderSearchOptions &HSOpts) { struct stat StatBuf; diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 0156e75628c..20874fcf530 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -395,7 +395,7 @@ static llvm::Reloc::Model getRelocModel(ArgList &Args, return llvm::Reloc::PIC_; } -/// \brief Create a new Regex instance out of the string value in \p RpassArg. +/// Create a new Regex instance out of the string value in \p RpassArg. /// It returns a pointer to the newly generated Regex instance. static std::shared_ptr<llvm::Regex> GenerateOptimizationRemarkRegex(DiagnosticsEngine &Diags, ArgList &Args, diff --git a/clang/lib/Frontend/DiagnosticRenderer.cpp b/clang/lib/Frontend/DiagnosticRenderer.cpp index a3bcaf47fa6..fb0a92d1f8c 100644 --- a/clang/lib/Frontend/DiagnosticRenderer.cpp +++ b/clang/lib/Frontend/DiagnosticRenderer.cpp @@ -152,7 +152,7 @@ void DiagnosticRenderer::emitBasicNote(StringRef Message) { Message, None, DiagOrStoredDiag()); } -/// \brief Prints an include stack when appropriate for a particular +/// Prints an include stack when appropriate for a particular /// diagnostic level and location. /// /// This routine handles all the logic of suppressing particular include @@ -186,7 +186,7 @@ void DiagnosticRenderer::emitIncludeStack(FullSourceLoc Loc, PresumedLoc PLoc, } } -/// \brief Helper to recursively walk up the include stack and print each layer +/// Helper to recursively walk up the include stack and print each layer /// on the way back down. void DiagnosticRenderer::emitIncludeStackRecursively(FullSourceLoc Loc) { if (Loc.isInvalid()) { @@ -216,7 +216,7 @@ void DiagnosticRenderer::emitIncludeStackRecursively(FullSourceLoc Loc) { emitIncludeLocation(Loc, PLoc); } -/// \brief Emit the module import stack associated with the current location. +/// Emit the module import stack associated with the current location. void DiagnosticRenderer::emitImportStack(FullSourceLoc Loc) { if (Loc.isInvalid()) { emitModuleBuildStack(Loc.getManager()); @@ -227,7 +227,7 @@ void DiagnosticRenderer::emitImportStack(FullSourceLoc Loc) { emitImportStackRecursively(NextImportLoc.first, NextImportLoc.second); } -/// \brief Helper to recursively walk up the import stack and print each layer +/// Helper to recursively walk up the import stack and print each layer /// on the way back down. void DiagnosticRenderer::emitImportStackRecursively(FullSourceLoc Loc, StringRef ModuleName) { @@ -245,7 +245,7 @@ void DiagnosticRenderer::emitImportStackRecursively(FullSourceLoc Loc, emitImportLocation(Loc, PLoc, ModuleName); } -/// \brief Emit the module build stack, for cases where a module is (re-)built +/// Emit the module build stack, for cases where a module is (re-)built /// on demand. void DiagnosticRenderer::emitModuleBuildStack(const SourceManager &SM) { ModuleBuildStack Stack = SM.getModuleBuildStack(); @@ -424,7 +424,7 @@ void DiagnosticRenderer::emitCaret(FullSourceLoc Loc, emitCodeContext(Loc, Level, SpellingRanges, Hints); } -/// \brief A helper function for emitMacroExpansion to print the +/// A helper function for emitMacroExpansion to print the /// macro expansion message void DiagnosticRenderer::emitSingleMacroExpansion( FullSourceLoc Loc, DiagnosticsEngine::Level Level, @@ -512,7 +512,7 @@ static bool checkRangesForMacroArgExpansion(FullSourceLoc Loc, return true; } -/// \brief Recursively emit notes for each macro expansion and caret +/// Recursively emit notes for each macro expansion and caret /// diagnostics where appropriate. /// /// Walks up the macro expansion stack printing expansion notes, the code diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index 1b4d789b4d9..e4fb022c2a1 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -79,7 +79,7 @@ public: } }; -/// \brief Dumps deserialized declarations. +/// Dumps deserialized declarations. class DeserializedDeclsDumper : public DelegatingDeserializationListener { public: explicit DeserializedDeclsDumper(ASTDeserializationListener *Previous, @@ -96,7 +96,7 @@ public: } }; -/// \brief Checks deserialized declarations and emits error if a name +/// Checks deserialized declarations and emits error if a name /// matches one given in command-line using -error-on-deserialized-decl. class DeserializedDeclsChecker : public DelegatingDeserializationListener { ASTContext &Ctx; @@ -282,7 +282,7 @@ static void addHeaderInclude(StringRef HeaderName, Includes += "}\n"; } -/// \brief Collect the set of header includes needed to construct the given +/// Collect the set of header includes needed to construct the given /// module and update the TopHeaders file set of the module. /// /// \param Module The module we're collecting includes from. diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index 3fcb72c025f..13f05371718 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -416,7 +416,7 @@ void TemplightDumpAction::ExecuteAction() { } namespace { - /// \brief AST reader listener that dumps module information for a module + /// AST reader listener that dumps module information for a module /// file. class DumpModuleInfoListener : public ASTReaderListener { llvm::raw_ostream &Out; diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 8a87b9f35e3..2e77c39bd8c 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -93,7 +93,7 @@ static void AddImplicitIncludePTH(MacroBuilder &Builder, Preprocessor &PP, AddImplicitInclude(Builder, OriginalFile); } -/// \brief Add an implicit \#include using the original file used to generate +/// Add an implicit \#include using the original file used to generate /// a PCH file. static void AddImplicitIncludePCH(MacroBuilder &Builder, Preprocessor &PP, const PCHContainerReader &PCHContainerRdr, @@ -301,7 +301,7 @@ static const char *getLockFreeValue(unsigned TypeWidth, unsigned TypeAlign, return "1"; // "sometimes lock free" } -/// \brief Add definitions required for a smooth interaction between +/// Add definitions required for a smooth interaction between /// Objective-C++ automated reference counting and libstdc++ (4.2). static void AddObjCXXARCLibstdcxxDefines(const LangOptions &LangOpts, MacroBuilder &Builder) { diff --git a/clang/lib/Frontend/LayoutOverrideSource.cpp b/clang/lib/Frontend/LayoutOverrideSource.cpp index 06e9a7dc50b..93e07eb81f7 100644 --- a/clang/lib/Frontend/LayoutOverrideSource.cpp +++ b/clang/lib/Frontend/LayoutOverrideSource.cpp @@ -15,7 +15,7 @@ using namespace clang; -/// \brief Parse a simple identifier. +/// Parse a simple identifier. static std::string parseName(StringRef S) { if (S.empty() || !isIdentifierHead(S[0])) return ""; diff --git a/clang/lib/Frontend/PCHContainerOperations.cpp b/clang/lib/Frontend/PCHContainerOperations.cpp index eebebf327a1..340e8ce63ff 100644 --- a/clang/lib/Frontend/PCHContainerOperations.cpp +++ b/clang/lib/Frontend/PCHContainerOperations.cpp @@ -25,7 +25,7 @@ PCHContainerReader::~PCHContainerReader() {} namespace { -/// \brief A PCHContainerGenerator that writes out the PCH to a flat file. +/// A PCHContainerGenerator that writes out the PCH to a flat file. class RawPCHContainerGenerator : public ASTConsumer { std::shared_ptr<PCHBuffer> Buffer; std::unique_ptr<raw_pwrite_stream> OS; diff --git a/clang/lib/Frontend/Rewrite/FixItRewriter.cpp b/clang/lib/Frontend/Rewrite/FixItRewriter.cpp index 17a35c3ac93..64785e30123 100644 --- a/clang/lib/Frontend/Rewrite/FixItRewriter.cpp +++ b/clang/lib/Frontend/Rewrite/FixItRewriter.cpp @@ -194,7 +194,7 @@ void FixItRewriter::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, Diag(Info.getLocation(), diag::note_fixit_applied); } -/// \brief Emit a diagnostic via the adapted diagnostic client. +/// Emit a diagnostic via the adapted diagnostic client. void FixItRewriter::Diag(SourceLocation Loc, unsigned DiagID) { // When producing this diagnostic, we temporarily bypass ourselves, // clear out any current diagnostic, and let the downstream client diff --git a/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp b/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp index 939c75bbaaa..ca60c4812f7 100644 --- a/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp +++ b/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp @@ -162,131 +162,131 @@ public: void finish() override; private: - /// \brief Build a DiagnosticsEngine to emit diagnostics about the diagnostics + /// Build a DiagnosticsEngine to emit diagnostics about the diagnostics DiagnosticsEngine *getMetaDiags(); - /// \brief Remove old copies of the serialized diagnostics. This is necessary + /// Remove old copies of the serialized diagnostics. This is necessary /// so that we can detect when subprocesses write diagnostics that we should /// merge into our own. void RemoveOldDiagnostics(); - /// \brief Emit the preamble for the serialized diagnostics. + /// Emit the preamble for the serialized diagnostics. void EmitPreamble(); - /// \brief Emit the BLOCKINFO block. + /// Emit the BLOCKINFO block. void EmitBlockInfoBlock(); - /// \brief Emit the META data block. + /// Emit the META data block. void EmitMetaBlock(); - /// \brief Start a DIAG block. + /// Start a DIAG block. void EnterDiagBlock(); - /// \brief End a DIAG block. + /// End a DIAG block. void ExitDiagBlock(); - /// \brief Emit a DIAG record. + /// Emit a DIAG record. void EmitDiagnosticMessage(FullSourceLoc Loc, PresumedLoc PLoc, DiagnosticsEngine::Level Level, StringRef Message, DiagOrStoredDiag D); - /// \brief Emit FIXIT and SOURCE_RANGE records for a diagnostic. + /// Emit FIXIT and SOURCE_RANGE records for a diagnostic. void EmitCodeContext(SmallVectorImpl<CharSourceRange> &Ranges, ArrayRef<FixItHint> Hints, const SourceManager &SM); - /// \brief Emit a record for a CharSourceRange. + /// Emit a record for a CharSourceRange. void EmitCharSourceRange(CharSourceRange R, const SourceManager &SM); - /// \brief Emit the string information for the category. + /// Emit the string information for the category. unsigned getEmitCategory(unsigned category = 0); - /// \brief Emit the string information for diagnostic flags. + /// Emit the string information for diagnostic flags. unsigned getEmitDiagnosticFlag(DiagnosticsEngine::Level DiagLevel, unsigned DiagID = 0); unsigned getEmitDiagnosticFlag(StringRef DiagName); - /// \brief Emit (lazily) the file string and retrieved the file identifier. + /// Emit (lazily) the file string and retrieved the file identifier. unsigned getEmitFile(const char *Filename); - /// \brief Add SourceLocation information the specified record. + /// Add SourceLocation information the specified record. void AddLocToRecord(FullSourceLoc Loc, PresumedLoc PLoc, RecordDataImpl &Record, unsigned TokSize = 0); - /// \brief Add SourceLocation information the specified record. + /// Add SourceLocation information the specified record. void AddLocToRecord(FullSourceLoc Loc, RecordDataImpl &Record, unsigned TokSize = 0) { AddLocToRecord(Loc, Loc.hasManager() ? Loc.getPresumedLoc() : PresumedLoc(), Record, TokSize); } - /// \brief Add CharSourceRange information the specified record. + /// Add CharSourceRange information the specified record. void AddCharSourceRangeToRecord(CharSourceRange R, RecordDataImpl &Record, const SourceManager &SM); - /// \brief Language options, which can differ from one clone of this client + /// Language options, which can differ from one clone of this client /// to another. const LangOptions *LangOpts; - /// \brief Whether this is the original instance (rather than one of its + /// Whether this is the original instance (rather than one of its /// clones), responsible for writing the file at the end. bool OriginalInstance; - /// \brief Whether this instance should aggregate diagnostics that are + /// Whether this instance should aggregate diagnostics that are /// generated from child processes. bool MergeChildRecords; - /// \brief State that is shared among the various clones of this diagnostic + /// State that is shared among the various clones of this diagnostic /// consumer. struct SharedState { SharedState(StringRef File, DiagnosticOptions *Diags) : DiagOpts(Diags), Stream(Buffer), OutputFile(File.str()), EmittedAnyDiagBlocks(false) {} - /// \brief Diagnostic options. + /// Diagnostic options. IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts; - /// \brief The byte buffer for the serialized content. + /// The byte buffer for the serialized content. SmallString<1024> Buffer; - /// \brief The BitStreamWriter for the serialized diagnostics. + /// The BitStreamWriter for the serialized diagnostics. llvm::BitstreamWriter Stream; - /// \brief The name of the diagnostics file. + /// The name of the diagnostics file. std::string OutputFile; - /// \brief The set of constructed record abbreviations. + /// The set of constructed record abbreviations. AbbreviationMap Abbrevs; - /// \brief A utility buffer for constructing record content. + /// A utility buffer for constructing record content. RecordData Record; - /// \brief A text buffer for rendering diagnostic text. + /// A text buffer for rendering diagnostic text. SmallString<256> diagBuf; - /// \brief The collection of diagnostic categories used. + /// The collection of diagnostic categories used. llvm::DenseSet<unsigned> Categories; - /// \brief The collection of files used. + /// The collection of files used. llvm::DenseMap<const char *, unsigned> Files; typedef llvm::DenseMap<const void *, std::pair<unsigned, StringRef> > DiagFlagsTy; - /// \brief Map for uniquing strings. + /// Map for uniquing strings. DiagFlagsTy DiagFlags; - /// \brief Whether we have already started emission of any DIAG blocks. Once + /// Whether we have already started emission of any DIAG blocks. Once /// this becomes \c true, we never close a DIAG block until we know that we're /// starting another one or we're done. bool EmittedAnyDiagBlocks; - /// \brief Engine for emitting diagnostics about the diagnostics. + /// Engine for emitting diagnostics about the diagnostics. std::unique_ptr<DiagnosticsEngine> MetaDiagnostics; }; - /// \brief State shared among the various clones of this diagnostic consumer. + /// State shared among the various clones of this diagnostic consumer. std::shared_ptr<SharedState> State; }; } // end anonymous namespace @@ -305,7 +305,7 @@ create(StringRef OutputFile, DiagnosticOptions *Diags, bool MergeChildRecords) { // Serialization methods. //===----------------------------------------------------------------------===// -/// \brief Emits a block ID in the BLOCKINFO block. +/// Emits a block ID in the BLOCKINFO block. static void EmitBlockID(unsigned ID, const char *Name, llvm::BitstreamWriter &Stream, RecordDataImpl &Record) { @@ -325,7 +325,7 @@ static void EmitBlockID(unsigned ID, const char *Name, Stream.EmitRecord(llvm::bitc::BLOCKINFO_CODE_BLOCKNAME, Record); } -/// \brief Emits a record ID in the BLOCKINFO block. +/// Emits a record ID in the BLOCKINFO block. static void EmitRecordID(unsigned ID, const char *Name, llvm::BitstreamWriter &Stream, RecordDataImpl &Record){ @@ -395,7 +395,7 @@ void SDiagsWriter::EmitCharSourceRange(CharSourceRange R, State->Record); } -/// \brief Emits the preamble of the diagnostics file. +/// Emits the preamble of the diagnostics file. void SDiagsWriter::EmitPreamble() { // Emit the file header. State->Stream.Emit((unsigned)'D', 8); diff --git a/clang/lib/Frontend/TextDiagnostic.cpp b/clang/lib/Frontend/TextDiagnostic.cpp index 9bda79a276f..85cd019005d 100644 --- a/clang/lib/Frontend/TextDiagnostic.cpp +++ b/clang/lib/Frontend/TextDiagnostic.cpp @@ -42,7 +42,7 @@ static const enum raw_ostream::Colors fatalColor = raw_ostream::RED; static const enum raw_ostream::Colors savedColor = raw_ostream::SAVEDCOLOR; -/// \brief Add highlights to differences in template strings. +/// Add highlights to differences in template strings. static void applyTemplateHighlighting(raw_ostream &OS, StringRef Str, bool &Normal, bool Bold) { while (1) { @@ -63,7 +63,7 @@ static void applyTemplateHighlighting(raw_ostream &OS, StringRef Str, } } -/// \brief Number of spaces to indent when word-wrapping. +/// Number of spaces to indent when word-wrapping. const unsigned WordWrapIndentation = 6; static int bytesSincePreviousTabOrLineBegin(StringRef SourceLine, size_t i) { @@ -76,7 +76,7 @@ static int bytesSincePreviousTabOrLineBegin(StringRef SourceLine, size_t i) { return bytes; } -/// \brief returns a printable representation of first item from input range +/// returns a printable representation of first item from input range /// /// This function returns a printable representation of the next item in a line /// of source. If the next byte begins a valid and printable character, that @@ -269,14 +269,14 @@ struct SourceColumnMap { int columns() const { return m_byteToColumn.back(); } int bytes() const { return m_columnToByte.back(); } - /// \brief Map a byte to the column which it is at the start of, or return -1 + /// Map a byte to the column which it is at the start of, or return -1 /// if it is not at the start of a column (for a UTF-8 trailing byte). int byteToColumn(int n) const { assert(0<=n && n<static_cast<int>(m_byteToColumn.size())); return m_byteToColumn[n]; } - /// \brief Map a byte to the first column which contains it. + /// Map a byte to the first column which contains it. int byteToContainingColumn(int N) const { assert(0 <= N && N < static_cast<int>(m_byteToColumn.size())); while (m_byteToColumn[N] == -1) @@ -284,7 +284,7 @@ struct SourceColumnMap { return m_byteToColumn[N]; } - /// \brief Map a column to the byte which starts the column, or return -1 if + /// Map a column to the byte which starts the column, or return -1 if /// the column the second or subsequent column of an expanded tab or similar /// multi-column entity. int columnToByte(int n) const { @@ -292,14 +292,14 @@ struct SourceColumnMap { return m_columnToByte[n]; } - /// \brief Map from a byte index to the next byte which starts a column. + /// Map from a byte index to the next byte which starts a column. int startOfNextColumn(int N) const { assert(0 <= N && N < static_cast<int>(m_byteToColumn.size() - 1)); while (byteToColumn(++N) == -1) {} return N; } - /// \brief Map from a byte index to the previous byte which starts a column. + /// Map from a byte index to the previous byte which starts a column. int startOfPreviousColumn(int N) const { assert(0 < N && N < static_cast<int>(m_byteToColumn.size())); while (byteToColumn(--N) == -1) {} @@ -317,7 +317,7 @@ private: }; } // end anonymous namespace -/// \brief When the source code line we want to print is too long for +/// When the source code line we want to print is too long for /// the terminal, select the "interesting" region. static void selectInterestingSourceRegion(std::string &SourceLine, std::string &CaretLine, @@ -507,7 +507,7 @@ static void selectInterestingSourceRegion(std::string &SourceLine, } } -/// \brief Skip over whitespace in the string, starting at the given +/// Skip over whitespace in the string, starting at the given /// index. /// /// \returns The index of the first non-whitespace character that is @@ -519,7 +519,7 @@ static unsigned skipWhitespace(unsigned Idx, StringRef Str, unsigned Length) { return Idx; } -/// \brief If the given character is the start of some kind of +/// If the given character is the start of some kind of /// balanced punctuation (e.g., quotes or parentheses), return the /// character that will terminate the punctuation. /// @@ -539,7 +539,7 @@ static inline char findMatchingPunctuation(char c) { return 0; } -/// \brief Find the end of the word starting at the given offset +/// Find the end of the word starting at the given offset /// within a string. /// /// \returns the index pointing one character past the end of the @@ -596,7 +596,7 @@ static unsigned findEndOfWord(unsigned Start, StringRef Str, return findEndOfWord(Start + 1, Str, Length, Column + 1, Columns); } -/// \brief Print the given string to a stream, word-wrapping it to +/// Print the given string to a stream, word-wrapping it to /// some number of columns in the process. /// /// \param OS the stream to which the word-wrapping string will be @@ -777,7 +777,7 @@ void TextDiagnostic::emitFilename(StringRef Filename, const SourceManager &SM) { OS << Filename; } -/// \brief Print out the file/line/column information and include trace. +/// Print out the file/line/column information and include trace. /// /// This method handlen the emission of the diagnostic location information. /// This includes extracting as much location information as is present for @@ -913,7 +913,7 @@ void TextDiagnostic::emitBuildingModuleLocation(FullSourceLoc Loc, OS << "While building module '" << ModuleName << "':\n"; } -/// \brief Find the suitable set of lines to show to include a set of ranges. +/// Find the suitable set of lines to show to include a set of ranges. static llvm::Optional<std::pair<unsigned, unsigned>> findLinesForRange(const CharSourceRange &R, FileID FID, const SourceManager &SM) { @@ -963,7 +963,7 @@ maybeAddRange(std::pair<unsigned, unsigned> A, std::pair<unsigned, unsigned> B, return A; } -/// \brief Highlight a SourceRange (with ~'s) for any characters on LineNo. +/// Highlight a SourceRange (with ~'s) for any characters on LineNo. static void highlightRange(const CharSourceRange &R, unsigned LineNo, FileID FID, const SourceColumnMap &map, @@ -1110,7 +1110,7 @@ static std::string buildFixItInsertionLine(FileID FID, return FixItInsertionLine; } -/// \brief Emit a code snippet and caret line. +/// Emit a code snippet and caret line. /// /// This routine emits a single line's code snippet and caret line.. /// diff --git a/clang/lib/Frontend/TextDiagnosticPrinter.cpp b/clang/lib/Frontend/TextDiagnosticPrinter.cpp index 5dd3252d5b1..a37382c116a 100644 --- a/clang/lib/Frontend/TextDiagnosticPrinter.cpp +++ b/clang/lib/Frontend/TextDiagnosticPrinter.cpp @@ -44,7 +44,7 @@ void TextDiagnosticPrinter::EndSourceFile() { TextDiag.reset(); } -/// \brief Print any diagnostic option information to a raw_ostream. +/// Print any diagnostic option information to a raw_ostream. /// /// This implements all of the logic for adding diagnostic options to a message /// (via OS). Each relevant option is comma separated and all are enclosed in diff --git a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp index 129a2338c4c..21933f474ff 100644 --- a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp +++ b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp @@ -80,7 +80,7 @@ public: VerifyFileTracker(VerifyDiagnosticConsumer &Verify, SourceManager &SM) : Verify(Verify), SM(SM) {} - /// \brief Hook into the preprocessor and update the list of parsed + /// Hook into the preprocessor and update the list of parsed /// files when the preprocessor indicates a new file is entered. void FileChanged(SourceLocation Loc, FileChangeReason Reason, SrcMgr::CharacteristicKind FileType, @@ -656,7 +656,7 @@ bool VerifyDiagnosticConsumer::HandleComment(Preprocessor &PP, } #ifndef NDEBUG -/// \brief Lex the specified source file to determine whether it contains +/// Lex the specified source file to determine whether it contains /// any expected-* directives. As a Lexer is used rather than a full-blown /// Preprocessor, directives inside skipped #if blocks will still be found. /// @@ -694,7 +694,7 @@ static bool findDirectives(SourceManager &SM, FileID FID, } #endif // !NDEBUG -/// \brief Takes a list of diagnostics that have been generated but not matched +/// Takes a list of diagnostics that have been generated but not matched /// by an expected-* directive and produces a diagnostic to the user from this. static unsigned PrintUnexpected(DiagnosticsEngine &Diags, SourceManager *SourceMgr, const_diag_iterator diag_begin, @@ -722,7 +722,7 @@ static unsigned PrintUnexpected(DiagnosticsEngine &Diags, SourceManager *SourceM return std::distance(diag_begin, diag_end); } -/// \brief Takes a list of diagnostics that were expected to have been generated +/// Takes a list of diagnostics that were expected to have been generated /// but were not and produces a diagnostic to the user from this. static unsigned PrintExpected(DiagnosticsEngine &Diags, SourceManager &SourceMgr, @@ -753,7 +753,7 @@ static unsigned PrintExpected(DiagnosticsEngine &Diags, return DL.size(); } -/// \brief Determine whether two source locations come from the same file. +/// Determine whether two source locations come from the same file. static bool IsFromSameFile(SourceManager &SM, SourceLocation DirectiveLoc, SourceLocation DiagnosticLoc) { while (DiagnosticLoc.isMacroID()) |