[cfe-commits] r81536 - /cfe/trunk/lib/Parse/ParseDeclCXX.cpp

Anders Carlsson andersca at mac.com
Fri Sep 11 10:54:14 PDT 2009


Author: andersca
Date: Fri Sep 11 12:54:14 2009
New Revision: 81536

URL: http://llvm.org/viewvc/llvm-project?rev=81536&view=rev
Log:
Just ignore friend templates for now so we won't crash.

Modified:
    cfe/trunk/lib/Parse/ParseDeclCXX.cpp

Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=81536&r1=81535&r2=81536&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Fri Sep 11 12:54:14 2009
@@ -1014,10 +1014,13 @@
   if (Tok.is(tok::semi)) {
     ConsumeToken();
 
-    // FIXME: Friend templates?
-    if (DS.isFriendSpecified())
+    if (DS.isFriendSpecified()) {
+      // FIXME: Friend templates are ignored for now.
+      if (TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate)
+        return;
+      
       Actions.ActOnFriendDecl(CurScope, &DS, /*IsDefinition*/ false);
-    else
+    } else
       Actions.ParsedFreeStandingDeclSpec(CurScope, DS);
 
     return;





More information about the cfe-commits mailing list