aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp
diff options
context:
space:
mode:
authorLogan Smith <logan.r.smith0@gmail.com>2020-07-22 10:03:49 -0700
committerLogan Smith <logan.r.smith0@gmail.com>2020-07-22 10:03:49 -0700
commit274b6b0c7a8b584662595762eaeff57d61c6807f (patch)
tree9b800fc5c4c02b02fbb2a7e8a6e9bafe7f89a773 /llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp
parenta1d99aff7c2ab47e3621c26a39eb1b4c287dee68 (diff)
downloadllvm-274b6b0c7a8b584662595762eaeff57d61c6807f.zip
llvm-274b6b0c7a8b584662595762eaeff57d61c6807f.tar.gz
llvm-274b6b0c7a8b584662595762eaeff57d61c6807f.tar.bz2
Only enable -Wsuggest-override if it doesn't suggest adding override to functions that are already final
A previous patch added -Wsuggest-override using a simple add_flag_if_supported(). This causes lots of warnings in LLVM when building with older GCC versions (< 9.2) which suggest adding override to functions that are only marked final. The current flags in both GCC >=9.2 and Clang accept plain final as equivalent to override final. This patch adds logic to detect versions of -Wsuggest-override that warn on void foo() final and disables them to avoid warning spam in builds using older GCC's. This has the added minor benefit of getting rid of the useless C_SUPPORTS_SUGGEST_OVERRIDE_FLAG CMake cache variable which was set by add_flag_if_supported(). Differential Revision: https://reviews.llvm.org/D84292
Diffstat (limited to 'llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions