From 9359793849d473e257cc7b050e2dbe65072c15ac Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Mon, 17 Jul 2017 15:27:53 +0000 Subject: Fix dereference of pointers in throw statements. Before: throw * x; After: throw *x; Patch by Erik Uhlmann. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308185 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Format/FormatTest.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'unittests') diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index eb7bcc1ed8..f533ebf223 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -5350,6 +5350,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyFormat("x = *a(x) = *a(y);", Left); verifyFormat("for (;; *a = b) {\n}", Left); verifyFormat("return *this += 1;", Left); + verifyFormat("throw *x;", Left); verifyIndependentOfContext("a = *(x + y);"); verifyIndependentOfContext("a = &(x + y);"); -- cgit v1.2.3