summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-06-14 17:46:37 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-06-14 17:46:37 +0000
commit24cdcadcc5e875b05bbb70eb123ea4f0a018ee83 (patch)
treed3e38ecc14d1689d1819eecd220d907e35ff48cf /clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
parentdcdd12b68c2ae7a30221a30d00a4d64f510e1695 (diff)
downloadbcm5719-llvm-24cdcadcc5e875b05bbb70eb123ea4f0a018ee83.tar.gz
bcm5719-llvm-24cdcadcc5e875b05bbb70eb123ea4f0a018ee83.zip
C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression.
Summary: When a variable is named in a context where we can't directly emit a reference to it (because we don't know for sure that it's going to be defined, or it's from an enclosing function and not captured, or the reference might not "work" for some reason), we emit a copy of the variable as a global and use that for the known-to-be-read-only access. This reinstates r363295, reverted in r363352, with a fix for PR42276: we now produce a proper name for a non-odr-use reference to a static constexpr data member. The name <mangled-name>.const is used in that case; such names are reserved to the implementation for cases such as this and should demangle nicely. Reviewers: rjmccall Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63157 llvm-svn: 363428
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud