aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Lexer.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-14 06:16:57 +0000
committerChris Lattner <sabre@nondot.org>2009-12-14 06:16:57 +0000
commit34f349da38a7bd99103e12d8ea6c73bc8d025193 (patch)
tree0425b8febb380dbc2b5b4b34bf0e25c4b28692ac /include/clang/Lex/Lexer.h
parentc3420ffb282c6ffc0192013bf8045b6c21eddece (diff)
teach clang to recover gracefully from conflict markers left in source
files: PR5238. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Lexer.h')
-rw-r--r--include/clang/Lex/Lexer.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/Lex/Lexer.h b/include/clang/Lex/Lexer.h
index eac197afd6..fc65b1fc54 100644
--- a/include/clang/Lex/Lexer.h
+++ b/include/clang/Lex/Lexer.h
@@ -38,7 +38,8 @@ class Lexer : public PreprocessorLexer {
const char *BufferEnd; // End of the buffer.
SourceLocation FileLoc; // Location for start of file.
LangOptions Features; // Features enabled by this language (cache).
- bool Is_PragmaLexer; // True if lexer for _Pragma handling.
+ bool Is_PragmaLexer : 1; // True if lexer for _Pragma handling.
+ bool IsInConflictMarker : 1; // True if in a VCS conflict marker '<<<<<<<'
//===--------------------------------------------------------------------===//
// Context-specific lexing flags set by the preprocessor.
@@ -369,6 +370,9 @@ private:
bool SkipBCPLComment (Token &Result, const char *CurPtr);
bool SkipBlockComment (Token &Result, const char *CurPtr);
bool SaveBCPLComment (Token &Result, const char *CurPtr);
+
+ bool IsStartOfConflictMarker(const char *CurPtr);
+ bool HandleEndOfConflictMarker(const char *CurPtr);
};