]> granicus.if.org Git - clang/commitdiff
Move DeclSpec::setProtocolQualifiers() out of line.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 29 Sep 2009 19:42:11 +0000 (19:42 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 29 Sep 2009 19:42:11 +0000 (19:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83092 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 7d316c43fd6a75beb5cb1b71812d83fa5f9bd82e..51970f1867d96d0697f7297eea669fb3caa5f6d8 100644 (file)
@@ -350,15 +350,7 @@ public:
   SourceLocation getProtocolLAngleLoc() const { return ProtocolLAngleLoc; }
   void setProtocolQualifiers(const ActionBase::DeclPtrTy *Protos, unsigned NP,
                              SourceLocation *ProtoLocs,
-                             SourceLocation LAngleLoc) {
-    if (NP == 0) return;
-    ProtocolQualifiers = new ActionBase::DeclPtrTy[NP];
-    ProtocolLocs = new SourceLocation[NP];
-    memcpy((void*)ProtocolQualifiers, Protos, sizeof(ActionBase::DeclPtrTy)*NP);
-    memcpy(ProtocolLocs, ProtoLocs, sizeof(SourceLocation)*NP);
-    NumProtocolQualifiers = NP;
-    ProtocolLAngleLoc = LAngleLoc;
-  }
+                             SourceLocation LAngleLoc);
 
   /// Finish - This does final analysis of the declspec, issuing diagnostics for
   /// things like "_Imaginary" (lacking an FP type).  After calling this method,
index 0342e393635a744c6a47f418bac665c06f5ef665..b8422aad5a842cdd9a4b1b02d68fc5309a7bc8e3 100644 (file)
@@ -334,6 +334,19 @@ bool DeclSpec::SetFriendSpec(SourceLocation Loc, const char *&PrevSpec,
   return false;
 }
 
+void DeclSpec::setProtocolQualifiers(const ActionBase::DeclPtrTy *Protos,
+                                     unsigned NP,
+                                     SourceLocation *ProtoLocs,
+                                     SourceLocation LAngleLoc) {
+  if (NP == 0) return;
+  ProtocolQualifiers = new ActionBase::DeclPtrTy[NP];
+  ProtocolLocs = new SourceLocation[NP];
+  memcpy((void*)ProtocolQualifiers, Protos, sizeof(ActionBase::DeclPtrTy)*NP);
+  memcpy(ProtocolLocs, ProtoLocs, sizeof(SourceLocation)*NP);
+  NumProtocolQualifiers = NP;
+  ProtocolLAngleLoc = LAngleLoc;
+}
+
 /// Finish - This does final analysis of the declspec, rejecting things like
 /// "_Imaginary" (lacking an FP type).  This returns a diagnostic to issue or
 /// diag::NUM_DIAGNOSTICS if there is no error.  After calling this method,