[cfe-commits] r50534 - /cfe/trunk/include/clang/Basic/IdentifierTable.h

Ted Kremenek kremenek at apple.com
Thu May 1 11:32:59 PDT 2008


Author: kremenek
Date: Thu May  1 13:32:59 2008
New Revision: 50534

URL: http://llvm.org/viewvc/llvm-project?rev=50534&view=rev
Log:
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.

Modified:
    cfe/trunk/include/clang/Basic/IdentifierTable.h

Modified: cfe/trunk/include/clang/Basic/IdentifierTable.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/IdentifierTable.h?rev=50534&r1=50533&r2=50534&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/IdentifierTable.h (original)
+++ cfe/trunk/include/clang/Basic/IdentifierTable.h Thu May  1 13:32:59 2008
@@ -222,6 +222,10 @@
 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);





More information about the cfe-commits mailing list