]> granicus.if.org Git - clang/commitdiff
Documentation cleanup:
authorJames Dennett <jdennett@google.com>
Fri, 22 Jun 2012 08:10:18 +0000 (08:10 +0000)
committerJames Dennett <jdennett@google.com>
Fri, 22 Jun 2012 08:10:18 +0000 (08:10 +0000)
* Primarily fixed \param commands with names not matching any actual
  parameters of the documented functions.  In many cases this consists
  just of fixing up the parameter name in the \param to match the code,
  in some it means deleting obsolete documentation and occasionally it
  means documenting the parameter that has replaced the older one that
  was documented, which sometimes means some simple reverse-engineering
  of the docs from the implementation;
* Fixed \param ParamName [out] to the correct format with [out] before
  the parameter name;
* Fixed some \brief summaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158980 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/TemplateBase.h
include/clang/Basic/Diagnostic.h
include/clang/Frontend/CompilerInvocation.h
include/clang/Lex/DirectoryLookup.h
include/clang/Lex/HeaderSearch.h
include/clang/Lex/PPCallbacks.h
include/clang/Sema/Initialization.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaExprObjC.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaType.cpp

index 76cbcfbf7fe05f39998afce2cb2feb509c8a9ec4..54c9f2c534d2cc8798274530ec985735a72c98d2 100644 (file)
@@ -299,14 +299,12 @@ public:
     return Args.NumArgs;
   }
 
-  /// Determines whether two template arguments are superficially the
+  /// \brief Determines whether two template arguments are superficially the
   /// same.
   bool structurallyEquals(const TemplateArgument &Other) const;
 
-  /// \brief When the template argument is a pack expansion, returns 
+  /// \brief When the template argument is a pack expansion, returns
   /// the pattern of the pack expansion.
-  ///
-  /// \param Ellipsis Will be set to the location of the ellipsis.
   TemplateArgument getPackExpansionPattern() const;
 
   /// \brief Print this template argument to the given output stream.
index 016628eac623dc24a22f29db6ae53758fd73c42a..883e9d193e9a9f31fc13200f599e8009b8335386 100644 (file)
@@ -584,9 +584,9 @@ public:
   /// diagnostics (through @c ProcessDiag) when it is destroyed.
   ///
   /// \param DiagID A member of the @c diag::kind enum.
-  /// \param Pos Represents the source location associated with the diagnostic,
+  /// \param Loc Represents the source location associated with the diagnostic,
   /// which can be an invalid location if no position information is available.
-  inline DiagnosticBuilder Report(SourceLocation Pos, unsigned DiagID);
+  inline DiagnosticBuilder Report(SourceLocation Loc, unsigned DiagID);
   inline DiagnosticBuilder Report(unsigned DiagID);
 
   void Report(const StoredDiagnostic &storedDiag);
@@ -975,9 +975,6 @@ inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
   return DB;
 }
 
-/// Report - Issue the message to the client.  DiagID is a member of the
-/// diag::kind enum.  This actually returns a new instance of DiagnosticBuilder
-/// which emits the diagnostics (through ProcessDiag) when it is destroyed.
 inline DiagnosticBuilder DiagnosticsEngine::Report(SourceLocation Loc,
                                             unsigned DiagID){
   assert(CurDiagID == ~0U && "Multiple diagnostics in flight at once!");
index 1f9a8ab8c41bd3b974db3a70a1d0c38bd745a7f6..fc3ab1017f2ebd8ff357e88501bada46b0f64aa9 100644 (file)
@@ -38,10 +38,13 @@ namespace driver {
 class ArgList;
 }
 
-/// CompilerInvocation - Fill out Opts based on the options given in Args.
+/// \brief Fill out Opts based on the options given in Args.
+///
 /// Args must have been created from the OptTable returned by
-/// createCC1OptTable(). When errors are encountered, return false and,
-/// if Diags is non-null, report the error(s).
+/// createCC1OptTable().
+///
+/// When errors are encountered, return false and, if Diags is non-null,
+/// report the error(s).
 bool ParseDiagnosticArgs(DiagnosticOptions &Opts, driver::ArgList &Args,
                          DiagnosticsEngine *Diags = 0);
   
@@ -58,8 +61,7 @@ public:
   const LangOptions *getLangOpts() const { return LangOpts.getPtr(); }
 };
   
-/// CompilerInvocation - Helper class for holding the data necessary to invoke
-/// the compiler.
+/// \brief Helper class for holding the data necessary to invoke the compiler.
 ///
 /// This class is designed to represent an abstract "invocation" of the
 /// compiler, including data such as the include paths, the code generation
@@ -103,10 +105,10 @@ public:
   /// @name Utility Methods
   /// @{
 
-  /// CreateFromArgs - Create a compiler invocation from a list of input
-  /// options. Returns true on success.
+  /// \brief Create a compiler invocation from a list of input options.
+  /// \returns true on success.
   ///
-  /// \param Res [out] - The resulting invocation.
+  /// \param [out] Res - The resulting invocation.
   /// \param ArgBegin - The first element in the argument vector.
   /// \param ArgEnd - The last element in the argument vector.
   /// \param Diags - The diagnostic engine to use for errors.
@@ -115,7 +117,7 @@ public:
                              const char* const *ArgEnd,
                              DiagnosticsEngine &Diags);
 
-  /// GetBuiltinIncludePath - Get the directory where the compiler headers
+  /// \brief Get the directory where the compiler headers
   /// reside, relative to the compiler binary (found by the passed in
   /// arguments).
   ///
@@ -125,11 +127,11 @@ public:
   /// executable), for finding the builtin compiler path.
   static std::string GetResourcesPath(const char *Argv0, void *MainAddr);
 
-  /// toArgs - Convert the CompilerInvocation to a list of strings suitable for
+  /// \brief Convert the CompilerInvocation to a list of strings suitable for
   /// passing to CreateFromArgs.
   void toArgs(std::vector<std::string> &Res) const;
 
-  /// setLangDefaults - Set language defaults for the given input language and
+  /// \brief Set language defaults for the given input language and
   /// language standard in this CompilerInvocation.
   ///
   /// \param IK - The input language.
@@ -139,10 +141,10 @@ public:
     setLangDefaults(*getLangOpts(), IK, LangStd);
   }
 
-  /// setLangDefaults - Set language defaults for the given input language and
+  /// \brief Set language defaults for the given input language and
   /// language standard in the given LangOptions object.
   ///
-  /// \param LangOpts - The LangOptions object to set up.
+  /// \param Opts - The LangOptions object to set up.
   /// \param IK - The input language.
   /// \param LangStd - The input language standard.
   static void setLangDefaults(LangOptions &Opts, InputKind IK,
index 0976da390afdaf3c5520ddc2bc8f795222d10f74..d773fc6fb15f78ef2e4fa9819ca8bd6308927baa 100644 (file)
@@ -146,14 +146,14 @@ public:
   /// part of a known module, this will be set to the module that should
   /// be imported instead of preprocessing/parsing the file found.
   ///
-  /// \param InUserSpecifiedSystemHeader [out] If the file is found, set to true
-  /// if the file is located in a framework that has been user-specified to be
-  /// treated as a system framework.
+  /// \param [out] InUserSpecifiedSystemFramework If the file is found,
+  /// set to true if the file is located in a framework that has been
+  /// user-specified to be treated as a system framework.
   const FileEntry *LookupFile(StringRef Filename, HeaderSearch &HS,
                               SmallVectorImpl<char> *SearchPath,
                               SmallVectorImpl<char> *RelativePath,
                               Module **SuggestedModule,
-                              bool &InUserSpecifiedSystemHeader) const;
+                              bool &InUserSpecifiedSystemFramework) const;
 
 private:
   const FileEntry *DoFrameworkLookup(
index 904d64328421df5e86933bc6a535807758a7bc26..df64f2aba2361224d0f698a18ebb71920850ba8a 100644 (file)
@@ -424,7 +424,7 @@ public:
   /// \brief Retrieve the name of the module file that should be used to 
   /// load a module with the given name.
   ///
-  /// \param Module The module whose module file name will be returned.
+  /// \param ModuleName The module whose module file name will be returned.
   ///
   /// \returns The name of the module file that corresponds to this module,
   /// or an empty string if this module does not correspond to any module file.
index e7219c7a9f2ae09bc7e92680753e4eda0ef5cb1f..962b4df6c492766c3951d4a6b37c97337b7876b6 100644 (file)
@@ -140,7 +140,7 @@ public:
 
   /// \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.
+  /// \param Str The text of the message directive.
   virtual void PragmaMessage(SourceLocation Loc, StringRef Str) {
   }
 
@@ -177,7 +177,7 @@ public:
   virtual void MacroUndefined(const Token &MacroNameTok, const MacroInfo *MI) {
   }
   
-  /// Defined - This hook is called whenever the 'defined' operator is seen.
+  /// \brief Hook called whenever the 'defined' operator is seen.
   virtual void Defined(const Token &MacroNameTok) {
   }
   
@@ -206,13 +206,13 @@ public:
 
   /// \brief Hook called whenever an \#ifdef is seen.
   /// \param Loc the source location of the directive.
-  /// \param II Information on the token being tested.
+  /// \param MacroNameTok Information on the token being tested.
   virtual void Ifdef(SourceLocation Loc, const Token &MacroNameTok) {
   }
 
   /// \brief Hook called whenever an \#ifndef is seen.
   /// \param Loc the source location of the directive.
-  /// \param II Information on the token being tested.
+  /// \param MacroNameTok Information on the token being tested.
   virtual void Ifndef(SourceLocation Loc, const Token &MacroNameTok) {
   }
 
index 0dd68875a9ec2834af105272866fc08323557bbf..a10b9dbced211f6b8c4614ab5de5f3655bea4416 100644 (file)
@@ -855,8 +855,8 @@ public:
   ///
   /// \param BaseType the base type to which we will be casting.
   ///
-  /// \param IsLValue true if the result of this cast will be treated as 
-  /// an lvalue.
+  /// \param Category Indicates whether the result will be treated as an
+  /// rvalue, an xvalue, or an lvalue.
   void AddDerivedToBaseCastStep(QualType BaseType,
                                 ExprValueKind Category);
      
@@ -865,9 +865,6 @@ public:
   /// \param BindingTemporary True if we are binding a reference to a temporary
   /// object (thereby extending its lifetime); false if we are binding to an
   /// lvalue or an lvalue treated as an rvalue.
-  ///
-  /// \param UnnecessaryCopy True if we should check for a copy
-  /// constructor for a completely unnecessary but
   void AddReferenceBindingStep(QualType T, bool BindingTemporary);
 
   /// \brief Add a new step that makes an extraneous copy of the input
index f04fc153af53f540d9585ec155004794da62dd15..aea92a4d73d3340561b360bb2f253df8d5795bbf 100644 (file)
@@ -5831,12 +5831,12 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
 /// that have been instantiated via C++ template instantiation (called
 /// via InstantiateDecl).
 ///
-/// \param IsExplicitSpecialiation whether this new function declaration is
+/// \param IsExplicitSpecialization whether this new function declaration is
 /// an explicit specialization of the previous declaration.
 ///
 /// This sets NewFD->isInvalidDecl() to true if there was an error.
 ///
-/// Returns true if the function declaration is a redeclaration.
+/// \returns true if the function declaration is a redeclaration.
 bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD,
                                     LookupResult &Previous,
                                     bool IsExplicitSpecialization) {
index 9466f4146effb39bed41f14b7cbf4fd9149e4f59..5304f567ee743e1a36f4bb30c7bb49d043a65df6 100644 (file)
@@ -1940,9 +1940,9 @@ static void checkCocoaAPI(Sema &S, const ObjCMessageExpr *Msg) {
 ///
 /// \param LBracLoc The location of the opening square bracket ']'.
 ///
-/// \param RBrac The location of the closing square bracket ']'.
+/// \param RBracLoc The location of the closing square bracket ']'.
 ///
-/// \param Args The message arguments.
+/// \param ArgsIn The message arguments.
 ExprResult Sema::BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo,
                                    QualType ReceiverType,
                                    SourceLocation SuperLoc,
@@ -2110,9 +2110,9 @@ ExprResult Sema::BuildInstanceMessageImplicit(Expr *Receiver,
 ///
 /// \param LBracLoc The location of the opening square bracket ']'.
 ///
-/// \param RBrac The location of the closing square bracket ']'.
+/// \param RBracLoc The location of the closing square bracket ']'.
 ///
-/// \param Args The message arguments.
+/// \param ArgsIn The message arguments.
 ExprResult Sema::BuildInstanceMessage(Expr *Receiver,
                                       QualType ReceiverType,
                                       SourceLocation SuperLoc,
index 013af8a8f624fe5fada17c4e7598c586fe542ba0..0f23a669bc3264aac3e51fbf10371a4a5d1a9b99 100644 (file)
@@ -7826,13 +7826,11 @@ isBetterOverloadCandidate(Sema &S,
 /// \brief Computes the best viable function (C++ 13.3.3)
 /// within an overload candidate set.
 ///
-/// \param CandidateSet the set of candidate functions.
-///
-/// \param Loc the location of the function name (or operator symbol) for
+/// \param Loc The location of the function name (or operator symbol) for
 /// which overload resolution occurs.
 ///
-/// \param Best f overload resolution was successful or found a deleted
-/// function, Best points to the candidate function found.
+/// \param Best If overload resolution was successful or found a deleted
+/// function, \p Best points to the candidate function found.
 ///
 /// \returns The result of overload resolution.
 OverloadingResult
index 4bd9b14bf5a9fa67be08110f0c4b6a016cae0bbd..35019b5fc0a6093613299f5fbe9d0391cc7c5d46 100644 (file)
@@ -1231,9 +1231,7 @@ static bool isArraySizeVLA(Sema &S, Expr *ArraySize, llvm::APSInt &SizeVal) {
 ///
 /// \param ArraySize Expression describing the size of the array.
 ///
-/// \param Loc The location of the entity whose type involves this
-/// array type or, if there is no such entity, the location of the
-/// type that will have array type.
+/// \param Brackets The range from the opening '[' to the closing ']'.
 ///
 /// \param Entity The name of the entity that involves the array
 /// type, if known.
@@ -1593,7 +1591,7 @@ QualType Sema::BuildMemberPointerType(QualType T, QualType Class,
 ///
 /// \param T The type to which we'll be building a block pointer.
 ///
-/// \param CVR The cvr-qualifiers to be applied to the block pointer type.
+/// \param Loc The source location, used for diagnostics.
 ///
 /// \param Entity The name of the entity that involves the block pointer
 /// type, if known.