From: James Dennett Date: Fri, 15 Jun 2012 22:23:43 +0000 (+0000) Subject: Documentation cleanup: X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef2b5b327b524f9ea3243c07e04fb24706e63120;p=clang Documentation cleanup: * Escaped "::" and "<" as needed in Doxygen comments; * Marked up code examples with \code...\endcode; * Documented a \param that is current, instead of a few that aren't; * Fixed up some \file and \brief comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158562 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 8f4cb92ff0..490ee5739a 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -9973,7 +9973,7 @@ Decl *Sema::ActOnTemplatedFriendTag(Scope *S, SourceLocation FriendLoc, /// friend class A::B; /// We permit this as a special case; if there are any template /// parameters present at all, require proper matching, i.e. -/// template <> template friend class A::B; +/// template <> template \ friend class A::B; Decl *Sema::ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TempParams) { SourceLocation Loc = DS.getLocStart(); diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 03c49f93bd..95dcbe9ad8 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -6,10 +6,9 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -// -// This file implements semantic analysis for C++ expressions. -// -//===----------------------------------------------------------------------===// + +// \file +// \brief Implements semantic analysis for C++ expressions. #include "clang/Sema/SemaInternal.h" #include "clang/Sema/DeclSpec.h" @@ -934,7 +933,7 @@ static bool doesUsualArrayDeleteWantSize(Sema &S, SourceLocation loc, } /// \brief Parsed a C++ 'new' expression (C++ 5.3.4). - +/// /// E.g.: /// @code new (memory) int[size][4] @endcode /// or @@ -947,10 +946,8 @@ static bool doesUsualArrayDeleteWantSize(Sema &S, SourceLocation loc, /// \param PlacementRParen Closing paren of the placement arguments. /// \param TypeIdParens If the type is in parens, the source range. /// \param D The type to be allocated, as well as array dimensions. -/// \param ConstructorLParen Opening paren of the constructor args, empty if -/// initializer-list syntax is used. -/// \param ConstructorArgs Constructor/initialization arguments. -/// \param ConstructorRParen Closing paren of the constructor args. +/// \param Initializer The initializing expression or initializer-list, or null +/// if there is none. ExprResult Sema::ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, @@ -962,7 +959,7 @@ Sema::ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal, // If the specified type is an array, unwrap it and save the expression. if (D.getNumTypeObjects() > 0 && D.getTypeObject(0).Kind == DeclaratorChunk::Array) { - DeclaratorChunk &Chunk = D.getTypeObject(0); + DeclaratorChunk &Chunk = D.getTypeObject(0); if (TypeContainsAuto) return ExprError(Diag(Chunk.Loc, diag::err_new_array_of_auto) << D.getSourceRange()); diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 0bf941b8e2..77695c199d 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -5790,14 +5790,17 @@ Sema::CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, } /// \brief Perform semantic analysis for the given dependent function -/// template specialization. The only possible way to get a dependent -/// function template specialization is with a friend declaration, -/// like so: +/// template specialization. /// -/// template void foo(T); -/// template class A { +/// The only possible way to get a dependent function template specialization +/// is with a friend declaration, like so: +/// +/// \code +/// template \ void foo(T); +/// template \ class A { /// friend void foo<>(T); /// }; +/// \endcode /// /// There really isn't any useful analysis we can do here, so we /// just store the information. diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index 9001696db9..c0bf06daf1 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -3240,8 +3240,8 @@ DeclContext *Sema::FindInstantiatedContext(SourceLocation Loc, DeclContext* DC, /// /// In the instantiation of X::getKind(), we need to map the /// EnumConstantDecl for KnownValue (which refers to -/// X::\::KnownValue) to its instantiation -/// (X::\::KnownValue). InstantiateCurrentDeclRef() performs +/// X::\::\KnownValue) to its instantiation +/// (X::\\::KnownValue). InstantiateCurrentDeclRef() performs /// this mapping from within the instantiation of X. NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs) {