aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 691c27cc25..64caf2bacc 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -1674,6 +1674,10 @@ bool Sema::mergeDeclAttribute(Decl *D, InheritableAttr *Attr) {
if (DLLExportAttr *ExportA = dyn_cast<DLLExportAttr>(Attr))
return mergeDLLExportAttr(D, ExportA->getRange(), true);
+ if (FormatAttr *FA = dyn_cast<FormatAttr>(Attr))
+ return mergeFormatAttr(D, FA->getRange(), true, FA->getType(),
+ FA->getFormatIdx(), FA->getFirstArg());
+
if (!DeclHasAttr(D, Attr)) {
InheritableAttr *NewAttr = cast<InheritableAttr>(Attr->clone(Context));
NewAttr->setInherited(true);