From: Igor Sugak Date: Mon, 2 Oct 2017 20:42:09 +0000 (-0700) Subject: fix -Wvexing-parse X-Git-Tag: v2017.10.09.00~18 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=d6fe55fe6fa45e5f28127ecd94fcfa7d978dcad6 fix -Wvexing-parse Summary: ```lang=cpp folly/test/stl_tests/StlVectorTest.cpp:1975:11: error: parentheses were disambiguated as redundant parentheses around declaration of variable named 'm' [-Werror,-Wvexing-parse] Vector(m); ^~~ folly/test/stl_tests/StlVectorTest.cpp:1975:11: note: add a variable name to declare a 'Vector' initialized with 'm' Vector(m); ^ varname folly/test/stl_tests/StlVectorTest.cpp:1975:5: note: add enclosing parentheses to perform a function-style cast Vector(m); ^ ( ) folly/test/stl_tests/StlVectorTest.cpp:1975:11: note: remove parentheses to silence this warning Vector(m); ^ ~ 1 error generated. ``` Reviewed By: Gownta Differential Revision: D5955613 fbshipit-source-id: 3015570ce111603b3561914d07b55365a221c686 --- diff --git a/folly/test/stl_tests/StlVectorTest.cpp b/folly/test/stl_tests/StlVectorTest.cpp index b80b8dfe..b107cd98 100644 --- a/folly/test/stl_tests/StlVectorTest.cpp +++ b/folly/test/stl_tests/StlVectorTest.cpp @@ -1972,7 +1972,7 @@ STL_TEST("23.2.1 Table 99.4", customAllocator, is_destructible, m) { ASSERT_TRUE(u.get_allocator() == m); if (false) { - Vector(m); + Vector t(m); } }