diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Basic/Targets/X86.cpp | 3 | ||||
| -rw-r--r-- | lib/Sema/SemaExpr.cpp | 3 | 
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  | 
