[clang-tidy] Introduce the WarnIntoHeaders option to modernize-deprecated-headers
Unfortunately, we must restrict the checker to warn for deprecated headers only if the header is included directly from a c++ source file. For header files, we cannot know if the project has a C source file that also directly/indirectly includes the offending header file otherwise. Thus, it's better to be on the safe side and suppress those reports. One can opt-in the old behavior, emitting diagnostics into header files, if one explicitly sets the WarnIntoHeaders=true, in which case nothing will be changed. Reviewed By: LegalizeAdulthood Differential Revision: https://reviews.llvm.org/D125769
Loading
Please sign in to comment