From 809d1be9820039b4cf6efa48246a0d70ffa13394 Mon Sep 17 00:00:00 2001 From: James Dennett Date: Wed, 13 Jun 2012 22:07:09 +0000 Subject: [PATCH] More doxygen/documentation cleanups. This reduces the number of warnings generated by Doxygen by about 100 (roughly 10%). Issues addressed: (1) Primarily, backslash-escaped "@foo" and "#bah" in Doxygen comments when they're not supposed to be Doxygen commands or links, and similarly for "" when it's not intended as as HTML tag; (2) Changed some \t commands (which don't exist) to \c ("to refer to a word of code", as the Doxygen manual says); (3) \precondition becomes \pre; (4) When touching comments, deleted a couple of spurious spaces in them; (5) Changed some \n and \r to \\n and \\r; (6) Fixed one tiny typo: #pragms -> #pragma. This patch touches documentation/comments only. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158422 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/ASTContext.h | 2 +- include/clang/AST/ExprCXX.h | 2 +- include/clang/AST/ExprObjC.h | 2 +- include/clang/AST/StmtObjC.h | 16 +++---- include/clang/AST/Type.h | 2 +- include/clang/Basic/MacroBuilder.h | 2 +- include/clang/Basic/SourceManager.h | 2 +- include/clang/Basic/SourceManagerInternals.h | 4 +- include/clang/Frontend/FrontendOptions.h | 4 +- include/clang/Frontend/HeaderSearchOptions.h | 6 +-- .../Frontend/PreprocessorOutputOptions.h | 2 +- include/clang/Lex/CodeCompletionHandler.h | 4 +- include/clang/Lex/HeaderSearch.h | 12 ++--- include/clang/Lex/PPCallbacks.h | 14 +++--- include/clang/Lex/Pragma.h | 10 ++--- include/clang/Lex/PreprocessingRecord.h | 18 ++++---- include/clang/Lex/Preprocessor.h | 11 +++-- include/clang/Lex/PreprocessorLexer.h | 2 +- include/clang/Sema/CodeCompleteConsumer.h | 4 +- include/clang/Sema/Scope.h | 4 +- include/clang/Sema/ScopeInfo.h | 2 +- include/clang/Sema/Sema.h | 44 +++++++++---------- include/clang/Sema/Weak.h | 2 +- include/clang/Serialization/ASTBitCodes.h | 4 +- lib/CodeGen/CGObjCGNU.cpp | 10 ++--- lib/Frontend/InitPreprocessor.cpp | 6 +-- 26 files changed, 95 insertions(+), 96 deletions(-) diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 48001ba3e7..4541182e68 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -1705,7 +1705,7 @@ public: /// \brief Get the implementation of ObjCCategoryDecl, or NULL if none exists. ObjCCategoryImplDecl *getObjCImplementation(ObjCCategoryDecl *D); - /// \brief returns true if there is at lease one @implementation in TU. + /// \brief returns true if there is at lease one \@implementation in TU. bool AnyObjCImplementation() { return !ObjCImpls.empty(); } diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h index 5bc269891f..515f7e5ce3 100644 --- a/include/clang/AST/ExprCXX.h +++ b/include/clang/AST/ExprCXX.h @@ -2228,7 +2228,7 @@ public: /// \brief A reference to an overloaded function set, either an -/// \t UnresolvedLookupExpr or an \t UnresolvedMemberExpr. +/// \c UnresolvedLookupExpr or an \c UnresolvedMemberExpr. class OverloadExpr : public Expr { /// The common name of these declarations. DeclarationNameInfo NameInfo; diff --git a/include/clang/AST/ExprObjC.h b/include/clang/AST/ExprObjC.h index 33dac5a707..a02ba00751 100644 --- a/include/clang/AST/ExprObjC.h +++ b/include/clang/AST/ExprObjC.h @@ -378,7 +378,7 @@ public: child_range children() { return child_range(); } }; -/// ObjCSelectorExpr used for @selector in Objective-C. +/// ObjCSelectorExpr used for \@selector in Objective-C. class ObjCSelectorExpr : public Expr { Selector SelName; SourceLocation AtLoc, RParenLoc; diff --git a/include/clang/AST/StmtObjC.h b/include/clang/AST/StmtObjC.h index a32104123b..662411901c 100644 --- a/include/clang/AST/StmtObjC.h +++ b/include/clang/AST/StmtObjC.h @@ -70,7 +70,7 @@ public: } }; -/// ObjCAtCatchStmt - This represents objective-c's @catch statement. +/// ObjCAtCatchStmt - This represents objective-c's \@catch statement. class ObjCAtCatchStmt : public Stmt { private: VarDecl *ExceptionDecl; @@ -118,7 +118,7 @@ public: child_range children() { return child_range(&Body, &Body + 1); } }; -/// ObjCAtFinallyStmt - This represent objective-c's @finally Statement +/// ObjCAtFinallyStmt - This represent objective-c's \@finally Statement class ObjCAtFinallyStmt : public Stmt { Stmt *AtFinallyStmt; SourceLocation AtFinallyLoc; @@ -192,26 +192,26 @@ public: unsigned NumCatchStmts, bool HasFinally); - /// \brief Retrieve the location of the @ in the @try. + /// \brief Retrieve the location of the @ in the \@try. SourceLocation getAtTryLoc() const { return AtTryLoc; } void setAtTryLoc(SourceLocation Loc) { AtTryLoc = Loc; } - /// \brief Retrieve the @try body. + /// \brief Retrieve the \@try body. const Stmt *getTryBody() const { return getStmts()[0]; } Stmt *getTryBody() { return getStmts()[0]; } void setTryBody(Stmt *S) { getStmts()[0] = S; } - /// \brief Retrieve the number of @catch statements in this try-catch-finally + /// \brief Retrieve the number of \@catch statements in this try-catch-finally /// block. unsigned getNumCatchStmts() const { return NumCatchStmts; } - /// \brief Retrieve a @catch statement. + /// \brief Retrieve a \@catch statement. const ObjCAtCatchStmt *getCatchStmt(unsigned I) const { assert(I < NumCatchStmts && "Out-of-bounds @catch index"); return cast_or_null(getStmts()[I + 1]); } - /// \brief Retrieve a @catch statement. + /// \brief Retrieve a \@catch statement. ObjCAtCatchStmt *getCatchStmt(unsigned I) { assert(I < NumCatchStmts && "Out-of-bounds @catch index"); return cast_or_null(getStmts()[I + 1]); @@ -223,7 +223,7 @@ public: getStmts()[I + 1] = S; } - /// Retrieve the @finally statement, if any. + /// Retrieve the \@finally statement, if any. const ObjCAtFinallyStmt *getFinallyStmt() const { if (!HasFinally) return 0; diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 23308d0873..e780c66f97 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -3701,7 +3701,7 @@ public: unsigned getNumArgs() const { return NumArgs; } /// \brief Retrieve a specific template argument as a type. - /// \precondition @c isArgType(Arg) + /// \pre @c isArgType(Arg) const TemplateArgument &getArg(unsigned Idx) const; // in TemplateBase.h bool isSugared() const { diff --git a/include/clang/Basic/MacroBuilder.h b/include/clang/Basic/MacroBuilder.h index 1d0f1e899c..8b552cfd57 100644 --- a/include/clang/Basic/MacroBuilder.h +++ b/include/clang/Basic/MacroBuilder.h @@ -24,7 +24,7 @@ class MacroBuilder { public: MacroBuilder(raw_ostream &Output) : Out(Output) {} - /// Append a #define line for macro of the form "#define Name Value\n". + /// Append a \#define line for macro of the form "\#define Name Value\n". void defineMacro(const Twine &Name, const Twine &Value = "1") { Out << "#define " << Name << ' ' << Value << '\n'; } diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index f7fb1f5231..5a0db9a109 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -895,7 +895,7 @@ public: return SourceLocation::getFileLoc(FileOffset + getFileIDSize(FID) - 1); } - /// \brief Returns the include location if \p FID is a #include'd file + /// \brief Returns the include location if \p FID is a \#include'd file /// otherwise it returns an invalid location. SourceLocation getIncludeLoc(FileID FID) const { bool Invalid = false; diff --git a/include/clang/Basic/SourceManagerInternals.h b/include/clang/Basic/SourceManagerInternals.h index 827de30aeb..edb43af223 100644 --- a/include/clang/Basic/SourceManagerInternals.h +++ b/include/clang/Basic/SourceManagerInternals.h @@ -30,11 +30,11 @@ struct LineEntry { /// FileOffset - The offset in this file that the line entry occurs at. unsigned FileOffset; - /// LineNo - The presumed line number of this line entry: #line 4. + /// LineNo - The presumed line number of this line entry: \#line 4. unsigned LineNo; /// FilenameID - The ID of the filename identified by this line entry: - /// #line 4 "foo.c". This is -1 if not specified. + /// \#line 4 "foo.c". This is -1 if not specified. int FilenameID; /// Flags - Set the 0 if no flags, 1 if a system header, diff --git a/include/clang/Frontend/FrontendOptions.h b/include/clang/Frontend/FrontendOptions.h index 78d3adfc6b..84b600d742 100644 --- a/include/clang/Frontend/FrontendOptions.h +++ b/include/clang/Frontend/FrontendOptions.h @@ -42,8 +42,8 @@ namespace frontend { PrintDeclContext, ///< Print DeclContext and their Decls. PrintPreamble, ///< Print the "preamble" of the input file PrintPreprocessedInput, ///< -E mode. - RewriteMacros, ///< Expand macros but not #includes. - RewriteIncludes, ///< Expand #includes but not macros. + RewriteMacros, ///< Expand macros but not \#includes. + RewriteIncludes, ///< Expand \#includes but not macros. RewriteObjC, ///< ObjC->C Rewriter. RewriteTest, ///< Rewriter playground RunAnalysis, ///< Run one or more source code analyses. diff --git a/include/clang/Frontend/HeaderSearchOptions.h b/include/clang/Frontend/HeaderSearchOptions.h index bdd26232c0..65119f0ed3 100644 --- a/include/clang/Frontend/HeaderSearchOptions.h +++ b/include/clang/Frontend/HeaderSearchOptions.h @@ -17,12 +17,12 @@ namespace clang { namespace frontend { /// IncludeDirGroup - Identifiers the group a include entry belongs to, which - /// represents its relative positive in the search list. A #include of a "" + /// represents its relative positive in the search list. A \#include of a "" /// path starts at the -iquote group, then searches the Angled group, then /// searches the system group, etc. enum IncludeDirGroup { - Quoted = 0, ///< '#include ""' paths, added by'gcc -iquote'. - Angled, ///< Paths for '#include <>' added by '-I'. + Quoted = 0, ///< '\#include ""' paths, added by 'gcc -iquote'. + Angled, ///< Paths for '\#include <>' added by '-I'. IndexHeaderMap, ///< Like Angled, but marks header maps used when /// building frameworks. System, ///< Like Angled, but marks system directories. diff --git a/include/clang/Frontend/PreprocessorOutputOptions.h b/include/clang/Frontend/PreprocessorOutputOptions.h index 1eda0d4027..5ec1c26938 100644 --- a/include/clang/Frontend/PreprocessorOutputOptions.h +++ b/include/clang/Frontend/PreprocessorOutputOptions.h @@ -18,7 +18,7 @@ class PreprocessorOutputOptions { public: unsigned ShowCPP : 1; ///< Print normal preprocessed output. unsigned ShowComments : 1; ///< Show comments. - unsigned ShowLineMarkers : 1; ///< Show #line markers. + unsigned ShowLineMarkers : 1; ///< Show \#line markers. unsigned ShowMacroComments : 1; ///< Show comments, even in macros. unsigned ShowMacros : 1; ///< Print macro definitions. diff --git a/include/clang/Lex/CodeCompletionHandler.h b/include/clang/Lex/CodeCompletionHandler.h index d876776c92..5b45c05d32 100644 --- a/include/clang/Lex/CodeCompletionHandler.h +++ b/include/clang/Lex/CodeCompletionHandler.h @@ -47,7 +47,7 @@ public: virtual void CodeCompleteMacroName(bool IsDefinition) { } /// \brief Callback invoked when performing code completion in a preprocessor - /// expression, such as the condition of an #if or #elif directive. + /// expression, such as the condition of an \#if or \#elif directive. virtual void CodeCompletePreprocessorExpression() { } /// \brief Callback invoked when performing code completion inside a @@ -62,7 +62,7 @@ public: /// \brief Callback invoked when performing code completion in a part of the /// file where we expect natural language, e.g., a comment, string, or - /// #error directive. + /// \#error directive. virtual void CodeCompleteNaturalLanguage() { } }; diff --git a/include/clang/Lex/HeaderSearch.h b/include/clang/Lex/HeaderSearch.h index e087e7190e..953f656b5d 100644 --- a/include/clang/Lex/HeaderSearch.h +++ b/include/clang/Lex/HeaderSearch.h @@ -32,12 +32,12 @@ class FileManager; class IdentifierInfo; /// HeaderFileInfo - The preprocessor keeps track of this information for each -/// file that is #included. +/// file that is \#included. struct HeaderFileInfo { - /// isImport - True if this is a #import'd or #pragma once file. + /// isImport - True if this is a \#import'd or \#pragma once file. unsigned isImport : 1; - /// isPragmaOnce - True if this is #pragma once file. + /// isPragmaOnce - True if this is \#pragma once file. unsigned isPragmaOnce : 1; /// DirInfo - Keep track of whether this is a system header, and if so, @@ -391,17 +391,17 @@ public: /// SetFileControllingMacro - Mark the specified file as having a controlling /// macro. This is used by the multiple-include optimization to eliminate - /// no-op #includes. + /// no-op \#includes. void SetFileControllingMacro(const FileEntry *File, const IdentifierInfo *ControllingMacro) { getFileInfo(File).ControllingMacro = ControllingMacro; } /// \brief Determine whether this file is intended to be safe from - /// multiple inclusions, e.g., it has #pragma once or a controlling + /// multiple inclusions, e.g., it has \#pragma once or a controlling /// macro. /// - /// This routine does not consider the effect of #import + /// This routine does not consider the effect of \#import bool isFileMultipleIncludeGuarded(const FileEntry *File); /// CreateHeaderMap - This method returns a HeaderMap for the specified diff --git a/include/clang/Lex/PPCallbacks.h b/include/clang/Lex/PPCallbacks.h index 33558c8dfd..1e1a23dfa3 100644 --- a/include/clang/Lex/PPCallbacks.h +++ b/include/clang/Lex/PPCallbacks.h @@ -76,7 +76,7 @@ public: } /// \brief This callback is invoked whenever an inclusion directive of - /// any kind (\c #include, \c #import, etc.) has been processed, regardless + /// any kind (\c \#include, \c \#import, etc.) has been processed, regardless /// of whether the inclusion will actually result in an inclusion. /// /// \param HashLoc The location of the '#' that starts the inclusion @@ -342,38 +342,38 @@ public: Second->SourceRangeSkipped(Range); } - /// If -- This hook is called whenever an #if is seen. + /// If -- This hook is 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. + /// Elif -- This hook is 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. + /// Ifdef -- This hook is 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. + /// Ifndef -- This hook is 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. + /// Else -- This hook is 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. + /// Endif -- This hook is called whenever an \#endif is seen. virtual void Endif(SourceLocation Loc, SourceLocation IfLoc) { First->Endif(Loc, IfLoc); Second->Endif(Loc, IfLoc); diff --git a/include/clang/Lex/Pragma.h b/include/clang/Lex/Pragma.h index 4868811e70..087448fbc5 100644 --- a/include/clang/Lex/Pragma.h +++ b/include/clang/Lex/Pragma.h @@ -26,12 +26,12 @@ namespace clang { class PragmaNamespace; /** - * \brief Describes how the pragma was introduced, e.g., with #pragma, + * \brief Describes how the pragma was introduced, e.g., with \#pragma, * _Pragma, or __pragma. */ enum PragmaIntroducerKind { /** - * \brief The pragma was introduced via #pragma. + * \brief The pragma was introduced via \#pragma. */ PIK_HashPragma, @@ -54,7 +54,7 @@ namespace clang { /// pragmas the handler with a null identifier is invoked, if it exists. /// /// Note that the PragmaNamespace class can be used to subdivide pragmas, e.g. -/// we treat "#pragma STDC" and "#pragma GCC" as namespaces that contain other +/// we treat "\#pragma STDC" and "\#pragma GCC" as namespaces that contain other /// pragmas. class PragmaHandler { std::string Name; @@ -84,8 +84,8 @@ public: /// PragmaNamespace - This PragmaHandler subdivides the namespace of pragmas, /// allowing hierarchical pragmas to be defined. Common examples of namespaces -/// are "#pragma GCC", "#pragma STDC", and "#pragma omp", but any namespaces may -/// be (potentially recursively) defined. +/// are "\#pragma GCC", "\#pragma STDC", and "\#pragma omp", but any namespaces +/// may be (potentially recursively) defined. class PragmaNamespace : public PragmaHandler { /// Handlers - This is a map of the handlers in this namespace with their name /// as key. diff --git a/include/clang/Lex/PreprocessingRecord.h b/include/clang/Lex/PreprocessingRecord.h index 45e3a5d647..fb3e081961 100644 --- a/include/clang/Lex/PreprocessingRecord.h +++ b/include/clang/Lex/PreprocessingRecord.h @@ -59,8 +59,8 @@ namespace clang { /// \brief A macro definition. MacroDefinitionKind, - /// \brief An inclusion directive, such as \c #include, \c - /// #import, or \c #include_next. + /// \brief An inclusion directive, such as \c \#include, \c + /// \#import, or \c \#include_next. InclusionDirectiveKind, /// @} @@ -197,19 +197,19 @@ namespace clang { }; /// \brief Record the location of an inclusion directive, such as an - /// \c #include or \c #import statement. + /// \c \#include or \c \#import statement. class InclusionDirective : public PreprocessingDirective { public: /// \brief The kind of inclusion directives known to the /// preprocessor. enum InclusionKind { - /// \brief An \c #include directive. + /// \brief An \c \#include directive. Include, - /// \brief An Objective-C \c #import directive. + /// \brief An Objective-C \c \#import directive. Import, - /// \brief A GNU \c #include_next directive. + /// \brief A GNU \c \#include_next directive. IncludeNext, - /// \brief A Clang \c #__include_macros directive. + /// \brief A Clang \c \#__include_macros directive. IncludeMacros }; @@ -551,7 +551,7 @@ namespace clang { /// /// Can be used to avoid implicit deserializations of preallocated /// preprocessed entities if we only care about entities of a specific file - /// and not from files #included in the range given at + /// and not from files \#included in the range given at /// \see getPreprocessedEntitiesInRange. bool isEntityInFileID(iterator PPEI, FileID FID); @@ -565,7 +565,7 @@ namespace clang { } /// \brief Returns true if the given range intersects with a conditional - /// directive. if a #if/#endif block is fully contained within the range, + /// directive. if a \#if/\#endif block is fully contained within the range, /// this function will return false. bool rangeIntersectsConditionalDirective(SourceRange Range) const; diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index 0dd9477e92..7d3d6e1080 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -780,25 +780,24 @@ public: getDiagnostics().setSuppressAllDiagnostics(true); } - /// \brief The location of the currently-active #pragma clang + /// \brief The location of the currently-active \#pragma clang /// arc_cf_code_audited begin. Returns an invalid location if there /// is no such pragma active. SourceLocation getPragmaARCCFCodeAuditedLoc() const { return PragmaARCCFCodeAuditedLoc; } - /// \brief Set the location of the currently-active #pragma clang + /// \brief Set the location of the currently-active \#pragma clang /// arc_cf_code_audited begin. An invalid location ends the pragma. void setPragmaARCCFCodeAuditedLoc(SourceLocation Loc) { PragmaARCCFCodeAuditedLoc = Loc; } - /// \brief Instruct the preprocessor to skip part of the main - /// the main source file. + /// \brief Instruct the preprocessor to skip part of the main source file. /// - /// \brief Bytes The number of bytes in the preamble to skip. + /// \param Bytes The number of bytes in the preamble to skip. /// - /// \brief StartOfLine Whether skipping these bytes puts the lexer at the + /// \param StartOfLine Whether skipping these bytes puts the lexer at the /// start of a line. void setSkipMainFilePreamble(unsigned Bytes, bool StartOfLine) { SkipMainFilePreamble.first = Bytes; diff --git a/include/clang/Lex/PreprocessorLexer.h b/include/clang/Lex/PreprocessorLexer.h index b551cd4310..4e1f459e2d 100644 --- a/include/clang/Lex/PreprocessorLexer.h +++ b/include/clang/Lex/PreprocessorLexer.h @@ -163,7 +163,7 @@ public: const FileEntry *getFileEntry() const; /// \brief Iterator that traverses the current stack of preprocessor - /// conditional directives (#if/#ifdef/#ifndef). + /// conditional directives (\#if/\#ifdef/\#ifndef). typedef SmallVectorImpl::const_iterator conditional_iterator; diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h index 32ffaa92d6..f7c7586065 100644 --- a/include/clang/Sema/CodeCompleteConsumer.h +++ b/include/clang/Sema/CodeCompleteConsumer.h @@ -237,7 +237,7 @@ public: /// This context usually implies that no completions should be added, /// unless they come from an appropriate natural-language dictionary. CCC_NaturalLanguage, - /// \brief Code completion for a selector, as in an @selector expression. + /// \brief Code completion for a selector, as in an \@selector expression. CCC_SelectorName, /// \brief Code completion within a type-qualifier list. CCC_TypeQualifiers, @@ -379,7 +379,7 @@ public: CK_Equal, /// \brief Horizontal whitespace (' '). CK_HorizontalSpace, - /// \brief Verticle whitespace ('\n' or '\r\n', depending on the + /// \brief Vertical whitespace ('\\n' or '\\r\\n', depending on the /// platform). CK_VerticalSpace }; diff --git a/include/clang/Sema/Scope.h b/include/clang/Sema/Scope.h index 48f54179ec..b78556e65a 100644 --- a/include/clang/Sema/Scope.h +++ b/include/clang/Sema/Scope.h @@ -71,7 +71,7 @@ public: FunctionPrototypeScope = 0x100, /// AtCatchScope - This is a scope that corresponds to the Objective-C - /// @catch statement. + /// \@catch statement. AtCatchScope = 0x200, /// ObjCMethodScope - This scope corresponds to an Objective-C method body. @@ -270,7 +270,7 @@ public: return getFlags() & Scope::FunctionPrototypeScope; } - /// isAtCatchScope - Return true if this scope is @catch. + /// isAtCatchScope - Return true if this scope is \@catch. bool isAtCatchScope() const { return getFlags() & Scope::AtCatchScope; } diff --git a/include/clang/Sema/ScopeInfo.h b/include/clang/Sema/ScopeInfo.h index ceaf586694..1aea0364fa 100644 --- a/include/clang/Sema/ScopeInfo.h +++ b/include/clang/Sema/ScopeInfo.h @@ -74,7 +74,7 @@ public: /// ScopeKind Kind; - /// \brief Whether this function contains a VLA, @try, try, C++ + /// \brief Whether this function contains a VLA, \@try, try, C++ /// initializer, or anything else that can't be jumped past. bool HasBranchProtectedScope; diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 7ab9ec60be..433c1e915f 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -222,13 +222,13 @@ public: /// This is used as part of a hack to omit that class from ADL results. DeclarationName VAListTagName; - /// PackContext - Manages the stack for #pragma pack. An alignment + /// PackContext - Manages the stack for \#pragma pack. An alignment /// of 0 indicates default alignment. void *PackContext; // Really a "PragmaPackStack*" - bool MSStructPragmaOn; // True when #pragma ms_struct on + bool MSStructPragmaOn; // True when \#pragma ms_struct on - /// VisContext - Manages the stack for #pragma GCC visibility. + /// VisContext - Manages the stack for \#pragma GCC visibility. void *VisContext; // Really a "PragmaVisStack*" /// ExprNeedsCleanups - True if the current evaluation context @@ -454,12 +454,12 @@ public: }; /// WeakUndeclaredIdentifiers - Identifiers contained in - /// #pragma weak before declared. rare. may alias another + /// \#pragma weak before declared. rare. may alias another /// identifier, declared or undeclared llvm::DenseMap WeakUndeclaredIdentifiers; /// ExtnameUndeclaredIdentifiers - Identifiers contained in - /// #pragma redefine_extname before declared. Used in Solaris system headers + /// \#pragma redefine_extname before declared. Used in Solaris system headers /// to define functions that occur in multiple standards to call the version /// in the currently selected standard. llvm::DenseMap ExtnameUndeclaredIdentifiers; @@ -469,7 +469,7 @@ public: void LoadExternalWeakUndeclaredIdentifiers(); /// WeakTopLevelDecl - Translation-unit scoped declarations generated by - /// #pragma weak during processing of other Decls. + /// \#pragma weak during processing of other Decls. /// I couldn't figure out a clean way to generate these in-line, so /// we store them here and handle separately -- which is a hack. /// It would be best to refactor this. @@ -490,10 +490,10 @@ public: LazyDeclPtr StdBadAlloc; /// \brief The C++ "std::initializer_list" template, which is defined in - /// . + /// \. ClassTemplateDecl *StdInitializerList; - /// \brief The C++ "type_info" declaration, which is defined in . + /// \brief The C++ "type_info" declaration, which is defined in \. RecordDecl *CXXTypeInfoDecl; /// \brief The MSVC "_GUID" struct, which is defined in MSVC header files. @@ -846,7 +846,7 @@ public: /// \brief Retrieve the current lambda expression, if any. sema::LambdaScopeInfo *getCurLambda(); - /// WeakTopLevelDeclDecls - access to #pragma weak-generated Decls + /// WeakTopLevelDeclDecls - access to \#pragma weak-generated Decls SmallVector &WeakTopLevelDecls() { return WeakTopLevelDecl; } //===--------------------------------------------------------------------===// @@ -6237,7 +6237,7 @@ public: POAK_Reset // #pragma options align=reset }; - /// ActOnPragmaOptionsAlign - Called on well formed #pragma options align. + /// ActOnPragmaOptionsAlign - Called on well formed \#pragma options align. void ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc, SourceLocation KindLoc); @@ -6254,7 +6254,7 @@ public: PMSST_ON // #pragms ms_struct on }; - /// ActOnPragmaPack - Called on well formed #pragma pack(...). + /// ActOnPragmaPack - Called on well formed \#pragma pack(...). void ActOnPragmaPack(PragmaPackKind Kind, IdentifierInfo *Name, Expr *Alignment, @@ -6262,15 +6262,15 @@ public: SourceLocation LParenLoc, SourceLocation RParenLoc); - /// ActOnPragmaMSStruct - Called on well formed #pragms ms_struct [on|off]. + /// ActOnPragmaMSStruct - Called on well formed \#pragma ms_struct [on|off]. void ActOnPragmaMSStruct(PragmaMSStructKind Kind); - /// ActOnPragmaUnused - Called on well-formed '#pragma unused'. + /// ActOnPragmaUnused - Called on well-formed '\#pragma unused'. void ActOnPragmaUnused(const Token &Identifier, Scope *curScope, SourceLocation PragmaLoc); - /// ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... . + /// ActOnPragmaVisibility - Called on well formed \#pragma GCC visibility... . void ActOnPragmaVisibility(const IdentifierInfo* VisType, SourceLocation PragmaLoc); @@ -6278,20 +6278,20 @@ public: SourceLocation Loc); void DeclApplyPragmaWeak(Scope *S, NamedDecl *ND, WeakInfo &W); - /// ActOnPragmaWeakID - Called on well formed #pragma weak ident. + /// ActOnPragmaWeakID - Called on well formed \#pragma weak ident. void ActOnPragmaWeakID(IdentifierInfo* WeakName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc); /// ActOnPragmaRedefineExtname - Called on well formed - /// #pragma redefine_extname oldname newname. + /// \#pragma redefine_extname oldname newname. void ActOnPragmaRedefineExtname(IdentifierInfo* WeakName, IdentifierInfo* AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc); - /// ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident. + /// ActOnPragmaWeakAlias - Called on well formed \#pragma weak ident = ident. void ActOnPragmaWeakAlias(IdentifierInfo* WeakName, IdentifierInfo* AliasName, SourceLocation PragmaLoc, @@ -6299,11 +6299,11 @@ public: SourceLocation AliasNameLoc); /// ActOnPragmaFPContract - Called on well formed - /// #pragma {STDC,OPENCL} FP_CONTRACT + /// \#pragma {STDC,OPENCL} FP_CONTRACT void ActOnPragmaFPContract(tok::OnOffSwitch OOS); /// AddAlignmentAttributesForRecord - Adds any needed alignment attributes to - /// a the record decl, to handle '#pragma pack' and '#pragma options align'. + /// a the record decl, to handle '\#pragma pack' and '\#pragma options align'. void AddAlignmentAttributesForRecord(RecordDecl *RD); /// AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record. @@ -6317,19 +6317,19 @@ public: void PushNamespaceVisibilityAttr(const VisibilityAttr *Attr, SourceLocation Loc); - /// AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, + /// AddPushedVisibilityAttribute - If '\#pragma GCC visibility' was used, /// add an appropriate visibility attribute. void AddPushedVisibilityAttribute(Decl *RD); /// PopPragmaVisibility - Pop the top element of the visibility stack; used - /// for '#pragma GCC visibility' and visibility attributes on namespaces. + /// for '\#pragma GCC visibility' and visibility attributes on namespaces. void PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc); /// FreeVisContext - Deallocate and null out VisContext. void FreeVisContext(); /// AddCFAuditedAttribute - Check whether we're currently within - /// '#pragma clang arc_cf_code_audited' and, if so, consider adding + /// '\#pragma clang arc_cf_code_audited' and, if so, consider adding /// the appropriate attribute. void AddCFAuditedAttribute(Decl *D); diff --git a/include/clang/Sema/Weak.h b/include/clang/Sema/Weak.h index d36b970893..6d1b64bd30 100644 --- a/include/clang/Sema/Weak.h +++ b/include/clang/Sema/Weak.h @@ -21,7 +21,7 @@ namespace clang { class IdentifierInfo; -/// \brief Captures information about a #pragma weak directive. +/// \brief Captures information about a \#pragma weak directive. class WeakInfo { IdentifierInfo *alias; // alias (optional) SourceLocation loc; // for diagnostics diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h index ec6775e94f..be13e3c7cb 100644 --- a/include/clang/Serialization/ASTBitCodes.h +++ b/include/clang/Serialization/ASTBitCodes.h @@ -500,8 +500,8 @@ namespace clang { PP_MACRO_OBJECT_LIKE = 1, /// \brief A function-like macro definition. - /// [PP_MACRO_FUNCTION_LIKE, , IsC99Varargs, IsGNUVarars, - /// NumArgs, ArgIdentInfoID* ] + /// [PP_MACRO_FUNCTION_LIKE, \, IsC99Varargs, + /// IsGNUVarars, NumArgs, ArgIdentInfoID* ] PP_MACRO_FUNCTION_LIKE = 2, /// \brief Describes one token. diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index e3ae237bec..e5935117a9 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -292,8 +292,8 @@ private: protected: /// Function used for throwing Objective-C exceptions. LazyRuntimeFunction ExceptionThrowFn; - /// Function used for rethrowing exceptions, used at the end of @finally or - /// @synchronize blocks. + /// Function used for rethrowing exceptions, used at the end of \@finally or + /// \@synchronize blocks. LazyRuntimeFunction ExceptionReThrowFn; /// Function called when entering a catch function. This is required for /// differentiating Objective-C exceptions and foreign exceptions. @@ -301,9 +301,9 @@ protected: /// Function called when exiting from a catch block. Used to do exception /// cleanup. LazyRuntimeFunction ExitCatchFn; - /// Function called when entering an @synchronize block. Acquires the lock. + /// Function called when entering an \@synchronize block. Acquires the lock. LazyRuntimeFunction SyncEnterFn; - /// Function called when exiting an @synchronize block. Releases the lock. + /// Function called when exiting an \@synchronize block. Releases the lock. LazyRuntimeFunction SyncExitFn; private: @@ -350,7 +350,7 @@ private: ArrayRef MethodSels, ArrayRef MethodTypes, bool isClassMethodList); - /// Emits an empty protocol. This is used for @protocol() where no protocol + /// Emits an empty protocol. This is used for \@protocol() where no protocol /// is found. The runtime will (hopefully) fix up the pointer to refer to the /// real protocol. llvm::Constant *GenerateEmptyProtocol(const std::string &ProtocolName); diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index 3d9d1311c3..7030541cc2 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/lib/Frontend/InitPreprocessor.cpp @@ -49,7 +49,7 @@ static void DefineBuiltinMacro(MacroBuilder &Builder, StringRef Macro, } } -/// AddImplicitInclude - Add an implicit #include of the specified file to the +/// AddImplicitInclude - Add an implicit \#include of the specified file to the /// predefines buffer. static void AddImplicitInclude(MacroBuilder &Builder, StringRef File, FileManager &FileMgr) { @@ -66,8 +66,8 @@ static void AddImplicitIncludeMacros(MacroBuilder &Builder, Builder.append("##"); // ##? } -/// AddImplicitIncludePTH - Add an implicit #include using the original file -/// used to generate a PTH cache. +/// AddImplicitIncludePTH - Add an implicit \#include using the original file +/// used to generate a PTH cache. static void AddImplicitIncludePTH(MacroBuilder &Builder, Preprocessor &PP, StringRef ImplicitIncludePTH) { PTHManager *P = PP.getPTHManager(); -- 2.40.0