summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
diff options
context:
space:
mode:
authorDevin Coughlin <dcoughlin@apple.com>2016-12-15 21:27:06 +0000
committerDevin Coughlin <dcoughlin@apple.com>2016-12-15 21:27:06 +0000
commit64c01f7bef8d65716f12e7556238ea8f8c2c010e (patch)
tree41fb79676ba342a7cfb2638af738338f2b0d25ec /clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
parent6698c15cb64c5a6b27521466ab8565a906b2323f (diff)
downloadbcm5719-llvm-64c01f7bef8d65716f12e7556238ea8f8c2c010e.tar.gz
bcm5719-llvm-64c01f7bef8d65716f12e7556238ea8f8c2c010e.zip
[analyzer] Add a new SVal to support pointer-to-member operations.
Add a new type of NonLoc SVal for C++ pointer-to-member operations. This SVal supports both pointers to member functions and pointers to member data. A patch by Kirill Romanenkov! Differential Revision: https://reviews.llvm.org/D25475 llvm-svn: 289873
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/SValBuilder.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/SValBuilder.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp b/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
index 145b7e084b7..10b0858b848 100644
--- a/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
+++ b/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
@@ -217,6 +217,10 @@ SValBuilder::getDerivedRegionValueSymbolVal(SymbolRef parentSymbol,
return nonloc::SymbolVal(sym);
}
+DefinedSVal SValBuilder::getMemberPointer(const DeclaratorDecl* DD) {
+ return nonloc::PointerToMember(DD);
+}
+
DefinedSVal SValBuilder::getFunctionPointer(const FunctionDecl *func) {
return loc::MemRegionVal(MemMgr.getFunctionCodeRegion(func));
}
OpenPOWER on IntegriCloud