[Sema] Clean up some __builtin_*_chk diagnostics
authorErik Pilkington <erik.pilkington@gmail.com>
Thu, 6 Sep 2018 17:19:33 +0000 (17:19 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Thu, 6 Sep 2018 17:19:33 +0000 (17:19 +0000)
commitf85e3910636c6ef1424194a1d1317c87aa07f7e1
treeefd890f1e6615d1dbe77b9e940b28519d770c902
parent1b34b01a8ed5d2c67c9f4b9843d15ba9b85737e9
[Sema] Clean up some __builtin_*_chk diagnostics

Namely, print the likely macro name when it's used, and include the actual
computed sizes in the diagnostic message, which are sometimes not obvious.

rdar://43909200

Differential revision: https://reviews.llvm.org/D51697

llvm-svn: 341566
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaChecking.cpp
clang/test/Sema/builtin-object-size.c
clang/test/Sema/builtins.c