summaryrefslogtreecommitdiffstats
path: root/include/clang/Lex
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2018-05-09 01:00:01 +0000
committerAdrian Prantl <aprantl@apple.com>2018-05-09 01:00:01 +0000
commit647be32c6048e24f90f470c557e850597e5526c3 (patch)
tree2be5c01566ec82e55fd30ceedef970efd887b4a5 /include/clang/Lex
parentc8ad1ab42f269f29bcf6385446e5b728aff7e4ad (diff)
Remove \brief commands from doxygen comments.
This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex')
-rw-r--r--include/clang/Lex/CodeCompletionHandler.h14
-rw-r--r--include/clang/Lex/DirectoryLookup.h12
-rw-r--r--include/clang/Lex/ExternalPreprocessorSource.h10
-rw-r--r--include/clang/Lex/HeaderSearch.h166
-rw-r--r--include/clang/Lex/HeaderSearchOptions.h28
-rw-r--r--include/clang/Lex/Lexer.h38
-rw-r--r--include/clang/Lex/LiteralSupport.h4
-rw-r--r--include/clang/Lex/MacroInfo.h118
-rw-r--r--include/clang/Lex/ModuleLoader.h20
-rw-r--r--include/clang/Lex/ModuleMap.h144
-rw-r--r--include/clang/Lex/MultipleIncludeOpt.h14
-rw-r--r--include/clang/Lex/PPCallbacks.h90
-rw-r--r--include/clang/Lex/PPConditionalDirectiveRecord.h10
-rw-r--r--include/clang/Lex/Pragma.h8
-rw-r--r--include/clang/Lex/PreprocessingRecord.h154
-rw-r--r--include/clang/Lex/Preprocessor.h354
-rw-r--r--include/clang/Lex/PreprocessorLexer.h30
-rw-r--r--include/clang/Lex/PreprocessorOptions.h40
-rw-r--r--include/clang/Lex/Token.h46
-rw-r--r--include/clang/Lex/TokenLexer.h12
-rw-r--r--include/clang/Lex/VariadicMacroSupport.h4
21 files changed, 658 insertions, 658 deletions
diff --git a/include/clang/Lex/CodeCompletionHandler.h b/include/clang/Lex/CodeCompletionHandler.h
index 91c3b7811f..be153cc1ad 100644
--- a/include/clang/Lex/CodeCompletionHandler.h
+++ b/include/clang/Lex/CodeCompletionHandler.h
@@ -19,13 +19,13 @@ namespace clang {
class IdentifierInfo;
class MacroInfo;
-/// \brief Callback handler that receives notifications when performing code
+/// Callback handler that receives notifications when performing code
/// completion within the preprocessor.
class CodeCompletionHandler {
public:
virtual ~CodeCompletionHandler();
- /// \brief Callback invoked when performing code completion for a preprocessor
+ /// Callback invoked when performing code completion for a preprocessor
/// directive.
///
/// This callback will be invoked when the preprocessor processes a '#' at the
@@ -35,22 +35,22 @@ public:
/// already.
virtual void CodeCompleteDirective(bool InConditional) { }
- /// \brief Callback invoked when performing code completion within a block of
+ /// Callback invoked when performing code completion within a block of
/// code that was excluded due to preprocessor conditionals.
virtual void CodeCompleteInConditionalExclusion() { }
- /// \brief Callback invoked when performing code completion in a context
+ /// Callback invoked when performing code completion in a context
/// where the name of a macro is expected.
///
/// \param IsDefinition Whether this is the definition of a macro, e.g.,
/// in a \#define.
virtual void CodeCompleteMacroName(bool IsDefinition) { }
- /// \brief Callback invoked when performing code completion in a preprocessor
+ /// Callback invoked when performing code completion in a preprocessor
/// expression, such as the condition of an \#if or \#elif directive.
virtual void CodeCompletePreprocessorExpression() { }
- /// \brief Callback invoked when performing code completion inside a
+ /// Callback invoked when performing code completion inside a
/// function-like macro argument.
///
/// There will be another callback invocation after the macro arguments are
@@ -60,7 +60,7 @@ public:
MacroInfo *MacroInfo,
unsigned ArgumentIndex) { }
- /// \brief Callback invoked when performing code completion in a part of the
+ /// 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.
virtual void CodeCompleteNaturalLanguage() { }
diff --git a/include/clang/Lex/DirectoryLookup.h b/include/clang/Lex/DirectoryLookup.h
index dcd58f434f..222ebf025a 100644
--- a/include/clang/Lex/DirectoryLookup.h
+++ b/include/clang/Lex/DirectoryLookup.h
@@ -55,10 +55,10 @@ private:
/// normal directory, a framework, or a headermap.
unsigned LookupType : 2;
- /// \brief Whether this is a header map used when building a framework.
+ /// Whether this is a header map used when building a framework.
unsigned IsIndexHeaderMap : 1;
- /// \brief Whether we've performed an exhaustive search for module maps
+ /// Whether we've performed an exhaustive search for module maps
/// within the subdirectories of this directory.
unsigned SearchedAllModuleMaps : 1;
@@ -118,11 +118,11 @@ public:
/// isHeaderMap - Return true if this is a header map, not a normal directory.
bool isHeaderMap() const { return getLookupType() == LT_HeaderMap; }
- /// \brief Determine whether we have already searched this entire
+ /// Determine whether we have already searched this entire
/// directory for module maps.
bool haveSearchedAllModuleMaps() const { return SearchedAllModuleMaps; }
- /// \brief Specify whether we have already searched all of the subdirectories
+ /// Specify whether we have already searched all of the subdirectories
/// for module maps.
void setSearchedAllModuleMaps(bool SAMM) {
SearchedAllModuleMaps = SAMM;
@@ -134,12 +134,12 @@ public:
return (SrcMgr::CharacteristicKind)DirCharacteristic;
}
- /// \brief Whether this describes a system header directory.
+ /// Whether this describes a system header directory.
bool isSystemHeaderDirectory() const {
return getDirCharacteristic() != SrcMgr::C_User;
}
- /// \brief Whether this header map is building a framework or not.
+ /// Whether this header map is building a framework or not.
bool isIndexHeaderMap() const {
return isHeaderMap() && IsIndexHeaderMap;
}
diff --git a/include/clang/Lex/ExternalPreprocessorSource.h b/include/clang/Lex/ExternalPreprocessorSource.h
index adf8e713e9..f34be68261 100644
--- a/include/clang/Lex/ExternalPreprocessorSource.h
+++ b/include/clang/Lex/ExternalPreprocessorSource.h
@@ -19,7 +19,7 @@ namespace clang {
class IdentifierInfo;
class Module;
-/// \brief Abstract interface for external sources of preprocessor
+/// Abstract interface for external sources of preprocessor
/// information.
///
/// This abstract class allows an external sources (such as the \c ASTReader)
@@ -28,18 +28,18 @@ class ExternalPreprocessorSource {
public:
virtual ~ExternalPreprocessorSource();
- /// \brief Read the set of macros defined by this external macro source.
+ /// Read the set of macros defined by this external macro source.
virtual void ReadDefinedMacros() = 0;
- /// \brief Update an out-of-date identifier.
+ /// Update an out-of-date identifier.
virtual void updateOutOfDateIdentifier(IdentifierInfo &II) = 0;
- /// \brief Return the identifier associated with the given ID number.
+ /// Return the identifier associated with the given ID number.
///
/// The ID 0 is associated with the NULL identifier.
virtual IdentifierInfo *GetIdentifier(unsigned ID) = 0;
- /// \brief Map a module ID to a module.
+ /// Map a module ID to a module.
virtual Module *getModule(unsigned ModuleID) = 0;
};
diff --git a/include/clang/Lex/HeaderSearch.h b/include/clang/Lex/HeaderSearch.h
index 6ba9c66fc3..3d13162da7 100644
--- a/include/clang/Lex/HeaderSearch.h
+++ b/include/clang/Lex/HeaderSearch.h
@@ -46,13 +46,13 @@ class Module;
class Preprocessor;
class TargetInfo;
-/// \brief The preprocessor keeps track of this information for each
+/// The preprocessor keeps track of this information for each
/// file that is \#included.
struct HeaderFileInfo {
- /// \brief True if this is a \#import'd or \#pragma once file.
+ /// True if this is a \#import'd or \#pragma once file.
unsigned isImport : 1;
- /// \brief True if this is a \#pragma once file.
+ /// True if this is a \#pragma once file.
unsigned isPragmaOnce : 1;
/// DirInfo - Keep track of whether this is a system header, and if so,
@@ -61,21 +61,21 @@ struct HeaderFileInfo {
/// SrcMgr::CharacteristicKind.
unsigned DirInfo : 3;
- /// \brief Whether this header file info was supplied by an external source,
+ /// Whether this header file info was supplied by an external source,
/// and has not changed since.
unsigned External : 1;
- /// \brief Whether this header is part of a module.
+ /// Whether this header is part of a module.
unsigned isModuleHeader : 1;
- /// \brief Whether this header is part of the module that we are building.
+ /// Whether this header is part of the module that we are building.
unsigned isCompilingModuleHeader : 1;
- /// \brief Whether this structure is considered to already have been
+ /// Whether this structure is considered to already have been
/// "resolved", meaning that it was loaded from the external source.
unsigned Resolved : 1;
- /// \brief Whether this is a header inside a framework that is currently
+ /// Whether this is a header inside a framework that is currently
/// being built.
///
/// When a framework is being built, the headers have not yet been placed
@@ -84,13 +84,13 @@ struct HeaderFileInfo {
/// those framework headers.
unsigned IndexHeaderMapHeader : 1;
- /// \brief Whether this file has been looked up as a header.
+ /// Whether this file has been looked up as a header.
unsigned IsValid : 1;
- /// \brief The number of times the file has been included already.
+ /// The number of times the file has been included already.
unsigned short NumIncludes = 0;
- /// \brief The ID number of the controlling macro.
+ /// The ID number of the controlling macro.
///
/// This ID number will be non-zero when there is a controlling
/// macro whose IdentifierInfo may not yet have been loaded from
@@ -107,7 +107,7 @@ struct HeaderFileInfo {
/// external storage.
const IdentifierInfo *ControllingMacro = nullptr;
- /// \brief If this header came from a framework include, this is the name
+ /// If this header came from a framework include, this is the name
/// of the framework.
StringRef Framework;
@@ -116,12 +116,12 @@ struct HeaderFileInfo {
External(false), isModuleHeader(false), isCompilingModuleHeader(false),
Resolved(false), IndexHeaderMapHeader(false), IsValid(false) {}
- /// \brief Retrieve the controlling macro for this header file, if
+ /// Retrieve the controlling macro for this header file, if
/// any.
const IdentifierInfo *
getControllingMacro(ExternalPreprocessorSource *External);
- /// \brief Determine whether this is a non-default header file info, e.g.,
+ /// Determine whether this is a non-default header file info, e.g.,
/// it corresponds to an actual header we've included or tried to include.
bool isNonDefault() const {
return isImport || isPragmaOnce || NumIncludes || ControllingMacro ||
@@ -129,13 +129,13 @@ struct HeaderFileInfo {
}
};
-/// \brief An external source of header file information, which may supply
+/// An external source of header file information, which may supply
/// information about header files already included.
class ExternalHeaderFileInfoSource {
public:
virtual ~ExternalHeaderFileInfoSource();
- /// \brief Retrieve the header file information for the given file entry.
+ /// Retrieve the header file information for the given file entry.
///
/// \returns Header file information for the given file entry, with the
/// \c External bit set. If the file entry is not known, return a
@@ -143,7 +143,7 @@ public:
virtual HeaderFileInfo GetHeaderFileInfo(const FileEntry *FE) = 0;
};
-/// \brief Encapsulates the information needed to find the file referenced
+/// Encapsulates the information needed to find the file referenced
/// by a \#include or \#include_next, (sub-)framework lookup, etc.
class HeaderSearch {
friend class DirectoryLookup;
@@ -159,7 +159,7 @@ class HeaderSearch {
bool IsUserSpecifiedSystemFramework;
};
- /// \brief Header-search options used to initialize this header search.
+ /// Header-search options used to initialize this header search.
std::shared_ptr<HeaderSearchOptions> HSOpts;
DiagnosticsEngine &Diags;
@@ -176,7 +176,7 @@ class HeaderSearch {
unsigned SystemDirIdx = 0;
bool NoCurDirSearch = false;
- /// \brief \#include prefixes for which the 'system header' property is
+ /// \#include prefixes for which the 'system header' property is
/// overridden.
///
/// For a \#include "x" or \#include \<x> directive, the last string in this
@@ -184,10 +184,10 @@ class HeaderSearch {
/// a system header.
std::vector<std::pair<std::string, bool>> SystemHeaderPrefixes;
- /// \brief The path to the module cache.
+ /// The path to the module cache.
std::string ModuleCachePath;
- /// \brief All of the preprocessor-specific data about files that are
+ /// All of the preprocessor-specific data about files that are
/// included, indexed by the FileEntry's UID.
mutable std::vector<HeaderFileInfo> FileInfo;
@@ -215,7 +215,7 @@ class HeaderSearch {
};
llvm::StringMap<LookupFileCacheInfo, llvm::BumpPtrAllocator> LookupFileCache;
- /// \brief Collection mapping a framework or subframework
+ /// Collection mapping a framework or subframework
/// name like "Carbon" to the Carbon.framework directory.
llvm::StringMap<FrameworkCacheEntry, llvm::BumpPtrAllocator> FrameworkMap;
@@ -230,26 +230,26 @@ class HeaderSearch {
/// headermaps. This vector owns the headermap.
std::vector<std::pair<const FileEntry *, const HeaderMap *>> HeaderMaps;
- /// \brief The mapping between modules and headers.
+ /// The mapping between modules and headers.
mutable ModuleMap ModMap;
- /// \brief Describes whether a given directory has a module map in it.
+ /// Describes whether a given directory has a module map in it.
llvm::DenseMap<const DirectoryEntry *, bool> DirectoryHasModuleMap;
- /// \brief Set of module map files we've already loaded, and a flag indicating
+ /// Set of module map files we've already loaded, and a flag indicating
/// whether they were valid or not.
llvm::DenseMap<const FileEntry *, bool> LoadedModuleMaps;
- /// \brief Uniqued set of framework names, which is used to track which
+ /// Uniqued set of framework names, which is used to track which
/// headers were included as framework headers.
llvm::StringSet<llvm::BumpPtrAllocator> FrameworkNames;
- /// \brief Entity used to resolve the identifier IDs of controlling
+ /// Entity used to resolve the identifier IDs of controlling
/// macros into IdentifierInfo pointers, and keep the identifire up to date,
/// as needed.
ExternalPreprocessorSource *ExternalLookup = nullptr;
- /// \brief Entity used to look up stored header file information.
+ /// Entity used to look up stored header file information.
ExternalHeaderFileInfoSource *ExternalSource = nullptr;
// Various statistics we track for performance analysis.
@@ -266,13 +266,13 @@ public:
HeaderSearch &operator=(const HeaderSearch &) = delete;
~HeaderSearch();
- /// \brief Retrieve the header-search options with which this header search
+ /// Retrieve the header-search options with which this header search
/// was initialized.
HeaderSearchOptions &getHeaderSearchOpts() const { return *HSOpts; }
FileManager &getFileMgr() const { return FileMgr; }
- /// \brief Interface for setting the file search paths.
+ /// Interface for setting the file search paths.
void SetSearchPaths(const std::vector<DirectoryLookup> &dirs,
unsigned angledDirIdx, unsigned systemDirIdx,
bool noCurDirSearch) {
@@ -285,7 +285,7 @@ public:
//LookupFileCache.clear();
}
- /// \brief Add an additional search path.
+ /// Add an additional search path.
void AddSearchPath(const DirectoryLookup &dir, bool isAngled) {
unsigned idx = isAngled ? SystemDirIdx : AngledDirIdx;
SearchDirs.insert(SearchDirs.begin() + idx, dir);
@@ -294,15 +294,15 @@ public:
SystemDirIdx++;
}
- /// \brief Set the list of system header prefixes.
+ /// Set the list of system header prefixes.
void SetSystemHeaderPrefixes(ArrayRef<std::pair<std::string, bool>> P) {
SystemHeaderPrefixes.assign(P.begin(), P.end());
}
- /// \brief Checks whether the map exists or not.
+ /// Checks whether the map exists or not.
bool HasIncludeAliasMap() const { return (bool)IncludeAliases; }
- /// \brief Map the source include name to the dest include name.
+ /// Map the source include name to the dest include name.
///
/// The Source should include the angle brackets or quotes, the dest
/// should not. This allows for distinction between <> and "" headers.
@@ -326,20 +326,20 @@ public:
return {};
}
- /// \brief Set the path to the module cache.
+ /// Set the path to the module cache.
void setModuleCachePath(StringRef CachePath) {
ModuleCachePath = CachePath;
}
- /// \brief Retrieve the path to the module cache.
+ /// Retrieve the path to the module cache.
StringRef getModuleCachePath() const { return ModuleCachePath; }
- /// \brief Consider modules when including files from this directory.
+ /// Consider modules when including files from this directory.
void setDirectoryHasModuleMap(const DirectoryEntry* Dir) {
DirectoryHasModuleMap[Dir] = true;
}
- /// \brief Forget everything we know about headers so far.
+ /// Forget everything we know about headers so far.
void ClearFileInfo() {
FileInfo.clear();
}
@@ -352,16 +352,16 @@ public:
return ExternalLookup;
}
- /// \brief Set the external source of header information.
+ /// Set the external source of header information.
void SetExternalSource(ExternalHeaderFileInfoSource *ES) {
ExternalSource = ES;
}
- /// \brief Set the target information for the header search, if not
+ /// Set the target information for the header search, if not
/// already known.
void setTarget(const TargetInfo &Target);
- /// \brief Given a "foo" or \<foo> reference, look up the indicated file,
+ /// Given a "foo" or \<foo> reference, look up the indicated file,
/// return null on failure.
///
/// \returns If successful, this returns 'UsedDir', the DirectoryLookup member
@@ -399,7 +399,7 @@ public:
Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule,
bool *IsMapped, bool SkipCache = false, bool BuildSystemModule = false);
- /// \brief Look up a subframework for the specified \#include file.
+ /// Look up a subframework for the specified \#include file.
///
/// For example, if \#include'ing <HIToolbox/HIToolbox.h> from
/// within ".../Carbon.framework/Headers/Carbon.h", check to see if
@@ -410,13 +410,13 @@ public:
SmallVectorImpl<char> *SearchPath, SmallVectorImpl<char> *RelativePath,
Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule);
- /// \brief Look up the specified framework name in our framework cache.
+ /// Look up the specified framework name in our framework cache.
/// \returns The DirectoryEntry it is in if we know, null otherwise.
FrameworkCacheEntry &LookupFrameworkCache(StringRef FWName) {
return FrameworkMap[FWName];
}
- /// \brief Mark the specified file as a target of a \#include,
+ /// Mark the specified file as a target of a \#include,
/// \#include_next, or \#import directive.
///
/// \return false if \#including the file will have no effect or true
@@ -425,13 +425,13 @@ public:
bool isImport, bool ModulesEnabled,
Module *CorrespondingModule);
- /// \brief Return whether the specified file is a normal header,
+ /// Return whether the specified file is a normal header,
/// a system header, or a C++ friendly system header.
SrcMgr::CharacteristicKind getFileDirFlavor(const FileEntry *File) {
return (SrcMgr::CharacteristicKind)getFileInfo(File).DirInfo;
}
- /// \brief Mark the specified file as a "once only" file, e.g. due to
+ /// Mark the specified file as a "once only" file, e.g. due to
/// \#pragma once.
void MarkFileIncludeOnce(const FileEntry *File) {
HeaderFileInfo &FI = getFileInfo(File);
@@ -439,24 +439,24 @@ public:
FI.isPragmaOnce = true;
}
- /// \brief Mark the specified file as a system header, e.g. due to
+ /// Mark the specified file as a system header, e.g. due to
/// \#pragma GCC system_header.
void MarkFileSystemHeader(const FileEntry *File) {
getFileInfo(File).DirInfo = SrcMgr::C_System;
}
- /// \brief Mark the specified file as part of a module.
+ /// Mark the specified file as part of a module.
void MarkFileModuleHeader(const FileEntry *File,
ModuleMap::ModuleHeaderRole Role,
bool IsCompiledModuleHeader);
- /// \brief Increment the count for the number of times the specified
+ /// Increment the count for the number of times the specified
/// FileEntry has been entered.
void IncrementIncludeCount(const FileEntry *File) {
++getFileInfo(File).NumIncludes;
}
- /// \brief Mark the specified file as having a controlling macro.
+ /// Mark the specified file as having a controlling macro.
///
/// This is used by the multiple-include optimization to eliminate
/// no-op \#includes.
@@ -465,12 +465,12 @@ public:
getFileInfo(File).ControllingMacro = ControllingMacro;
}
- /// \brief Return true if this is the first time encountering this header.
+ /// Return true if this is the first time encountering this header.
bool FirstTimeLexingFile(const FileEntry *File) {
return getFileInfo(File).NumIncludes == 1;
}
- /// \brief Determine whether this file is intended to be safe from
+ /// Determine whether this file is intended to be safe from
/// multiple inclusions, e.g., it has \#pragma once or a controlling
/// macro.
///
@@ -481,10 +481,10 @@ public:
/// FileEntry, uniquing them through the 'HeaderMaps' datastructure.
const HeaderMap *CreateHeaderMap(const FileEntry *FE);
- /// \brief Get filenames for all registered header maps.
+ /// Get filenames for all registered header maps.
void getHeaderMapFileNames(SmallVectorImpl<std::string> &Names) const;
- /// \brief Retrieve the name of the cached module file that should be used
+ /// Retrieve the name of the cached module file that should be used
/// to load the given module.
///
/// \param Module The module whose module file name will be returned.
@@ -493,7 +493,7 @@ public:
/// or an empty string if this module does not correspond to any module file.
std::string getCachedModuleFileName(Module *Module);
- /// \brief Retrieve the name of the prebuilt module file that should be used
+ /// Retrieve the name of the prebuilt module file that should be used
/// to load a module with the given name.
///
/// \param ModuleName The module whose module file name will be returned.
@@ -506,7 +506,7 @@ public:
std::string getPrebuiltModuleFileName(StringRef ModuleName,
bool FileMapOnly = false);
- /// \brief Retrieve the name of the (to-be-)cached module file that should
+ /// Retrieve the name of the (to-be-)cached module file that should
/// be used to load a module with the given name.
///
/// \param ModuleName The module whose module file name will be returned.
@@ -519,7 +519,7 @@ public:
std::string getCachedModuleFileName(StringRef ModuleName,
StringRef ModuleMapPath);
- /// \brief Lookup a module Search for a module with the given name.
+ /// Lookup a module Search for a module with the given name.
///
/// \param ModuleName The name of the module we're looking for.
///
@@ -530,14 +530,14 @@ public:
/// \returns The module with the given name.
Module *lookupModule(StringRef ModuleName, bool AllowSearch = true);
- /// \brief Try to find a module map file in the given directory, returning
+ /// Try to find a module map file in the given directory, returning
/// \c nullptr if none is found.
const FileEntry *lookupModuleMapFile(const DirectoryEntry *Dir,
bool IsFramework);
void IncrementFrameworkLookupCount() { ++NumFrameworkLookups; }
- /// \brief Determine whether there is a module map that may map the header
+ /// Determine whether there is a module map that may map the header
/// with the given file name to a (sub)module.
/// Always returns false if modules are disabled.
///
@@ -551,14 +551,14 @@ public:
bool hasModuleMap(StringRef Filename, const DirectoryEntry *Root,
bool IsSystem);
- /// \brief Retrieve the module that corresponds to the given file, if any.
+ /// Retrieve the module that corresponds to the given file, if any.
///
/// \param File The header that we wish to map to a module.
/// \param AllowTextual Whether we want to find textual headers too.
ModuleMap::KnownHeader findModuleForHeader(const FileEntry *File,
bool AllowTextual = false) const;
- /// \brief Read the contents of the given module map file.
+ /// Read the contents of the given module map file.
///
/// \param File The module map file.
/// \param IsSystem Whether this file is in a system header directory.
@@ -575,16 +575,16 @@ public:
FileID ID = FileID(), unsigned *Offset = nullptr,
StringRef OriginalModuleMapFile = StringRef());
- /// \brief Collect the set of all known, top-level modules.
+ /// Collect the set of all known, top-level modules.
///
/// \param Modules Will be filled with the set of known, top-level modules.
void collectAllModules(SmallVectorImpl<Module *> &Modules);
- /// \brief Load all known, top-level system modules.
+ /// Load all known, top-level system modules.
void loadTopLevelSystemModules();
private:
- /// \brief Lookup a module with the given module name and search-name.
+ /// Lookup a module with the given module name and search-name.
///
/// \param ModuleName The name of the module we're looking for.
///
@@ -596,7 +596,7 @@ private:
/// \returns The module named ModuleName.
Module *lookupModule(StringRef ModuleName, StringRef SearchName);
- /// \brief Retrieve a module with the given name, which may be part of the
+ /// Retrieve a module with the given name, which may be part of the
/// given framework.
///
/// \param Name The name of the module to retrieve.
@@ -611,11 +611,11 @@ private:
const DirectoryEntry *Dir,
bool IsSystem);
- /// \brief Load all of the module maps within the immediate subdirectories
+ /// Load all of the module maps within the immediate subdirectories
/// of the given search directory.
void loadSubdirectoryModuleMaps(DirectoryLookup &SearchDir);
- /// \brief Find and suggest a usable module for the given file.
+ /// Find and suggest a usable module for the given file.
///
/// \return \c true if the file can be used, \c false if we are not permitted to
/// find this file due to requirements from \p RequestingModule.
@@ -625,7 +625,7 @@ private:
ModuleMap::KnownHeader *SuggestedModule,
bool IsSystemHeaderDir);
- /// \brief Find and suggest a usable module for the given file, which is part of
+ /// Find and suggest a usable module for the given file, which is part of
/// the specified framework.
///
/// \return \c true if the file can be used, \c false if we are not permitted to
@@ -634,7 +634,7 @@ private:
const FileEntry *File, StringRef FrameworkDir, Module *RequestingModule,
ModuleMap::KnownHeader *SuggestedModule, bool IsSystemFramework);
- /// \brief Look up the file with the specified name and determine its owning
+ /// Look up the file with the specified name and determine its owning
/// module.
const FileEntry *
getFileAndSuggestModule(StringRef FileName, SourceLocation IncludeLoc,
@@ -643,19 +643,19 @@ private:
ModuleMap::KnownHeader *SuggestedModule);
public:
- /// \brief Retrieve the module map.
+ /// Retrieve the module map.
ModuleMap &getModuleMap() { return ModMap; }
- /// \brief Retrieve the module map.
+ /// Retrieve the module map.
const ModuleMap &getModuleMap() const { return ModMap; }
unsigned header_file_size() const { return FileInfo.size(); }
- /// \brief Return the HeaderFileInfo structure for the specified FileEntry,
+ /// Return the HeaderFileInfo structure for the specified FileEntry,
/// in preparation for updating it in some way.
HeaderFileInfo &getFileInfo(const FileEntry *FE);
- /// \brief Return the HeaderFileInfo structure for the specified FileEntry,
+ /// Return the HeaderFileInfo structure for the specified FileEntry,
/// if it has ever been filled in.
/// \param WantExternal Whether the caller wants purely-external header file
/// info (where \p External is true).
@@ -691,10 +691,10 @@ public:
search_dir_iterator system_dir_end() const { return SearchDirs.end(); }
- /// \brief Retrieve a uniqued framework name.
+ /// Retrieve a uniqued framework name.
StringRef getUniqueFrameworkName(StringRef Framework);
- /// \brief Suggest a path by which the specified file could be found, for
+ /// Suggest a path by which the specified file could be found, for
/// use in diagnostics to suggest a #include.
///
/// \param IsSystem If non-null, filled in to indicate whether the suggested
@@ -702,7 +702,7 @@ public:
std::string suggestPathToFileForDiagnostics(const FileEntry *File,
bool *IsSystem = nullptr);
- /// \brief Suggest a path by which the specified file could be found, for
+ /// Suggest a path by which the specified file could be found, for
/// use in diagnostics to suggest a #include.
///
/// \param WorkingDir If non-empty, this will be prepended to search directory
@@ -716,18 +716,18 @@ public:
size_t getTotalMemory() const;
private:
- /// \brief Describes what happened when we tried to load a module map file.
+ /// Describes what happened when we tried to load a module map file.
enum LoadModuleMapResult {
- /// \brief The module map file had already been loaded.
+ /// The module map file had already been loaded.
LMM_AlreadyLoaded,
- /// \brief The module map file was loaded by this invocation.
+ /// The module map file was loaded by this invocation.
LMM_NewlyLoaded,
- /// \brief There is was directory with the given name.
+ /// There is was directory with the given name.
LMM_NoDirectory,
- /// \brief There was either no module map file or the module map file was
+ /// There was either no module map file or the module map file was
/// invalid.
LMM_InvalidModuleMap
};
@@ -738,7 +738,7 @@ private:
FileID ID = FileID(),
unsigned *Offset = nullptr);
- /// \brief Try to load the module map file in the given directory.
+ /// Try to load the module map file in the given directory.
///
/// \param DirName The name of the directory where we will look for a module
/// map file.
@@ -750,7 +750,7 @@ private:
LoadModuleMapResult loadModuleMapFile(StringRef DirName, bool IsSystem,
bool IsFramework);
- /// \brief Try to load the module map file in the given directory.
+ /// Try to load the module map file in the given directory.
///
/// \param Dir The directory where we will look for a module map file.
/// \param IsSystem Whether this is a system header directory.
diff --git a/include/clang/Lex/HeaderSearchOptions.h b/include/clang/Lex/HeaderSearchOptions.h
index 937ad9863d..298179e91a 100644
--- a/include/clang/Lex/HeaderSearchOptions.h
+++ b/include/clang/Lex/HeaderSearchOptions.h
@@ -108,32 +108,32 @@ public:
/// etc.).
std::string ResourceDir;
- /// \brief The directory used for the module cache.
+ /// The directory used for the module cache.
std::string ModuleCachePath;
- /// \brief The directory used for a user build.
+ /// The directory used for a user build.
std::string ModuleUserBuildPath;
- /// \brief The mapping of module names to prebuilt module files.
+ /// The mapping of module names to prebuilt module files.
std::map<std::string, std::string> PrebuiltModuleFiles;
- /// \brief The directories used to load prebuilt module files.
+ /// The directories used to load prebuilt module files.
std::vector<std::string> PrebuiltModulePaths;
/// The module/pch container format.
std::string ModuleFormat;
- /// \brief Whether we should disable the use of the hash string within the
+ /// Whether we should disable the use of the hash string within the
/// module cache.
///
/// Note: Only used for testing!
unsigned DisableModuleHash : 1;
- /// \brief Implicit module maps. This option is enabld by default when
+ /// Implicit module maps. This option is enabld by default when
/// modules is enabled.
unsigned ImplicitModuleMaps : 1;
- /// \brief Set the 'home directory' of a module map file to the current
+ /// Set the 'home directory' of a module map file to the current
/// working directory (or the home directory of the module map file that
/// contained the 'extern module' directive importing this module map file
/// if any) rather than the directory containing the module map file.
@@ -142,7 +142,7 @@ public:
/// file.
unsigned ModuleMapFileHomeIsCwd : 1;
- /// \brief The interval (in seconds) between pruning operations.
+ /// The interval (in seconds) between pruning operations.
///
/// This operation is expensive, because it requires Clang to walk through
/// the directory structure of the module cache, stat()'ing and removing
@@ -151,7 +151,7 @@ public:
/// The default value is large, e.g., the operation runs once a week.
unsigned ModuleCachePruneInterval = 7 * 24 * 60 * 60;
- /// \brief The time (in seconds) after which an unused module file will be
+ /// The time (in seconds) after which an unused module file will be
/// considered unused and will, therefore, be pruned.
///
/// When the module cache is pruned, any module file that has not been
@@ -160,17 +160,17 @@ public:
/// regenerated often.
unsigned ModuleCachePruneAfter = 31 * 24 * 60 * 60;
- /// \brief The time in seconds when the build session started.
+ /// The time in seconds when the build session started.
///
/// This time is used by other optimizations in header search and module
/// loading.
uint64_t BuildSessionTimestamp = 0;
- /// \brief The set of macro names that should be ignored for the purposes
+ /// The set of macro names that should be ignored for the purposes
/// of computing the module hash.
llvm::SmallSetVector<llvm::CachedHashString, 16> ModulesIgnoreMacros;
- /// \brief The set of user-provided virtual filesystem overlay files.
+ /// The set of user-provided virtual filesystem overlay files.
std::vector<std::string> VFSOverlayFiles;
/// Include the compiler builtin includes.
@@ -188,12 +188,12 @@ public:
/// Whether header search information should be output as for -v.
unsigned Verbose : 1;
- /// \brief If true, skip verifying input files used by modules if the
+ /// If true, skip verifying input files used by modules if the
/// module was already verified during this build session (see
/// \c BuildSessionTimestamp).
unsigned ModulesValidateOncePerBuildSession : 1;
- /// \brief Whether to validate system input files when a module is loaded.
+ /// Whether to validate system input files when a module is loaded.
unsigned ModulesValidateSystemHeaders : 1;
/// Whether the module includes debug information (-gmodules).
diff --git a/include/clang/Lex/Lexer.h b/include/clang/Lex/Lexer.h
index 15ef8300d0..624151ef87 100644
--- a/include/clang/Lex/Lexer.h
+++ b/include/clang/Lex/Lexer.h
@@ -57,10 +57,10 @@ enum ConflictMarkerKind {
/// PreprocessorOptions::PrecompiledPreambleBytes.
/// The preamble includes the BOM, if any.
struct PreambleBounds {
- /// \brief Size of the preamble in bytes.
+ /// Size of the preamble in bytes.
unsigned Size;
- /// \brief Whether the preamble ends at the start of a new line.
+ /// Whether the preamble ends at the start of a new line.
///
/// Used to inform the lexer as to whether it's starting at the beginning of
/// a line after skipping the preamble.
@@ -263,7 +263,7 @@ public:
return getSourceLocation(BufferPtr);
}
- /// \brief Return the current location in the buffer.
+ /// Return the current location in the buffer.
const char *getBufferLocation() const { return BufferPtr; }
/// Stringify - Convert the specified string into a C string by i) escaping
@@ -322,14 +322,14 @@ public:
const SourceManager &SM,
const LangOptions &LangOpts);
- /// \brief Relex the token at the specified location.
+ /// Relex the token at the specified location.
/// \returns true if there was a failure, false on success.
static bool getRawToken(SourceLocation Loc, Token &Result,
const SourceManager &SM,
const LangOptions &LangOpts,
bool IgnoreWhiteSpace = false);
- /// \brief Given a location any where in a source buffer, find the location
+ /// Given a location any where in a source buffer, find the location
/// that corresponds to the beginning of the token in which the original
/// source location lands.
static SourceLocation GetBeginningOfToken(SourceLocation Loc,
@@ -354,7 +354,7 @@ public:
getTokenPrefixLength(TokStart, Characters, SM, LangOpts));
}
- /// \brief Computes the source location just past the end of the
+ /// Computes the source location just past the end of the
/// token at this source location.
///
/// This routine can be used to produce a source location that
@@ -373,7 +373,7 @@ public:
const SourceManager &SM,
const LangOptions &LangOpts);
- /// \brief Given a token range, produce a corresponding CharSourceRange that
+ /// Given a token range, produce a corresponding CharSourceRange that
/// is not a token range. This allows the source range to be used by
/// components that don't have access to the lexer and thus can't find the
/// end of the range for themselves.
@@ -393,7 +393,7 @@ public:
: Range;
}
- /// \brief Returns true if the given MacroID location points at the first
+ /// Returns true if the given MacroID location points at the first
/// token of the macro expansion.
///
/// \param MacroBegin If non-null and function returns true, it is set to
@@ -403,7 +403,7 @@ public:
const LangOptions &LangOpts,
SourceLocation *MacroBegin = nullptr);
- /// \brief Returns true if the given MacroID location points at the last
+ /// Returns true if the given MacroID location points at the last
/// token of the macro expansion.
///
/// \param MacroEnd If non-null and function returns true, it is set to
@@ -413,7 +413,7 @@ public:
const LangOptions &LangOpts,
SourceLocation *MacroEnd = nullptr);
- /// \brief Accepts a range and returns a character range with file locations.
+ /// Accepts a range and returns a character range with file locations.
///
/// Returns a null range if a part of the range resides inside a macro
/// expansion or the range does not reside on the same FileID.
@@ -443,13 +443,13 @@ public:
const SourceManager &SM,
const LangOptions &LangOpts);
- /// \brief Returns a string for the source that the range encompasses.
+ /// Returns a string for the source that the range encompasses.
static StringRef getSourceText(CharSourceRange Range,
const SourceManager &SM,
const LangOptions &LangOpts,
bool *Invalid = nullptr);
- /// \brief Retrieve the name of the immediate macro expansion.
+ /// Retrieve the name of the immediate macro expansion.
///
/// This routine starts from a source location, and finds the name of the macro
/// responsible for its immediate expansion. It looks through any intervening
@@ -460,7 +460,7 @@ public:
const SourceManager &SM,
const LangOptions &LangOpts);
- /// \brief Retrieve the name of the immediate macro expansion.
+ /// Retrieve the name of the immediate macro expansion.
///
/// This routine starts from a source location, and finds the name of the
/// macro responsible for its immediate expansion. It looks through any
@@ -480,7 +480,7 @@ public:
static StringRef getImmediateMacroNameForDiagnostics(
SourceLocation Loc, const SourceManager &SM, const LangOptions &LangOpts);
- /// \brief Compute the preamble of the given file.
+ /// Compute the preamble of the given file.
///
/// The preamble of a file contains the initial comments, include directives,
/// and other preprocessor directives that occur before the code in this
@@ -506,7 +506,7 @@ public:
const SourceManager &SM,
const LangOptions &LangOpts);
- /// \brief Checks that the given token is the first token that occurs after
+ /// Checks that the given token is the first token that occurs after
/// the given location (this excludes comments and whitespace). Returns the
/// location immediately after the specified token. If the token is not found
/// or the location is inside a macro, the returned source location will be
@@ -517,10 +517,10 @@ public:
const LangOptions &LangOpts,
bool SkipTrailingWhitespaceAndNewLine);
- /// \brief Returns true if the given character could appear in an identifier.
+ /// Returns true if the given character could appear in an identifier.
static bool isIdentifierBodyChar(char c, const LangOptions &LangOpts);
- /// \brief Checks whether new line pointed by Str is preceded by escape
+ /// Checks whether new line pointed by Str is preceded by escape
/// sequence.
static bool isNewLineEscaped(const char *BufferStart, const char *Str);
@@ -726,7 +726,7 @@ private:
/// invalid.
uint32_t tryReadUCN(const char *&CurPtr, const char *SlashLoc, Token *Tok);
- /// \brief Try to consume a UCN as part of an identifier at the current
+ /// Try to consume a UCN as part of an identifier at the current
/// location.
/// \param CurPtr Initially points to the range of characters in the source
/// buffer containing the '\'. Updated to point past the end of
@@ -740,7 +740,7 @@ private:
bool tryConsumeIdentifierUCN(const char *&CurPtr, unsigned Size,
Token &Result);
- /// \brief Try to consume an identifier character encoded in UTF-8.
+ /// Try to consume an identifier character encoded in UTF-8.
/// \param CurPtr Points to the start of the (potential) UTF-8 code unit
/// sequence. On success, updated to point past the end of it.
/// \return \c true if a UTF-8 sequence mapping to an acceptable identifier
diff --git a/include/clang/Lex/LiteralSupport.h b/include/clang/Lex/LiteralSupport.h
index cc9223eb7d..4f32fa8e73 100644
--- a/include/clang/Lex/LiteralSupport.h
+++ b/include/clang/Lex/LiteralSupport.h
@@ -112,7 +112,7 @@ private:
static bool isDigitSeparator(char C) { return C == '\''; }
- /// \brief Determine whether the sequence of characters [Start, End) contains
+ /// Determine whether the sequence of characters [Start, End) contains
/// any real digits (not digit separators).
bool containsDigits(const char *Start, const char *End) {
return Start != End && (Start + 1 != End || !isDigitSeparator(Start[0]));
@@ -120,7 +120,7 @@ private:
enum CheckSeparatorKind { CSK_BeforeDigits, CSK_AfterDigits };
- /// \brief Ensure that we don't have a digit separator here.
+ /// Ensure that we don't have a digit separator here.
void checkSeparator(SourceLocation TokLoc, const char *Pos,
CheckSeparatorKind IsAfterDigits);
diff --git a/include/clang/Lex/MacroInfo.h b/include/clang/Lex/MacroInfo.h
index 3029294209..13e5313a9c 100644
--- a/include/clang/Lex/MacroInfo.h
+++ b/include/clang/Lex/MacroInfo.h
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
//
/// \file
-/// \brief Defines the clang::MacroInfo and clang::MacroDirective classes.
+/// Defines the clang::MacroInfo and clang::MacroDirective classes.
//
//===----------------------------------------------------------------------===//
@@ -34,20 +34,20 @@ class Module;
class Preprocessor;
class SourceManager;
-/// \brief Encapsulates the data about a macro definition (e.g. its tokens).
+/// Encapsulates the data about a macro definition (e.g. its tokens).
///
/// There's an instance of this class for every #define.
class MacroInfo {
//===--------------------------------------------------------------------===//
// State set when the macro is defined.
- /// \brief The location the macro is defined.
+ /// The location the macro is defined.
SourceLocation Location;
- /// \brief The location of the last token in the macro.
+ /// The location of the last token in the macro.
SourceLocation EndLocation;
- /// \brief The list of arguments for a function-like macro.
+ /// The list of arguments for a function-like macro.
///
/// ParameterList points to the first of NumParameters pointers.
///
@@ -58,61 +58,61 @@ class MacroInfo {
/// \see ParameterList
unsigned NumParameters = 0;
- /// \brief This is the list of tokens that the macro is defined to.
+ /// This is the list of tokens that the macro is defined to.
SmallVector<Token, 8> ReplacementTokens;
- /// \brief Length in characters of the macro definition.
+ /// Length in characters of the macro definition.
mutable unsigned DefinitionLength;
mutable bool IsDefinitionLengthCached : 1;
- /// \brief True if this macro is function-like, false if it is object-like.
+ /// True if this macro is function-like, false if it is object-like.
bool IsFunctionLike : 1;
- /// \brief True if this macro is of the form "#define X(...)" or
+ /// True if this macro is of the form "#define X(...)" or
/// "#define X(Y,Z,...)".
///
/// The __VA_ARGS__ token should be replaced with the contents of "..." in an
/// invocation.
bool IsC99Varargs : 1;
- /// \brief True if this macro is of the form "#define X(a...)".
+ /// True if this macro is of the form "#define X(a...)".
///
/// The "a" identifier in the replacement list will be replaced with all
/// arguments of the macro starting with the specified one.
bool IsGNUVarargs : 1;
- /// \brief True if this macro requires processing before expansion.
+ /// True if this macro requires processing before expansion.
///
/// This is the case for builtin macros such as __LINE__, so long as they have
/// not been redefined, but not for regular predefined macros from the
/// "<built-in>" memory buffer (see Preprocessing::getPredefinesFileID).
bool IsBuiltinMacro : 1;
- /// \brief Whether this macro contains the sequence ", ## __VA_ARGS__"
+ /// Whether this macro contains the sequence ", ## __VA_ARGS__"
bool HasCommaPasting : 1;
//===--------------------------------------------------------------------===//
// State that changes as the macro is used.
- /// \brief True if we have started an expansion of this macro already.
+ /// True if we have started an expansion of this macro already.
///
/// This disables recursive expansion, which would be quite bad for things
/// like \#define A A.
bool IsDisabled : 1;
- /// \brief True if this macro is either defined in the main file and has
+ /// True if this macro is either defined in the main file and has
/// been used, or if it is not defined in the main file.
///
/// This is used to emit -Wunused-macros diagnostics.
bool IsUsed : 1;
- /// \brief True if this macro can be redefined without emitting a warning.
+ /// True if this macro can be redefined without emitting a warning.
bool IsAllowRedefinitionsWithoutWarning : 1;
- /// \brief Must warn if the macro is unused at the end of translation unit.
+ /// Must warn if the macro is unused at the end of translation unit.
bool IsWarnIfUnused : 1;
- /// \brief Whether this macro was used as header guard.
+ /// Whether this macro was used as header guard.
bool UsedForHeaderGuard : 1;
// Only the Preprocessor gets to create and destroy these.
@@ -120,23 +120,23 @@ class MacroInfo {
~MacroInfo() = default;
public:
- /// \brief Return the location that the macro was defined at.
+ /// Return the location that the macro was defined at.
SourceLocation getDefinitionLoc() const { return Location; }
- /// \brief Set the location of the last token in the macro.
+ /// Set the location of the last token in the macro.
void setDefinitionEndLoc(SourceLocation EndLoc) { EndLocation = EndLoc; }
- /// \brief Return the location of the last token in the macro.
+ /// Return the location of the last token in the macro.
SourceLocation getDefinitionEndLoc() const { return EndLocation; }
- /// \brief Get length in characters of the macro definition.
+ /// Get length in characters of the macro definition.
unsigned getDefinitionLength(const SourceManager &SM) const {
if (IsDefinitionLengthCached)
return DefinitionLength;
return getDefinitionLengthSlow(SM);
}
- /// \brief Return true if the specified macro definition is equal to
+ /// Return true if the specified macro definition is equal to
/// this macro in spelling, arguments, and whitespace.
///
/// \param Syntactically if true, the macro definitions can be identical even
@@ -146,21 +146,21 @@ public:
bool isIdenticalTo(const MacroInfo &Other, Preprocessor &PP,
bool Syntactically) const;
- /// \brief Set or clear the isBuiltinMacro flag.
+ /// Set or clear the isBuiltinMacro flag.
void setIsBuiltinMacro(bool Val = true) { IsBuiltinMacro = Val; }
- /// \brief Set the value of the IsUsed flag.
+ /// Set the value of the IsUsed flag.
void setIsUsed(bool Val) { IsUsed = Val; }
- /// \brief Set the value of the IsAllowRedefinitionsWithoutWarning flag.
+ /// Set the value of the IsAllowRedefinitionsWithoutWarning flag.
void setIsAllowRedefinitionsWithoutWarning(bool Val) {
IsAllowRedefinitionsWithoutWarning = Val;
}
- /// \brief Set the value of the IsWarnIfUnused flag.
+ /// Set the value of the IsWarnIfUnused flag.
void setIsWarnIfUnused(bool val) { IsWarnIfUnused = val; }
- /// \brief Set the specified list of identifiers as the parameter list for
+ /// Set the specified list of identifiers as the parameter list for
/// this macro.
void setParameterList(ArrayRef<IdentifierInfo *> List,
llvm::BumpPtrAllocator &PPAllocator) {
@@ -185,7 +185,7 @@ public:
return ArrayRef<const IdentifierInfo *>(ParameterList, NumParameters);
}
- /// \brief Return the parameter number of the specified identifier,
+ /// Return the parameter number of the specified identifier,
/// or -1 if the identifier is not a formal parameter identifier.
int getParameterNum(const IdentifierInfo *Arg) const {
for (param_iterator I = param_begin(), E = param_end(); I != E; ++I)
@@ -207,7 +207,7 @@ public:
bool isGNUVarargs() const { return IsGNUVarargs; }
bool isVariadic() const { return IsC99Varargs | IsGNUVarargs; }
- /// \brief Return true if this macro requires processing before expansion.
+ /// Return true if this macro requires processing before expansion.
///
/// This is true only for builtin macro, such as \__LINE__, whose values
/// are not given by fixed textual expansions. Regular predefined macros
@@ -218,19 +218,19 @@ public:
bool hasCommaPasting() const { return HasCommaPasting; }
void setHasCommaPasting() { HasCommaPasting = true; }
- /// \brief Return false if this macro is defined in the main file and has
+ /// Return false if this macro is defined in the main file and has
/// not yet been used.
bool isUsed() const { return IsUsed; }
- /// \brief Return true if this macro can be redefined without warning.
+ /// Return true if this macro can be redefined without warning.
bool isAllowRedefinitionsWithoutWarning() const {
return IsAllowRedefinitionsWithoutWarning;
}
- /// \brief Return true if we should emit a warning if the macro is unused.
+ /// Return true if we should emit a warning if the macro is unused.
bool isWarnIfUnused() const { return IsWarnIfUnused; }
- /// \brief Return the number of tokens that this macro expands to.
+ /// Return the number of tokens that this macro expands to.
unsigned getNumTokens() const { return ReplacementTokens.size(); }
const Token &getReplacementToken(unsigned Tok) const {
@@ -245,7 +245,7 @@ public:
bool tokens_empty() const { return ReplacementTokens.empty(); }
ArrayRef<Token> tokens() const { return ReplacementTokens; }
- /// \brief Add the specified token to the replacement text for the macro.
+ /// Add the specified token to the replacement text for the macro.
void AddTokenToBody(const Token &Tok) {
assert(
!IsDefinitionLengthCached &&
@@ -253,7 +253,7 @@ public:
ReplacementTokens.push_back(Tok);
}
- /// \brief Return true if this macro is enabled.
+ /// Return true if this macro is enabled.
///
/// In other words, that we are not currently in an expansion of this macro.
bool isEnabled() const { return !IsDisabled; }
@@ -268,7 +268,7 @@ public:
IsDisabled = true;
}
- /// \brief Determine whether this macro was used for a header guard.
+ /// Determine whether this macro was used for a header guard.
bool isUsedForHeaderGuard() const { return UsedForHeaderGuard; }
void setUsedForHeaderGuard(bool Val) { UsedForHeaderGuard = Val; }
@@ -281,7 +281,7 @@ private:
unsigned getDefinitionLengthSlow(const SourceManager &SM) const;
};
-/// \brief Encapsulates changes to the "macros namespace" (the location where
+/// Encapsulates changes to the "macros namespace" (the location where
/// the macro name became active, the location where it was undefined, etc.).
///
/// MacroDirectives, associated with an identifier, are used to model the macro
@@ -297,20 +297,20 @@ public:
};
protected:
- /// \brief Previous macro directive for the same identifier, or nullptr.
+ /// Previous macro directive for the same identifier, or nullptr.
MacroDirective *Previous = nullptr;
SourceLocation Loc;
- /// \brief MacroDirective kind.
+ /// MacroDirective kind.
unsigned MDKind : 2;
- /// \brief True if the macro directive was loaded from a PCH file.
+ /// True if the macro directive was loaded from a PCH file.
unsigned IsFromPCH : 1;
// Used by VisibilityMacroDirective ----------------------------------------//
- /// \brief Whether the macro has public visibility (when described in a
+ /// Whether the macro has public visibility (when described in a
/// module).
unsigned IsPublic : 1;
@@ -322,16 +322,16 @@ public:
SourceLocation getLocation() const { return Loc; }
- /// \brief Set previous definition of the macro with the same name.
+ /// Set previous definition of the macro with the same name.
void setPrevious(MacroDirective *Prev) { Previous = Prev; }
- /// \brief Get previous definition of the macro with the same name.
+ /// Get previous definition of the macro with the same name.
const MacroDirective *getPrevious() const { return Previous; }
- /// \brief Get previous definition of the macro with the same name.
+ /// Get previous definition of the macro with the same name.
MacroDirective *getPrevious() { return Previous; }
- /// \brief Return true if the macro directive was loaded from a PCH file.
+ /// Return true if the macro directive was loaded from a PCH file.
bool isFromPCH() const { return IsFromPCH; }
void setIsFromPCH() { IsFromPCH = true; }
@@ -374,7 +374,7 @@ public:
}
};
- /// \brief Traverses the macro directives history and returns the next
+ /// Traverses the macro directives history and returns the next
/// macro definition directive along with info about its undefined location
/// (if there is one) and if it is public or private.
DefInfo getDefinition();
@@ -393,7 +393,7 @@ public:
}
MacroInfo *getMacroInfo() { return getDefinition().getMacroInfo(); }
- /// \brief Find macro definition active in the specified source location. If
+ /// Find macro definition active in the specified source location. If
/// this macro was not defined there, return NULL.
const DefInfo findDirectiveAtLoc(SourceLocation L, SourceManager &SM) const;
@@ -402,7 +402,7 @@ public:
static bool classof(const MacroDirective *) { return true; }
};
-/// \brief A directive for a defined macro or a macro imported from a module.
+/// A directive for a defined macro or a macro imported from a module.
class DefMacroDirective : public MacroDirective {
MacroInfo *Info;
@@ -414,7 +414,7 @@ public:
explicit DefMacroDirective(MacroInfo *MI)
: DefMacroDirective(MI, MI->getDefinitionLoc()) {}
- /// \brief The data for the macro definition.
+ /// The data for the macro definition.
const MacroInfo *getInfo() const { return Info; }
MacroInfo *getInfo() { return Info; }
@@ -425,7 +425,7 @@ public:
static bool classof(const DefMacroDirective *) { return true; }
};
-/// \brief A directive for an undefined macro.
+/// A directive for an undefined macro.
class UndefMacroDirective : public MacroDirective {
public:
explicit UndefMacroDirective(SourceLocation UndefLoc)
@@ -440,7 +440,7 @@ public:
static bool classof(const UndefMacroDirective *) { return true; }
};
-/// \brief A directive for setting the module visibility of a macro.
+/// A directive for setting the module visibility of a macro.
class VisibilityMacroDirective : public MacroDirective {
public:
explicit VisibilityMacroDirective(SourceLocation Loc, bool Public)
@@ -448,7 +448,7 @@ public:
IsPublic = Public;
}
- /// \brief Determine whether this macro is part of the public API of its
+ /// Determine whether this macro is part of the public API of its
/// module.
bool isPublic() const { return IsPublic; }
@@ -478,7 +478,7 @@ MacroDirective::DefInfo::getPreviousDefinition() {
return DefDirective->getPrevious()->getDefinition();
}
-/// \brief Represents a macro directive exported by a module.
+/// Represents a macro directive exported by a module.
///
/// There's an instance of this class for every macro #define or #undef that is
/// the final directive for a macro name within a module. These entities also
@@ -557,7 +557,7 @@ public:
unsigned getNumOverridingMacros() const { return NumOverriddenBy; }
};
-/// \brief A description of the current definition of a macro.
+/// A description of the current definition of a macro.
///
/// The definition of a macro comprises a set of (at least one) defining
/// entities, which are either local MacroDirectives or imported ModuleMacros.
@@ -571,12 +571,12 @@ public:
bool IsAmbiguous)
: LatestLocalAndAmbiguous(MD, IsAmbiguous), ModuleMacros(MMs) {}
- /// \brief Determine whether there is a definition of this macro.
+ /// Determine whether there is a definition of this macro.
explicit operator bool() const {
return getLocalDirective() || !ModuleMacros.empty();
}
- /// \brief Get the MacroInfo that should be used for this definition.
+ /// Get the MacroInfo that should be used for this definition.
MacroInfo *getMacroInfo() const {
if (!ModuleMacros.empty())
return ModuleMacros.back()->getMacroInfo();
@@ -585,16 +585,16 @@ public:
return nullptr;
}
- /// \brief \c true if the definition is ambiguous, \c false otherwise.
+ /// \c true if the definition is ambiguous, \c false otherwise.
bool isAmbiguous() const { return LatestLocalAndAmbiguous.getInt(); }
- /// \brief Get the latest non-imported, non-\#undef'd macro definition
+ /// Get the latest non-imported, non-\#undef'd macro definition
/// for this macro.
DefMacroDirective *getLocalDirective() const {
return LatestLocalAndAmbiguous.getPointer();
}
- /// \brief Get the active module macros for this macro.
+ /// Get the active module macros for this macro.
ArrayRef<ModuleMacro *> getModuleMacros() const { return ModuleMacros; }
template <typename Fn> void forAllDefinitions(Fn F) const {
diff --git a/include/clang/Lex/ModuleLoader.h b/include/clang/Lex/ModuleLoader.h
index 30ea583b71..a2766fa359 100644
--- a/include/clang/Lex/ModuleLoader.h
+++ b/include/clang/Lex/ModuleLoader.h
@@ -28,11 +28,11 @@ namespace clang {
class GlobalModuleIndex;
class IdentifierInfo;
-/// \brief A sequence of identifier/location pairs used to describe a particular
+/// A sequence of identifier/location pairs used to describe a particular
/// module or submodule, e.g., std.vector.
using ModuleIdPath = ArrayRef<std::pair<IdentifierInfo *, SourceLocation>>;
-/// \brief Describes the result of attempting to load a module.
+/// Describes the result of attempting to load a module.
class ModuleLoadResult {
public:
enum LoadResultKind {
@@ -55,18 +55,18 @@ public:
operator Module *() const { return Storage.getPointer(); }
- /// \brief Determines whether the module, which failed to load, was
+ /// Determines whether the module, which failed to load, was
/// actually a submodule that we expected to see (based on implying the
/// submodule from header structure), but didn't materialize in the actual
/// module.
bool isMissingExpected() const { return Storage.getInt() == MissingExpected; }
- /// \brief Determines whether the module failed to load due to a configuration
+ /// Determines whether the module failed to load due to a configuration
/// mismatch with an explicitly-named .pcm file from the command line.
bool isConfigMismatch() const { return Storage.getInt() == ConfigMismatch; }
};
-/// \brief Abstract interface for a module loader.
+/// Abstract interface for a module loader.
///
/// This abstract interface describes a module loader, which is responsible
/// for resolving a module name (e.g., "std") to an actual module file, and
@@ -81,17 +81,17 @@ public:
virtual ~ModuleLoader();
- /// \brief Returns true if this instance is building a module.
+ /// Returns true if this instance is building a module.
bool buildingModule() const {
return BuildingModule;
}
- /// \brief Flag indicating whether this instance is building a module.
+ /// Flag indicating whether this instance is building a module.
void setBuildingModule(bool BuildingModuleFlag) {
BuildingModule = BuildingModuleFlag;
}
- /// \brief Attempt to load the given module.
+ /// Attempt to load the given module.
///
/// This routine attempts to load the module described by the given
/// parameters.
@@ -125,12 +125,12 @@ public:
virtual void loadModuleFromSource(SourceLocation Loc, StringRef ModuleName,
StringRef Source) = 0;
- /// \brief Make the given module visible.
+ /// Make the given module visible.
virtual void makeModuleVisible(Module *Mod,
Module::NameVisibilityKind Visibility,
SourceLocation ImportLoc) = 0;
- /// \brief Load, create, or return global module.
+ /// Load, create, or return global module.
/// This function returns an existing global module index, if one
/// had already been loaded or created, or loads one if it
/// exists, or creates one if it doesn't exist.
diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h
index a34f0d845d..406bac5c12 100644
--- a/include/clang/Lex/ModuleMap.h
+++ b/include/clang/Lex/ModuleMap.h
@@ -42,13 +42,13 @@ class FileManager;
class HeaderSearch;
class SourceManager;
-/// \brief A mechanism to observe the actions of the module map parser as it
+/// A mechanism to observe the actions of the module map parser as it
/// reads module map files.
class ModuleMapCallbacks {
public:
virtual ~ModuleMapCallbacks() = default;
- /// \brief Called when a module map file has been read.
+ /// Called when a module map file has been read.
///
/// \param FileStart A SourceLocation referring to the start of the file's
/// contents.
@@ -57,12 +57,12 @@ public:
virtual void moduleMapFileRead(SourceLocation FileStart,
const FileEntry &File, bool IsSystem) {}
- /// \brief Called when a header is added during module map parsing.
+ /// Called when a header is added during module map parsing.
///
/// \param Filename The header file itself.
virtual void moduleMapAddHeader(StringRef Filename) {}
- /// \brief Called when an umbrella header is added during module map parsing.
+ /// Called when an umbrella header is added during module map parsing.
///
/// \param FileMgr FileManager instance
/// \param Header The umbrella header to collect.
@@ -79,11 +79,11 @@ class ModuleMap {
llvm::SmallVector<std::unique_ptr<ModuleMapCallbacks>, 1> Callbacks;
- /// \brief The directory used for Clang-supplied, builtin include headers,
+ /// The directory used for Clang-supplied, builtin include headers,
/// such as "stdint.h".
const DirectoryEntry *BuiltinIncludeDir = nullptr;
- /// \brief Language options used to parse the module map itself.
+ /// Language options used to parse the module map itself.
///
/// These are always simple C language options.
LangOptions MMapLangOpts;
@@ -96,13 +96,13 @@ class ModuleMap {
/// transferred if/when we create an enclosing module.
std::unique_ptr<Module> PendingGlobalModule;
- /// \brief The top-level modules that are known.
+ /// The top-level modules that are known.
llvm::StringMap<Module *> Modules;
/// Shadow modules created while building this module map.
llvm::SmallVector<Module*, 2> ShadowModules;
- /// \brief The number of modules we have created in total.
+ /// The number of modules we have created in total.
unsigned NumCreatedModules = 0;
/// In case a module has a export_as entry, it might have a pending link
@@ -118,15 +118,15 @@ public:
/// information is available or add it to a pending list otherwise.
void addLinkAsDependency(Module *Mod);
- /// \brief Flags describing the role of a module header.
+ /// Flags describing the role of a module header.
enum ModuleHeaderRole {
- /// \brief This header is normally included in the module.
+ /// This header is normally included in the module.
NormalHeader = 0x0,
- /// \brief This header is included but private.
+ /// This header is included but private.
PrivateHeader = 0x1,
- /// \brief This header is part of the module (for layering purposes) but
+ /// This header is part of the module (for layering purposes) but
/// should be textually included.
TextualHeader = 0x2,
@@ -144,7 +144,7 @@ public:
/// Convert a header role to a kind.
static Module::HeaderKind headerRoleToKind(ModuleHeaderRole Role);
- /// \brief A header that is known to reside within a given module,
+ /// A header that is known to reside within a given module,
/// whether it was included or excluded.
class KnownHeader {
llvm::PointerIntPair<Module *, 2, ModuleHeaderRole> Storage;
@@ -160,24 +160,24 @@ public:
return A.Storage != B.Storage;
}
- /// \brief Retrieve the module the header is stored in.
+ /// Retrieve the module the header is stored in.
Module *getModule() const { return Storage.getPointer(); }
- /// \brief The role of this header within the module.
+ /// The role of this header within the module.
ModuleHeaderRole getRole() const { return Storage.getInt(); }
- /// \brief Whether this header is available in the module.
+ /// Whether this header is available in the module.
bool isAvailable() const {
return getModule()->isAvailable();
}
- /// \brief Whether this header is accessible from the specified module.
+ /// Whether this header is accessible from the specified module.
bool isAccessibleFrom(Module *M) const {
return !(getRole() & PrivateHeader) ||
(M && M->getTopLevelModule() == getModule()->getTopLevelModule());
}
- // \brief Whether this known header is valid (i.e., it has an
+ // Whether this known header is valid (i.e., it has an
// associated module).
explicit operator bool() const {
return Storage.getPointer() != nullptr;
@@ -192,7 +192,7 @@ private:
using HeadersMap =
llvm::DenseMap<const FileEntry *, SmallVector<KnownHeader, 1>>;
- /// \brief Mapping from each header to the module that owns the contents of
+ /// Mapping from each header to the module that owns the contents of
/// that header.
HeadersMap Headers;
@@ -203,7 +203,7 @@ private:
mutable llvm::DenseMap<time_t, llvm::TinyPtrVector<Module*>>
LazyHeadersByModTime;
- /// \brief Mapping from directories with umbrella headers to the module
+ /// Mapping from directories with umbrella headers to the module
/// that is generated from the umbrella header.
///
/// This mapping is used to map headers that haven't explicitly been named
@@ -211,7 +211,7 @@ private:
/// header.
llvm::DenseMap<const DirectoryEntry *, Module *> UmbrellaDirs;
- /// \brief A generation counter that is used to test whether modules of the
+ /// A generation counter that is used to test whether modules of the
/// same name may shadow or are illegal redefinitions.
///
/// Modules from earlier scopes may shadow modules from later ones.
@@ -220,18 +220,18 @@ private:
llvm::DenseMap<Module *, unsigned> ModuleScopeIDs;
- /// \brief The set of attributes that can be attached to a module.
+ /// The set of attributes that can be attached to a module.
struct Attributes {
- /// \brief Whether this is a system module.
+ /// Whether this is a system module.
unsigned IsSystem : 1;
- /// \brief Whether this is an extern "C" module.
+ /// Whether this is an extern "C" module.
unsigned IsExternC : 1;
- /// \brief Whether this is an exhaustive set of configuration macros.
+ /// Whether this is an exhaustive set of configuration macros.
unsigned IsExhaustive : 1;
- /// \brief Whether files in this module can only include non-modular headers
+ /// Whether files in this module can only include non-modular headers
/// and headers from used modules.
unsigned NoUndeclaredIncludes : 1;
@@ -240,26 +240,26 @@ private:
NoUndeclaredIncludes(false) {}
};
- /// \brief A directory for which framework modules can be inferred.
+ /// A directory for which framework modules can be inferred.
struct InferredDirectory {
- /// \brief Whether to infer modules from this directory.
+ /// Whether to infer modules from this directory.
unsigned InferModules : 1;
- /// \brief The attributes to use for inferred modules.
+ /// The attributes to use for inferred modules.
Attributes Attrs;
- /// \brief If \c InferModules is non-zero, the module map file that allowed
+ /// If \c InferModules is non-zero, the module map file that allowed
/// inferred modules. Otherwise, nullptr.
const FileEntry *ModuleMapFile;
- /// \brief The names of modules that cannot be inferred within this
+ /// The names of modules that cannot be inferred within this
/// directory.
SmallVector<std::string, 2> ExcludedModules;
InferredDirectory() : InferModules(false) {}
};
- /// \brief A mapping from directories to information about inferring
+ /// A mapping from directories to information about inferring
/// framework modules from within those directories.
llvm::DenseMap<const DirectoryEntry *, InferredDirectory> InferredDirectories;
@@ -269,11 +269,11 @@ private:
llvm::DenseMap<const Module *, AdditionalModMapsSet> AdditionalModMaps;
- /// \brief Describes whether we haved parsed a particular file as a module
+ /// Describes whether we haved parsed a particular file as a module
/// map.
llvm::DenseMap<const FileEntry *, bool> ParsedModuleMap;
- /// \brief Resolve the given export declaration into an actual export
+ /// Resolve the given export declaration into an actual export
/// declaration.
///
/// \param Mod The module in which we're resolving the export declaration.
@@ -289,7 +289,7 @@ private:
resolveExport(Module *Mod, const Module::UnresolvedExportDecl &Unresolved,
bool Complain) const;
- /// \brief Resolve the given module id to an actual module.
+ /// Resolve the given module id to an actual module.
///
/// \param Id The module-id to resolve.
///
@@ -327,14 +327,14 @@ private:
bool resolveAsBuiltinHeader(Module *M,
const Module::UnresolvedHeaderDirective &Header);
- /// \brief Looks up the modules that \p File corresponds to.
+ /// Looks up the modules that \p File corresponds to.
///
/// If \p File represents a builtin header within Clang's builtin include
/// directory, this also loads all of the module maps to see if it will get
/// associated with a specific module (e.g. in /usr/include).
HeadersMap::iterator findKnownHeader(const FileEntry *File);
- /// \brief Searches for a module whose umbrella directory contains \p File.
+ /// Searches for a module whose umbrella directory contains \p File.
///
/// \param File The header to search for.
///
@@ -343,11 +343,11 @@ private:
KnownHeader findHeaderInUmbrellaDirs(const FileEntry *File,
SmallVectorImpl<const DirectoryEntry *> &IntermediateDirs);
- /// \brief Given that \p File is not in the Headers map, look it up within
+ /// Given that \p File is not in the Headers map, look it up within
/// umbrella directories and find or create a module for it.
KnownHeader findOrCreateModuleForHeaderInUmbrellaDir(const FileEntry *File);
- /// \brief A convenience method to determine if \p File is (possibly nested)
+ /// A convenience method to determine if \p File is (possibly nested)
/// in an umbrella directory.
bool isHeaderInUmbrellaDirs(const FileEntry *File) {
SmallVector<const DirectoryEntry *, 2> IntermediateDirs;
@@ -358,7 +358,7 @@ private:
Attributes Attrs, Module *Parent);
public:
- /// \brief Construct a new module map.
+ /// Construct a new module map.
///
/// \param SourceMgr The source manager used to find module files and headers.
/// This source manager should be shared with the header-search mechanism,
@@ -373,32 +373,32 @@ public:
const LangOptions &LangOpts, const TargetInfo *Target,
HeaderSearch &HeaderInfo);
- /// \brief Destroy the module map.
+ /// Destroy the module map.
~ModuleMap();
- /// \brief Set the target information.
+ /// Set the target information.
void setTarget(const TargetInfo &Target);
- /// \brief Set the directory that contains Clang-supplied include
+ /// Set the directory that contains Clang-supplied include
/// files, such as our stdarg.h or tgmath.h.
void setBuiltinIncludeDir(const DirectoryEntry *Dir) {
BuiltinIncludeDir = Dir;
}
- /// \brief Get the directory that contains Clang-supplied include files.
+ /// Get the directory that contains Clang-supplied include files.
const DirectoryEntry *getBuiltinDir() const {
return BuiltinIncludeDir;
}
- /// \brief Is this a compiler builtin header?
+ /// Is this a compiler builtin header?
static bool isBuiltinHeader(StringRef FileName);
- /// \brief Add a module map callback.
+ /// Add a module map callback.
void addModuleMapCallbacks(std::unique_ptr<ModuleMapCallbacks> Callback) {
Callbacks.push_back(std::move(Callback));
}
- /// \brief Retrieve the module that owns the given header file, if any.
+ /// Retrieve the module that owns the given header file, if any.
///
/// \param File The header file that is likely to be included.
///
@@ -412,7 +412,7 @@ public:
KnownHeader findModuleForHeader(const FileEntry *File,
bool AllowTextual = false);
- /// \brief Retrieve all the modules that contain the given header file. This
+ /// Retrieve all the modules that contain the given header file. This
/// may not include umbrella modules, nor information from external sources,
/// if they have not yet been inferred / loaded.
///
@@ -429,7 +429,7 @@ public:
/// Resolve all lazy header directives for the specified module.
void resolveHeaderDirectives(Module *Mod) const;
- /// \brief Reports errors if a module must not include a specific file.
+ /// Reports errors if a module must not include a specific file.
///
/// \param RequestingModule The module including a file.
///
@@ -448,23 +448,23 @@ public:
SourceLocation FilenameLoc, StringRef Filename,
const FileEntry *File);
- /// \brief Determine whether the given header is part of a module
+ /// Determine whether the given header is part of a module
/// marked 'unavailable'.
bool isHeaderInUnavailableModule(const FileEntry *Header) const;
- /// \brief Determine whether the given header is unavailable as part
+ /// Determine whether the given header is unavailable as part
/// of the specified module.
bool isHeaderUnavailableInModule(const FileEntry *Header,
const Module *RequestingModule) const;
- /// \brief Retrieve a module with the given name.
+ /// Retrieve a module with the given name.
///
/// \param Name The name of the module to look up.
///
/// \returns The named module, if known; otherwise, returns null.
Module *findModule(StringRef Name) const;
- /// \brief Retrieve a module with the given name using lexical name lookup,
+ /// Retrieve a module with the given name using lexical name lookup,
/// starting at the given context.
///
/// \param Name The name of the module to look up.
@@ -475,7 +475,7 @@ public:
/// \returns The named module, if known; otherwise, returns null.
Module *lookupModuleUnqualified(StringRef Name, Module *Context) const;
- /// \brief Retrieve a module with the given name within the given context,
+ /// Retrieve a module with the given name within the given context,
/// using direct (qualified) name lookup.
///
/// \param Name The name of the module to look up.
@@ -486,7 +486,7 @@ public:
/// \returns The named submodule, if known; otherwose, returns null.
Module *lookupModuleQualified(StringRef Name, Module *Context) const;
- /// \brief Find a new module or submodule, or create it if it does not already
+ /// Find a new module or submodule, or create it if it does not already
/// exist.
///
/// \param Name The name of the module to find or create.
@@ -504,7 +504,7 @@ public:
bool IsFramework,
bool IsExplicit);
- /// \brief Create a 'global module' for a C++ Modules TS module interface
+ /// Create a 'global module' for a C++ Modules TS module interface
/// unit.
///
/// We model the global module as a submodule of the module interface unit.
@@ -512,7 +512,7 @@ public:
/// later, because we don't know what it will be called.
Module *createGlobalModuleForInterfaceUnit(SourceLocation Loc);
- /// \brief Create a new module for a C++ Modules TS module interface unit.
+ /// Create a new module for a C++ Modules TS module interface unit.
/// The module must not already exist, and will be configured for the current
/// compilation.
///
@@ -522,17 +522,17 @@ public:
Module *createModuleForInterfaceUnit(SourceLocation Loc, StringRef Name,
Module *GlobalModule);
- /// \brief Infer the contents of a framework module map from the given
+ /// Infer the contents of a framework module map from the given
/// framework directory.
Module *inferFrameworkModule(const DirectoryEntry *FrameworkDir,
bool IsSystem, Module *Parent);
- /// \brief Create a new top-level module that is shadowed by
+ /// Create a new top-level module that is shadowed by
/// \p ShadowingModule.
Module *createShadowedModule(StringRef Name, bool IsFramework,
Module *ShadowingModule);
- /// \brief Creates a new declaration scope for module names, allowing
+ /// Creates a new declaration scope for module names, allowing
/// previously defined modules to shadow definitions from the new scope.
///
/// \note Module names from earlier scopes will shadow names from the new
@@ -545,7 +545,7 @@ public:
return ModuleScopeIDs[ExistingModule] < CurrentModuleScopeID;
}
- /// \brief Retrieve the module map file containing the definition of the given
+ /// Retrieve the module map file containing the definition of the given
/// module.
///
/// \param Module The module whose module map file will be returned, if known.
@@ -554,7 +554,7 @@ public:
/// module, or nullptr if the module definition was inferred.
const FileEntry *getContainingModuleMapFile(const Module *Module) const;
- /// \brief Get the module map file that (along with the module name) uniquely
+ /// Get the module map file that (along with the module name) uniquely
/// identifies this module.
///
/// The particular module that \c Name refers to may depend on how the module
@@ -567,7 +567,7 @@ public:
void setInferredModuleAllowedBy(Module *M, const FileEntry *ModuleMap);
- /// \brief Get any module map files other than getModuleMapFileForUniquing(M)
+ /// Get any module map files other than getModuleMapFileForUniquing(M)
/// that define submodules of a top-level module \p M. This is cheaper than
/// getting the module map file for each submodule individually, since the
/// expected number of results is very small.
@@ -582,7 +582,7 @@ public:
AdditionalModMaps[M].insert(ModuleMap);
}
- /// \brief Resolve all of the unresolved exports in the given module.
+ /// Resolve all of the unresolved exports in the given module.
///
/// \param Mod The module whose exports should be resolved.
///
@@ -592,7 +592,7 @@ public:
/// false otherwise.
bool resolveExports(Module *Mod, bool Complain);
- /// \brief Resolve all of the unresolved uses in the given module.
+ /// Resolve all of the unresolved uses in the given module.
///
/// \param Mod The module whose uses should be resolved.
///
@@ -602,7 +602,7 @@ public:
/// false otherwise.
bool resolveUses(Module *Mod, bool Complain);
- /// \brief Resolve all of the unresolved conflicts in the given module.
+ /// Resolve all of the unresolved conflicts in the given module.
///
/// \param Mod The module whose conflicts should be resolved.
///
@@ -612,25 +612,25 @@ public:
/// false otherwise.
bool resolveConflicts(Module *Mod, bool Complain);
- /// \brief Sets the umbrella header of the given module to the given
+ /// Sets the umbrella header of the given module to the given
/// header.
void setUmbrellaHeader(Module *Mod, const FileEntry *UmbrellaHeader,
Twine NameAsWritten);
- /// \brief Sets the umbrella directory of the given module to the given
+ /// Sets the umbrella directory of the given module to the given
/// directory.
void setUmbrellaDir(Module *Mod, const DirectoryEntry *UmbrellaDir,
Twine NameAsWritten);
- /// \brief Adds this header to the given module.
+ /// Adds this header to the given module.
/// \param Role The role of the header wrt the module.
void addHeader(Module *Mod, Module::Header Header,
ModuleHeaderRole Role, bool Imported = false);
- /// \brief Marks this header as being excluded from the given module.
+ /// Marks this header as being excluded from the given module.
void excludeHeader(Module *Mod, Module::Header Header);
- /// \brief Parse the given module map file, and record any modules we
+ /// Parse the given module map file, and record any modules we
/// encounter.
///
/// \param File The file to be parsed.
@@ -655,7 +655,7 @@ public:
FileID ID = FileID(), unsigned *Offset = nullptr,
SourceLocation ExternModuleLoc = SourceLocation());
- /// \brief Dump the contents of the module map, for debugging purposes.
+ /// Dump the contents of the module map, for debugging purposes.
void dump();
using module_iterator = llvm::StringMap<Module *>::const_iterator;
diff --git a/include/clang/Lex/MultipleIncludeOpt.h b/include/clang/Lex/MultipleIncludeOpt.h
index 00d3047e53..ac0dcc7b51 100644
--- a/include/clang/Lex/MultipleIncludeOpt.h
+++ b/include/clang/Lex/MultipleIncludeOpt.h
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
///
/// \file
-/// \brief Defines the MultipleIncludeOpt interface.
+/// Defines the MultipleIncludeOpt interface.
//
//===----------------------------------------------------------------------===//
@@ -20,7 +20,7 @@
namespace clang {
class IdentifierInfo;
-/// \brief Implements the simple state machine that the Lexer class uses to
+/// Implements the simple state machine that the Lexer class uses to
/// detect files subject to the 'multiple-include' optimization.
///
/// The public methods in this class are triggered by various
@@ -113,7 +113,7 @@ public:
/// buffer, this method is called to disable the MIOpt if needed.
void ExpandedMacro() { DidMacroExpansion = true; }
- /// \brief Called when entering a top-level \#ifndef directive (or the
+ /// Called when entering a top-level \#ifndef directive (or the
/// "\#if !defined" equivalent) without any preceding tokens.
///
/// Note, we don't care about the input value of 'ReadAnyTokens'. The caller
@@ -139,14 +139,14 @@ public:
MacroLoc = Loc;
}
- /// \brief Invoked when a top level conditional (except \#ifndef) is found.
+ /// Invoked when a top level conditional (except \#ifndef) is found.
void EnterTopLevelConditional() {
// If a conditional directive (except #ifndef) is found at the top level,
// there is a chunk of the file not guarded by the controlling macro.
Invalidate();
}
- /// \brief Called when the lexer exits the top-level conditional.
+ /// Called when the lexer exits the top-level conditional.
void ExitTopLevelConditional() {
// If we have a macro, that means the top of the file was ok. Set our state
// back to "not having read any tokens" so we can detect anything after the
@@ -159,7 +159,7 @@ public:
ImmediatelyAfterTopLevelIfndef = false;
}
- /// \brief Once the entire file has been lexed, if there is a controlling
+ /// Once the entire file has been lexed, if there is a controlling
/// macro, return it.
const IdentifierInfo *GetControllingMacroAtEndOfFile() const {
// If we haven't read any tokens after the #endif, return the controlling
@@ -169,7 +169,7 @@ public:
return nullptr;
}
- /// \brief If the ControllingMacro is followed by a macro definition, return
+ /// If the ControllingMacro is followed by a macro definition, return
/// the macro that was defined.
const IdentifierInfo *GetDefinedMacro() const {
return DefinedMacro;
diff --git a/include/clang/Lex/PPCallbacks.h b/include/clang/Lex/PPCallbacks.h
index 19bce4dd32..1814821cdc 100644
--- a/include/clang/Lex/PPCallbacks.h
+++ b/include/clang/Lex/PPCallbacks.h
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
///
/// \file
-/// \brief Defines the PPCallbacks interface.
+/// Defines the PPCallbacks interface.
///
//===----------------------------------------------------------------------===//
@@ -29,7 +29,7 @@ namespace clang {
class MacroDirective;
class MacroArgs;
-/// \brief This interface provides a way to observe the actions of the
+/// 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.
@@ -41,7 +41,7 @@ public:
EnterFile, ExitFile, SystemHeaderPragma, RenameFile
};
- /// \brief Callback invoked whenever a source file is entered or exited.
+ /// Callback invoked whenever a source file is entered or exited.
///
/// \param Loc Indicates the new location.
/// \param PrevFID the file that was exited if \p Reason is ExitFile.
@@ -50,7 +50,7 @@ public:
FileID PrevFID = FileID()) {
}
- /// \brief Callback invoked whenever a source file is skipped as the result
+ /// Callback invoked whenever a source file is skipped as the result
/// of header guard optimization.
///
/// \param SkippedFile The file that is skipped instead of entering \#include
@@ -63,7 +63,7 @@ public:
SrcMgr::CharacteristicKind FileType) {
}
- /// \brief Callback invoked whenever an inclusion directive results in a
+ /// 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
@@ -80,7 +80,7 @@ public:
return false;
}
- /// \brief Callback invoked whenever an inclusion directive of
+ /// 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.
///
@@ -128,7 +128,7 @@ public:
const Module *Imported) {
}
- /// \brief Callback invoked whenever there was an explicit module-import
+ /// Callback invoked whenever there was an explicit module-import
/// syntax.
///
/// \param ImportLoc The location of import directive token.
@@ -143,54 +143,54 @@ public:
const Module *Imported) {
}
- /// \brief Callback invoked when the end of the main file is reached.
+ /// Callback invoked when the end of the main file is reached.
///
/// No subsequent callbacks will be made.
virtual void EndOfMainFile() {
}
- /// \brief Callback invoked when a \#ident or \#sccs directive is read.
+ /// 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, StringRef str) {
}
- /// \brief Callback invoked when start reading any pragma directive.
+ /// Callback invoked when start reading any pragma directive.
virtual void PragmaDirective(SourceLocation Loc,
PragmaIntroducerKind Introducer) {
}
- /// \brief Callback invoked when a \#pragma comment directive is read.
+ /// Callback invoked when a \#pragma comment directive is read.
virtual void PragmaComment(SourceLocation Loc, const IdentifierInfo *Kind,
StringRef Str) {
}
- /// \brief Callback invoked when a \#pragma detect_mismatch directive is
+ /// Callback invoked when a \#pragma detect_mismatch directive is
/// read.
virtual void PragmaDetectMismatch(SourceLocation Loc, StringRef Name,
StringRef Value) {
}
- /// \brief Callback invoked when a \#pragma clang __debug directive is read.
+ /// Callback invoked when a \#pragma clang __debug directive is read.
/// \param Loc The location of the debug directive.
/// \param DebugType The identifier following __debug.
virtual void PragmaDebug(SourceLocation Loc, StringRef DebugType) {
}
- /// \brief Determines the kind of \#pragma invoking a call to PragmaMessage.
+ /// Determines the kind of \#pragma invoking a call to PragmaMessage.
enum PragmaMessageKind {
- /// \brief \#pragma message has been invoked.
+ /// \#pragma message has been invoked.
PMK_Message,
- /// \brief \#pragma GCC warning has been invoked.
+ /// \#pragma GCC warning has been invoked.
PMK_Warning,
- /// \brief \#pragma GCC error has been invoked.
+ /// \#pragma GCC error has been invoked.
PMK_Error
};
- /// \brief Callback invoked when a \#pragma message directive is read.
+ /// Callback invoked when a \#pragma message directive is read.
/// \param Loc The location of the message directive.
/// \param Namespace The namespace of the message directive.
/// \param Kind The type of the message directive.
@@ -199,62 +199,62 @@ public:
PragmaMessageKind Kind, StringRef Str) {
}
- /// \brief Callback invoked when a \#pragma gcc diagnostic push directive
+ /// Callback invoked when a \#pragma gcc diagnostic push directive
/// is read.
virtual void PragmaDiagnosticPush(SourceLocation Loc,
StringRef Namespace) {
}
- /// \brief Callback invoked when a \#pragma gcc diagnostic pop directive
+ /// Callback invoked when a \#pragma gcc diagnostic pop directive
/// is read.
virtual void PragmaDiagnosticPop(SourceLocation Loc,
StringRef Namespace) {
}
- /// \brief Callback invoked when a \#pragma gcc diagnostic directive is read.
+ /// Callback invoked when a \#pragma gcc diagnostic directive is read.
virtual void PragmaDiagnostic(SourceLocation Loc, StringRef Namespace,
diag::Severity mapping, StringRef Str) {}
- /// \brief Called when an OpenCL extension is either disabled or
+ /// Called when an OpenCL extension is either disabled or
/// enabled with a pragma.
virtual void PragmaOpenCLExtension(SourceLocation NameLoc,
const IdentifierInfo *Name,
SourceLocation StateLoc, unsigned State) {
}
- /// \brief Callback invoked when a \#pragma warning directive is read.
+ /// Callback invoked when a \#pragma warning directive is read.
virtual void PragmaWarning(SourceLocation Loc, StringRef WarningSpec,
ArrayRef<int> Ids) {
}
- /// \brief Callback invoked when a \#pragma warning(push) directive is read.
+ /// Callback invoked when a \#pragma warning(push) directive is read.
virtual void PragmaWarningPush(SourceLocation Loc, int Level) {
}
- /// \brief Callback invoked when a \#pragma warning(pop) directive is read.
+ /// Callback invoked when a \#pragma warning(pop) directive is read.
virtual void PragmaWarningPop(SourceLocation Loc) {
}
- /// \brief Callback invoked when a \#pragma clang assume_nonnull begin directive
+ /// Callback invoked when a \#pragma clang assume_nonnull begin directive
/// is read.
virtual void PragmaAssumeNonNullBegin(SourceLocation Loc) {}
- /// \brief Callback invoked when a \#pragma clang assume_nonnull end directive
+ /// Callback invoked when a \#pragma clang assume_nonnull end directive
/// is read.
virtual void PragmaAssumeNonNullEnd(SourceLocation Loc) {}
- /// \brief Called by Preprocessor::HandleMacroExpandedIdentifier when a
+ /// Called by Preprocessor::HandleMacroExpandedIdentifier when a
/// macro invocation is found.
virtual void MacroExpands(const Token &MacroNameTok,
const MacroDefinition &MD, SourceRange Range,
const MacroArgs *Args) {}
- /// \brief Hook called whenever a macro definition is seen.
+ /// Hook called whenever a macro definition is seen.
virtual void MacroDefined(const Token &MacroNameTok,
const MacroDirective *MD) {
}
- /// \brief Hook called whenever a macro \#undef is seen.
+ /// Hook called whenever a macro \#undef is seen.
/// \param MacroNameTok The active Token
/// \param MD A MacroDefinition for the named macro.
/// \param Undef New MacroDirective if the macro was defined, null otherwise.
@@ -265,13 +265,13 @@ public:
const MacroDirective *Undef) {
}
- /// \brief Hook called whenever the 'defined' operator is seen.
+ /// Hook called whenever the 'defined' operator is seen.
/// \param MD The MacroDirective if the name was a macro, null otherwise.
virtual void Defined(const Token &MacroNameTok, const MacroDefinition &MD,
SourceRange Range) {
}
- /// \brief Hook called when a source range is skipped.
+ /// 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.
/// \param EndifLoc The end location of the 'endif' token, which may precede
@@ -284,7 +284,7 @@ public:
CVK_NotEvaluated, CVK_False, CVK_True
};
- /// \brief Hook called whenever an \#if is seen.
+ /// Hook called whenever an \#if is seen.
/// \param Loc the source location of the directive.
/// \param ConditionRange The SourceRange of the expression being tested.
/// \param ConditionValue The evaluated value of the condition.
@@ -294,7 +294,7 @@ public:
ConditionValueKind ConditionValue) {
}
- /// \brief Hook called whenever an \#elif is seen.
+ /// 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 ConditionValue The evaluated value of the condition.
@@ -304,7 +304,7 @@ public:
ConditionValueKind ConditionValue, SourceLocation IfLoc) {
}
- /// \brief Hook called whenever an \#ifdef is seen.
+ /// Hook called whenever an \#ifdef is seen.
/// \param Loc the source location of the directive.
/// \param MacroNameTok Information on the token being tested.
/// \param MD The MacroDefinition if the name was a macro, null otherwise.
@@ -312,7 +312,7 @@ public:
const MacroDefinition &MD) {
}
- /// \brief Hook called whenever an \#ifndef is seen.
+ /// Hook called whenever an \#ifndef is seen.
/// \param Loc the source location of the directive.
/// \param MacroNameTok Information on the token being tested.
/// \param MD The MacroDefiniton if the name was a macro, null otherwise.
@@ -320,20 +320,20 @@ public:
const MacroDefinition &MD) {
}
- /// \brief Hook called whenever an \#else is seen.
+ /// 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.
virtual void Else(SourceLocation Loc, SourceLocation IfLoc) {
}
- /// \brief Hook called whenever an \#endif is seen.
+ /// 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.
virtual void Endif(SourceLocation Loc, SourceLocation IfLoc) {
}
};
-/// \brief Simple wrapper class for chaining callbacks.
+/// Simple wrapper class for chaining callbacks.
class PPChainedCallbacks : public PPCallbacks {
virtual void anchor();
std::unique_ptr<PPCallbacks> First, Second;
@@ -499,41 +499,41 @@ public:
Second->SourceRangeSkipped(Range, EndifLoc);
}
- /// \brief Hook called whenever an \#if is seen.
+ /// Hook called whenever an \#if is seen.
void If(SourceLocation Loc, SourceRange ConditionRange,
ConditionValueKind ConditionValue) override {
First->If(Loc, ConditionRange, ConditionValue);
Second->If(Loc, ConditionRange, ConditionValue);
}
- /// \brief Hook called whenever an \#elif is seen.
+ /// Hook called whenever an \#elif is seen.
void Elif(SourceLocation Loc, SourceRange ConditionRange,
ConditionValueKind ConditionValue, SourceLocation IfLoc) override {
First->Elif(Loc, ConditionRange, ConditionValue, IfLoc);
Second->Elif(Loc, ConditionRange, ConditionValue, IfLoc);
}
- /// \brief Hook called whenever an \#ifdef is seen.
+ /// Hook called whenever an \#ifdef is seen.
void Ifdef(SourceLocation Loc, const Token &MacroNameTok,
const MacroDefinition &MD) override {
First->Ifdef(Loc, MacroNameTok, MD);
Second->Ifdef(Loc, MacroNameTok, MD);
}
- /// \brief Hook called whenever an \#ifndef is seen.
+ /// Hook called whenever an \#ifndef is seen.
void Ifndef(SourceLocation Loc, const Token &MacroNameTok,
const MacroDefinition &MD) override {
First->Ifndef(Loc, MacroNameTok, MD);
Second->Ifndef(Loc, MacroNameTok, MD);
}
- /// \brief Hook called whenever an \#else is seen.
+ /// Hook called whenever an \#else is seen.
void Else(SourceLocation Loc, SourceLocation IfLoc) override {
First->Else(Loc, IfLoc);
Second->Else(Loc, IfLoc);
}
- /// \brief Hook called whenever an \#endif is seen.
+ /// Hook called whenever an \#endif is seen.
void Endif(SourceLocation Loc, SourceLocation IfLoc) override {
First->Endif(Loc, IfLoc);
Second->Endif(Loc, IfLoc);
diff --git a/include/clang/Lex/PPConditionalDirectiveRecord.h b/include/clang/Lex/PPConditionalDirectiveRecord.h
index 8c5227561b..a653b83399 100644
--- a/include/clang/Lex/PPConditionalDirectiveRecord.h
+++ b/include/clang/Lex/PPConditionalDirectiveRecord.h
@@ -21,7 +21,7 @@
namespace clang {
-/// \brief Records preprocessor conditional directive regions and allows
+/// Records preprocessor conditional directive regions and allows
/// querying in which region source locations belong to.
class PPConditionalDirectiveRecord : public PPCallbacks {
SourceManager &SourceMgr;
@@ -57,25 +57,25 @@ class PPConditionalDirectiveRecord : public PPCallbacks {
};
typedef std::vector<CondDirectiveLoc> CondDirectiveLocsTy;
- /// \brief The locations of conditional directives in source order.
+ /// The locations of conditional directives in source order.
CondDirectiveLocsTy CondDirectiveLocs;
void addCondDirectiveLoc(CondDirectiveLoc DirLoc);
public:
- /// \brief Construct a new preprocessing record.
+ /// Construct a new preprocessing record.
explicit PPConditionalDirectiveRecord(SourceManager &SM);
size_t getTotalMemory() const;
SourceManager &getSourceManager() const { return SourceMgr; }
- /// \brief Returns true if the given range intersects with a conditional
+ /// Returns true if the given range intersects with a conditional
/// directive. if a \#if/\#endif block is fully contained within the range,
/// this function will return false.
bool rangeIntersectsConditionalDirective(SourceRange Range) const;
- /// \brief Returns true if the given locations are in different regions,
+ /// Returns true if the given locations are in different regions,
/// separated by conditional directive blocks.
bool areInDifferentConditionalDirectiveRegion(SourceLocation LHS,
SourceLocation RHS) const {
diff --git a/include/clang/Lex/Pragma.h b/include/clang/Lex/Pragma.h
index 090ae2a982..9348388bc2 100644
--- a/include/clang/Lex/Pragma.h
+++ b/include/clang/Lex/Pragma.h
@@ -26,22 +26,22 @@ class Preprocessor;
class Token;
/**
- * \brief Describes how the pragma was introduced, e.g., with \#pragma,
+ * Describes how the pragma was introduced, e.g., with \#pragma,
* _Pragma, or __pragma.
*/
enum PragmaIntroducerKind {
/**
- * \brief The pragma was introduced via \#pragma.
+ * The pragma was introduced via \#pragma.
*/
PIK_HashPragma,
/**
- * \brief The pragma was introduced via the C99 _Pragma(string-literal).
+ * The pragma was introduced via the C99 _Pragma(string-literal).
*/
PIK__Pragma,
/**
- * \brief The pragma was introduced via the Microsoft
+ * The pragma was introduced via the Microsoft
* __pragma(token-string).
*/
PIK___pragma
diff --git a/include/clang/Lex/PreprocessingRecord.h b/include/clang/Lex/PreprocessingRecord.h
index 77da1eb26f..d9233c5d8d 100644
--- a/include/clang/Lex/PreprocessingRecord.h
+++ b/include/clang/Lex/PreprocessingRecord.h
@@ -39,11 +39,11 @@ class PreprocessingRecord;
} // namespace clang
-/// \brief Allocates memory within a Clang preprocessing record.
+/// Allocates memory within a Clang preprocessing record.
void *operator new(size_t bytes, clang::PreprocessingRecord &PR,
unsigned alignment = 8) noexcept;
-/// \brief Frees memory allocated in a Clang preprocessing record.
+/// Frees memory allocated in a Clang preprocessing record.
void operator delete(void *ptr, clang::PreprocessingRecord &PR,
unsigned) noexcept;
@@ -55,25 +55,25 @@ class MacroInfo;
class SourceManager;
class Token;
- /// \brief Base class that describes a preprocessed entity, which may be a
+ /// Base class that describes a preprocessed entity, which may be a
/// preprocessor directive or macro expansion.
class PreprocessedEntity {
public:
- /// \brief The kind of preprocessed entity an object describes.
+ /// The kind of preprocessed entity an object describes.
enum EntityKind {
- /// \brief Indicates a problem trying to load the preprocessed entity.
+ /// Indicates a problem trying to load the preprocessed entity.
InvalidKind,
- /// \brief A macro expansion.
+ /// A macro expansion.
MacroExpansionKind,
/// \defgroup Preprocessing directives
/// @{
- /// \brief A macro definition.
+ /// A macro definition.
MacroDefinitionKind,
- /// \brief An inclusion directive, such as \c \#include, \c
+ /// An inclusion directive, such as \c \#include, \c
/// \#import, or \c \#include_next.
InclusionDirectiveKind,
@@ -84,10 +84,10 @@ class Token;
};
private:
- /// \brief The kind of preprocessed entity that this object describes.
+ /// The kind of preprocessed entity that this object describes.
EntityKind Kind;
- /// \brief The source range that covers this preprocessed entity.
+ /// The source range that covers this preprocessed entity.
SourceRange Range;
protected:
@@ -97,14 +97,14 @@ class Token;
: Kind(Kind), Range(Range) {}
public:
- /// \brief Retrieve the kind of preprocessed entity stored in this object.
+ /// Retrieve the kind of preprocessed entity stored in this object.
EntityKind getKind() const { return Kind; }
- /// \brief Retrieve the source range that covers this entire preprocessed
+ /// Retrieve the source range that covers this entire preprocessed
/// entity.
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
- /// \brief Returns true if there was a problem loading the preprocessed
+ /// Returns true if there was a problem loading the preprocessed
/// entity.
bool isInvalid() const { return Kind == InvalidKind; }
@@ -131,7 +131,7 @@ class Token;
void operator delete(void *data) noexcept;
};
- /// \brief Records the presence of a preprocessor directive.
+ /// Records the presence of a preprocessor directive.
class PreprocessingDirective : public PreprocessedEntity {
public:
PreprocessingDirective(EntityKind Kind, SourceRange Range)
@@ -144,9 +144,9 @@ class Token;
}
};
- /// \brief Record the location of a macro definition.
+ /// Record the location of a macro definition.
class MacroDefinitionRecord : public PreprocessingDirective {
- /// \brief The name of the macro being defined.
+ /// The name of the macro being defined.
const IdentifierInfo *Name;
public:
@@ -154,10 +154,10 @@ class Token;
SourceRange Range)
: PreprocessingDirective(MacroDefinitionKind, Range), Name(Name) {}
- /// \brief Retrieve the name of the macro being defined.
+ /// Retrieve the name of the macro being defined.
const IdentifierInfo *getName() const { return Name; }
- /// \brief Retrieve the location of the macro name in the definition.
+ /// Retrieve the location of the macro name in the definition.
SourceLocation getLocation() const { return getSourceRange().getBegin(); }
// Implement isa/cast/dyncast/etc.
@@ -166,9 +166,9 @@ class Token;
}
};
- /// \brief Records the location of a macro expansion.
+ /// Records the location of a macro expansion.
class MacroExpansion : public PreprocessedEntity {
- /// \brief The definition of this macro or the name of the macro if it is
+ /// The definition of this macro or the name of the macro if it is
/// a builtin macro.
llvm::PointerUnion<IdentifierInfo *, MacroDefinitionRecord *> NameOrDef;
@@ -181,17 +181,17 @@ class Token;
: PreprocessedEntity(MacroExpansionKind, Range), NameOrDef(Definition) {
}
- /// \brief True if it is a builtin macro.
+ /// True if it is a builtin macro.
bool isBuiltinMacro() const { return NameOrDef.is<IdentifierInfo *>(); }
- /// \brief The name of the macro being expanded.
+ /// The name of the macro being expanded.
const IdentifierInfo *getName() const {
if (MacroDefinitionRecord *Def = getDefinition())
return Def->getName();
return NameOrDef.get<IdentifierInfo *>();
}
- /// \brief The definition of the macro being expanded. May return null if
+ /// The definition of the macro being expanded. May return null if
/// this is a builtin macro.
MacroDefinitionRecord *getDefinition() const {
return NameOrDef.dyn_cast<MacroDefinitionRecord *>();
@@ -203,45 +203,45 @@ class Token;
}
};
- /// \brief Record the location of an inclusion directive, such as an
+ /// Record the location of an inclusion directive, such as an
/// \c \#include or \c \#import statement.
class InclusionDirective : public PreprocessingDirective {
public:
- /// \brief The kind of inclusion directives known to the
+ /// The kind of inclusion directives known to the
/// preprocessor.
enum InclusionKind {
- /// \brief An \c \#include directive.
+ /// An \c \#include directive.
Include,
- /// \brief An Objective-C \c \#import directive.
+ /// An Objective-C \c \#import directive.
Import,
- /// \brief A GNU \c \#include_next directive.
+ /// A GNU \c \#include_next directive.
IncludeNext,
- /// \brief A Clang \c \#__include_macros directive.
+ /// A Clang \c \#__include_macros directive.
IncludeMacros
};
private:
- /// \brief The name of the file that was included, as written in
+ /// The name of the file that was included, as written in
/// the source.
StringRef FileName;
- /// \brief Whether the file name was in quotation marks; otherwise, it was
+ /// Whether the file name was in quotation marks; otherwise, it was
/// in angle brackets.
unsigned InQuotes : 1;
- /// \brief The kind of inclusion directive we have.
+ /// The kind of inclusion directive we have.
///
/// This is a value of type InclusionKind.
unsigned Kind : 2;
- /// \brief Whether the inclusion directive was automatically turned into
+ /// Whether the inclusion directive was automatically turned into
/// a module import.
unsigned ImportedModule : 1;
- /// \brief The file that was included.
+ /// The file that was included.
const FileEntry *File;
public:
@@ -250,21 +250,21 @@ class Token;
bool InQuotes, bool ImportedModule,
const FileEntry *File, SourceRange Range);
- /// \brief Determine what kind of inclusion directive this is.
+ /// Determine what kind of inclusion directive this is.
InclusionKind getKind() const { return static_cast<InclusionKind>(Kind); }
- /// \brief Retrieve the included file name as it was written in the source.
+ /// Retrieve the included file name as it was written in the source.
StringRef getFileName() const { return FileName; }
- /// \brief Determine whether the included file name was written in quotes;
+ /// Determine whether the included file name was written in quotes;
/// otherwise, it was written in angle brackets.
bool wasInQuotes() const { return InQuotes; }
- /// \brief Determine whether the inclusion directive was automatically
+ /// Determine whether the inclusion directive was automatically
/// turned into a module import.
bool importedModule() const { return ImportedModule; }
- /// \brief Retrieve the file entry for the actual file that was included
+ /// Retrieve the file entry for the actual file that was included
/// by this directive.
const FileEntry *getFile() const { return File; }
@@ -274,60 +274,60 @@ class Token;
}
};
- /// \brief An abstract class that should be subclassed by any external source
+ /// An abstract class that should be subclassed by any external source
/// of preprocessing record entries.
class ExternalPreprocessingRecordSource {
public:
virtual ~ExternalPreprocessingRecordSource();
- /// \brief Read a preallocated preprocessed entity from the external source.
+ /// Read a preallocated preprocessed entity from the external source.
///
/// \returns null if an error occurred that prevented the preprocessed
/// entity from being loaded.
virtual PreprocessedEntity *ReadPreprocessedEntity(unsigned Index) = 0;
- /// \brief Returns a pair of [Begin, End) indices of preallocated
+ /// Returns a pair of [Begin, End) indices of preallocated
/// preprocessed entities that \p Range encompasses.
virtual std::pair<unsigned, unsigned>
findPreprocessedEntitiesInRange(SourceRange Range) = 0;
- /// \brief Optionally returns true or false if the preallocated preprocessed
+ /// Optionally returns true or false if the preallocated preprocessed
/// entity with index \p Index came from file \p FID.
virtual Optional<bool> isPreprocessedEntityInFileID(unsigned Index,
FileID FID) {
return None;
}
- /// \brief Read a preallocated skipped range from the external source.
+ /// Read a preallocated skipped range from the external source.
virtual SourceRange ReadSkippedRange(unsigned Index) = 0;
};
- /// \brief A record of the steps taken while preprocessing a source file,
+ /// A record of the steps taken while preprocessing a source file,
/// including the various preprocessing directives processed, macros
/// expanded, etc.
class PreprocessingRecord : public PPCallbacks {
SourceManager &SourceMgr;
- /// \brief Allocator used to store preprocessing objects.
+ /// Allocator used to store preprocessing objects.
llvm::BumpPtrAllocator BumpAlloc;
- /// \brief The set of preprocessed entities in this record, in order they
+ /// The set of preprocessed entities in this record, in order they
/// were seen.
std::vector<PreprocessedEntity *> PreprocessedEntities;
- /// \brief The set of preprocessed entities in this record that have been
+ /// The set of preprocessed entities in this record that have been
/// loaded from external sources.
///
/// The entries in this vector are loaded lazily from the external source,
/// and are referenced by the iterator using negative indices.
std::vector<PreprocessedEntity *> LoadedPreprocessedEntities;
- /// \brief The set of ranges that were skipped by the preprocessor,
+ /// The set of ranges that were skipped by the preprocessor,
std::vector<SourceRange> SkippedRanges;
bool SkippedRangesAllLoaded = true;
- /// \brief Global (loaded or local) ID for a preprocessed entity.
+ /// Global (loaded or local) ID for a preprocessed entity.
/// Negative values are used to indicate preprocessed entities
/// loaded from the external source while non-negative values are used to
/// indicate preprocessed entities introduced by the current preprocessor.
@@ -351,60 +351,60 @@ class Token;
return isLoaded ? PPEntityID(-int(Index)-1) : PPEntityID(Index+1);
}
- /// \brief Mapping from MacroInfo structures to their definitions.
+ /// Mapping from MacroInfo structures to their definitions.
llvm::DenseMap<const MacroInfo *, MacroDefinitionRecord *> MacroDefinitions;
- /// \brief External source of preprocessed entities.
+ /// External source of preprocessed entities.
ExternalPreprocessingRecordSource *ExternalSource = nullptr;
- /// \brief Retrieve the preprocessed entity at the given ID.
+ /// Retrieve the preprocessed entity at the given ID.
PreprocessedEntity *getPreprocessedEntity(PPEntityID PPID);
- /// \brief Retrieve the loaded preprocessed entity at the given index.
+ /// Retrieve the loaded preprocessed entity at the given index.
PreprocessedEntity *getLoadedPreprocessedEntity(unsigned Index);
- /// \brief Determine the number of preprocessed entities that were
+ /// Determine the number of preprocessed entities that were
/// loaded (or can be loaded) from an external source.
unsigned getNumLoadedPreprocessedEntities() const {
return LoadedPreprocessedEntities.size();
}
- /// \brief Returns a pair of [Begin, End) indices of local preprocessed
+ /// Returns a pair of [Begin, End) indices of local preprocessed
/// entities that \p Range encompasses.
std::pair<unsigned, unsigned>
findLocalPreprocessedEntitiesInRange(SourceRange Range) const;
unsigned findBeginLocalPreprocessedEntity(SourceLocation Loc) const;
unsigned findEndLocalPreprocessedEntity(SourceLocation Loc) const;
- /// \brief Allocate space for a new set of loaded preprocessed entities.
+ /// Allocate space for a new set of loaded preprocessed entities.
///
/// \returns The index into the set of loaded preprocessed entities, which
/// corresponds to the first newly-allocated entity.
unsigned allocateLoadedEntities(unsigned NumEntities);
- /// \brief Allocate space for a new set of loaded preprocessed skipped
+ /// Allocate space for a new set of loaded preprocessed skipped
/// ranges.
///
/// \returns The index into the set of loaded preprocessed ranges, which
/// corresponds to the first newly-allocated range.
unsigned allocateSkippedRanges(unsigned NumRanges);
- /// \brief Ensures that all external skipped ranges have been loaded.
+ /// Ensures that all external skipped ranges have been loaded.
void ensureSkippedRangesLoaded();
- /// \brief Register a new macro definition.
+ /// Register a new macro definition.
void RegisterMacroDefinition(MacroInfo *Macro, MacroDefinitionRecord *Def);
public:
- /// \brief Construct a new preprocessing record.
+ /// Construct a new preprocessing record.
explicit PreprocessingRecord(SourceManager &SM);
- /// \brief Allocate memory in the preprocessing record.
+ /// Allocate memory in the preprocessing record.
void *Allocate(unsigned Size, unsigned Align = 8) {
return BumpAlloc.Allocate(Size, Align);
}
- /// \brief Deallocate memory in the preprocessing record.
+ /// Deallocate memory in the preprocessing record.
void Deallocate(void *Ptr) {}
size_t getTotalMemory() const;
@@ -451,27 +451,27 @@ class Token;
PreprocessedEntity *operator->() const { return **this; }
};
- /// \brief Begin iterator for all preprocessed entities.
+ /// Begin iterator for all preprocessed entities.
iterator begin() {
return iterator(this, -(int)LoadedPreprocessedEntities.size());
}
- /// \brief End iterator for all preprocessed entities.
+ /// End iterator for all preprocessed entities.
iterator end() {
return iterator(this, PreprocessedEntities.size());
}
- /// \brief Begin iterator for local, non-loaded, preprocessed entities.
+ /// Begin iterator for local, non-loaded, preprocessed entities.
iterator local_begin() {
return iterator(this, 0);
}
- /// \brief End iterator for local, non-loaded, preprocessed entities.
+ /// End iterator for local, non-loaded, preprocessed entities.
iterator local_end() {
return iterator(this, PreprocessedEntities.size());
}
- /// \brief iterator range for the given range of loaded
+ /// iterator range for the given range of loaded
/// preprocessed entities.
llvm::iterator_range<iterator> getIteratorsForLoadedRange(unsigned start,
unsigned count) {
@@ -482,14 +482,14 @@ class Token;
iterator(this, int(end) - LoadedPreprocessedEntities.size()));
}
- /// \brief Returns a range of preprocessed entities that source range \p R
+ /// Returns a range of preprocessed entities that source range \p R
/// encompasses.
///
/// \param R the range to look for preprocessed entities.
llvm::iterator_range<iterator>
getPreprocessedEntitiesInRange(SourceRange R);
- /// \brief Returns true if the preprocessed entity that \p PPEI iterator
+ /// Returns true if the preprocessed entity that \p PPEI iterator
/// points to is coming from the file \p FID.
///
/// Can be used to avoid implicit deserializations of preallocated
@@ -498,22 +498,22 @@ class Token;
/// \see getPreprocessedEntitiesInRange.
bool isEntityInFileID(iterator PPEI, FileID FID);
- /// \brief Add a new preprocessed entity to this record.
+ /// Add a new preprocessed entity to this record.
PPEntityID addPreprocessedEntity(PreprocessedEntity *Entity);
- /// \brief Set the external source for preprocessed entities.
+ /// Set the external source for preprocessed entities.
void SetExternalSource(ExternalPreprocessingRecordSource &Source);
- /// \brief Retrieve the external source for preprocessed entities.
+ /// Retrieve the external source for preprocessed entities.
ExternalPreprocessingRecordSource *getExternalSource() const {
return ExternalSource;
}
- /// \brief Retrieve the macro definition that corresponds to the given
+ /// Retrieve the macro definition that corresponds to the given
/// \c MacroInfo.
MacroDefinitionRecord *findMacroDefinition(const MacroInfo *MI);
- /// \brief Retrieve all ranges that got skipped while preprocessing.
+ /// Retrieve all ranges that got skipped while preprocessing.
const std::vector<SourceRange> &getSkippedRanges() {
ensureSkippedRangesLoaded();
return SkippedRanges;
@@ -539,7 +539,7 @@ class Token;
void Ifndef(SourceLocation Loc, const Token &MacroNameTok,
const MacroDefinition &MD) override;
- /// \brief Hook called whenever the 'defined' operator is seen.
+ /// Hook called whenever the 'defined' operator is seen.
void Defined(const Token &MacroNameTok, const MacroDefinition &MD,
SourceRange Range) override;
@@ -549,7 +549,7 @@ class Token;
void addMacroExpansion(const Token &Id, const MacroInfo *MI,
SourceRange Range);
- /// \brief Cached result of the last \see getPreprocessedEntitiesInRange
+ /// Cached result of the last \see getPreprocessedEntitiesInRange
/// query.
struct {
SourceRange Range;
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index 49d5da731a..a6d5f264f9 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
//
/// \file
-/// \brief Defines the clang::Preprocessor interface.
+/// Defines the clang::Preprocessor interface.
//
//===----------------------------------------------------------------------===//
@@ -83,7 +83,7 @@ class PTHManager;
class ScratchBuffer;
class TargetInfo;
-/// \brief Stores token information for comparing actual tokens with
+/// Stores token information for comparing actual tokens with
/// predefined values. Only handles simple tokens and identifiers.
class TokenValue {
tok::TokenKind Kind;
@@ -106,7 +106,7 @@ public:
}
};
-/// \brief Context in which macro name is used.
+/// Context in which macro name is used.
enum MacroUse {
// other than #define or #undef
MU_Other = 0,
@@ -118,7 +118,7 @@ enum MacroUse {
MU_Undef = 2
};
-/// \brief Engages in a tight little dance with the lexer to efficiently
+/// Engages in a tight little dance with the lexer to efficiently
/// preprocess tokens.
///
/// Lexers know only about tokens within a single source file, and don't
@@ -140,7 +140,7 @@ class Preprocessor {
HeaderSearch &HeaderInfo;
ModuleLoader &TheModuleLoader;
- /// \brief External source of macros.
+ /// External source of macros.
ExternalPreprocessorSource *ExternalSource;
/// An optional PTHManager object used for getting tokens from
@@ -186,7 +186,7 @@ class Preprocessor {
unsigned CounterValue = 0;
enum {
- /// \brief Maximum depth of \#includes.
+ /// Maximum depth of \#includes.
MaxAllowedIncludeStackDepth = 200
};
@@ -210,26 +210,26 @@ class Preprocessor {
class ResetMacroExpansionHelper;
- /// \brief Whether we have already loaded macros from the external source.
+ /// Whether we have already loaded macros from the external source.
mutable bool ReadMacrosFromExternalSource : 1;
- /// \brief True if pragmas are enabled.
+ /// True if pragmas are enabled.
bool PragmasEnabled : 1;
- /// \brief True if the current build action is a preprocessing action.
+ /// True if the current build action is a preprocessing action.
bool PreprocessedOutput : 1;
- /// \brief True if we are currently preprocessing a #if or #elif directive
+ /// True if we are currently preprocessing a #if or #elif directive
bool ParsingIfOrElifDirective;
- /// \brief True if we are pre-expanding macro arguments.
+ /// True if we are pre-expanding macro arguments.
bool InMacroArgPreExpansion;
- /// \brief Mapping/lookup information for all identifiers in
+ /// Mapping/lookup information for all identifiers in
/// the program, including program keywords.
mutable IdentifierTable Identifiers;
- /// \brief This table contains all the selectors in the program.
+ /// This table contains all the selectors in the program.
///
/// Unlike IdentifierTable above, this table *isn't* populated by the
/// preprocessor. It is declared/expanded here because its role/lifetime is
@@ -240,82 +240,82 @@ class Preprocessor {
/// the lifetime of the preprocessor.
SelectorTable Selectors;
- /// \brief Information about builtins.
+ /// Information about builtins.
Builtin::Context BuiltinInfo;
- /// \brief Tracks all of the pragmas that the client registered
+ /// Tracks all of the pragmas that the client registered
/// with this preprocessor.
std::unique_ptr<PragmaNamespace> PragmaHandlers;
- /// \brief Pragma handlers of the original source is stored here during the
+ /// Pragma handlers of the original source is stored here during the
/// parsing of a model file.
std::unique_ptr<PragmaNamespace> PragmaHandlersBackup;
- /// \brief Tracks all of the comment handlers that the client registered
+ /// Tracks all of the comment handlers that the client registered
/// with this preprocessor.
std::vector<CommentHandler *> CommentHandlers;
- /// \brief True if we want to ignore EOF token and continue later on (thus
+ /// True if we want to ignore EOF token and continue later on (thus
/// avoid tearing the Lexer and etc. down).
bool IncrementalProcessing = false;
/// The kind of translation unit we are processing.
TranslationUnitKind TUKind;
- /// \brief The code-completion handler.
+ /// The code-completion handler.
CodeCompletionHandler *CodeComplete = nullptr;
- /// \brief The file that we're performing code-completion for, if any.
+ /// The file that we're performing code-completion for, if any.
const FileEntry *CodeCompletionFile = nullptr;
- /// \brief The offset in file for the code-completion point.
+ /// The offset in file for the code-completion point.
unsigned CodeCompletionOffset = 0;
- /// \brief The location for the code-completion point. This gets instantiated
+ /// The location for the code-completion point. This gets instantiated
/// when the CodeCompletionFile gets \#include'ed for preprocessing.
SourceLocation CodeCompletionLoc;
- /// \brief The start location for the file of the code-completion point.
+ /// The start location for the file of the code-completion point.
///
/// This gets instantiated when the CodeCompletionFile gets \#include'ed
/// for preprocessing.
SourceLocation CodeCompletionFileLoc;
- /// \brief The source location of the \c import contextual keyword we just
+ /// The source location of the \c import contextual keyword we just
/// lexed, if any.
SourceLocation ModuleImportLoc;
- /// \brief The module import path that we're currently processing.
+ /// The module import path that we're currently processing.
SmallVector<std::pair<IdentifierInfo *, SourceLocation>, 2> ModuleImportPath;
- /// \brief Whether the last token we lexed was an '@'.
+ /// Whether the last token we lexed was an '@'.
bool LastTokenWasAt = false;
- /// \brief Whether the module import expects an identifier next. Otherwise,
+ /// Whether the module import expects an identifier next. Otherwise,
/// it expects a '.' or ';'.
bool ModuleImportExpectsIdentifier = false;
- /// \brief The source location of the currently-active
+ /// The source location of the currently-active
/// \#pragma clang arc_cf_code_audited begin.
SourceLocation PragmaARCCFCodeAuditedLoc;
- /// \brief The source location of the currently-active
+ /// The source location of the currently-active
/// \#pragma clang assume_nonnull begin.
SourceLocation PragmaAssumeNonNullLoc;
- /// \brief True if we hit the code-completion point.
+ /// True if we hit the code-completion point.
bool CodeCompletionReached = false;
- /// \brief The code completion token containing the information
+ /// The code completion token containing the information
/// on the stem that is to be code completed.
IdentifierInfo *CodeCompletionII = nullptr;
- /// \brief The directory that the main file should be considered to occupy,
+ /// The directory that the main file should be considered to occupy,
/// if it does not correspond to a real file (as happens when building a
/// module).
const DirectoryEntry *MainFileDir = nullptr;
- /// \brief The number of bytes that we will initially skip when entering the
+ /// The number of bytes that we will initially skip when entering the
/// main file, along with a flag that indicates whether skipping this number
/// of bytes will place the lexer at the start of a line.
///
@@ -386,37 +386,37 @@ private:
State ConditionalStackState = Off;
} PreambleConditionalStack;
- /// \brief The current top of the stack that we're lexing from if
+ /// The current top of the stack that we're lexing from if
/// not expanding a macro and we are lexing directly from source code.
///
/// Only one of CurLexer, CurPTHLexer, or CurTokenLexer will be non-null.
std::unique_ptr<Lexer> CurLexer;
- /// \brief The current top of stack that we're lexing from if
+ /// The current top of stack that we're lexing from if
/// not expanding from a macro and we are lexing from a PTH cache.
///
/// Only one of CurLexer, CurPTHLexer, or CurTokenLexer will be non-null.
std::unique_ptr<PTHLexer> CurPTHLexer;
- /// \brief The current top of the stack what we're lexing from
+ /// The current top of the stack what we're lexing from
/// if not expanding a macro.
///
/// This is an alias for either CurLexer or CurPTHLexer.
PreprocessorLexer *CurPPLexer = nullptr;
- /// \brief Used to find the current FileEntry, if CurLexer is non-null
+ /// Used to find the current FileEntry, if CurLexer is non-null
/// and if applicable.
///
/// This allows us to implement \#include_next and find directory-specific
/// properties.
const DirectoryLookup *CurDirLookup = nullptr;
- /// \brief The current macro we are expanding, if we are expanding a macro.
+ /// The current macro we are expanding, if we are expanding a macro.
///
/// One of CurLexer and CurTokenLexer must be null.
std::unique_ptr<TokenLexer> CurTokenLexer;
- /// \brief The kind of lexer we're currently working with.
+ /// The kind of lexer we're currently working with.
enum CurLexerKind {
CLK_Lexer,
CLK_PTHLexer,
@@ -425,11 +425,11 @@ private:
CLK_LexAfterModuleImport
} CurLexerKind = CLK_Lexer;
- /// \brief If the current lexer is for a submodule that is being built, this
+ /// If the current lexer is for a submodule that is being built, this
/// is that submodule.
Module *CurLexerSubmodule = nullptr;
- /// \brief Keeps track of the stack of files currently
+ /// Keeps track of the stack of files currently
/// \#included, and macros currently being expanded from, not counting
/// CurLexer/CurTokenLexer.
struct IncludeStackInfo {
@@ -458,7 +458,7 @@ private:
};
std::vector<IncludeStackInfo> IncludeMacroStack;
- /// \brief Actions invoked when some preprocessor activity is
+ /// Actions invoked when some preprocessor activity is
/// encountered (e.g. a file is \#included, etc).
std::unique_ptr<PPCallbacks> Callbacks;
@@ -617,7 +617,7 @@ private:
struct SubmoduleState;
- /// \brief Information about a submodule that we're currently building.
+ /// Information about a submodule that we're currently building.
struct BuildingSubmoduleInfo {
/// The module that we are building.
Module *M;
@@ -643,7 +643,7 @@ private:
};
SmallVector<BuildingSubmoduleInfo, 8> BuildingSubmoduleStack;
- /// \brief Information about a submodule's preprocessor state.
+ /// Information about a submodule's preprocessor state.
struct SubmoduleState {
/// The macros for the submodule.
MacroMap Macros;
@@ -674,7 +674,7 @@ private:
llvm::DenseMap<const IdentifierInfo *, llvm::TinyPtrVector<ModuleMacro *>>
LeafModuleMacros;
- /// \brief Macros that we want to warn because they are not used at the end
+ /// Macros that we want to warn because they are not used at the end
/// of the translation unit.
///
/// We store just their SourceLocations instead of
@@ -686,7 +686,7 @@ private:
using WarnUnusedMacroLocsTy = llvm::SmallPtrSet<SourceLocation, 32>;
WarnUnusedMacroLocsTy WarnUnusedMacroLocs;
- /// \brief A "freelist" of MacroArg objects that can be
+ /// A "freelist" of MacroArg objects that can be
/// reused for quick allocation.
MacroArgs *MacroArgCache = nullptr;
@@ -713,21 +713,21 @@ private:
unsigned NumFastTokenPaste = 0;
unsigned NumSkipped = 0;
- /// \brief The predefined macros that preprocessor should use from the
+ /// The predefined macros that preprocessor should use from the
/// command line etc.
std::string Predefines;
- /// \brief The file ID for the preprocessor predefines.
+ /// The file ID for the preprocessor predefines.
FileID PredefinesFileID;
/// \{
- /// \brief Cache of macro expanders to reduce malloc traffic.
+ /// Cache of macro expanders to reduce malloc traffic.
enum { TokenLexerCacheSize = 8 };
unsigned NumCachedTokenLexers;
std::unique_ptr<TokenLexer> TokenLexerCache[TokenLexerCacheSize];
/// \}
- /// \brief Keeps macro expanded tokens for TokenLexers.
+ /// Keeps macro expanded tokens for TokenLexers.
//
/// Works like a stack; a TokenLexer adds the macro expanded tokens that is
/// going to lex in the cache and when it finishes the tokens are removed
@@ -735,7 +735,7 @@ private:
SmallVector<Token, 16> MacroExpandedTokens;
std::vector<std::pair<TokenLexer *, size_t>> MacroExpandingLexersStack;
- /// \brief A record of the macro definitions and expansions that
+ /// A record of the macro definitions and expansions that
/// occurred during preprocessing.
///
/// This is an optional side structure that can be enabled with
@@ -745,18 +745,18 @@ private:
/// Cached tokens state.
using CachedTokensTy = SmallVector<Token, 1>;
- /// \brief Cached tokens are stored here when we do backtracking or
+ /// Cached tokens are stored here when we do backtracking or
/// lookahead. They are "lexed" by the CachingLex() method.
CachedTokensTy CachedTokens;
- /// \brief The position of the cached token that CachingLex() should
+ /// The position of the cached token that CachingLex() should
/// "lex" next.
///
/// If it points beyond the CachedTokens vector, it means that a normal
/// Lex() should be invoked.
CachedTokensTy::size_type CachedLexPos = 0;
- /// \brief Stack of backtrack positions, allowing nested backtracks.
+ /// Stack of backtrack positions, allowing nested backtracks.
///
/// The EnableBacktrackAtThisPos() method pushes a position to
/// indicate where CachedLexPos should be set when the BackTrack() method is
@@ -785,7 +785,7 @@ public:
~Preprocessor();
- /// \brief Initialize the preprocessor using information about the target.
+ /// Initialize the preprocessor using information about the target.
///
/// \param Target is owned by the caller and must remain valid for the
/// lifetime of the preprocessor.
@@ -794,7 +794,7 @@ public:
void Initialize(const TargetInfo &Target,
const TargetInfo *AuxTarget = nullptr);
- /// \brief Initialize the preprocessor to parse a model file
+ /// Initialize the preprocessor to parse a model file
///
/// To parse model files the preprocessor of the original source is reused to
/// preserver the identifier table. However to avoid some duplicate
@@ -802,10 +802,10 @@ public:
/// to parse model files. This method does that cleanup.
void InitializeForModelFile();
- /// \brief Cleanup after model file parsing
+ /// Cleanup after model file parsing
void FinalizeForModelFile();
- /// \brief Retrieve the preprocessor options used to initialize this
+ /// Retrieve the preprocessor options used to initialize this
/// preprocessor.
PreprocessorOptions &getPreprocessorOpts() const { return *PPOpts; }
@@ -838,19 +838,19 @@ public:
return ExternalSource;
}
- /// \brief Retrieve the module loader associated with this preprocessor.
+ /// Retrieve the module loader associated with this preprocessor.
ModuleLoader &getModuleLoader() const { return TheModuleLoader; }
bool hadModuleLoaderFatalFailure() const {
return TheModuleLoader.HadFatalFailure;
}
- /// \brief True if we are currently preprocessing a #if or #elif directive
+ /// True if we are currently preprocessing a #if or #elif directive
bool isParsingIfOrElifDirective() const {
return ParsingIfOrElifDirective;
}
- /// \brief Control whether the preprocessor retains comments in output.
+ /// Control whether the preprocessor retains comments in output.
void SetCommentRetentionState(bool KeepComments, bool KeepMacroComments) {
this->KeepComments = KeepComments | KeepMacroComments;
this->KeepMacroComments = KeepMacroComments;
@@ -879,32 +879,32 @@ public:
/// false if it is producing tokens to be consumed by Parse and Sema.
bool isPreprocessedOutput() const { return PreprocessedOutput; }
- /// \brief Return true if we are lexing directly from the specified lexer.
+ /// Return true if we are lexing directly from the specified lexer.
bool isCurrentLexer(const PreprocessorLexer *L) const {
return CurPPLexer == L;
}
- /// \brief Return the current lexer being lexed from.
+ /// Return the current lexer being lexed from.
///
/// Note that this ignores any potentially active macro expansions and _Pragma
/// expansions going on at the time.
PreprocessorLexer *getCurrentLexer() const { return CurPPLexer; }
- /// \brief Return the current file lexer being lexed from.
+ /// Return the current file lexer being lexed from.
///
/// Note that this ignores any potentially active macro expansions and _Pragma
/// expansions going on at the time.
PreprocessorLexer *getCurrentFileLexer() const;
- /// \brief Return the submodule owning the file being lexed. This may not be
+ /// Return the submodule owning the file being lexed. This may not be
/// the current module if we have changed modules since entering the file.
Module *getCurrentLexerSubmodule() const { return CurLexerSubmodule; }
- /// \brief Returns the FileID for the preprocessor predefines.
+ /// Returns the FileID for the preprocessor predefines.
FileID getPredefinesFileID() const { return PredefinesFileID; }
/// \{
- /// \brief Accessors for preprocessor callbacks.
+ /// Accessors for preprocessor callbacks.
///
/// Note that this class takes ownership of any PPCallbacks object given to
/// it.
@@ -925,7 +925,7 @@ public:
(!getLangOpts().Modules || (bool)getMacroDefinition(II));
}
- /// \brief Determine whether II is defined as a macro within the module M,
+ /// Determine whether II is defined as a macro within the module M,
/// if that is a module that we've already preprocessed. Does not check for
/// macros imported into M.
bool isMacroDefinedInLocalModule(const IdentifierInfo *II, Module *M) {
@@ -969,7 +969,7 @@ public:
S.isAmbiguous(*this, II));
}
- /// \brief Given an identifier, return its latest non-imported MacroDirective
+ /// Given an identifier, return its latest non-imported MacroDirective
/// if it is \#define'd and not \#undef'd, or null if it isn't \#define'd.
MacroDirective *getLocalMacroDirective(const IdentifierInfo *II) const {
if (!II->hasMacroDefinition())
@@ -994,14 +994,14 @@ public:
return nullptr;
}
- /// \brief Given an identifier, return the latest non-imported macro
+ /// Given an identifier, return the latest non-imported macro
/// directive for that identifier.
///
/// One can iterate over all previous macro directives from the most recent
/// one.
MacroDirective *getLocalMacroDirectiveHistory(const IdentifierInfo *II) const;
- /// \brief Add a directive to the macro directive history for this identifier.
+ /// Add a directive to the macro directive history for this identifier.
void appendMacroDirective(IdentifierInfo *II, MacroDirective *MD);
DefMacroDirective *appendDefMacroDirective(IdentifierInfo *II, MacroInfo *MI,
SourceLocation Loc) {
@@ -1014,16 +1014,16 @@ public:
return appendDefMacroDirective(II, MI, MI->getDefinitionLoc());
}
- /// \brief Set a MacroDirective that was loaded from a PCH file.
+ /// Set a MacroDirective that was loaded from a PCH file.
void setLoadedMacroDirective(IdentifierInfo *II, MacroDirective *ED,
MacroDirective *MD);
- /// \brief Register an exported macro for a module and identifier.
+ /// Register an exported macro for a module and identifier.
ModuleMacro *addModuleMacro(Module *Mod, IdentifierInfo *II, MacroInfo *Macro,
ArrayRef<ModuleMacro *> Overrides, bool &IsNew);
ModuleMacro *getModuleMacro(Module *Mod, IdentifierInfo *II);
- /// \brief Get the list of leaf (non-overridden) module macros for a name.
+ /// Get the list of leaf (non-overridden) module macros for a name.
ArrayRef<ModuleMacro*> getLeafModuleMacros(const IdentifierInfo *II) const {
if (II->isOutOfDate())
updateOutOfDateIdentifier(const_cast<IdentifierInfo&>(*II));
@@ -1051,7 +1051,7 @@ public:
/// \}
- /// \brief Return the name of the macro defined before \p Loc that has
+ /// Return the name of the macro defined before \p Loc that has
/// spelling \p Tokens. If there are multiple macros with same spelling,
/// return the last one defined.
StringRef getLastMacroWithSpelling(SourceLocation Loc,
@@ -1059,7 +1059,7 @@ public:
const std::string &getPredefines() const { return Predefines; }
- /// \brief Set the predefines for this Preprocessor.
+ /// Set the predefines for this Preprocessor.
///
/// These predefines are automatically injected when parsing the main file.
void setPredefines(const char *P) { Predefines = P; }
@@ -1071,7 +1071,7 @@ public:
return &Identifiers.get(Name);
}
- /// \brief Add the specified pragma handler to this preprocessor.
+ /// Add the specified pragma handler to this preprocessor.
///
/// If \p Namespace is non-null, then it is a token required to exist on the
/// pragma line before the pragma string starts, e.g. "STDC" or "GCC".
@@ -1080,7 +1080,7 @@ public:
AddPragmaHandler(StringRef(), Handler);
}
- /// \brief Remove the specific pragma handler from this preprocessor.
+ /// Remove the specific pragma handler from this preprocessor.
///
/// If \p Namespace is non-null, then it should be the namespace that
/// \p Handler was added to. It is an error to remove a handler that
@@ -1093,68 +1093,68 @@ public:
/// Install empty handlers for all pragmas (making them ignored).
void IgnorePragmas();
- /// \brief Add the specified comment handler to the preprocessor.
+ /// Add the specified comment handler to the preprocessor.
void addCommentHandler(CommentHandler *Handler);
- /// \brief Remove the specified comment handler.
+ /// Remove the specified comment handler.
///
/// It is an error to remove a handler that has not been registered.
void removeCommentHandler(CommentHandler *Handler);
- /// \brief Set the code completion handler to the given object.
+ /// Set the code completion handler to the given object.
void setCodeCompletionHandler(CodeCompletionHandler &Handler) {
CodeComplete = &Handler;
}
- /// \brief Retrieve the current code-completion handler.
+ /// Retrieve the current code-completion handler.
CodeCompletionHandler *getCodeCompletionHandler() const {
return CodeComplete;
}
- /// \brief Clear out the code completion handler.
+ /// Clear out the code completion handler.
void clearCodeCompletionHandler() {
CodeComplete = nullptr;
}
- /// \brief Hook used by the lexer to invoke the "natural language" code
+ /// Hook used by the lexer to invoke the "natural language" code
/// completion point.
void CodeCompleteNaturalLanguage();
- /// \brief Set the code completion token for filtering purposes.
+ /// Set the code completion token for filtering purposes.
void setCodeCompletionIdentifierInfo(IdentifierInfo *Filter) {
CodeCompletionII = Filter;
}
- /// \brief Get the code completion token for filtering purposes.
+ /// Get the code completion token for filtering purposes.
StringRef getCodeCompletionFilter() {
if (CodeCompletionII)
return CodeCompletionII->getName();
return {};
}
- /// \brief Retrieve the preprocessing record, or NULL if there is no
+ /// Retrieve the preprocessing record, or NULL if there is no
/// preprocessing record.
PreprocessingRecord *getPreprocessingRecord() const { return Record; }
- /// \brief Create a new preprocessing record, which will keep track of
+ /// Create a new preprocessing record, which will keep track of
/// all macro expansions, macro definitions, etc.
void createPreprocessingRecord();
- /// \brief Enter the specified FileID as the main source file,
+ /// Enter the specified FileID as the main source file,
/// which implicitly adds the builtin defines etc.
void EnterMainSourceFile();
- /// \brief Inform the preprocessor callbacks that processing is complete.
+ /// Inform the preprocessor callbacks that processing is complete.
void EndSourceFile();
- /// \brief Add a source file to the top of the include stack and
+ /// Add a source file to the top of the include stack and
/// start lexing tokens from it instead of the current buffer.
///
/// Emits a diagnostic, doesn't enter the file, and returns true on error.
bool EnterSourceFile(FileID CurFileID, const DirectoryLookup *Dir,
SourceLocation Loc);
- /// \brief Add a Macro to the top of the include stack and start lexing
+ /// Add a Macro to the top of the include stack and start lexing
/// tokens from it instead of the current buffer.
///
/// \param Args specifies the tokens input to a function-like macro.
@@ -1163,7 +1163,7 @@ public:
void EnterMacro(Token &Identifier, SourceLocation ILEnd, MacroInfo *Macro,
MacroArgs *Args);
- /// \brief Add a "macro" context to the top of the include stack,
+ /// Add a "macro" context to the top of the include stack,
/// which will cause the lexer to start returning the specified tokens.
///
/// If \p DisableMacroExpansion is true, tokens lexed from the token stream
@@ -1188,7 +1188,7 @@ public:
EnterTokenStream(Toks.data(), Toks.size(), DisableMacroExpansion, false);
}
- /// \brief Pop the current lexer/macro exp off the top of the lexer stack.
+ /// Pop the current lexer/macro exp off the top of the lexer stack.
///
/// This should only be used in situations where the current state of the
/// top-of-stack lexer is known.
@@ -1209,7 +1209,7 @@ public:
///
void EnableBacktrackAtThisPos();
- /// \brief Disable the last EnableBacktrackAtThisPos call.
+ /// Disable the last EnableBacktrackAtThisPos call.
void CommitBacktrackedTokens();
struct CachedTokensRange {
@@ -1217,28 +1217,28 @@ public:
};
private:
- /// \brief A range of cached tokens that should be erased after lexing
+ /// A range of cached tokens that should be erased after lexing
/// when backtracking requires the erasure of such cached tokens.
Optional<CachedTokensRange> CachedTokenRangeToErase;
public:
- /// \brief Returns the range of cached tokens that were lexed since
+ /// Returns the range of cached tokens that were lexed since
/// EnableBacktrackAtThisPos() was previously called.
CachedTokensRange LastCachedTokenRange();
- /// \brief Erase the range of cached tokens that were lexed since
+ /// Erase the range of cached tokens that were lexed since
/// EnableBacktrackAtThisPos() was previously called.
void EraseCachedTokens(CachedTokensRange TokenRange);
- /// \brief Make Preprocessor re-lex the tokens that were lexed since
+ /// Make Preprocessor re-lex the tokens that were lexed since
/// EnableBacktrackAtThisPos() was previously called.
void Backtrack();
- /// \brief True if EnableBacktrackAtThisPos() was called and
+ /// True if EnableBacktrackAtThisPos() was called and
/// caching of tokens is on.
bool isBacktrackEnabled() const { return !BacktrackPositions.empty(); }
- /// \brief Lex the next token for this preprocessor.
+ /// Lex the next token for this preprocessor.
void Lex(Token &Result);
void LexAfterModuleImport(Token &Result);
@@ -1249,7 +1249,7 @@ public:
return CurSubmoduleState->VisibleModules.getImportLoc(M);
}
- /// \brief Lex a string literal, which may be the concatenation of multiple
+ /// Lex a string literal, which may be the concatenation of multiple
/// string literals and may even come from macro expansion.
/// \returns true on success, false if a error diagnostic has been generated.
bool LexStringLiteral(Token &Result, std::string &String,
@@ -1262,13 +1262,13 @@ public:
AllowMacroExpansion);
}
- /// \brief Complete the lexing of a string literal where the first token has
+ /// Complete the lexing of a string literal where the first token has
/// already been lexed (see LexStringLiteral).
bool FinishLexStringLiteral(Token &Result, std::string &String,
const char *DiagnosticTag,
bool AllowMacroExpansion);
- /// \brief Lex a token. If it's a comment, keep lexing until we get
+ /// Lex a token. If it's a comment, keep lexing until we get
/// something not a comment.
///
/// This is useful in -E -C mode where comments would foul up preprocessor
@@ -1279,7 +1279,7 @@ public:
while (Result.getKind() == tok::comment);
}
- /// \brief Just like Lex, but disables macro expansion of identifier tokens.
+ /// Just like Lex, but disables macro expansion of identifier tokens.
void LexUnexpandedToken(Token &Result) {
// Disable macro expansion.
bool OldVal = DisableMacroExpansion;
@@ -1291,7 +1291,7 @@ public:
DisableMacroExpansion = OldVal;
}
- /// \brief Like LexNonComment, but this disables macro expansion of
+ /// Like LexNonComment, but this disables macro expansion of
/// identifier tokens.
void LexUnexpandedNonComment(Token &Result) {
do
@@ -1299,7 +1299,7 @@ public:
while (Result.getKind() == tok::comment);
}
- /// \brief Parses a simple integer literal to get its numeric value. Floating
+ /// Parses a simple integer literal to get its numeric value. Floating
/// point literals and user defined literals are rejected. Used primarily to
/// handle pragmas that accept integer arguments.
bool parseSimpleIntegerLiteral(Token &Tok, uint64_t &Value);
@@ -1310,7 +1310,7 @@ public:
MacroExpansionInDirectivesOverride = true;
}
- /// \brief Peeks ahead N tokens and returns that token without consuming any
+ /// Peeks ahead N tokens and returns that token without consuming any
/// tokens.
///
/// LookAhead(0) returns the next token that would be returned by Lex(),
@@ -1324,7 +1324,7 @@ public:
return PeekAhead(N+1);
}
- /// \brief When backtracking is enabled and tokens are cached,
+ /// When backtracking is enabled and tokens are cached,
/// this allows to revert a specific number of tokens.
///
/// Note that the number of tokens being reverted should be up to the last
@@ -1339,7 +1339,7 @@ public:
CachedLexPos -= N;
}
- /// \brief Enters a token in the token stream to be lexed next.
+ /// Enters a token in the token stream to be lexed next.
///
/// If BackTrack() is called afterwards, the token will remain at the
/// insertion point.
@@ -1369,18 +1369,18 @@ public:
return CachedTokens[CachedLexPos-1].getLastLoc();
}
- /// \brief Whether \p Tok is the most recent token (`CachedLexPos - 1`) in
+ /// Whether \p Tok is the most recent token (`CachedLexPos - 1`) in
/// CachedTokens.
bool IsPreviousCachedToken(const Token &Tok) const;
- /// \brief Replace token in `CachedLexPos - 1` in CachedTokens by the tokens
+ /// Replace token in `CachedLexPos - 1` in CachedTokens by the tokens
/// in \p NewToks.
///
/// Useful when a token needs to be split in smaller ones and CachedTokens
/// most recent token must to be updated to reflect that.
void ReplacePreviousCachedToken(ArrayRef<Token> NewToks);
- /// \brief Replace the last token with an annotation token.
+ /// Replace the last token with an annotation token.
///
/// Like AnnotateCachedTokens(), this routine replaces an
/// already-parsed (and resolved) token with an annotation
@@ -1406,19 +1406,19 @@ public:
CachedTokens[CachedLexPos-1] = Tok;
}
- /// \brief Recompute the current lexer kind based on the CurLexer/CurPTHLexer/
+ /// Recompute the current lexer kind based on the CurLexer/CurPTHLexer/
/// CurTokenLexer pointers.
void recomputeCurLexerKind();
- /// \brief Returns true if incremental processing is enabled
+ /// Returns true if incremental processing is enabled
bool isIncrementalProcessingEnabled() const { return IncrementalProcessing; }
- /// \brief Enables the incremental processing
+ /// Enables the incremental processing
void enableIncrementalProcessing(bool value = true) {
IncrementalProcessing = value;
}
- /// \brief Specify the point at which code-completion will be performed.
+ /// Specify the point at which code-completion will be performed.
///
/// \param File the file in which code completion should occur. If
/// this file is included multiple times, code-completion will
@@ -1435,16 +1435,16 @@ public:
bool SetCodeCompletionPoint(const FileEntry *File,
unsigned Line, unsigned Column);
- /// \brief Determine if we are performing code completion.
+ /// Determine if we are performing code completion.
bool isCodeCompletionEnabled() const { return CodeCompletionFile != nullptr; }
- /// \brief Returns the location of the code-completion point.
+ /// Returns the location of the code-completion point.
///
/// Returns an invalid location if code-completion is not enabled or the file
/// containing the code-completion point has not been lexed yet.
SourceLocation getCodeCompletionLoc() const { return CodeCompletionLoc; }
- /// \brief Returns the start location of the file of code-completion point.
+ /// Returns the start location of the file of code-completion point.
///
/// Returns an invalid location if code-completion is not enabled or the file
/// containing the code-completion point has not been lexed yet.
@@ -1452,11 +1452,11 @@ public:
return CodeCompletionFileLoc;
}
- /// \brief Returns true if code-completion is enabled and we have hit the
+ /// Returns true if code-completion is enabled and we have hit the
/// code-completion point.
bool isCodeCompletionReached() const { return CodeCompletionReached; }
- /// \brief Note that we hit the code-completion point.
+ /// Note that we hit the code-completion point.
void setCodeCompletionReached() {
assert(isCodeCompletionEnabled() && "Code-completion not enabled!");
CodeCompletionReached = true;
@@ -1464,7 +1464,7 @@ public:
getDiagnostics().setSuppressAllDiagnostics(true);
}
- /// \brief The location of the currently-active \#pragma clang
+ /// The location of the currently-active \#pragma clang
/// arc_cf_code_audited begin.
///
/// Returns an invalid location if there is no such pragma active.
@@ -1472,13 +1472,13 @@ public:
return PragmaARCCFCodeAuditedLoc;
}
- /// \brief Set the location of the currently-active \#pragma clang
+ /// 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 The location of the currently-active \#pragma clang
+ /// The location of the currently-active \#pragma clang
/// assume_nonnull begin.
///
/// Returns an invalid location if there is no such pragma active.
@@ -1486,19 +1486,19 @@ public:
return PragmaAssumeNonNullLoc;
}
- /// \brief Set the location of the currently-active \#pragma clang
+ /// Set the location of the currently-active \#pragma clang
/// assume_nonnull begin. An invalid location ends the pragma.
void setPragmaAssumeNonNullLoc(SourceLocation Loc) {
PragmaAssumeNonNullLoc = Loc;
}
- /// \brief Set the directory in which the main file should be considered
+ /// Set the directory in which the main file should be considered
/// to have been found, if it is not a real file.
void setMainFileDir(const DirectoryEntry *Dir) {
MainFileDir = Dir;
}
- /// \brief Instruct the preprocessor to skip part of the main source file.
+ /// Instruct the preprocessor to skip part of the main source file.
///
/// \param Bytes The number of bytes in the preamble to skip.
///
@@ -1533,7 +1533,7 @@ public:
return Lexer::getSpelling(loc, buffer, SourceMgr, LangOpts, invalid);
}
- /// \brief Return the 'spelling' of the Tok token.
+ /// Return the 'spelling' of the Tok token.
///
/// The spelling of a token is the characters used to represent the token in
/// the source file after trigraph expansion and escaped-newline folding. In
@@ -1545,7 +1545,7 @@ public:
return Lexer::getSpelling(Tok, SourceMgr, LangOpts, Invalid);
}
- /// \brief Get the spelling of a token into a preallocated buffer, instead
+ /// Get the spelling of a token into a preallocated buffer, instead
/// of as an std::string.
///
/// The caller is required to allocate enough space for the token, which is
@@ -1562,7 +1562,7 @@ public:
return Lexer::getSpelling(Tok, Buffer, SourceMgr, LangOpts, Invalid);
}
- /// \brief Get the spelling of a token into a SmallVector.
+ /// Get the spelling of a token into a SmallVector.
///
/// Note that the returned StringRef may not point to the
/// supplied buffer if a copy can be avoided.
@@ -1570,14 +1570,14 @@ public:
SmallVectorImpl<char> &Buffer,
bool *Invalid = nullptr) const;
- /// \brief Relex the token at the specified location.
+ /// Relex the token at the specified location.
/// \returns true if there was a failure, false on success.
bool getRawToken(SourceLocation Loc, Token &Result,
bool IgnoreWhiteSpace = false) {
return Lexer::getRawToken(Loc, Result, SourceMgr, LangOpts, IgnoreWhiteSpace);
}
- /// \brief Given a Token \p Tok that is a numeric constant with length 1,
+ /// Given a Token \p Tok that is a numeric constant with length 1,
/// return the character.
char
getSpellingOfSingleCharacterNumericConstant(const Token &Tok,
@@ -1595,7 +1595,7 @@ public:
return *SourceMgr.getCharacterData(Tok.getLocation(), Invalid);
}
- /// \brief Retrieve the name of the immediate macro expansion.
+ /// Retrieve the name of the immediate macro expansion.
///
/// This routine starts from a source location, and finds the name of the
/// macro responsible for its immediate expansion. It looks through any
@@ -1607,7 +1607,7 @@ public:
return Lexer::getImmediateMacroName(Loc, SourceMgr, getLangOpts());
}
- /// \brief Plop the specified string into a scratch buffer and set the
+ /// Plop the specified string into a scratch buffer and set the
/// specified token's location and length to it.
///
/// If specified, the source location provides a location of the expansion
@@ -1621,7 +1621,7 @@ public:
/// split token will return the split token rather than the original.
SourceLocation SplitToken(SourceLocation TokLoc, unsigned Length);
- /// \brief Computes the source location just past the end of the
+ /// Computes the source location just past the end of the
/// token at this source location.
///
/// This routine can be used to produce a source location that
@@ -1640,7 +1640,7 @@ public:
return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, LangOpts);
}
- /// \brief Returns true if the given MacroID location points at the first
+ /// Returns true if the given MacroID location points at the first
/// token of the macro expansion.
///
/// \param MacroBegin If non-null and function returns true, it is set to
@@ -1651,7 +1651,7 @@ public:
MacroBegin);
}
- /// \brief Returns true if the given MacroID location points at the last
+ /// Returns true if the given MacroID location points at the last
/// token of the macro expansion.
///
/// \param MacroEnd If non-null and function returns true, it is set to
@@ -1661,20 +1661,20 @@ public:
return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, LangOpts, MacroEnd);
}
- /// \brief Print the token to stderr, used for debugging.
+ /// Print the token to stderr, used for debugging.
void DumpToken(const Token &Tok, bool DumpFlags = false) const;
void DumpLocation(SourceLocation Loc) const;
void DumpMacro(const MacroInfo &MI) const;
void dumpMacroInfo(const IdentifierInfo *II);
- /// \brief Given a location that specifies the start of a
+ /// Given a location that specifies the start of a
/// token, return a new location that specifies a character within the token.
SourceLocation AdvanceToTokenCharacter(SourceLocation TokStart,
unsigned Char) const {
return Lexer::AdvanceToTokenCharacter(TokStart, Char, SourceMgr, LangOpts);
}
- /// \brief Increment the counters for the number of token paste operations
+ /// Increment the counters for the number of token paste operations
/// performed.
///
/// If fast was specified, this is a 'fast paste' case we handled.
@@ -1707,13 +1707,13 @@ private:
llvm::DenseMap<IdentifierInfo*,unsigned> PoisonReasons;
public:
- /// \brief Specifies the reason for poisoning an identifier.
+ /// Specifies the reason for poisoning an identifier.
///
/// If that identifier is accessed while poisoned, then this reason will be
/// used instead of the default "poisoned" diagnostic.
void SetPoisonReason(IdentifierInfo *II, unsigned DiagID);
- /// \brief Display reason for poisoned identifier.
+ /// Display reason for poisoned identifier.
void HandlePoisonedIdentifier(Token & Tok);
void MaybeHandlePoisonedIdentifier(Token & Identifier) {
@@ -1746,7 +1746,7 @@ private:
public:
void PoisonSEHIdentifiers(bool Poison = true); // Borland
- /// \brief Callback invoked when the lexer reads an identifier and has
+ /// Callback invoked when the lexer reads an identifier and has
/// filled in the tokens IdentifierInfo member.
///
/// This callback potentially macro expands it or turns it into a named
@@ -1756,36 +1756,36 @@ public:
/// lex again.
bool HandleIdentifier(Token &Identifier);
- /// \brief Callback invoked when the lexer hits the end of the current file.
+ /// Callback invoked when the lexer hits the end of the current file.
///
/// This either returns the EOF token and returns true, or
/// pops a level off the include stack and returns false, at which point the
/// client should call lex again.
bool HandleEndOfFile(Token &Result, bool isEndOfMacro = false);
- /// \brief Callback invoked when the current TokenLexer hits the end of its
+ /// Callback invoked when the current TokenLexer hits the end of its
/// token stream.
bool HandleEndOfTokenLexer(Token &Result);
- /// \brief Callback invoked when the lexer sees a # token at the start of a
+ /// Callback invoked when the lexer sees a # token at the start of a
/// line.
///
/// This consumes the directive, modifies the lexer/preprocessor state, and
/// advances the lexer(s) so that the next token read is the correct one.
void HandleDirective(Token &Result);
- /// \brief Ensure that the next token is a tok::eod token.
+ /// Ensure that the next token is a tok::eod token.
///
/// If not, emit a diagnostic and consume up until the eod.
/// If \p EnableMacros is true, then we consider macros that expand to zero
/// tokens as being ok.
void CheckEndOfDirective(const char *Directive, bool EnableMacros = false);
- /// \brief Read and discard all tokens remaining on the current line until
+ /// Read and discard all tokens remaining on the current line until
/// the tok::eod token is found.
void DiscardUntilEndOfDirective();
- /// \brief Returns true if the preprocessor has seen a use of
+ /// Returns true if the preprocessor has seen a use of
/// __DATE__ or __TIME__ in the file so far.
bool SawDateOrTime() const {
return DATELoc != SourceLocation() || TIMELoc != SourceLocation();
@@ -1793,13 +1793,13 @@ public:
unsigned getCounterValue() const { return CounterValue; }
void setCounterValue(unsigned V) { CounterValue = V; }
- /// \brief Retrieves the module that we're currently building, if any.
+ /// Retrieves the module that we're currently building, if any.
Module *getCurrentModule();
- /// \brief Allocate a new MacroInfo object with the provided SourceLocation.
+ /// Allocate a new MacroInfo object with the provided SourceLocation.
MacroInfo *AllocateMacroInfo(SourceLocation L);
- /// \brief Turn the specified lexer token into a fully checked and spelled
+ /// Turn the specified lexer token into a fully checked and spelled
/// filename, e.g. as an operand of \#include.
///
/// The caller is expected to provide a buffer that is large enough to hold
@@ -1810,7 +1810,7 @@ public:
/// in ""'s.
bool GetIncludeFilenameSpelling(SourceLocation Loc,StringRef &Filename);
- /// \brief Given a "foo" or \<foo> reference, look up the indicated file.
+ /// Given a "foo" or \<foo> reference, look up the indicated file.
///
/// Returns null on failure. \p isAngled indicates whether the file
/// reference is for system \#include's or not (i.e. using <> instead of "").
@@ -1823,17 +1823,17 @@ public:
ModuleMap::KnownHeader *SuggestedModule,
bool *IsMapped, bool SkipCache = false);
- /// \brief Get the DirectoryLookup structure used to find the current
+ /// Get the DirectoryLookup structure used to find the current
/// FileEntry, if CurLexer is non-null and if applicable.
///
/// This allows us to implement \#include_next and find directory-specific
/// properties.
const DirectoryLookup *GetCurDirLookup() { return CurDirLookup; }
- /// \brief Return true if we're in the top-level file, not in a \#include.
+ /// Return true if we're in the top-level file, not in a \#include.
bool isInPrimaryFile() const;
- /// \brief Handle cases where the \#include name is expanded
+ /// Handle cases where the \#include name is expanded
/// from a macro as multiple tokens, which need to be glued together.
///
/// This occurs for code like:
@@ -1849,7 +1849,7 @@ public:
bool ConcatenateIncludeName(SmallString<128> &FilenameBuffer,
SourceLocation &End);
- /// \brief Lex an on-off-switch (C99 6.10.6p2) and verify that it is
+ /// Lex an on-off-switch (C99 6.10.6p2) and verify that it is
/// followed by EOD. Return true if the token is not a valid on-off-switch.
bool LexOnOffSwitch(tok::OnOffSwitch &OOS);
@@ -1898,7 +1898,7 @@ private:
VisibilityMacroDirective *AllocateVisibilityMacroDirective(SourceLocation Loc,
bool isPublic);
- /// \brief Lex and validate a macro name, which occurs after a
+ /// Lex and validate a macro name, which occurs after a
/// \#define or \#undef.
///
/// \param MacroNameTok Token that represents the name defined or undefined.
@@ -1942,7 +1942,7 @@ private:
bool FoundNonSkipPortion, bool FoundElse,
SourceLocation ElseLoc = SourceLocation());
- /// \brief A fast PTH version of SkipExcludedConditionalBlock.
+ /// A fast PTH version of SkipExcludedConditionalBlock.
void PTHSkipExcludedConditionalBlock();
/// Information about the result for evaluating an expression for a
@@ -1955,17 +1955,17 @@ private:
bool IncludedUndefinedIds;
};
- /// \brief Evaluate an integer constant expression that may occur after a
+ /// Evaluate an integer constant expression that may occur after a
/// \#if or \#elif directive and return a \p DirectiveEvalResult object.
///
/// If the expression is equivalent to "!defined(X)" return X in IfNDefMacro.
DirectiveEvalResult EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro);
- /// \brief Install the standard preprocessor pragmas:
+ /// Install the standard preprocessor pragmas:
/// \#pragma GCC poison/system_header/dependency and \#pragma once.
void RegisterBuiltinPragmas();
- /// \brief Register builtin macros such as __LINE__ with the identifier table.
+ /// Register builtin macros such as __LINE__ with the identifier table.
void RegisterBuiltinMacros();
/// If an identifier token is read that is to be expanded as a macro, handle
@@ -1973,7 +1973,7 @@ private:
/// otherwise the caller should lex again.
bool HandleMacroExpandedIdentifier(Token &Tok, const MacroDefinition &MD);
- /// \brief Cache macro expanded tokens for TokenLexers.
+ /// Cache macro expanded tokens for TokenLexers.
//
/// Works like a stack; a TokenLexer adds the macro expanded tokens that is
/// going to lex in the cache and when it finishes the tokens are removed
@@ -1993,34 +1993,34 @@ private:
MacroArgs *ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI,
SourceLocation &ExpansionEnd);
- /// \brief If an identifier token is read that is to be expanded
+ /// If an identifier token is read that is to be expanded
/// as a builtin macro, handle it and return the next token as 'Tok'.
void ExpandBuiltinMacro(Token &Tok);
- /// \brief Read a \c _Pragma directive, slice it up, process it, then
+ /// Read a \c _Pragma directive, slice it up, process it, then
/// return the first token after the directive.
/// This assumes that the \c _Pragma token has just been read into \p Tok.
void Handle_Pragma(Token &Tok);
- /// \brief Like Handle_Pragma except the pragma text is not enclosed within
+ /// Like Handle_Pragma except the pragma text is not enclosed within
/// a string literal.
void HandleMicrosoft__pragma(Token &Tok);
- /// \brief Add a lexer to the top of the include stack and
+ /// Add a lexer to the top of the include stack and
/// start lexing tokens from it instead of the current buffer.
void EnterSourceFileWithLexer(Lexer *TheLexer, const DirectoryLookup *Dir);
- /// \brief Add a lexer to the top of the include stack and
+ /// Add a lexer to the top of the include stack and
/// start getting tokens from it using the PTH cache.
void EnterSourceFileWithPTH(PTHLexer *PL, const DirectoryLookup *Dir);
- /// \brief Set the FileID for the preprocessor predefines.
+ /// Set the FileID for the preprocessor predefines.
void setPredefinesFileID(FileID FID) {
assert(PredefinesFileID.isInvalid() && "PredefinesFileID already set!");
PredefinesFileID = FID;
}
- /// \brief Returns true if we are lexing from a file and not a
+ /// Returns true if we are lexing from a file and not a
/// pragma or a macro.
static bool IsFileLexer(const Lexer* L, const PreprocessorLexer* P) {
return L ? !L->isPragmaLexer() : P != nullptr;
@@ -2086,12 +2086,12 @@ public:
DiagnosticsEngine &Diags, Module *M);
// Module inclusion testing.
- /// \brief Find the module that owns the source or header file that
+ /// Find the module that owns the source or header file that
/// \p Loc points to. If the location is in a file that was included
/// into a module, or is outside any module, returns nullptr.
Module *getModuleForLocation(SourceLocation Loc);
- /// \brief We want to produce a diagnostic at location IncLoc concerning a
+ /// We want to produce a diagnostic at location IncLoc concerning a
/// missing module import.
///
/// \param IncLoc The location at which the missing import was detected.
@@ -2134,7 +2134,7 @@ public:
}
private:
- /// \brief After processing predefined file, initialize the conditional stack from
+ /// After processing predefined file, initialize the conditional stack from
/// the preamble.
void replayPreambleConditionalStack();
@@ -2171,12 +2171,12 @@ public:
// has inserted some tokens and getCommentRetentionState() is false.
bool HandleComment(Token &Token, SourceRange Comment);
- /// \brief A macro is used, update information about macros that need unused
+ /// A macro is used, update information about macros that need unused
/// warnings.
void markMacroAsUsed(MacroInfo *MI);
};
-/// \brief Abstract base class that describes a handler that will receive
+/// Abstract base class that describes a handler that will receive
/// source ranges for each of the comments encountered in the source file.
class CommentHandler {
public:
@@ -2187,7 +2187,7 @@ public:
virtual bool HandleComment(Preprocessor &PP, SourceRange Comment) = 0;
};
-/// \brief Registry of pragma handlers added by plugins
+/// Registry of pragma handlers added by plugins
using PragmaHandlerRegistry = llvm::Registry<PragmaHandler>;
} // namespace clang
diff --git a/include/clang/Lex/PreprocessorLexer.h b/include/clang/Lex/PreprocessorLexer.h
index ff71d11b45..bb02725b11 100644
--- a/include/clang/Lex/PreprocessorLexer.h
+++ b/include/clang/Lex/PreprocessorLexer.h
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
//
/// \file
-/// \brief Defines the PreprocessorLexer interface.
+/// Defines the PreprocessorLexer interface.
//
//===----------------------------------------------------------------------===//
@@ -39,21 +39,21 @@ protected:
/// The SourceManager FileID corresponding to the file being lexed.
const FileID FID;
- /// \brief Number of SLocEntries before lexing the file.
+ /// Number of SLocEntries before lexing the file.
unsigned InitialNumSLocEntries = 0;
//===--------------------------------------------------------------------===//
// Context-specific lexing flags set by the preprocessor.
//===--------------------------------------------------------------------===//
- /// \brief True when parsing \#XXX; turns '\\n' into a tok::eod token.
+ /// True when parsing \#XXX; turns '\\n' into a tok::eod token.
bool ParsingPreprocessorDirective = false;
- /// \brief True after \#include; turns \<xx> into a tok::angle_string_literal
+ /// True after \#include; turns \<xx> into a tok::angle_string_literal
/// token.
bool ParsingFilename = false;
- /// \brief True if in raw mode.
+ /// 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:
@@ -68,11 +68,11 @@ protected:
/// Note that in raw mode that the PP pointer may be null.
bool LexingRawMode = false;
- /// \brief A state machine that detects the \#ifndef-wrapping a file
+ /// A state machine that detects the \#ifndef-wrapping a file
/// idiom for the multiple-include optimization.
MultipleIncludeOpt MIOpt;
- /// \brief Information about the set of \#if/\#ifdef/\#ifndef blocks
+ /// Information about the set of \#if/\#ifdef/\#ifndef blocks
/// we are currently in.
SmallVector<PPConditionalInfo, 4> ConditionalStack;
@@ -82,7 +82,7 @@ protected:
virtual void IndirectLex(Token& Result) = 0;
- /// \brief Return the source location for the next observable location.
+ /// Return the source location for the next observable location.
virtual SourceLocation getSourceLocation() = 0;
//===--------------------------------------------------------------------===//
@@ -114,7 +114,7 @@ protected:
return false;
}
- /// \brief Return the top of the conditional stack.
+ /// Return the top of the conditional stack.
/// \pre This requires that there be a conditional active.
PPConditionalInfo &peekConditionalLevel() {
assert(!ConditionalStack.empty() && "No conditionals active!");
@@ -130,23 +130,23 @@ public:
//===--------------------------------------------------------------------===//
// Misc. lexing methods.
- /// \brief After the preprocessor has parsed a \#include, lex and
+ /// 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);
- /// \brief Inform the lexer whether or not we are currently lexing a
+ /// Inform the lexer whether or not we are currently lexing a
/// preprocessor directive.
void setParsingPreprocessorDirective(bool f) {
ParsingPreprocessorDirective = f;
}
- /// \brief Return true if this lexer is in raw mode or not.
+ /// Return true if this lexer is in raw mode or not.
bool isLexingRawMode() const { return LexingRawMode; }
- /// \brief Return the preprocessor object for this lexer.
+ /// Return the preprocessor object for this lexer.
Preprocessor *getPP() const { return PP; }
FileID getFileID() const {
@@ -155,7 +155,7 @@ public:
return FID;
}
- /// \brief Number of SLocEntries before lexing the file.
+ /// Number of SLocEntries before lexing the file.
unsigned getInitialNumSLocEntries() const {
return InitialNumSLocEntries;
}
@@ -164,7 +164,7 @@ public:
/// getFileID(), this only works for lexers with attached preprocessors.
const FileEntry *getFileEntry() const;
- /// \brief Iterator that traverses the current stack of preprocessor
+ /// Iterator that traverses the current stack of preprocessor
/// conditional directives (\#if/\#ifdef/\#ifndef).
using conditional_iterator =
SmallVectorImpl<PPConditionalInfo>::const_iterator;
diff --git a/include/clang/Lex/PreprocessorOptions.h b/include/clang/Lex/PreprocessorOptions.h
index 55fc305dc2..8cf1fc6058 100644
--- a/include/clang/Lex/PreprocessorOptions.h
+++ b/include/clang/Lex/PreprocessorOptions.h
@@ -27,14 +27,14 @@ class MemoryBuffer;
namespace clang {
-/// \brief Enumerate the kinds of standard library that
+/// Enumerate the kinds of standard library that
enum ObjCXXARCStandardLibraryKind {
ARCXX_nolib,
- /// \brief libc++
+ /// libc++
ARCXX_libcxx,
- /// \brief libstdc++
+ /// libstdc++
ARCXX_libstdcxx
};
@@ -46,42 +46,42 @@ public:
std::vector<std::string> Includes;
std::vector<std::string> MacroIncludes;
- /// \brief Initialize the preprocessor with the compiler and target specific
+ /// Initialize the preprocessor with the compiler and target specific
/// predefines.
bool UsePredefines = true;
- /// \brief Whether we should maintain a detailed record of all macro
+ /// Whether we should maintain a detailed record of all macro
/// definitions and expansions.
bool DetailedRecord = false;
/// The implicit PCH included at the start of the translation unit, or empty.
std::string ImplicitPCHInclude;
- /// \brief Headers that will be converted to chained PCHs in memory.
+ /// Headers that will be converted to chained PCHs in memory.
std::vector<std::string> ChainedIncludes;
- /// \brief When true, disables most of the normal validation performed on
+ /// When true, disables most of the normal validation performed on
/// precompiled headers.
bool DisablePCHValidation = false;
- /// \brief When true, a PCH with compiler errors will not be rejected.
+ /// When true, a PCH with compiler errors will not be rejected.
bool AllowPCHWithCompilerErrors = false;
- /// \brief Dump declarations that are deserialized from PCH, for testing.
+ /// Dump declarations that are deserialized from PCH, for testing.
bool DumpDeserializedPCHDecls = false;
- /// \brief This is a set of names for decls that we do not want to be
+ /// This is a set of names for decls that we do not want to be
/// deserialized, and we emit an error if they are; for testing purposes.
std::set<std::string> DeserializedPCHDeclsToErrorOn;
- /// \brief If non-zero, the implicit PCH include is actually a precompiled
+ /// If non-zero, the implicit PCH include is actually a precompiled
/// preamble that covers this number of bytes in the main source file.
///
/// The boolean indicates whether the preamble ends at the start of a new
/// line.
std::pair<unsigned, bool> PrecompiledPreambleBytes;
- /// \brief True indicates that a preamble is being generated.
+ /// True indicates that a preamble is being generated.
///
/// When the lexer is done, one of the things that need to be preserved is the
/// conditional #if stack, so the ASTWriter/ASTReader can save/restore it when
@@ -105,22 +105,22 @@ public:
/// When enabled, the preprocessor will construct editor placeholder tokens.
bool LexEditorPlaceholders = true;
- /// \brief True if the SourceManager should report the original file name for
+ /// True if the SourceManager should report the original file name for
/// contents of files that were remapped to other files. Defaults to true.
bool RemappedFilesKeepOriginalName = true;
- /// \brief The set of file remappings, which take existing files on
+ /// The set of file remappings, which take existing files on
/// the system (the first part of each pair) and gives them the
/// contents of other files on the system (the second part of each
/// pair).
std::vector<std::pair<std::string, std::string>> RemappedFiles;
- /// \brief The set of file-to-buffer remappings, which take existing files
+ /// The set of file-to-buffer remappings, which take existing files
/// on the system (the first part of each pair) and gives them the contents
/// of the specified memory buffer (the second part of each pair).
std::vector<std::pair<std::string, llvm::MemoryBuffer *>> RemappedFileBuffers;
- /// \brief Whether the compiler instance should retain (i.e., not free)
+ /// Whether the compiler instance should retain (i.e., not free)
/// the buffers associated with remapped files.
///
/// This flag defaults to false; it can be set true only through direct
@@ -128,12 +128,12 @@ public:
/// compiler invocation and its buffers will be reused.
bool RetainRemappedFileBuffers = false;
- /// \brief The Objective-C++ ARC standard library that we should support,
+ /// The Objective-C++ ARC standard library that we should support,
/// by providing appropriate definitions to retrofit the standard library
/// with support for lifetime-qualified pointers.
ObjCXXARCStandardLibraryKind ObjCXXARCStandardLibrary = ARCXX_nolib;
- /// \brief Records the set of modules
+ /// Records the set of modules
class FailedModulesSet {
llvm::StringSet<> Failed;
@@ -147,7 +147,7 @@ public:
}
};
- /// \brief The set of modules that failed to build.
+ /// The set of modules that failed to build.
///
/// This pointer will be shared among all of the compiler instances created
/// to (re)build modules, so that once a module fails to build anywhere,
@@ -174,7 +174,7 @@ public:
RemappedFileBuffers.clear();
}
- /// \brief Reset any options that are not considered when building a
+ /// Reset any options that are not considered when building a
/// module.
void resetNonModularOptions() {
Includes.clear();
diff --git a/include/clang/Lex/Token.h b/include/clang/Lex/Token.h
index 02a1fef70f..633e1d1569 100644
--- a/include/clang/Lex/Token.h
+++ b/include/clang/Lex/Token.h
@@ -102,24 +102,24 @@ public:
return is(K1) || isOneOf(K2, Ks...);
}
- /// \brief Return true if this is a raw identifier (when lexing
+ /// Return true if this is a raw identifier (when lexing
/// in raw mode) or a non-keyword identifier (when lexing in non-raw mode).
bool isAnyIdentifier() const {
return tok::isAnyIdentifier(getKind());
}
- /// \brief Return true if this is a "literal", like a numeric
+ /// Return true if this is a "literal", like a numeric
/// constant, string, etc.
bool isLiteral() const {
return tok::isLiteral(getKind());
}
- /// \brief Return true if this is any of tok::annot_* kind tokens.
+ /// Return true if this is any of tok::annot_* kind tokens.
bool isAnnotation() const {
return tok::isAnnotation(getKind());
}
- /// \brief Return a source location identifier for the specified
+ /// Return a source location identifier for the specified
/// offset in the current file.
SourceLocation getLocation() const {
return SourceLocation::getFromRawEncoding(Loc);
@@ -153,7 +153,7 @@ public:
: getLocation().getLocWithOffset(getLength());
}
- /// \brief SourceRange of the group of tokens that this annotation token
+ /// SourceRange of the group of tokens that this annotation token
/// represents.
SourceRange getAnnotationRange() const {
return SourceRange(getLocation(), getAnnotationEndLoc());
@@ -165,7 +165,7 @@ public:
const char *getName() const { return tok::getTokenName(Kind); }
- /// \brief Reset all flags to cleared.
+ /// Reset all flags to cleared.
void startToken() {
Kind = tok::unknown;
Flags = 0;
@@ -230,22 +230,22 @@ public:
PtrData = val;
}
- /// \brief Set the specified flag.
+ /// Set the specified flag.
void setFlag(TokenFlags Flag) {
Flags |= Flag;
}
- /// \brief Get the specified flag.
+ /// Get the specified flag.
bool getFlag(TokenFlags Flag) const {
return (Flags & Flag) != 0;
}
- /// \brief Unset the specified flag.
+ /// Unset the specified flag.
void clearFlag(TokenFlags Flag) {
Flags &= ~Flag;
}
- /// \brief Return the internal represtation of the flags.
+ /// Return the internal represtation of the flags.
///
/// This is only intended for low-level operations such as writing tokens to
/// disk.
@@ -253,7 +253,7 @@ public:
return Flags;
}
- /// \brief Set a flag to either true or false.
+ /// Set a flag to either true or false.
void setFlagValue(TokenFlags Flag, bool Val) {
if (Val)
setFlag(Flag);
@@ -265,28 +265,28 @@ public:
///
bool isAtStartOfLine() const { return getFlag(StartOfLine); }
- /// \brief Return true if this token has whitespace before it.
+ /// Return true if this token has whitespace before it.
///
bool hasLeadingSpace() const { return getFlag(LeadingSpace); }
- /// \brief Return true if this identifier token should never
+ /// Return true if this identifier token should never
/// be expanded in the future, due to C99 6.10.3.4p2.
bool isExpandDisabled() const { return getFlag(DisableExpand); }
- /// \brief Return true if we have an ObjC keyword identifier.
+ /// Return true if we have an ObjC keyword identifier.
bool isObjCAtKeyword(tok::ObjCKeywordKind objcKey) const;
- /// \brief Return the ObjC keyword kind.
+ /// Return the ObjC keyword kind.
tok::ObjCKeywordKind getObjCKeywordID() const;
- /// \brief Return true if this token has trigraphs or escaped newlines in it.
+ /// Return true if this token has trigraphs or escaped newlines in it.
bool needsCleaning() const { return getFlag(NeedsCleaning); }
- /// \brief Return true if this token has an empty macro before it.
+ /// Return true if this token has an empty macro before it.
///
bool hasLeadingEmptyMacro() const { return getFlag(LeadingEmptyMacro); }
- /// \brief Return true if this token is a string or character literal which
+ /// Return true if this token is a string or character literal which
/// has a ud-suffix.
bool hasUDSuffix() const { return getFlag(HasUDSuffix); }
@@ -308,21 +308,21 @@ public:
bool isEditorPlaceholder() const { return getFlag(IsEditorPlaceholder); }
};
-/// \brief Information about the conditional stack (\#if directives)
+/// Information about the conditional stack (\#if directives)
/// currently active.
struct PPConditionalInfo {
- /// \brief Location where the conditional started.
+ /// Location where the conditional started.
SourceLocation IfLoc;
- /// \brief True if this was contained in a skipping directive, e.g.,
+ /// True if this was contained in a skipping directive, e.g.,
/// in a "\#if 0" block.
bool WasSkipping;
- /// \brief True if we have emitted tokens already, and now we're in
+ /// True if we have emitted tokens already, and now we're in
/// an \#else block or something. Only useful in Skipping blocks.
bool FoundNonSkip;
- /// \brief True if we've seen a \#else in this block. If so,
+ /// True if we've seen a \#else in this block. If so,
/// \#elif/\#else directives are not allowed.
bool FoundElse;
};
diff --git a/include/clang/Lex/TokenLexer.h b/include/clang/Lex/TokenLexer.h
index dccaef9d38..e616d497ee 100644
--- a/include/clang/Lex/TokenLexer.h
+++ b/include/clang/Lex/TokenLexer.h
@@ -62,18 +62,18 @@ class TokenLexer {
/// expanded.
SourceLocation ExpandLocStart, ExpandLocEnd;
- /// \brief Source location pointing at the source location entry chunk that
+ /// Source location pointing at the source location entry chunk that
/// was reserved for the current macro expansion.
SourceLocation MacroExpansionStart;
- /// \brief The offset of the macro expansion in the
+ /// The offset of the macro expansion in the
/// "source location address space".
unsigned MacroStartSLocOffset;
- /// \brief Location of the macro definition.
+ /// Location of the macro definition.
SourceLocation MacroDefStart;
- /// \brief Length of the macro definition.
+ /// Length of the macro definition.
unsigned MacroDefLength;
/// Lexical information about the expansion point of the macro: the identifier
@@ -216,12 +216,12 @@ private:
/// first token on the next line.
void HandleMicrosoftCommentPaste(Token &Tok, SourceLocation OpLoc);
- /// \brief If \p loc is a FileID and points inside the current macro
+ /// If \p loc is a FileID and points inside the current macro
/// definition, returns the appropriate source location pointing at the
/// macro expansion source location entry.
SourceLocation getExpansionLocForMacroDefLoc(SourceLocation loc) const;
- /// \brief Creates SLocEntries and updates the locations of macro argument
+ /// Creates SLocEntries and updates the locations of macro argument
/// tokens to their new expanded locations.
///
/// \param ArgIdSpellLoc the location of the macro argument id inside the
diff --git a/include/clang/Lex/VariadicMacroSupport.h b/include/clang/Lex/VariadicMacroSupport.h
index db1ce0e6be..55202ffc34 100644
--- a/include/clang/Lex/VariadicMacroSupport.h
+++ b/include/clang/Lex/VariadicMacroSupport.h
@@ -66,7 +66,7 @@ namespace clang {
~VariadicMacroScopeGuard() { exitScope(); }
};
- /// \brief A class for tracking whether we're inside a VA_OPT during a
+ /// A class for tracking whether we're inside a VA_OPT during a
/// traversal of the tokens of a variadic macro definition.
class VAOptDefinitionContext {
/// Contains all the locations of so far unmatched lparens.
@@ -116,7 +116,7 @@ namespace clang {
};
- /// \brief A class for tracking whether we're inside a VA_OPT during a
+ /// A class for tracking whether we're inside a VA_OPT during a
/// traversal of the tokens of a macro during macro expansion.
class VAOptExpansionContext : VAOptDefinitionContext {