diff options
author | Bruno Ricci <riccibrun@gmail.com> | 2018-12-21 14:10:18 +0000 |
---|---|---|
committer | Bruno Ricci <riccibrun@gmail.com> | 2018-12-21 14:10:18 +0000 |
commit | 5fc4db75798c8829d1df1235272321e286e3c0e4 (patch) | |
tree | 6c3348909dd6cc70ed8878aee7031c2b33ff590d /clang/lib/Analysis/ThreadSafetyCommon.cpp | |
parent | 2c8ead823b5e21fc5476cf11f351c894b01dc4ce (diff) | |
download | llvm-5fc4db75798c8829d1df1235272321e286e3c0e4.zip llvm-5fc4db75798c8829d1df1235272321e286e3c0e4.tar.gz llvm-5fc4db75798c8829d1df1235272321e286e3c0e4.tar.bz2 |
[AST][NFC] Pass the AST context to one of the ctor of DeclRefExpr.
All of the other constructors already take a reference to the AST context.
This avoids calling Decl::getASTContext in most cases. Additionally move
the definition of the constructor from Expr.h to Expr.cpp since it is calling
DeclRefExpr::computeDependence. NFC.
llvm-svn: 349901
Diffstat (limited to 'clang/lib/Analysis/ThreadSafetyCommon.cpp')
-rw-r--r-- | clang/lib/Analysis/ThreadSafetyCommon.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Analysis/ThreadSafetyCommon.cpp b/clang/lib/Analysis/ThreadSafetyCommon.cpp index 0c09974..14d1d9c 100644 --- a/clang/lib/Analysis/ThreadSafetyCommon.cpp +++ b/clang/lib/Analysis/ThreadSafetyCommon.cpp @@ -128,7 +128,8 @@ CapabilityExpr SExprBuilder::translateAttrExpr(const Expr *AttrExp, // Hack to handle constructors, where self cannot be recovered from // the expression. if (SelfDecl && !Ctx.SelfArg) { - DeclRefExpr SelfDRE(SelfDecl, false, SelfDecl->getType(), VK_LValue, + DeclRefExpr SelfDRE(SelfDecl->getASTContext(), SelfDecl, false, + SelfDecl->getType(), VK_LValue, SelfDecl->getLocation()); Ctx.SelfArg = &SelfDRE; |