summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.h
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-09-17 09:52:48 +0000
committerDaniel Jasper <djasper@google.com>2013-09-17 09:52:48 +0000
commitfb81b09d8702f5c8d08d6a019331638c13bf71bb (patch)
treee32fe6937f9fbbd36a39440982a1bcf4f05c3732 /clang/lib/Format/TokenAnnotator.h
parentc947eb08b5ff1a38c1a962cc38399376f4bf63b6 (diff)
downloadbcm5719-llvm-fb81b09d8702f5c8d08d6a019331638c13bf71bb.tar.gz
bcm5719-llvm-fb81b09d8702f5c8d08d6a019331638c13bf71bb.zip
clang-format: Don't accidentally move tokens into preprocessor directive.
This fixes llvm.org/PR17265. Before: Foo::Foo() #ifdef BAR : baz(0) #endif { } After: Foo::Foo() #ifdef BAR : baz(0) #endif { } llvm-svn: 190861
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.h')
-rw-r--r--clang/lib/Format/TokenAnnotator.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Format/TokenAnnotator.h b/clang/lib/Format/TokenAnnotator.h
index 06f335215d1..91f1b4678a1 100644
--- a/clang/lib/Format/TokenAnnotator.h
+++ b/clang/lib/Format/TokenAnnotator.h
@@ -110,6 +110,8 @@ private:
bool spaceRequiredBefore(const AnnotatedLine &Line, const FormatToken &Tok);
+ bool mustBreakBefore(const AnnotatedLine &Line, const FormatToken &Right);
+
bool canBreakBefore(const AnnotatedLine &Line, const FormatToken &Right);
void printDebugInfo(const AnnotatedLine &Line);
OpenPOWER on IntegriCloud