aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-02-04 13:02:15 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-02-04 13:02:15 +0000
commitfdd15602a42bbe26185978ef1e17019f6d969aa7 (patch)
treeccbaf7edee98ff7893e5d30535d62bb30a9a566a /include/clang/Lex/Preprocessor.h
parent00bd44d5677783527d7517c1ffe45e4d75a0f56f (diff)
Remove Diagnostic.h include from Preprocessor.h.
- Move the offending methods out of line and fix transitive includers. - This required changing an enum in the PPCallback API into an unsigned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index 33efbd960c..dc93b625c3 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -21,7 +21,6 @@
#include "clang/Lex/TokenLexer.h"
#include "clang/Lex/PTHManager.h"
#include "clang/Basic/Builtins.h"
-#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/DenseMap.h"
@@ -57,7 +56,7 @@ class ModuleLoader;
/// like the #include stack, token expansion, etc.
///
class Preprocessor : public llvm::RefCountedBase<Preprocessor> {
- DiagnosticsEngine *Diags;
+ DiagnosticsEngine *Diags;
LangOptions &Features;
const TargetInfo *Target;
FileManager &FileMgr;
@@ -725,12 +724,7 @@ public:
bool isCodeCompletionReached() const { return CodeCompletionReached; }
/// \brief Note that we hit the code-completion point.
- void setCodeCompletionReached() {
- assert(isCodeCompletionEnabled() && "Code-completion not enabled!");
- CodeCompletionReached = true;
- // Silence any diagnostics that occur after we hit the code-completion.
- getDiagnostics().setSuppressAllDiagnostics(true);
- }
+ void setCodeCompletionReached();
/// \brief The location of the currently-active #pragma clang
/// arc_cf_code_audited begin. Returns an invalid location if there
@@ -760,13 +754,9 @@ public:
/// Diag - Forwarding function for diagnostics. This emits a diagnostic at
/// the specified Token's location, translating the token's start
/// position in the current buffer into a SourcePosition object for rendering.
- DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID) const {
- return Diags->Report(Loc, DiagID);
- }
+ DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID) const;
- DiagnosticBuilder Diag(const Token &Tok, unsigned DiagID) const {
- return Diags->Report(Tok.getLocation(), DiagID);
- }
+ DiagnosticBuilder Diag(const Token &Tok, unsigned DiagID) const;
/// getSpelling() - Return the 'spelling' of the token at the given
/// location; does not go up to the spelling location or down to the