summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul_robinson@playstation.sony.com>2014-12-15 18:57:28 +0000
committerPaul Robinson <paul_robinson@playstation.sony.com>2014-12-15 18:57:28 +0000
commit30e41fb4da688d9c7c4d9bc122d8f1cb9a864f75 (patch)
tree0ee33016bac3c92c95642f9566df6abbba07e0d3 /clang/lib/Sema/SemaDecl.cpp
parentaddddc441f9c7fbd4ed70bc5a3256c385599929d (diff)
downloadbcm5719-llvm-30e41fb4da688d9c7c4d9bc122d8f1cb9a864f75.tar.gz
bcm5719-llvm-30e41fb4da688d9c7c4d9bc122d8f1cb9a864f75.zip
Warn when attribute 'optnone' conflicts with attributes on a
different declaration of the same function. llvm-svn: 224256
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index f75a2cee63c..0d33deaa5e5 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -2154,6 +2154,12 @@ static bool mergeDeclAttribute(Sema &S, NamedDecl *D,
NewAttr = S.mergeMSInheritanceAttr(D, IA->getRange(), IA->getBestCase(),
AttrSpellingListIndex,
IA->getSemanticSpelling());
+ else if (const auto *AA = dyn_cast<AlwaysInlineAttr>(Attr))
+ NewAttr = S.mergeAlwaysInlineAttr(D, AA->getRange(), AttrSpellingListIndex);
+ else if (const auto *MA = dyn_cast<MinSizeAttr>(Attr))
+ NewAttr = S.mergeMinSizeAttr(D, MA->getRange(), AttrSpellingListIndex);
+ else if (const auto *OA = dyn_cast<OptimizeNoneAttr>(Attr))
+ NewAttr = S.mergeOptimizeNoneAttr(D, OA->getRange(), AttrSpellingListIndex);
else if (isa<AlignedAttr>(Attr))
// AlignedAttrs are handled separately, because we need to handle all
// such attributes on a declaration at the same time.
OpenPOWER on IntegriCloud