aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Dwarf.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-02-21 22:48:34 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-02-21 22:48:34 +0000
commit65615996b9db7c9a5700277007d71477f3cb745a (patch)
tree17428e662c32c24a6deabf3faf3c3bd3cf8655f8 /llvm/lib/Support/Dwarf.cpp
parentcf928cb53f3eb110c12d58081f455ad4ffeb06a7 (diff)
downloadllvm-65615996b9db7c9a5700277007d71477f3cb745a.zip
llvm-65615996b9db7c9a5700277007d71477f3cb745a.tar.gz
llvm-65615996b9db7c9a5700277007d71477f3cb745a.tar.bz2
Limit cast machinery to preserve const and not accept temporaries
After cleaning up the following type hierarchies: * TypeLoc: r175462 * SVal: r175594 * CFGElement: r175462 * ProgramPoint: r175812 that all invoked undefined behavior by causing a derived copy construction of a base object through an invalid cast (thus supporting code that relied on casting temporaries that were direct base objects) Clang/LLVM is now clean of casts of temporaries. So here's some fun SFINAE machinery (courtesy of Eli Friedman, with some porting back from C++11 to LLVM's traits by me) to cause compile-time failures if llvm::cast & friends are ever passed an rvalue. This should avoid a repeat of anything even remotely like PR14321/r168124. Thanks to Jordan Rose for the help with the various Static Analyzer related hierarchies that needed cleaning up, Eli for the SFINAE, Richard Smith, John McCall, Ted Kremenek, and Anna Zaks for their input/reviews/patience along the way. llvm-svn: 175819
Diffstat (limited to 'llvm/lib/Support/Dwarf.cpp')
0 files changed, 0 insertions, 0 deletions