summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorMartin Probst <martin@probst.io>2016-06-24 17:45:13 +0000
committerMartin Probst <martin@probst.io>2016-06-24 17:45:13 +0000
commitec3dc98802f71d25cd21136b153f3ebead798cb4 (patch)
tree7967183dee35829a5dedb87185bfec1e6fa0aeb0 /clang/lib/Format
parent3e9bbddcbb2791e9bb04fe117ce9a95a4b0f0939 (diff)
downloadbcm5719-llvm-ec3dc98802f71d25cd21136b153f3ebead798cb4.tar.gz
bcm5719-llvm-ec3dc98802f71d25cd21136b153f3ebead798cb4.zip
clang-format: [JS] Fix build breakage.
Checking Line.MustBeDeclaration does actually break the field and param initializer use case. llvm-svn: 273694
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 4a90522e6e3..db8a3d62441 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -639,7 +639,7 @@ private:
}
// Declarations cannot be conditional expressions, this can only be part
// of a type declaration.
- if (Line.MustBeDeclaration && !Contexts.back().IsExpression &&
+ if (!Contexts.back().IsExpression &&
Style.Language == FormatStyle::LK_JavaScript)
break;
parseConditional();
OpenPOWER on IntegriCloud