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