diff options
Diffstat (limited to 'clang/include/clang/AST/DeclBase.h')
-rw-r--r-- | clang/include/clang/AST/DeclBase.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h index 5b1038582bc6..9a4736019d1b 100644 --- a/clang/include/clang/AST/DeclBase.h +++ b/clang/include/clang/AST/DeclBase.h @@ -548,17 +548,18 @@ public: return hasAttrs() ? getAttrs().end() : nullptr; } - template <typename T> - void dropAttr() { + template <typename... Ts> void dropAttrs() { if (!HasAttrs) return; AttrVec &Vec = getAttrs(); - llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); + llvm::erase_if(Vec, [](Attr *A) { return isa<Ts...>(A); }); if (Vec.empty()) HasAttrs = false; } + template <typename T> void dropAttr() { dropAttrs<T>(); } + template <typename T> llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); @@ -1707,7 +1708,7 @@ class DeclContext { LLVM_PREFERRED_TYPE(bool) uint64_t IsVirtualAsWritten : 1; LLVM_PREFERRED_TYPE(bool) - uint64_t IsPure : 1; + uint64_t IsPureVirtual : 1; LLVM_PREFERRED_TYPE(bool) uint64_t HasInheritedPrototype : 1; LLVM_PREFERRED_TYPE(bool) |