diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
commit | 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 (patch) | |
tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /include/clang/AST/DeclBase.h | |
parent | 657bc3d9848e3be92029b2416031340988cd0111 (diff) | |
download | src-13cc256e404620c1de0cbcc4e43ce1e2dbbc4898.tar.gz src-13cc256e404620c1de0cbcc4e43ce1e2dbbc4898.zip |
Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):vendor/clang/clang-release_32-r168974
Notes
Notes:
svn path=/vendor/clang/dist/; revision=243791
svn path=/vendor/clang/clang-release_32-r168974/; revision=243792; tag=vendor/clang/clang-release_32-r168974
Diffstat (limited to 'include/clang/AST/DeclBase.h')
-rw-r--r-- | include/clang/AST/DeclBase.h | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index 0f596095f74a..50e202738dd4 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -430,16 +430,10 @@ public: void dropAttr() { if (!HasAttrs) return; - AttrVec &Attrs = getAttrs(); - for (unsigned i = 0, e = Attrs.size(); i != e; /* in loop */) { - if (isa<T>(Attrs[i])) { - Attrs.erase(Attrs.begin() + i); - --e; - } - else - ++i; - } - if (Attrs.empty()) + AttrVec &Vec = getAttrs(); + Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end()); + + if (Vec.empty()) HasAttrs = false; } @@ -844,8 +838,6 @@ public: IdentifierNamespace |= IDNS_NonMemberOperator; } - // Implement isa/cast/dyncast/etc. - static bool classof(const Decl *) { return true; } static bool classofKind(Kind K) { return true; } static DeclContext *castToDeclContext(const Decl *); static Decl *castFromDeclContext(const DeclContext *); @@ -1479,6 +1471,13 @@ public: inline ddiag_iterator ddiag_end() const; // Low-level accessors + + /// \brief Mark the lookup table as needing to be built. This should be + /// used only if setHasExternalLexicalStorage() has been called. + void setMustBuildLookupTable() { + assert(ExternalLexicalStorage && "Requires external lexical storage"); + LookupPtr.setInt(true); + } /// \brief Retrieve the internal representation of the lookup structure. /// This may omit some names if we are lazily building the structure. @@ -1516,10 +1515,6 @@ public: static bool classof(const Decl *D); static bool classof(const DeclContext *D) { return true; } -#define DECL(NAME, BASE) -#define DECL_CONTEXT(NAME) \ - static bool classof(const NAME##Decl *D) { return true; } -#include "clang/AST/DeclNodes.inc" LLVM_ATTRIBUTE_USED void dumpDeclContext() const; |