]> granicus.if.org Git - clang/commitdiff
Added default ctor to Selector.
authorTed Kremenek <kremenek@apple.com>
Thu, 1 May 2008 18:32:59 +0000 (18:32 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 1 May 2008 18:32:59 +0000 (18:32 +0000)
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

include/clang/Basic/IdentifierTable.h

index 7c9efc8bc4019d789191bef060a53231257c22b8..024ff14456e4cf54e82f23b68afb325bc8d2363e 100644 (file)
@@ -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);