summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/UnwrappedLineParser.h
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-01-05 22:14:16 +0000
committerManuel Klimek <klimek@google.com>2013-01-05 22:14:16 +0000
commitef2cfb110d776dd9fc34c4154a1e6d5f774df25f (patch)
treec82efb543df9a485449b8c2bd6dca90e5da8bf1b /clang/lib/Format/UnwrappedLineParser.h
parentfeb9ae59d2f94b06897bb6f39f90f2486698523e (diff)
downloadbcm5719-llvm-ef2cfb110d776dd9fc34c4154a1e6d5f774df25f.tar.gz
bcm5719-llvm-ef2cfb110d776dd9fc34c4154a1e6d5f774df25f.zip
Fixes PR14801 - preprocessor directives shouldn't be indented
Uses indent 0 for macros for now and resets the indent state to the level prior to the preprocessor directive. llvm-svn: 171639
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.h')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.h b/clang/lib/Format/UnwrappedLineParser.h
index 69ac7683254..a8e5b739bc8 100644
--- a/clang/lib/Format/UnwrappedLineParser.h
+++ b/clang/lib/Format/UnwrappedLineParser.h
@@ -124,6 +124,9 @@ private:
void nextToken();
void readToken();
+ // FIXME: We are constantly running into bugs where Line.Level is incorrectly
+ // subtracted from beyond 0. Introduce a method to subtract from Line.Level
+ // and use that everywhere in the Parser.
UnwrappedLine Line;
FormatToken FormatTok;
OpenPOWER on IntegriCloud