Enable -Werror-implicit-function-declaration by default (NFC)

This is useful in C source files where it is easy for a typo to be
silently assumed by the compiler to be an implicit declaration.

Differential Revision: https://reviews.llvm.org/D90727
This commit is contained in:
Mehdi Amini 2020-11-04 00:06:28 +00:00
parent b4fa6d3e13
commit 065047ab01
1 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,10 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
include(AddMLIR)
# Forbid implicit function declaration: this may lead to subtle bugs and we
# don't have a reason to support this.
add_flag_if_supported("-Werror-implicit-function-declaration" WERROR_IMPLICIT_FUNCTION_DECLARATION)
# Installing the headers and docs needs to depend on generating any public
# tablegen'd targets.
# mlir-generic-headers are dialect-independent.