summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-05-21 13:08:17 +0000
committerDaniel Jasper <djasper@google.com>2014-05-21 13:08:17 +0000
commit5ebb2f362501bfe197418f321bb86a093a64f375 (patch)
tree1ad11141b31da06a40f0df4b81907c996de17cd7 /clang/unittests/Format/FormatTest.cpp
parent38eed1b86d5705fe43f054765f567894dcb773c7 (diff)
downloadbcm5719-llvm-5ebb2f362501bfe197418f321bb86a093a64f375.tar.gz
bcm5719-llvm-5ebb2f362501bfe197418f321bb86a093a64f375.zip
clang-format: Fix incorrect macro call detection.
In: struct A { A() noexcept(....) {} }; 'A()' is not a macro call. This fixes llvm.org/PR19814. llvm-svn: 209294
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index e5a94cf1e94..cff851c4f77 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -2557,6 +2557,7 @@ TEST_F(FormatTest, MacroCallsWithoutTrailingSemicolon) {
"}\n"));
EXPECT_EQ("class A {\n"
" A() : t(0) {}\n"
+ " A(int i) noexcept() : {}\n"
" A(X x)\n" // FIXME: function-level try blocks are broken.
" try : t(0) {\n"
" } catch (...) {\n"
@@ -2564,6 +2565,7 @@ TEST_F(FormatTest, MacroCallsWithoutTrailingSemicolon) {
"};",
format("class A {\n"
" A()\n : t(0) {}\n"
+ " A(int i)\n noexcept() : {}\n"
" A(X x)\n"
" try : t(0) {} catch (...) {}\n"
"};"));
OpenPOWER on IntegriCloud