[Lldb-commits] [PATCH] D49271: Adding libc++ formattors for std::optional

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 1 16:33:48 PDT 2018


shafik marked 4 inline comments as done.
shafik added a comment.

@labath Addressed comment, thank you for helping out.



================
Comment at: packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py:21
+    @add_test_categories(["libc++"])
+    @skipIf(oslist=no_match(["macosx"]), compiler="clang", compiler_version=['<', '5.0'])
+
----------------
labath wrote:
> shafik wrote:
> > labath wrote:
> > > Could you add another line for `gcc` here? The -std=c++17 flag seems to be supported starting with gcc-5.1.
> > > 
> > > Also a comment that this is due to the -std flag would be helpful to people looking at this in the future.
> > Adding a comment makes sense.
> > 
> > So `@add_test_categories(["libc++"])` won't skip for gcc bots then?
> It won't because it doesn't make sense to do that. Gcc is perfectly capable of using libc++. The only tricky thing is that it doesn't have the magic `-stdlib` argument, so you have to specify the include paths and libraries explicitly (which our makefiles do).
Good point I did not realize this before! 


================
Comment at: packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/main.cpp:17-20
+    bool has_optional = false ;
+#if HAVE_OPTIONAL == 1
+    has_optional = true ;
+#endif
----------------
labath wrote:
> This could be simplified to `bool has_optional = HAVE_OPTIONAL;`
Good catch!


https://reviews.llvm.org/D49271





More information about the lldb-commits mailing list