diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-07-27 17:13:18 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-07-27 17:13:18 +0000 |
commit | 7ed5fb2d22942648408376457dcc11912066ea6f (patch) | |
tree | a2cdf5599fab6ae29b5027dc16711b28e6cde415 /clang/lib/Analysis/CFG.cpp | |
parent | 04ccfda0750b17773808d0e7c237dc618468f147 (diff) | |
download | bcm5719-llvm-7ed5fb2d22942648408376457dcc11912066ea6f.tar.gz bcm5719-llvm-7ed5fb2d22942648408376457dcc11912066ea6f.zip |
Add missing temporary materialization conversion on left-hand side of .
in some member function calls.
Specifically, when calling a conversion function, we would fail to
create the AST node representing materialization of the class object.
llvm-svn: 338135
Diffstat (limited to 'clang/lib/Analysis/CFG.cpp')
-rw-r--r-- | clang/lib/Analysis/CFG.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp index b895087e511..8a3ab15458d 100644 --- a/clang/lib/Analysis/CFG.cpp +++ b/clang/lib/Analysis/CFG.cpp @@ -4408,9 +4408,11 @@ tryAgain: auto *LE = cast<LambdaExpr>(E); CFGBlock *B = Block; for (Expr *Init : LE->capture_inits()) { - if (CFGBlock *R = VisitForTemporaryDtors( - Init, /*BindToTemporary=*/false, Context)) - B = R; + if (Init) { + if (CFGBlock *R = VisitForTemporaryDtors( + Init, /*BindToTemporary=*/false, Context)) + B = R; + } } return B; } |