summaryrefslogtreecommitdiffstats
path: root/include/clang/Frontend/ASTUnit.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Frontend/ASTUnit.h')
-rw-r--r--include/clang/Frontend/ASTUnit.h96
1 files changed, 48 insertions, 48 deletions
diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h
index 9f529ba0e0..ba14596546 100644
--- a/include/clang/Frontend/ASTUnit.h
+++ b/include/clang/Frontend/ASTUnit.h
@@ -159,7 +159,7 @@ private:
/// Whether the ASTUnit should delete the remapped buffers.
bool OwnsRemappedFileBuffers = true;
-
+
/// Track the top-level decls which appeared in an ASTUnit which was loaded
/// from a source file.
//
@@ -176,7 +176,7 @@ private:
/// Map from FileID to the file-level declarations that it contains.
/// The files and decls are only local (and non-preamble) ones.
FileDeclsTy FileDecls;
-
+
/// The name of the original source file used to generate this ASTUnit.
std::string OriginalSourceFile;
@@ -197,7 +197,7 @@ private:
/// Diagnostics that come from the driver are retained from one parse to
/// the next.
unsigned NumStoredDiagnosticsFromDriver = 0;
-
+
/// Counter that determines when we want to try building a
/// precompiled preamble.
///
@@ -236,7 +236,7 @@ private:
/// A list of the serialization ID numbers for each of the top-level
/// declarations parsed within the precompiled preamble.
std::vector<serialization::DeclID> TopLevelDeclsInPreamble;
-
+
/// Whether we should be caching code-completion results.
bool ShouldCacheCodeCompletionResults : 1;
@@ -247,7 +247,7 @@ private:
/// True if non-system source files should be treated as volatile
/// (likely to change while trying to use them).
bool UserFilesAreVolatile : 1;
-
+
static void ConfigureDiags(IntrusiveRefCntPtr<DiagnosticsEngine> Diags,
ASTUnit &AST, bool CaptureDiagnostics);
@@ -265,7 +265,7 @@ public:
/// The code-completion string corresponding to this completion
/// result.
CodeCompletionString *Completion;
-
+
/// A bitmask that indicates which code-completion contexts should
/// contain this completion result.
///
@@ -274,20 +274,20 @@ public:
/// bit, shift 1 by that number of bits. Many completions can occur in
/// several different contexts.
uint64_t ShowInContexts;
-
+
/// The priority given to this code-completion result.
unsigned Priority;
-
- /// The libclang cursor kind corresponding to this code-completion
+
+ /// The libclang cursor kind corresponding to this code-completion
/// result.
CXCursorKind Kind;
-
+
/// The availability of this code-completion result.
CXAvailabilityKind Availability;
-
+
/// The simplified type class for a non-macro completion result.
SimplifiedTypeClass TypeClass;
-
+
/// The type of a non-macro completion result, stored as a unique
/// integer used by the string map of cached completion types.
///
@@ -296,13 +296,13 @@ public:
/// for more information.
unsigned Type;
};
-
+
/// Retrieve the mapping from formatted type names to unique type
/// identifiers.
llvm::StringMap<unsigned> &getCachedCompletionTypes() {
- return CachedCompletionTypes;
+ return CachedCompletionTypes;
}
-
+
/// Retrieve the allocator used to cache global code completions.
std::shared_ptr<GlobalCodeCompletionAllocator>
getCachedCompletionAllocator() {
@@ -324,29 +324,29 @@ private:
/// The set of cached code-completion results.
std::vector<CachedCodeCompletionResult> CachedCompletionResults;
-
+
/// A mapping from the formatted type name to a unique number for that
/// type, which is used for type equality comparisons.
llvm::StringMap<unsigned> CachedCompletionTypes;
-
- /// A string hash of the top-level declaration and macro definition
+
+ /// A string hash of the top-level declaration and macro definition
/// names processed the last time that we reparsed the file.
///
- /// This hash value is used to determine when we need to refresh the
+ /// This hash value is used to determine when we need to refresh the
/// global code-completion cache.
unsigned CompletionCacheTopLevelHashValue = 0;
- /// A string hash of the top-level declaration and macro definition
+ /// A string hash of the top-level declaration and macro definition
/// names processed the last time that we reparsed the precompiled preamble.
///
- /// This hash value is used to determine when we need to refresh the
+ /// This hash value is used to determine when we need to refresh the
/// global code-completion cache after a rebuild of the precompiled preamble.
unsigned PreambleTopLevelHashValue = 0;
/// The current hash value for the top-level declaration and macro
/// definition names
unsigned CurrentTopLevelHashValue = 0;
-
+
/// Bit used by CIndex to mark when a translation unit may be in an
/// inconsistent state, and is not safe to free.
unsigned UnsafeToFree : 1;
@@ -357,10 +357,10 @@ private:
/// Cache any "global" code-completion results, so that we can avoid
/// recomputing them with each completion.
void CacheCodeCompletionResults();
-
- /// Clear out and deallocate
+
+ /// Clear out and deallocate
void ClearCachedCompletionResults();
-
+
explicit ASTUnit(bool MainFileIsAST);
bool Parse(std::shared_ptr<PCHContainerOperations> PCHContainerOps,
@@ -402,9 +402,9 @@ public:
class ConcurrencyCheck {
ASTUnit &Self;
-
+
public:
- explicit ConcurrencyCheck(ASTUnit &Self) : Self(Self) {
+ explicit ConcurrencyCheck(ASTUnit &Self) : Self(Self) {
Self.ConcurrencyCheckValue.start();
}
@@ -424,7 +424,7 @@ public:
const DiagnosticsEngine &getDiagnostics() const { return *Diagnostics; }
DiagnosticsEngine &getDiagnostics() { return *Diagnostics; }
-
+
const SourceManager &getSourceManager() const { return *SourceMgr; }
SourceManager &getSourceManager() { return *SourceMgr; }
@@ -449,7 +449,7 @@ public:
bool hasSema() const { return (bool)TheSema; }
- Sema &getSema() const {
+ Sema &getSema() const {
assert(TheSema && "ASTUnit does not have a Sema object!");
return *TheSema;
}
@@ -463,12 +463,12 @@ public:
assert(HSOpts && "ASTUnit does not have header search options");
return *HSOpts;
}
-
+
const PreprocessorOptions &getPreprocessorOpts() const {
assert(PPOpts && "ASTUnit does not have preprocessor options");
return *PPOpts;
}
-
+
const FileManager &getFileManager() const { return *FileMgr; }
FileManager &getFileManager() { return *FileMgr; }
@@ -529,7 +529,7 @@ public:
/// Get the decls that are contained in a file in the Offset/Length
/// range. \p Length can be 0 to indicate a point at \p Offset instead of
- /// a range.
+ /// a range.
void findFileRegionDecls(FileID File, unsigned Offset, unsigned Length,
SmallVectorImpl<Decl *> &Decls);
@@ -575,25 +575,25 @@ public:
return SourceRange(mapLocationToPreamble(R.getBegin()),
mapLocationToPreamble(R.getEnd()));
}
-
+
// Retrieve the diagnostics associated with this AST
using stored_diag_iterator = StoredDiagnostic *;
using stored_diag_const_iterator = const StoredDiagnostic *;
- stored_diag_const_iterator stored_diag_begin() const {
- return StoredDiagnostics.begin();
+ stored_diag_const_iterator stored_diag_begin() const {
+ return StoredDiagnostics.begin();
}
- stored_diag_iterator stored_diag_begin() {
- return StoredDiagnostics.begin();
+ stored_diag_iterator stored_diag_begin() {
+ return StoredDiagnostics.begin();
}
- stored_diag_const_iterator stored_diag_end() const {
- return StoredDiagnostics.end();
+ stored_diag_const_iterator stored_diag_end() const {
+ return StoredDiagnostics.end();
}
- stored_diag_iterator stored_diag_end() {
- return StoredDiagnostics.end();
+ stored_diag_iterator stored_diag_end() {
+ return StoredDiagnostics.end();
}
unsigned stored_diag_size() const { return StoredDiagnostics.size(); }
@@ -601,12 +601,12 @@ public:
stored_diag_iterator stored_diag_afterDriver_begin() {
if (NumStoredDiagnosticsFromDriver > StoredDiagnostics.size())
NumStoredDiagnosticsFromDriver = 0;
- return StoredDiagnostics.begin() + NumStoredDiagnosticsFromDriver;
+ return StoredDiagnostics.begin() + NumStoredDiagnosticsFromDriver;
}
using cached_completion_iterator =
std::vector<CachedCodeCompletionResult>::iterator;
-
+
cached_completion_iterator cached_completion_begin() {
return CachedCompletionResults.begin();
}
@@ -615,8 +615,8 @@ public:
return CachedCompletionResults.end();
}
- unsigned cached_completion_size() const {
- return CachedCompletionResults.size();
+ unsigned cached_completion_size() const {
+ return CachedCompletionResults.size();
}
/// Returns an iterator range for the local preprocessing entities
@@ -712,7 +712,7 @@ private:
public:
/// Create an ASTUnit from a source file, via a CompilerInvocation
- /// object, by invoking the optionally provided ASTFrontendAction.
+ /// object, by invoking the optionally provided ASTFrontendAction.
///
/// \param CI - The compiler invocation to use; it must have exactly one input
/// source file. The ASTUnit takes ownership of the CompilerInvocation object.
@@ -854,10 +854,10 @@ public:
///
/// \param Column The column at which code completion will occur.
///
- /// \param IncludeMacros Whether to include macros in the code-completion
+ /// \param IncludeMacros Whether to include macros in the code-completion
/// results.
///
- /// \param IncludeCodePatterns Whether to include code patterns (such as a
+ /// \param IncludeCodePatterns Whether to include code patterns (such as a
/// for loop) in the code-completion results.
///
/// \param IncludeBriefComments Whether to include brief documentation within