[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-commits
Subject: Re: [PATCH] D11194: Instantiate function declarations in instantiated functions.
From: Richard Smith via cfe-commits <cfe-commits () lists ! llvm ! org>
Date: 2015-08-17 20:57:09
Message-ID: 16501cfd01bf395fb8b2a6b1a1a7fa23 () localhost ! localdomain
[Download RAW message or body]
rsmith added inline comments.
================
Comment at: lib/AST/DeclBase.cpp:273
@@ +272,3 @@
+ return true;
+ if (const CXXRecordDecl *ClassD = dyn_cast<CXXRecordDecl>(LDC))
+ return ClassD->isLocalClass() && !ClassD->isLambda();;
----------------
It's not necessary for this change, but to match its documentation this function \
should handle other kinds of `TagDecl` too (enums, C structs). Something like:
do {
if (LDC->isFunctionOrMethod())
return true;
if (!isa<TagDecl>(LDC))
return false;
LDC = LDC->getLexicalParent();
} while (LDC);
return false;
... maybe?
================
Comment at: lib/AST/DeclBase.cpp:274
@@ +273,3 @@
+ if (const CXXRecordDecl *ClassD = dyn_cast<CXXRecordDecl>(LDC))
+ return ClassD->isLocalClass() && !ClassD->isLambda();;
+ return false;
----------------
You have a double-semicolon here.
================
Comment at: lib/AST/DeclBase.cpp:274
@@ +273,3 @@
+ if (const CXXRecordDecl *ClassD = dyn_cast<CXXRecordDecl>(LDC))
+ return ClassD->isLocalClass() && !ClassD->isLambda();;
+ return false;
----------------
rsmith wrote:
> You have a double-semicolon here.
Why are you discounting lambdas here?
http://reviews.llvm.org/D11194
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic