summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-02-23 19:27:10 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-02-23 19:27:10 +0000
commit6850acfcbbfd7d9d479309cfede599210dd6a6a0 (patch)
tree355529f69a71163a261a08f5d81fc688c2db12e7
parent1d969f42a02b25d9e255b6fee355199d6f49a480 (diff)
downloadbcm5719-llvm-6850acfcbbfd7d9d479309cfede599210dd6a6a0.tar.gz
bcm5719-llvm-6850acfcbbfd7d9d479309cfede599210dd6a6a0.zip
Document the value casting API changes.
After changing the way several value inheritance hierarchies (TypeLoc, CFGelement, ProgramPoint and SVal) handle casting, this documentation describes how 3rd party code may need to be updated to compile with the new APIs. As suggested by Sean Silva on cfe-dev. llvm-svn: 175970
-rw-r--r--clang/docs/ReleaseNotes.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 5435ce50f60..eeb99983927 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -98,6 +98,18 @@ These are major API changes that have happened since the 3.2 release of
Clang. If upgrading an external codebase that uses Clang as a library,
this section should help get you past the largest hurdles of upgrading.
+Value Casting
+^^^^^^^^^^^^^
+
+Certain type hierarchies (TypeLoc, CFGElement, ProgramPoint, and SVal) were
+misusing the llvm::cast machinery to perform undefined operations. Their APIs
+have been changed to use two member function templates that return values
+instead of pointers or references - "T castAs" and "Optional<T> getAs" (in the
+case of the TypeLoc hierarchy the latter is "T getAs" and you can use the
+boolean testability of a TypeLoc (or its 'validity') to verify that the cast
+succeeded). Essentially all previous 'cast' usage should be replaced with
+'castAs' and 'dyn_cast' should be replaced with 'getAs'.
+
API change 1
^^^^^^^^^^^^
OpenPOWER on IntegriCloud