aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-02-04 09:53:13 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-02-04 09:53:13 +0000
commit282e7e66748cc6dd14d6f7f2cb52e5373c531e61 (patch)
tree65a943e4a9c8a0534b580dcbbbcb6791451b5a56 /lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
parentf39aec17b89f8f0dd78e78c50ad2fa08f12272e3 (diff)
In C++11 mode, when an integral constant expression is desired and we have a
value of class type, look for a unique conversion operator converting to integral or unscoped enumeration type and use that. Implements [expr.const]p5. Sema::VerifyIntegerConstantExpression now performs the conversion and returns the converted result. Some important callers of Expr::isIntegralConstantExpr have been switched over to using it (including all of those required for C++11 conformance); this switch brings a side-benefit of improved diagnostics and, in several cases, simpler code. However, some language extensions and attributes have not been moved across and will not perform implicit conversions on constant expressions of literal class type where an ICE is required. In passing, fix static_assert to perform a contextual conversion to bool on its argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp')
0 files changed, 0 insertions, 0 deletions