diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-06-04 18:30:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-06-04 18:30:46 +0000 |
commit | 8c592941d57097bc0ddf91ee2a97939873a9ed5a (patch) | |
tree | 96bde5e6f395287f22ca8cd9594dadff3f2b851d /lib/Sema/SemaDeclCXX.cpp | |
parent | 7af84528b65c137e69300389e7b69c09801b4e61 (diff) | |
download | clang-8c592941d57097bc0ddf91ee2a97939873a9ed5a.tar.gz |
Factor out repeated code to build a DeclRefExpr and mark it referenced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362537 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 0956aff21e..354316a3cc 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -11475,7 +11475,7 @@ class RefBuilder: public ExprBuilder { public: Expr *build(Sema &S, SourceLocation Loc) const override { - return assertNotNull(S.BuildDeclRefExpr(Var, VarType, VK_LValue, Loc).get()); + return assertNotNull(S.BuildDeclRefExpr(Var, VarType, VK_LValue, Loc)); } RefBuilder(VarDecl *Var, QualType VarType) @@ -12877,7 +12877,7 @@ void Sema::DefineImplicitLambdaToFunctionPointerConversion( // Construct the body of the conversion function { return __invoke; }. Expr *FunctionRef = BuildDeclRefExpr(Invoker, Invoker->getType(), - VK_LValue, Conv->getLocation()).get(); + VK_LValue, Conv->getLocation()); assert(FunctionRef && "Can't refer to __invoke function?"); Stmt *Return = BuildReturnStmt(Conv->getLocation(), FunctionRef).get(); Conv->setBody(CompoundStmt::Create(Context, Return, Conv->getLocation(), |