[Lldb-commits] [PATCH] D40757: Disable warnings related to anonymous types
Vedant Kumar via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Dec 4 15:01:21 PST 2017
vsk added a comment.
In https://reviews.llvm.org/D40757#943483, @labath wrote:
> If the "excuse" for not following llvm here is that these structs mirror apple headers, should we restrict these warnings only to the relevant files (e.g. everything in `source/Plugins/Language/ObjC`)?
>
> I don't particularly care about whether we do, but I wanted to throw the idea out there, as this is the reason why I haven't done something similar yet (although the warnings are quite annoying).
I'd like to make this a narrower change as well, but unfortunately, I haven't found a way to add in extra CXX flags through the add_library or llvm_add_library utilities. Somebody tried to do this once in AddLLDB.cmake (see "set(CMAKE_CXX_FLAGS ...)"), but it's busted, and does not do anything, AFAICT.
In this case, I think it should be safe to disable these warnings project-wide, because they're not often (ever?) immediate indicators of correctness issues / undefined behavior. Given all of that, @labath are you OK with the patch as-is?
================
Comment at: cmake/modules/LLDBConfig.cmake:241
+check_cxx_compiler_flag("-Wno-nested-anon-types"
+ CXX_SUPPORTS_NO_GNU_ANONYMOUS_STRUCT)
+if (CXX_SUPPORTS_NO_GNU_ANONYMOUS_STRUCT)
----------------
I should point out that there's a typo here -- I've fixed this so it's spelled CXX_SUPPORTS_NO_NESTED_ANON_TYPES locally.
https://reviews.llvm.org/D40757
More information about the lldb-commits
mailing list