aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2020-02-10 22:52:00 -0800
committerJustin Lebar <jlebar@google.com>2020-02-11 10:37:08 -0800
commitf0fd852fcd054297f2b07e2ca87551de9b2a39c0 (patch)
tree5fc370129e8304860846cda7a4feb0cd45ffbf06
parent696f80736b861dfab5a7330dd009fd1d53b60356 (diff)
downloadllvm-f0fd852fcd054297f2b07e2ca87551de9b2a39c0.zip
llvm-f0fd852fcd054297f2b07e2ca87551de9b2a39c0.tar.gz
llvm-f0fd852fcd054297f2b07e2ca87551de9b2a39c0.tar.bz2
Fix SFINAE in CFG.cpp.
Summary: Used std::enable_if without ::type. Reviewers: bkramer, MaskRay Subscribers: martong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74412
-rw-r--r--clang/lib/Analysis/CFG.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp
index 4c1ea89..8091625 100644
--- a/clang/lib/Analysis/CFG.cpp
+++ b/clang/lib/Analysis/CFG.cpp
@@ -720,10 +720,10 @@ private:
// These sorts of call expressions don't have a common superclass,
// hence strict duck-typing.
template <typename CallLikeExpr,
- typename = typename std::enable_if<
- std::is_same<CallLikeExpr, CallExpr>::value ||
- std::is_same<CallLikeExpr, CXXConstructExpr>::value ||
- std::is_same<CallLikeExpr, ObjCMessageExpr>::value>>
+ typename = std::enable_if_t<
+ std::is_base_of<CallExpr, CallLikeExpr>::value ||
+ std::is_base_of<CXXConstructExpr, CallLikeExpr>::value ||
+ std::is_base_of<ObjCMessageExpr, CallLikeExpr>::value>>
void findConstructionContextsForArguments(CallLikeExpr *E) {
for (unsigned i = 0, e = E->getNumArgs(); i != e; ++i) {
Expr *Arg = E->getArg(i);