Skip to content

Commit fc75fa2

Browse files
committed
disable dangling else for gcc
1 parent 0a5a061 commit fc75fa2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/unittests/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ function(add_llvm_target_unittest test_dir_name)
1414
add_llvm_unittest(${test_dir_name} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN})
1515
endfunction()
1616

17+
# GCC may emit false positive warnings against LLVM's style guide.
18+
if (CMAKE_COMPILER_IS_GNUCXX)
19+
list(APPEND LLVM_COMPILE_FLAGS "-Wno-dangling-else")
20+
endif ()
21+
1722
add_subdirectory(ADT)
1823
add_subdirectory(Analysis)
1924
add_subdirectory(AsmParser)

0 commit comments

Comments
 (0)