summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-06-11 17:50:32 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-06-11 17:50:32 +0000
commit715f7a1bd058c64a39cc4773114dfb46ae8cc8a3 (patch)
treed9f4369bedcbe50c9dc03ee5498544702d86616e /clang/lib/Sema/SemaChecking.cpp
parentef2d6d99c0d35e46dce7fff6b999a3a1fc08aecc (diff)
downloadbcm5719-llvm-715f7a1bd058c64a39cc4773114dfb46ae8cc8a3.tar.gz
bcm5719-llvm-715f7a1bd058c64a39cc4773114dfb46ae8cc8a3.zip
For DR712: store on a DeclRefExpr whether it constitutes an odr-use.
Begin restructuring to support the forms of non-odr-use reference permitted by DR712. llvm-svn: 363086
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 2159a20c2c1..653bf879828 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -5231,15 +5231,10 @@ Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {
}
// Create a new DeclRefExpr to refer to the new decl.
- DeclRefExpr* NewDRE = DeclRefExpr::Create(
- Context,
- DRE->getQualifierLoc(),
- SourceLocation(),
- NewBuiltinDecl,
- /*enclosing*/ false,
- DRE->getLocation(),
- Context.BuiltinFnTy,
- DRE->getValueKind());
+ DeclRefExpr *NewDRE = DeclRefExpr::Create(
+ Context, DRE->getQualifierLoc(), SourceLocation(), NewBuiltinDecl,
+ /*enclosing*/ false, DRE->getLocation(), Context.BuiltinFnTy,
+ DRE->getValueKind(), nullptr, nullptr, DRE->isNonOdrUse());
// Set the callee in the CallExpr.
// FIXME: This loses syntactic information.
OpenPOWER on IntegriCloud