summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2018-06-21 23:46:09 +0000
committerChandler Carruth <chandlerc@gmail.com>2018-06-21 23:46:09 +0000
commit16e6bc23a12ecaee8b2eeb6a4246843ce24e751c (patch)
tree51fa00e804c6bd18247e5d92509a8c81f17d15fe /lldb/packages/Python/lldbsuite/test/python_api
parent342b095689e4a6ba61eb4fc03b1985c22989b00d (diff)
downloadbcm5719-llvm-16e6bc23a12ecaee8b2eeb6a4246843ce24e751c.tar.gz
bcm5719-llvm-16e6bc23a12ecaee8b2eeb6a4246843ce24e751c.zip
[x86] Teach the builtin argument range check to allow invalid ranges in
dead code. This is important for C++ templates that essentially compute the valid input in a way that is constant and will cause all the invalid cases to be dead code that is deleted. Code in the wild actually does this and GCC also accepts these kinds of patterns so it is important to support it. To make this work, we provide a non-error path to diagnose these issues, and use a default-error warning instead. This keeps the relatively strict handling but prevents nastiness like SFINAE on these errors. It also allows us to safely use the system to diagnose this only when it occurs at runtime (in emitted code). Entertainingly, this required fixing the syntax in various other ways for the x86 test because we never bothered to diagnose that the returns were invalid. Since debugging these compile failures was super confusing, I've also improved the diagnostic to actually say what the value was. Most of the checks I've made ignore this to simplify maintenance, but I've checked it in a few places to make sure the diagnsotic is working. Depends on D48462. Without that, we might actually crash some part of the compiler after bypassing the error here. Thanks to Richard, Ben Kramer, and especially Craig Topper for all the help here. Differential Revision: https://reviews.llvm.org/D48464 llvm-svn: 335309
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud