]> granicus.if.org Git - clang/commitdiff
Return true from UnifySection when emitting a diagnostic
authorEhsan Akhgari <ehsan.akhgari@gmail.com>
Mon, 22 Sep 2014 19:46:39 +0000 (19:46 +0000)
committerEhsan Akhgari <ehsan.akhgari@gmail.com>
Mon, 22 Sep 2014 19:46:39 +0000 (19:46 +0000)
Test Plan: I noticed this through code inspection.  The callers use the return value to remove the SectionAttr if a diagnostic is emitted, but I don't think the failure to do so is observable right now.

Reviewers: rnk

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D5438

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218265 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaAttr.cpp

index 6320faab3741774081f033938cf9a9866a856915..f92bb68d209481728ef5a1c1695a573b93ed1c4d 100644 (file)
@@ -384,7 +384,7 @@ bool Sema::UnifySection(StringRef SectionName,
   if (auto A = OtherDecl->getAttr<SectionAttr>())
     if (A->isImplicit())
       Diag(A->getLocation(), diag::note_pragma_entered_here);
-  return false;
+  return true;
 }
 
 bool Sema::UnifySection(StringRef SectionName,