aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-02-24 21:27:39 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-02-24 21:27:39 +0000
commit93179bb90b8042f256bd2adc00b7e39ef42869c4 (patch)
tree31a923f5304528d512a2d514b25236c67941c9df /lib
parent6eea8b8c1aad853d6161709d8b3035dfd867fa1c (diff)
downloadsrc-93179bb90b8042f256bd2adc00b7e39ef42869c4.tar.gz
src-93179bb90b8042f256bd2adc00b7e39ef42869c4.zip
Vendor import of clang release_60 branch r325932:vendor/clang/clang-release_60-r325932
Notes
Notes: svn path=/vendor/clang/dist-release_60/; revision=329933 svn path=/vendor/clang/clang-release_60-r325932/; revision=329934; tag=vendor/clang/clang-release_60-r325932
Diffstat (limited to 'lib')
-rw-r--r--lib/Basic/Targets/X86.cpp3
-rw-r--r--lib/Sema/SemaExpr.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Basic/Targets/X86.cpp b/lib/Basic/Targets/X86.cpp
index 58c6ddc8ff66..cfa6c571d6ea 100644
--- a/lib/Basic/Targets/X86.cpp
+++ b/lib/Basic/Targets/X86.cpp
@@ -152,7 +152,8 @@ bool X86TargetInfo::initFeatureMap(
setFeatureEnabledImpl(Features, "avx512bw", true);
setFeatureEnabledImpl(Features, "avx512vl", true);
setFeatureEnabledImpl(Features, "pku", true);
- setFeatureEnabledImpl(Features, "clwb", true);
+ if (Kind != CK_Cannonlake) // CNL inherits all SKX features, except CLWB
+ setFeatureEnabledImpl(Features, "clwb", true);
LLVM_FALLTHROUGH;
case CK_SkylakeClient:
setFeatureEnabledImpl(Features, "xsavec", true);
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 7e01b058ab2d..a6e43765e106 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -14926,7 +14926,8 @@ static void DoMarkVarDeclReferenced(Sema &SemaRef, SourceLocation Loc,
if (RefersToEnclosingScope) {
LambdaScopeInfo *const LSI =
SemaRef.getCurLambda(/*IgnoreNonLambdaCapturingScope=*/true);
- if (LSI && !LSI->CallOperator->Encloses(Var->getDeclContext())) {
+ if (LSI && (!LSI->CallOperator ||
+ !LSI->CallOperator->Encloses(Var->getDeclContext()))) {
// If a variable could potentially be odr-used, defer marking it so
// until we finish analyzing the full expression for any
// lvalue-to-rvalue