|
@@ -5243,7 +5243,13 @@ static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT, QualType LhsT,
|
|
|
Sema::ContextRAII TUContext(Self, Self.Context.getTranslationUnitDecl());
|
|
|
ExprResult Result = Self.BuildBinOp(/*S=*/nullptr, KeyLoc, BO_Assign, &Lhs,
|
|
|
&Rhs);
|
|
|
- if (Result.isInvalid() || SFINAE.hasErrorOccurred())
|
|
|
+ if (Result.isInvalid())
|
|
|
+ return false;
|
|
|
+
|
|
|
+ // Treat the assignment as unused for the purpose of -Wdeprecated-volatile.
|
|
|
+ Self.CheckUnusedVolatileAssignment(Result.get());
|
|
|
+
|
|
|
+ if (SFINAE.hasErrorOccurred())
|
|
|
return false;
|
|
|
|
|
|
if (BTT == BTT_IsAssignable)
|