[clang-tidy][NFC] Apply readability-redundant-nested-if 1/N - #213939
Merged
Conversation
vbvictor
force-pushed
the
acp/vbvictor/6152665683018178
branch
from
August 7, 2026 07:58
c4629c1 to
6b888a2
Compare
vbvictor
marked this pull request as ready for review
August 7, 2026 07:58
|
@llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Baranov Victor (vbvictor) ChangesPatch is 27.79 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/213939.diff 20 Files Affected:
diff --git a/clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.cpp b/clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.cpp
index 62fc3b159241d..e892fc0ba70c1 100644
--- a/clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.cpp
+++ b/clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.cpp
@@ -134,9 +134,9 @@ bool UnrollLoopsCheck::hasKnownBounds(const Stmt *Statement,
}
}
// If increment is unary and not one of ++ and --, loop bounds are unknown.
- if (const auto *Op = dyn_cast<UnaryOperator>(Increment))
- if (!Op->isIncrementDecrementOp())
- return false;
+ if (const auto *Op = dyn_cast<UnaryOperator>(Increment);
+ Op && !Op->isIncrementDecrementOp())
+ return false;
if (const auto *BinaryOp = dyn_cast<BinaryOperator>(Conditional)) {
const Expr *LHS = BinaryOp->getLHS();
diff --git a/clang-tools-extra/clang-tidy/android/ComparisonInTempFailureRetryCheck.cpp b/clang-tools-extra/clang-tidy/android/ComparisonInTempFailureRetryCheck.cpp
index ba399efa4a8a6..397d6f8e87e83 100644
--- a/clang-tools-extra/clang-tidy/android/ComparisonInTempFailureRetryCheck.cpp
+++ b/clang-tools-extra/clang-tidy/android/ComparisonInTempFailureRetryCheck.cpp
@@ -67,12 +67,11 @@ void ComparisonInTempFailureRetryCheck::check(
const SourceLocation Invocation = SM.getImmediateMacroCallerLoc(LocStart);
Token Tok;
if (!Lexer::getRawToken(SM.getSpellingLoc(Invocation), Tok, SM, Opts,
- /*IgnoreWhiteSpace=*/true)) {
- if (Tok.getKind() == tok::raw_identifier &&
- llvm::is_contained(RetryMacros, Tok.getRawIdentifier())) {
- RetryMacroName = Tok.getRawIdentifier();
- break;
- }
+ /*IgnoreWhiteSpace=*/true) &&
+ Tok.getKind() == tok::raw_identifier &&
+ llvm::is_contained(RetryMacros, Tok.getRawIdentifier())) {
+ RetryMacroName = Tok.getRawIdentifier();
+ break;
}
LocStart = Invocation;
diff --git a/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp
index 2f260c36155ff..783944cd1a5a1 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp
@@ -21,9 +21,9 @@ namespace clang::tidy::bugprone {
using utils::lexer::CommentToken;
namespace {
AST_MATCHER(Decl, isFromStdNamespaceOrSystemHeader) {
- if (const auto *D = Node.getDeclContext()->getEnclosingNamespaceContext())
- if (D->isStdNamespace())
- return true;
+ if (const auto *D = Node.getDeclContext()->getEnclosingNamespaceContext();
+ D && D->isStdNamespace())
+ return true;
if (Node.getLocation().isInvalid())
return false;
return Node.getASTContext().getSourceManager().isInSystemHeader(
@@ -184,10 +184,11 @@ static const CXXMethodDecl *findMockedMethod(const CXXMethodDecl *Method) {
return nullptr;
}
if (const auto *Next =
- dyn_cast_or_null<CXXMethodDecl>(Method->getNextDeclInContext())) {
- if (looksLikeExpectMethod(Next) && areMockAndExpectMethods(Method, Next))
- return Method;
- }
+ dyn_cast_or_null<CXXMethodDecl>(Method->getNextDeclInContext());
+ Next && looksLikeExpectMethod(Next) &&
+ areMockAndExpectMethods(Method, Next))
+ return Method;
+
return nullptr;
}
@@ -326,16 +327,14 @@ void ArgumentCommentCheck::checkCallArgs(ASTContext *Ctx,
const IdentifierInfo *II = PVD->getIdentifier();
if (!II)
continue;
- if (FunctionDecl *Template = Callee->getTemplateInstantiationPattern()) {
- // Don't warn on arguments for parameters instantiated from template
- // parameter packs. If we find more arguments than the template
- // definition has, it also means that they correspond to a parameter
- // pack.
- if (Template->getNumParams() <= I ||
- Template->getParamDecl(I)->isParameterPack()) {
- continue;
- }
- }
+ // Don't warn on arguments for parameters instantiated from template
+ // parameter packs. If we find more arguments than the template
+ // definition has, it also means that they correspond to a parameter
+ // pack.
+ if (FunctionDecl *Template = Callee->getTemplateInstantiationPattern();
+ Template && (Template->getNumParams() <= I ||
+ Template->getParamDecl(I)->isParameterPack()))
+ continue;
const CharSourceRange BeforeArgument =
MakeFileCharRange(ArgBeginLoc, Args[I]->getBeginLoc());
diff --git a/clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp
index b7c7a3196d787..f7c0024fc1fd1 100644
--- a/clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp
@@ -39,9 +39,9 @@ AST_MATCHER_P2(Expr, hasSideEffect, bool, CheckFunctionCalls,
if (const auto *OpCallExpr = dyn_cast<CXXOperatorCallExpr>(E)) {
if (const auto *MethodDecl =
- dyn_cast_or_null<CXXMethodDecl>(OpCallExpr->getDirectCallee()))
- if (MethodDecl->isConst())
- return false;
+ dyn_cast_or_null<CXXMethodDecl>(OpCallExpr->getDirectCallee());
+ MethodDecl && MethodDecl->isConst())
+ return false;
const OverloadedOperatorKind OpKind = OpCallExpr->getOperator();
return OpKind == OO_Equal || OpKind == OO_PlusEqual ||
diff --git a/clang-tools-extra/clang-tidy/bugprone/ChainedComparisonCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/ChainedComparisonCheck.cpp
index 1c70fb482aa2d..5df9aaf9fff22 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ChainedComparisonCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/ChainedComparisonCheck.cpp
@@ -106,10 +106,9 @@ void ChainedComparisonData::extract(const Expr *Op) {
return;
}
- if (const auto *OverloadedOp = dyn_cast<CXXOperatorCallExpr>(Op)) {
- if (OverloadedOp->getNumArgs() == 2U)
- extract(OverloadedOp);
- }
+ if (const auto *OverloadedOp = dyn_cast<CXXOperatorCallExpr>(Op);
+ OverloadedOp && OverloadedOp->getNumArgs() == 2U)
+ extract(OverloadedOp);
}
ChainedComparisonCheck::ChainedComparisonCheck(StringRef Name,
diff --git a/clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp
index 0e0f3b95fffdd..d1ddb186d3b18 100644
--- a/clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp
@@ -1563,14 +1563,13 @@ static bool isIgnoredParameter(const TheCheck &Check, const ParmVarDecl *Node) {
}();
LLVM_DEBUG(llvm::dbgs() << "\tType name is '" << NodeTypeName << "'\n");
- if (!NodeTypeName.empty()) {
- if (llvm::any_of(Check.IgnoredParameterTypeSuffixes,
- [NodeTypeName](StringRef E) {
- return !E.empty() && NodeTypeName.ends_with(E);
- })) {
- LLVM_DEBUG(llvm::dbgs() << "\tType suffix ignored.\n");
- return true;
- }
+ if (!NodeTypeName.empty() && llvm::any_of(Check.IgnoredParameterTypeSuffixes,
+ [NodeTypeName](StringRef E) {
+ return !E.empty() &&
+ NodeTypeName.ends_with(E);
+ })) {
+ LLVM_DEBUG(llvm::dbgs() << "\tType suffix ignored.\n");
+ return true;
}
return false;
@@ -1661,9 +1660,9 @@ class AppearsInSameExpr : public RecursiveASTVisitor<AppearsInSameExpr> {
if (!CurrentExprOnlyTreeRoot)
return true;
- if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl()))
- if (llvm::find(FD->parameters(), PVD))
- ParentExprsForParamRefs[PVD].insert(CurrentExprOnlyTreeRoot);
+ if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl());
+ PVD && llvm::find(FD->parameters(), PVD))
+ ParentExprsForParamRefs[PVD].insert(CurrentExprOnlyTreeRoot);
return true;
}
diff --git a/clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp
index 9e2214a5c7c82..d082f12723b77 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp
@@ -40,9 +40,9 @@ AST_MATCHER(QualType, isEnableIf) {
return true; // Case: enable_if_t< >.
if (const auto *TT = BaseType->getAs<TypedefType>())
if (const NestedNameSpecifier Q = TT->getQualifier();
- Q.getKind() == NestedNameSpecifier::Kind::Type)
- if (CheckTemplate(Q.getAsType()->getAs<TemplateSpecializationType>()))
- return true; // Case: enable_if< >::type.
+ Q.getKind() == NestedNameSpecifier::Kind::Type &&
+ CheckTemplate(Q.getAsType()->getAs<TemplateSpecializationType>()))
+ return true; // Case: enable_if< >::type.
return false;
}
AST_MATCHER_P(TemplateTypeParmDecl, hasDefaultArgument,
diff --git a/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp
index 5b319d11f84b1..88bd2b708d4cb 100644
--- a/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp
@@ -225,14 +225,14 @@ static bool overlap(ArrayRef<CallGraphNode *> SCC,
/// returns true iff `Cond` involves at least one static local variable.
static bool hasStaticLocalVariable(const Stmt *Cond) {
if (const auto *DRE = dyn_cast<DeclRefExpr>(Cond)) {
- if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()))
- if (VD->isStaticLocal())
- return true;
+ if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl());
+ VD && VD->isStaticLocal())
+ return true;
if (const auto *BD = dyn_cast<BindingDecl>(DRE->getDecl()))
- if (const auto *DD = dyn_cast<DecompositionDecl>(BD->getDecomposedDecl()))
- if (DD->isStaticLocal())
- return true;
+ if (const auto *DD = dyn_cast<DecompositionDecl>(BD->getDecomposedDecl());
+ DD && DD->isStaticLocal())
+ return true;
}
return llvm::any_of(Cond->children(), [](const Stmt *Child) {
diff --git a/clang-tools-extra/clang-tidy/bugprone/InvalidEnumDefaultInitializationCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/InvalidEnumDefaultInitializationCheck.cpp
index 09d84391d8ba3..abe27388a3f8c 100644
--- a/clang-tools-extra/clang-tidy/bugprone/InvalidEnumDefaultInitializationCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/InvalidEnumDefaultInitializationCheck.cpp
@@ -41,10 +41,10 @@ AST_MATCHER(EnumDecl, isCompleteAndHasNoZeroValue) {
AST_MATCHER(Expr, isEmptyInit) {
if (isa<CXXScalarValueInitExpr, ImplicitValueInitExpr>(&Node))
return true;
- if (const auto *Init = dyn_cast<InitListExpr>(&Node)) {
- if (Init->getNumInits() == 0)
- return true;
- }
+ if (const auto *Init = dyn_cast<InitListExpr>(&Node);
+ Init && Init->getNumInits() == 0)
+ return true;
+
return false;
}
diff --git a/clang-tools-extra/clang-tidy/bugprone/MissingEndComparisonCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/MissingEndComparisonCheck.cpp
index 051f0b569c66b..626237ea1e27c 100644
--- a/clang-tools-extra/clang-tidy/bugprone/MissingEndComparisonCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/MissingEndComparisonCheck.cpp
@@ -101,10 +101,10 @@ static std::optional<std::string> getStandardEndText(ASTContext &Context,
unsigned EndIdx = 1;
const Expr *FirstArg = Call->getArg(0);
if (const auto *Record =
- FirstArg->getType().getNonReferenceType()->getAsCXXRecordDecl()) {
- if (Record->getIdentifier() && Record->getName().ends_with("_policy"))
- EndIdx = 2;
- }
+ FirstArg->getType().getNonReferenceType()->getAsCXXRecordDecl();
+ Record && Record->getIdentifier() &&
+ Record->getName().ends_with("_policy"))
+ EndIdx = 2;
if (Call->getNumArgs() <= EndIdx)
return std::nullopt;
diff --git a/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
index dc09fabffed1e..9e462d33bfd0e 100644
--- a/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
@@ -67,14 +67,14 @@ static unsigned getLength(const Expr *E,
E = E->IgnoreImpCasts();
if (const auto *LengthDRE = dyn_cast<DeclRefExpr>(E))
- if (const auto *LengthVD = dyn_cast<VarDecl>(LengthDRE->getDecl()))
- if (!isa<ParmVarDecl>(LengthVD))
- if (const Expr *LengthInit = LengthVD->getInit();
- LengthInit && !LengthInit->isValueDependent()) {
- Expr::EvalResult Length;
- if (LengthInit->EvaluateAsInt(Length, *Result.Context))
- return Length.Val.getInt().getZExtValue();
- }
+ if (const auto *LengthVD = dyn_cast<VarDecl>(LengthDRE->getDecl());
+ LengthVD && !isa<ParmVarDecl>(LengthVD))
+ if (const Expr *LengthInit = LengthVD->getInit();
+ LengthInit && !LengthInit->isValueDependent()) {
+ Expr::EvalResult Length;
+ if (LengthInit->EvaluateAsInt(Length, *Result.Context))
+ return Length.Val.getInt().getZExtValue();
+ }
if (const auto *LengthIL = dyn_cast<IntegerLiteral>(E))
return LengthIL->getValue().getZExtValue();
@@ -107,9 +107,9 @@ static const CallExpr *getStrlenExpr(const MatchFinder::MatchResult &Result) {
Result.Nodes.getNodeAs<CallExpr>(WrongLengthExprName))
if (const Decl *D = StrlenExpr->getCalleeDecl())
if (const FunctionDecl *FD = D->getAsFunction())
- if (const IdentifierInfo *II = FD->getIdentifier())
- if (II->isStr("strlen") || II->isStr("wcslen"))
- return StrlenExpr;
+ if (const IdentifierInfo *II = FD->getIdentifier();
+ II && (II->isStr("strlen") || II->isStr("wcslen")))
+ return StrlenExpr;
return nullptr;
}
@@ -233,9 +233,9 @@ isGivenLengthEqualToSrcLength(const MatchFinder::MatchResult &Result) {
if (GivenLength != 0 && SrcLength != 0 && GivenLength == SrcLength)
return true;
- if (const auto *LengthExpr = Result.Nodes.getNodeAs<Expr>(LengthExprName))
- if (isa<BinaryOperator>(LengthExpr->IgnoreParenImpCasts()))
- return false;
+ if (const auto *LengthExpr = Result.Nodes.getNodeAs<Expr>(LengthExprName);
+ LengthExpr && isa<BinaryOperator>(LengthExpr->IgnoreParenImpCasts()))
+ return false;
// Check the strlen()'s argument's 'VarDecl' is equal to the source 'VarDecl'.
if (const CallExpr *StrlenCE = getStrlenExpr(Result))
@@ -324,21 +324,18 @@ static void lengthExprHandle(const Expr *LengthExpr,
const Expr *LhsExpr = BO->getLHS()->IgnoreImpCasts();
const Expr *RhsExpr = BO->getRHS()->IgnoreImpCasts();
- if (const auto *LhsIL = dyn_cast<IntegerLiteral>(LhsExpr)) {
- if (LhsIL->getValue().getZExtValue() == 1) {
- Diag << FixItHint::CreateRemoval(
- {LhsIL->getBeginLoc(),
- RhsExpr->getBeginLoc().getLocWithOffset(-1)});
- return;
- }
+ if (const auto *LhsIL = dyn_cast<IntegerLiteral>(LhsExpr);
+ LhsIL && LhsIL->getValue().getZExtValue() == 1) {
+ Diag << FixItHint::CreateRemoval(
+ {LhsIL->getBeginLoc(), RhsExpr->getBeginLoc().getLocWithOffset(-1)});
+ return;
}
- if (const auto *RhsIL = dyn_cast<IntegerLiteral>(RhsExpr)) {
- if (RhsIL->getValue().getZExtValue() == 1) {
- Diag << FixItHint::CreateRemoval(
- {LhsExpr->getEndLoc().getLocWithOffset(1), RhsIL->getEndLoc()});
- return;
- }
+ if (const auto *RhsIL = dyn_cast<IntegerLiteral>(RhsExpr);
+ RhsIL && RhsIL->getValue().getZExtValue() == 1) {
+ Diag << FixItHint::CreateRemoval(
+ {LhsExpr->getEndLoc().getLocWithOffset(1), RhsIL->getEndLoc()});
+ return;
}
}
@@ -912,9 +909,9 @@ void NotNullTerminatedResultCheck::memcpySFix(
void NotNullTerminatedResultCheck::memchrFix(
StringRef Name, const MatchFinder::MatchResult &Result) {
const auto *FunctionExpr = Result.Nodes.getNodeAs<CallExpr>(FunctionExprName);
- if (const auto *GivenCL = dyn_cast<CharacterLiteral>(FunctionExpr->getArg(1)))
- if (GivenCL->getValue() != 0)
- return;
+ if (const auto *GivenCL = dyn_cast<CharacterLiteral>(FunctionExpr->getArg(1));
+ GivenCL && GivenCL->getValue() != 0)
+ return;
const auto Diag =
diag(FunctionExpr->getArg(2)->IgnoreParenCasts()->getBeginLoc(),
diff --git a/clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp
index dda687ff7ade5..1e3615f9ac971 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp
@@ -90,9 +90,9 @@ static const Decl *findRVRefOverload(const FunctionDecl &FD,
for (const Decl *Overload : LookupResult) {
if (Overload == &FD)
continue;
- if (const auto *O = dyn_cast<FunctionDecl>(Overload))
- if (hasSameParameterTypes(FD, *O, PD))
- return O;
+ if (const auto *O = dyn_cast<FunctionDecl>(Overload);
+ O && hasSameParameterTypes(FD, *O, PD))
+ return O;
}
return nullptr;
}
diff --git a/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp
index 12b5a5de55618..970cd0f39a9ce 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp
@@ -375,15 +375,14 @@ void SizeofExpressionCheck::check(const MatchFinder::MatchResult &Result) {
const auto *SzOfExpr = Result.Nodes.getNodeAs<Expr>("sizeof-expr");
- if (const auto *Type = dyn_cast<ArrayType>(SizeofArgTy)) {
- // check if the array element size is larger than one. If true,
- // the size of the array is higher than the number of elements
- if (!getSizeOfType(Ctx, Type->getElementType().getTypePtr()).isOne()) {
- diag(SzOfExpr->getBeginLoc(),
- "suspicious usage of 'sizeof' in the loop")
- << SzOfExpr->getSourceRange();
- }
- }
+ // check if the array element size is larger than one. If true,
+ // the size of the array is higher than the number of elements
+ if (const auto *Type = dyn_cast<ArrayType>(SizeofArgTy);
+ Type &&
+ !getSizeOfType(Ctx, Type->getElementType().getTypePtr()).isOne())
+ diag(SzOfExpr->getBeginLoc(), "suspicious usage of 'sizeof' in the loop")
+ << SzOfExpr->getSourceRange();
+
} else if (const auto *E = Result.Nodes.getNodeAs<Expr>("sizeof-pointer")) {
diag(E->getBeginLoc(), "suspicious usage of 'sizeof()' on an expression "
"of pointer type")
diff --git a/clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.cpp
index 7890afb41addb..4247c9050009d 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.cpp
@@ -52,14 +52,13 @@ void SuspiciousMemoryComparisonCheck::check(
if (PointeeType->isRecordType()) {
if (const RecordDecl *RD =
PointeeType->getAsRecordDecl()->getDefinition()) {
- if (const auto *CXXDecl = dyn_cast<CXXRecordDecl>(RD)) {
- if (!CXXDecl->isStandardLayout()) {
- diag(CE->getBeginLoc(),
- "comparing object representation of non-standard-layout type "
- "%0; consider using a comparison operator instead")
- << PointeeQualifiedType;
- break;
- }
+ if (const auto *CXXDecl = dyn_cast<CXXRecordDecl>(RD);
+ CXXDecl && !CXXDecl->isStandardLayout()) {
+ diag(CE->getBeginLoc(),
+ "comparing object representation of non-standard-layout type "
+ "%0; consider using a comparison operator instead")
+ << PointeeQualifiedType;
+ break;
}...
[truncated]
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.