From: James Dennett Date: Wed, 20 Jun 2012 00:48:54 +0000 (+0000) Subject: Documentation cleanup: X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=80b5a2fea27561dce90c7588181185130d61e55e;p=clang Documentation cleanup: * Escaped # characters in Doxygen comments as needed; * Added/fixed \file and \brief markup to add summaries to Doxygen output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158773 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Lex/PreprocessorLexer.h b/include/clang/Lex/PreprocessorLexer.h index 4e1f459e2d..8a0b3cf51a 100644 --- a/include/clang/Lex/PreprocessorLexer.h +++ b/include/clang/Lex/PreprocessorLexer.h @@ -6,9 +6,10 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -// -// This file defines the PreprocessorLexer interface. -// +/// +/// \file +/// \brief Defines the PreprocessorLexer interface. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_PreprocessorLexer_H @@ -38,16 +39,17 @@ protected: // Context-specific lexing flags set by the preprocessor. //===--------------------------------------------------------------------===// - /// ParsingPreprocessorDirective - This is true when parsing #XXX. This turns - /// '\n' into a tok::eod token. + /// \brief True when parsing \#XXX; turns '\\n' into a tok::eod token. bool ParsingPreprocessorDirective; - /// ParsingFilename - True after #include: this turns into a - /// tok::angle_string_literal token. + /// \brief True after \#include; turns \ into a tok::angle_string_literal + /// token. bool ParsingFilename; - /// LexingRawMode - True if in raw mode: This flag disables interpretation of - /// tokens and is a far faster mode to lex in than non-raw-mode. This flag: + /// \brief True if in raw mode. + /// + /// Raw mode disables interpretation of tokens and is a far faster mode to + /// lex in than non-raw-mode. This flag: /// 1. If EOF of the current lexer is found, the include stack isn't popped. /// 2. Identifier information is not looked up for identifier tokens. As an /// effect of this, implicit macro expansion is naturally disabled. @@ -59,11 +61,11 @@ protected: /// Note that in raw mode that the PP pointer may be null. bool LexingRawMode; - /// MIOpt - This is a state machine that detects the #ifndef-wrapping a file + /// \brief A state machine that detects the \#ifndef-wrapping a file /// idiom for the multiple-include optimization. MultipleIncludeOpt MIOpt; - /// ConditionalStack - Information about the set of #if/#ifdef/#ifndef blocks + /// \brief Information about the set of \#if/\#ifdef/\#ifndef blocks /// we are currently in. SmallVector ConditionalStack; @@ -83,16 +85,15 @@ protected: virtual void IndirectLex(Token& Result) = 0; - /// getSourceLocation - Return the source location for the next observable - /// location. + /// \brief Return the source location for the next observable location. virtual SourceLocation getSourceLocation() = 0; //===--------------------------------------------------------------------===// // #if directive handling. - /// pushConditionalLevel - When we enter a #if directive, this keeps track of - /// what we are currently in for diagnostic emission (e.g. #if with missing - /// #endif). + /// pushConditionalLevel - When we enter a \#if directive, this keeps track of + /// what we are currently in for diagnostic emission (e.g. \#if with missing + /// \#endif). void pushConditionalLevel(SourceLocation DirectiveStart, bool WasSkipping, bool FoundNonSkip, bool FoundElse) { PPConditionalInfo CI; @@ -116,8 +117,8 @@ protected: return false; } - /// peekConditionalLevel - Return the top of the conditional stack. This - /// requires that there be a conditional active. + /// \brief Return the top of the conditional stack. + /// \pre This requires that there be a conditional active. PPConditionalInfo &peekConditionalLevel() { assert(!ConditionalStack.empty() && "No conditionals active!"); return ConditionalStack.back(); @@ -130,21 +131,23 @@ public: //===--------------------------------------------------------------------===// // Misc. lexing methods. - /// LexIncludeFilename - After the preprocessor has parsed a #include, lex and - /// (potentially) macro expand the filename. If the sequence parsed is not - /// lexically legal, emit a diagnostic and return a result EOD token. + /// \brief After the preprocessor has parsed a \#include, lex and + /// (potentially) macro expand the filename. + /// + /// If the sequence parsed is not lexically legal, emit a diagnostic and + /// return a result EOD token. void LexIncludeFilename(Token &Result); - /// setParsingPreprocessorDirective - Inform the lexer whether or not - /// we are currently lexing a preprocessor directive. + /// \brief Inform the lexer whether or not we are currently lexing a + /// preprocessor directive. void setParsingPreprocessorDirective(bool f) { ParsingPreprocessorDirective = f; } - /// isLexingRawMode - Return true if this lexer is in raw mode or not. + /// \brief Return true if this lexer is in raw mode or not. bool isLexingRawMode() const { return LexingRawMode; } - /// getPP - Return the preprocessor object for this lexer. + /// \brief Return the preprocessor object for this lexer. Preprocessor *getPP() const { return PP; } FileID getFileID() const {