diff options
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 7f3f8110029..48fb2318e61 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -2627,7 +2627,7 @@ void Sema::mergeDeclAttributes(NamedDecl *New, Decl *Old, // This redeclaration adds a section attribute. if (New->hasAttr<SectionAttr>() && !Old->hasAttr<SectionAttr>()) { if (auto *VD = dyn_cast<VarDecl>(New)) { - if (VD->isThisDeclarationADefinition() != VarDecl::Definition) { + if (VD->isThisDeclarationADefinition() == VarDecl::DeclarationOnly) { Diag(New->getLocation(), diag::warn_attribute_section_on_redeclaration); Diag(Old->getLocation(), diag::note_previous_declaration); } |