r218265 - Return true from UnifySection when emitting a diagnostic

Ehsan Akhgari ehsan.akhgari at gmail.com
Mon Sep 22 12:46:39 PDT 2014


Author: ehsan
Date: Mon Sep 22 14:46:39 2014
New Revision: 218265

URL: http://llvm.org/viewvc/llvm-project?rev=218265&view=rev
Log:
Return true from UnifySection when emitting a diagnostic

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

Modified:
    cfe/trunk/lib/Sema/SemaAttr.cpp

Modified: cfe/trunk/lib/Sema/SemaAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaAttr.cpp?rev=218265&r1=218264&r2=218265&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaAttr.cpp Mon Sep 22 14:46:39 2014
@@ -384,7 +384,7 @@ bool Sema::UnifySection(StringRef Sectio
   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,





More information about the cfe-commits mailing list