summaryrefslogtreecommitdiff
path: root/include/clang/AST/Attr.h
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-01-20 18:07:09 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-01-20 18:07:09 +0000
commitd3760b55954d6a5eb62433d21f60e264a6234ef5 (patch)
tree2190483c2bc4b4fbcda507e434b7f9b4c55a6252 /include/clang/AST/Attr.h
parent1e6097c61dd8b3fb2b6b9cd34e88bfa29500f814 (diff)
downloadclang-d3760b55954d6a5eb62433d21f60e264a6234ef5.tar.gz
Exposed a declarative way to specify that an attribute can be duplicated when merging attributes on a declaration. This replaces some hard-coded functionality from Sema.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199677 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Attr.h')
-rw-r--r--include/clang/AST/Attr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h
index 01c32c0269..822686a071 100644
--- a/include/clang/AST/Attr.h
+++ b/include/clang/AST/Attr.h
@@ -108,6 +108,11 @@ public:
// Pretty print this attribute.
virtual void printPretty(raw_ostream &OS,
const PrintingPolicy &Policy) const = 0;
+
+ /// \brief By default, attributes cannot be duplicated when being merged;
+ /// however, an attribute can override this. Returns true if the attribute
+ /// can be duplicated when merging.
+ virtual bool duplicatesAllowed() const { return false; }
};
class InheritableAttr : public Attr {