]> granicus.if.org Git - clang/commitdiff
Inline a trivial clear() method.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 19 May 2012 14:28:31 +0000 (14:28 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 19 May 2012 14:28:31 +0000 (14:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157114 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/DeclSpec.h
lib/Sema/DeclSpec.cpp

index 67fd3939f35de392343fbb55d71c6cc383eccf15..422a17cc25b49ec6f293fb00ea26cd520c0952c7 100644 (file)
@@ -853,12 +853,14 @@ public:
     assert(Other.Kind == IK_Identifier && "Cannot copy non-identifiers");
   }
 
-  /// \brief Destroy this unqualified-id.
-  ~UnqualifiedId() { clear(); }
-  
   /// \brief Clear out this unqualified-id, setting it to default (invalid) 
   /// state.
-  void clear();
+  void clear() {
+    Kind = IK_Identifier;
+    Identifier = 0;
+    StartLocation = SourceLocation();
+    EndLocation = SourceLocation();
+  }
   
   /// \brief Determine whether this unqualified-id refers to a valid name.
   bool isValid() const { return StartLocation.isValid(); }
index b531accf868ae632843b0979860d84d6387d3a47..8ea72ca79ce58d4699aa37e47db8fd405ebc2c1f 100644 (file)
@@ -935,13 +935,6 @@ bool DeclSpec::isMissingDeclaratorOk() {
     StorageClassSpec != DeclSpec::SCS_typedef;
 }
 
-void UnqualifiedId::clear() {
-  Kind = IK_Identifier;
-  Identifier = 0;
-  StartLocation = SourceLocation();
-  EndLocation = SourceLocation();
-}
-
 void UnqualifiedId::setOperatorFunctionId(SourceLocation OperatorLoc, 
                                           OverloadedOperatorKind Op,
                                           SourceLocation SymbolLocations[3]) {