aboutsummaryrefslogtreecommitdiff
path: root/lldb/scripts/Python
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-08-05 09:10:50 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-08-05 09:10:50 +0000
commit28389f0cdf24010cd82abb00f1b18f394e416912 (patch)
tree88d2acf6fc4865a5e0ff54838a40012c34341655 /lldb/scripts/Python
parent126b15542958f627bb2cb74ae048221022a031dc (diff)
downloadllvm-28389f0cdf24010cd82abb00f1b18f394e416912.zip
llvm-28389f0cdf24010cd82abb00f1b18f394e416912.tar.gz
llvm-28389f0cdf24010cd82abb00f1b18f394e416912.tar.bz2
Flesh out the -Warray-bounds detection of C89 tail-padded one-element
arrays. This now suppresses the warning only in the case of a one-element array as the last field in a struct where the array size is a literal '1' rather than any macro expansion or template parameter. This doesn't distinguish between the language standard in use to allow code which dates from C89 era to compile without the warning even in C99 and C++ builds. We could add a separate warning (under a different flag) with fixit hints to switch to a flexible array, but its not clear that this would be desirable. Much of the code using this idiom is striving for maximum portability. Tests were also fleshed out a bit, and the diagnostic itself tweaked to be more pretty w.r.t. single elment arrays. This is more ugly than I would like due to APInt's not being supported by the diagnostic rendering engine. A pseudo-patch for this was proposed by Nicola Gigante, but I reworked it both for several correctness issues and for code style. Sorry this was so long in coming. llvm-svn: 136965
Diffstat (limited to 'lldb/scripts/Python')
0 files changed, 0 insertions, 0 deletions