[cfe-commits] r158978 - /cfe/trunk/include/clang/Lex/PPCallbacks.h

James Dennett jdennett at google.com
Thu Jun 21 22:59:28 PDT 2012


Author: jdennett
Date: Fri Jun 22 00:59:27 2012
New Revision: 158978

URL: http://llvm.org/viewvc/llvm-project?rev=158978&view=rev
Log:
Documentation cleanup:
* Added \file documentation for PPCallbacks.h;
* Added/formated \brief summaries;
* Deleted documentation for parameters that no longer exist;
* Used \param more systematically for documentation of parameters;
* Escaped # characters in Doxygen comments.

Modified:
    cfe/trunk/include/clang/Lex/PPCallbacks.h

Modified: cfe/trunk/include/clang/Lex/PPCallbacks.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/PPCallbacks.h?rev=158978&r1=158977&r2=158978&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/PPCallbacks.h (original)
+++ cfe/trunk/include/clang/Lex/PPCallbacks.h Fri Jun 22 00:59:27 2012
@@ -6,9 +6,10 @@
 // License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-//
-//  This file defines the PPCallbacks interface.
-//
+///
+/// \file
+/// \brief Defines the PPCallbacks interface.
+///
 //===----------------------------------------------------------------------===//
 
 #ifndef LLVM_CLANG_LEX_PPCALLBACKS_H
@@ -26,9 +27,10 @@
   class IdentifierInfo;
   class MacroInfo;
 
-/// PPCallbacks - This interface provides a way to observe the actions of the
-/// preprocessor as it does its thing.  Clients can define their hooks here to
-/// implement preprocessor level tools.
+/// \brief This interface provides a way to observe the actions of the
+/// preprocessor as it does its thing.
+///
+/// Clients can define their hooks here to implement preprocessor level tools.
 class PPCallbacks {
 public:
   virtual ~PPCallbacks();
@@ -37,29 +39,29 @@
     EnterFile, ExitFile, SystemHeaderPragma, RenameFile
   };
 
-  /// FileChanged - This callback is invoked whenever a source file is
-  /// entered or exited.  The SourceLocation indicates the new location, and
-  /// EnteringFile indicates whether this is because we are entering a new
-  /// #include'd file (when true) or whether we're exiting one because we ran
-  /// off the end (when false).
+  /// \brief Callback invoked whenever a source file is entered or exited.
   ///
-  /// \param PrevFID the file that was exited if \arg Reason is ExitFile. 
+  /// \param Loc Indicates the new location.
+  /// \param PrevFID the file that was exited if \p Reason is ExitFile.
   virtual void FileChanged(SourceLocation Loc, FileChangeReason Reason,
                            SrcMgr::CharacteristicKind FileType,
                            FileID PrevFID = FileID()) {
   }
 
-  /// FileSkipped - This callback is invoked whenever a source file is
-  /// skipped as the result of header guard optimization.  ParentFile
-  /// is the file that #includes the skipped file.  FilenameTok is the
-  /// token in ParentFile that indicates the skipped file.
+  /// \brief Callback invoked whenever a source file is skipped as the result
+  /// of header guard optimization.
+  ///
+  /// \param ParentFile The file that \#included the skipped file.
+  ///
+  /// \param FilenameTok The token in ParentFile that indicates the
+  /// skipped file.
   virtual void FileSkipped(const FileEntry &ParentFile,
                            const Token &FilenameTok,
                            SrcMgr::CharacteristicKind FileType) {
   }
 
-  /// FileNotFound - This callback is invoked whenever an inclusion directive
-  /// results in a file-not-found error.
+  /// \brief Callback invoked whenever an inclusion directive results in a
+  /// file-not-found error.
   ///
   /// \param FileName The name of the file being included, as written in the 
   /// source code.
@@ -75,7 +77,7 @@
     return false;
   }
 
-  /// \brief This callback is invoked whenever an inclusion directive of
+  /// \brief Callback invoked whenever an inclusion directive of
   /// any kind (\c \#include, \c \#import, etc.) has been processed, regardless
   /// of whether the inclusion will actually result in an inclusion.
   ///
@@ -118,63 +120,59 @@
                                   StringRef RelativePath) {
   }
 
-  /// EndOfMainFile - This callback is invoked when the end of the main file is
-  /// reach, no subsequent callbacks will be made.
+  /// \brief Callback invoked when the end of the main file is reached.
+  ///
+  /// No subsequent callbacks will be made.
   virtual void EndOfMainFile() {
   }
 
-  /// Ident - This callback is invoked when a #ident or #sccs directive is read.
+  /// \brief Callback invoked when a \#ident or \#sccs directive is read.
   /// \param Loc The location of the directive.
   /// \param str The text of the directive.
   ///
   virtual void Ident(SourceLocation Loc, const std::string &str) {
   }
 
-  /// PragmaComment - This callback is invoked when a #pragma comment directive
-  /// is read.
-  ///
+  /// \brief Callback invoked when a \#pragma comment directive is read.
   virtual void PragmaComment(SourceLocation Loc, const IdentifierInfo *Kind,
                              const std::string &Str) {
   }
 
-  /// PragmaMessage - This callback is invoked when a #pragma message directive
-  /// is read.
+  /// \brief Callback invoked when a \#pragma message directive is read.
   /// \param Loc The location of the message directive.
   /// \param str The text of the message directive.
-  ///
   virtual void PragmaMessage(SourceLocation Loc, StringRef Str) {
   }
 
-  /// PragmaDiagnosticPush - This callback is invoked when a
-  /// #pragma gcc dianostic push directive is read.
+  /// \brief Callback invoked when a \#pragma gcc dianostic push directive
+  /// is read.
   virtual void PragmaDiagnosticPush(SourceLocation Loc,
                                     StringRef Namespace) {
   }
 
-  /// PragmaDiagnosticPop - This callback is invoked when a
-  /// #pragma gcc dianostic pop directive is read.
+  /// \brief Callback invoked when a \#pragma gcc dianostic pop directive
+  /// is read.
   virtual void PragmaDiagnosticPop(SourceLocation Loc,
                                    StringRef Namespace) {
   }
 
-  /// PragmaDiagnostic - This callback is invoked when a
-  /// #pragma gcc dianostic directive is read.
+  /// \brief Callback invoked when a \#pragma gcc dianostic directive is read.
   virtual void PragmaDiagnostic(SourceLocation Loc, StringRef Namespace,
                                 diag::Mapping mapping, StringRef Str) {
   }
 
-  /// MacroExpands - This is called by
-  /// Preprocessor::HandleMacroExpandedIdentifier when a macro invocation is
-  /// found.
+  /// \brief Called by Preprocessor::HandleMacroExpandedIdentifier when a
+  /// macro invocation is found.
   virtual void MacroExpands(const Token &MacroNameTok, const MacroInfo* MI,
                             SourceRange Range) {
   }
 
-  /// MacroDefined - This hook is called whenever a macro definition is seen.
+  /// \brief Hook called whenever a macro definition is seen.
   virtual void MacroDefined(const Token &MacroNameTok, const MacroInfo *MI) {
   }
 
-  /// MacroUndefined - This hook is called whenever a macro #undef is seen.
+  /// \brief Hook called whenever a macro \#undef is seen.
+  ///
   /// MI is released immediately following this callback.
   virtual void MacroUndefined(const Token &MacroNameTok, const MacroInfo *MI) {
   }
@@ -183,54 +181,55 @@
   virtual void Defined(const Token &MacroNameTok) {
   }
   
-  /// SourceRangeSkipped - This hook is called when a source range is skipped.
+  /// \brief Hook called when a source range is skipped.
   /// \param Range The SourceRange that was skipped. The range begins at the
-  /// #if/#else directive and ends after the #endif/#else directive.
+  /// \#if/\#else directive and ends after the \#endif/\#else directive.
   virtual void SourceRangeSkipped(SourceRange Range) {
   }
 
-  /// If -- This hook is called whenever an #if is seen.
+  /// \brief Hook called whenever an \#if is seen.
   /// \param Loc the source location of the directive.
   /// \param ConditionRange The SourceRange of the expression being tested.
+  ///
   // FIXME: better to pass in a list (or tree!) of Tokens.
   virtual void If(SourceLocation Loc, SourceRange ConditionRange) {
   }
 
-  /// Elif -- This hook is called whenever an #elif is seen.
+  /// \brief Hook called whenever an \#elif is seen.
   /// \param Loc the source location of the directive.
   /// \param ConditionRange The SourceRange of the expression being tested.
-  /// \param IfLoc the source location of the #if/#ifdef/#ifndef directive.
+  /// \param IfLoc the source location of the \#if/\#ifdef/\#ifndef directive.
   // FIXME: better to pass in a list (or tree!) of Tokens.
   virtual void Elif(SourceLocation Loc, SourceRange ConditionRange,
                     SourceLocation IfLoc) {
   }
 
-  /// Ifdef -- This hook is called whenever an #ifdef is seen.
+  /// \brief Hook called whenever an \#ifdef is seen.
   /// \param Loc the source location of the directive.
   /// \param II Information on the token being tested.
   virtual void Ifdef(SourceLocation Loc, const Token &MacroNameTok) {
   }
 
-  /// Ifndef -- This hook is called whenever an #ifndef is seen.
+  /// \brief Hook called whenever an \#ifndef is seen.
   /// \param Loc the source location of the directive.
   /// \param II Information on the token being tested.
   virtual void Ifndef(SourceLocation Loc, const Token &MacroNameTok) {
   }
 
-  /// Else -- This hook is called whenever an #else is seen.
+  /// \brief Hook called whenever an \#else is seen.
   /// \param Loc the source location of the directive.
-  /// \param IfLoc the source location of the #if/#ifdef/#ifndef directive.
+  /// \param IfLoc the source location of the \#if/\#ifdef/\#ifndef directive.
   virtual void Else(SourceLocation Loc, SourceLocation IfLoc) {
   }
 
-  /// Endif -- This hook is called whenever an #endif is seen.
+  /// \brief Hook called whenever an \#endif is seen.
   /// \param Loc the source location of the directive.
-  /// \param IfLoc the source location of the #if/#ifdef/#ifndef directive.
+  /// \param IfLoc the source location of the \#if/\#ifdef/\#ifndef directive.
   virtual void Endif(SourceLocation Loc, SourceLocation IfLoc) {
   }
 };
 
-/// PPChainedCallbacks - Simple wrapper class for chaining callbacks.
+/// \brief Simple wrapper class for chaining callbacks.
 class PPChainedCallbacks : public PPCallbacks {
   virtual void anchor();
   PPCallbacks *First, *Second;
@@ -342,38 +341,38 @@
     Second->SourceRangeSkipped(Range);
   }
 
-  /// If -- This hook is called whenever an \#if is seen.
+  /// \brief Hook called whenever an \#if is seen.
   virtual void If(SourceLocation Loc, SourceRange ConditionRange) {
     First->If(Loc, ConditionRange);
     Second->If(Loc, ConditionRange);
   }
 
-  /// Elif -- This hook is called whenever an \#if is seen.
+  /// \brief Hook called whenever an \#if is seen.
   virtual void Elif(SourceLocation Loc, SourceRange ConditionRange,
                     SourceLocation IfLoc) {
     First->Elif(Loc, ConditionRange, IfLoc);
     Second->Elif(Loc, ConditionRange, IfLoc);
   }
 
-  /// Ifdef -- This hook is called whenever an \#ifdef is seen.
+  /// \brief Hook called whenever an \#ifdef is seen.
   virtual void Ifdef(SourceLocation Loc, const Token &MacroNameTok) {
     First->Ifdef(Loc, MacroNameTok);
     Second->Ifdef(Loc, MacroNameTok);
   }
 
-  /// Ifndef -- This hook is called whenever an \#ifndef is seen.
+  /// \brief Hook called whenever an \#ifndef is seen.
   virtual void Ifndef(SourceLocation Loc, const Token &MacroNameTok) {
     First->Ifndef(Loc, MacroNameTok);
     Second->Ifndef(Loc, MacroNameTok);
   }
 
-  /// Else -- This hook is called whenever an \#else is seen.
+  /// \brief Hook called whenever an \#else is seen.
   virtual void Else(SourceLocation Loc, SourceLocation IfLoc) {
     First->Else(Loc, IfLoc);
     Second->Else(Loc, IfLoc);
   }
 
-  /// Endif -- This hook is called whenever an \#endif is seen.
+  /// \brief Hook called whenever an \#endif is seen.
   virtual void Endif(SourceLocation Loc, SourceLocation IfLoc) {
     First->Endif(Loc, IfLoc);
     Second->Endif(Loc, IfLoc);





More information about the cfe-commits mailing list