aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/IdentifierTable.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-05-01 18:32:59 +0000
committerTed Kremenek <kremenek@apple.com>2008-05-01 18:32:59 +0000
commitc65b8a3e1f8da6117a2b9ba57afe8b7a2ec887cc (patch)
treedd220f96bdd73e0526b9af2af63fd8f36afaedd1 /include/clang/Basic/IdentifierTable.h
parentb83e02eedabb84708c0bfa71c4299fcd9ea2c074 (diff)
Added default ctor to Selector.
REASON: Without a default ctor we cannot do "new Selector[xxx]" and similar operations with ADTs that need to default constructor selectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/IdentifierTable.h')
-rw-r--r--include/clang/Basic/IdentifierTable.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h
index 7c9efc8bc4..024ff14456 100644
--- a/include/clang/Basic/IdentifierTable.h
+++ b/include/clang/Basic/IdentifierTable.h
@@ -222,6 +222,10 @@ class Selector {
public:
friend class SelectorTable; // only the SelectorTable can create these.
+ /// The default ctor should only be used when creating data structures that
+ /// will contain selectors.
+ Selector() : InfoPtr(0) {}
+
IdentifierInfo *getAsIdentifierInfo() const {
if (getIdentifierInfoFlag())
return reinterpret_cast<IdentifierInfo *>(InfoPtr & ~ArgFlags);