summaryrefslogtreecommitdiffstats
path: root/lib/Format/UnwrappedLineParser.h
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2014-04-14 09:14:11 +0000
committerManuel Klimek <klimek@google.com>2014-04-14 09:14:11 +0000
commitf6e698b4292387d2bb214df4d5b9fe0dc23c101d (patch)
tree422d1ea2d0f4358dc9c9096af023f2999f8b217c /lib/Format/UnwrappedLineParser.h
parent5975b27fc562bdc8fa8ab10232ef3716f9f6d259 (diff)
Format code around VCS conflict markers.
Now correctly formats: { int a; void f() { callme(some(parameter1, <<<<<<< text by the vcs parameter2), ||||||| text by the vcs parameter2), parameter3, ======= text by the vcs parameter2, parameter3), >>>>>>> text by the vcs otherparameter); } } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/UnwrappedLineParser.h')
-rw-r--r--lib/Format/UnwrappedLineParser.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Format/UnwrappedLineParser.h b/lib/Format/UnwrappedLineParser.h
index 6eaa415b6b..8f0c5a3ef4 100644
--- a/lib/Format/UnwrappedLineParser.h
+++ b/lib/Format/UnwrappedLineParser.h
@@ -107,7 +107,16 @@ private:
void flushComments(bool NewlineBeforeNext);
void pushToken(FormatToken *Tok);
void calculateBraceTypes();
- void pushPPConditional();
+
+ // Marks a conditional compilation edge (for example, an '#if', '#ifdef',
+ // '#else' or merge conflict marker). If 'Unreachable' is true, assumes
+ // this branch either cannot be taken (for example '#if false'), or should
+ // not be taken in this round.
+ void conditionalCompilationCondition(bool Unreachable);
+ void conditionalCompilationStart(bool Unreachable);
+ void conditionalCompilationAlternative();
+ void conditionalCompilationEnd();
+
bool isOnNewLine(const FormatToken& FormatTok);
// FIXME: We are constantly running into bugs where Line.Level is incorrectly