Skip to content

Commit 925db23

Browse files
committed
fix(clang-cl): reduce warnings
1 parent 3606a89 commit 925db23

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,12 @@ if (WIN32)
276276
target_compile_options(
277277
mrdocs-core
278278
PUBLIC
279-
/permissive- # strict C++
280-
/W4 # enable all warnings
281-
/MP # multi-processor compilation
282-
/EHs # C++ Exception handling
283-
$<$<CONFIG:Debug>:/Oy-> # Disable frame pointer omission
279+
/permissive- # strict C++
280+
/W4 # enable all warnings
281+
$<$<CXX_COMPILER_ID:MSVC>:/MP> # multi-processor compilation
282+
/EHs # C++ Exception handling
283+
$<$<CONFIG:Debug>:/Oy-> # Disable frame pointer omission
284+
$<$<CXX_COMPILER_ID:Clang>:-Wno-unused-parameter> # ClangCL warning enabled with /W4
284285
)
285286
endif()
286287
endif ()

src/lib/Support/LegibleNames.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class LegibleNames::Impl
192192
If the symbolhas no name, then a reserved name based
193193
on the type is returned instead.
194194
*/
195-
std::string_view
195+
std::string
196196
getRawUnqualified(SymbolID const& id)
197197
{
198198
Info const* I = corpus_.find(id);

src/test/ADT/Polymorphic.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ struct Polymorphic_test
241241
#if defined(__clang__)
242242
#pragma clang diagnostic push
243243
#pragma clang diagnostic ignored "-Wself-assign-overloaded"
244-
#endif
245-
#if defined(__GNUC__)
244+
#pragma clang diagnostic ignored "-Wself-move"
245+
#elif defined(__GNUC__)
246246
#pragma GCC diagnostic push
247247
#pragma GCC diagnostic ignored "-Wself-move"
248248
#endif
@@ -255,8 +255,7 @@ struct Polymorphic_test
255255
}
256256
#if defined(__clang__)
257257
#pragma clang diagnostic pop
258-
#endif
259-
#if defined(__GNUC__)
258+
#elif defined(__GNUC__)
260259
#pragma GCC diagnostic pop
261260
#endif
262261

0 commit comments

Comments
 (0)