Emit -Wfortify-source using DiagRuntimeBehaviour
authorErik Pilkington <erik.pilkington@gmail.com>
Tue, 26 Mar 2019 23:21:22 +0000 (23:21 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Tue, 26 Mar 2019 23:21:22 +0000 (23:21 +0000)
commit818698010cd47b6ed76b58f06eb9ac62045eb0aa
treecbc373ceb079136ececd951de457b1e97cef760c
parent14f6d1527c706d0749bad224fb6a4d2586d608f4
Emit -Wfortify-source using DiagRuntimeBehaviour

This fixes a false positive on the following, where st is configured to have
different sizes based on some preprocessor logic:

  if (sizeof(buf) == sizeof(*st))
    memcpy(&buf, st, sizeof(*st));

llvm-svn: 357041
clang/lib/Sema/SemaChecking.cpp
clang/test/Sema/warn-fortify-source.c