diff options
author | Daniel Jasper <djasper@google.com> | 2016-11-01 06:23:19 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2016-11-01 06:23:19 +0000 |
commit | 28b4d5133c1161868d63644e73ddeb78fc361f48 (patch) | |
tree | 399436aac99f012081960d2ea8cb1be1a29c8713 /clang/unittests/Format/FormatTest.cpp | |
parent | d0d27aa59b0e7e6851d71da24835597658ccaa8a (diff) | |
download | bcm5719-llvm-28b4d5133c1161868d63644e73ddeb78fc361f48.tar.gz bcm5719-llvm-28b4d5133c1161868d63644e73ddeb78fc361f48.zip |
clang-format: Fix bug in function reference qualifier detection.
Before:
template <typename T>
void F(T) &&
= delete;
After:
template <typename T>
void F(T) && = delete;
llvm-svn: 285674
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 6ab4a746290..5c70b8c12bb 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -5637,6 +5637,9 @@ TEST_F(FormatTest, UnderstandsFunctionRefQualification) { verifyFormat("SomeType MemberFunction(const Deleted &) && final {}"); verifyFormat("SomeType MemberFunction(const Deleted &) && override {}"); verifyFormat("SomeType MemberFunction(const Deleted &) const &;"); + verifyFormat("template <typename T>\n" + "void F(T) && = delete;", + getGoogleStyle()); FormatStyle AlignLeft = getLLVMStyle(); AlignLeft.PointerAlignment = FormatStyle::PAS_Left; @@ -5789,7 +5792,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { FormatStyle Left = getLLVMStyle(); Left.PointerAlignment = FormatStyle::PAS_Left; verifyFormat("x = *a(x) = *a(y);", Left); - verifyFormat("for (;; * = b) {\n}", Left); + verifyFormat("for (;; *a = b) {\n}", Left); verifyFormat("return *this += 1;", Left); verifyIndependentOfContext("a = *(x + y);"); |