aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Basic/SourceLocation.h3
-rw-r--r--include/clang/Basic/SourceManager.h1
-rw-r--r--include/clang/Lex/Lexer.h5
3 files changed, 6 insertions, 3 deletions
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h
index 4c0f0e9d46..858b763666 100644
--- a/include/clang/Basic/SourceLocation.h
+++ b/include/clang/Basic/SourceLocation.h
@@ -64,6 +64,7 @@ private:
/// an input translation unit.
class SourceLocation {
unsigned ID;
+ friend class SourceManager;
public:
enum {
// FileID Layout:
@@ -100,6 +101,7 @@ public:
bool isValid() const { return ID != 0; }
bool isInvalid() const { return ID == 0; }
+private:
static SourceLocation getFileLoc(unsigned ChunkID, unsigned FilePos) {
SourceLocation L;
// If a FilePos is larger than (1<<FilePosBits), the SourceManager makes
@@ -116,6 +118,7 @@ public:
L.ID = (ChunkID << FilePosBits) | FilePos;
return L;
}
+public:
static bool isValidMacroSpellingOffs(int Val) {
if (Val >= 0)
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index 08929e39c1..629d8ca574 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -324,7 +324,6 @@ public:
return SourceLocation::getFileLoc(FID.ID, 0);
}
-
/// getInstantiationLoc - Return a new SourceLocation that encodes the fact
/// that a token at Loc should actually be referenced from InstantiationLoc.
SourceLocation getInstantiationLoc(SourceLocation Loc,
diff --git a/include/clang/Lex/Lexer.h b/include/clang/Lex/Lexer.h
index afaf4ba07b..42cdd9170a 100644
--- a/include/clang/Lex/Lexer.h
+++ b/include/clang/Lex/Lexer.h
@@ -93,8 +93,9 @@ public:
/// Create_PragmaLexer: Lexer constructor - Create a new lexer object for
/// _Pragma expansion. This has a variety of magic semantics that this method
/// sets up. It returns a new'd Lexer that must be delete'd when done.
- static Lexer *Create_PragmaLexer(SourceLocation TokStartLoc, unsigned TokLen,
- Preprocessor &PP);
+ static Lexer *Create_PragmaLexer(SourceLocation SpellingLoc,
+ SourceLocation InstantiationLoc,
+ unsigned TokLen, Preprocessor &PP);
/// getFeatures - Return the language features currently enabled. NOTE: this