[cfe-commits] r151076 - in /cfe/trunk: include/clang/AST/DeclCXX.h include/clang/Sema/Sema.h lib/AST/DeclBase.cpp lib/AST/DeclCXX.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaLambda.cpp lib/Serialization/ASTReaderDecl.cpp lib/Serialization/ASTWriter.cp

Eli Friedman eli.friedman at gmail.com
Tue Feb 21 17:50:48 PST 2012


On Tue, Feb 21, 2012 at 12:17 PM, Douglas Gregor <dgregor at apple.com> wrote:
>>>     void VisitBlockDeclRefExpr(BlockDeclRefExpr *E) {
>>> +      // If we were asked not to visit local variables, don't.
>>> +      if (SkipLocalVariables && E->getDecl()->hasLocalStorage())
>>> +          return;
>>
>> What exactly are the rules for odr-use marking inside a lambda in a
>> default argument, actually?
>
> That is an *excellent* question. We're trying to emulate what would have happened if the expression had been written in a potentially evaluated context, by walking the resulting tree, and it's fairly likely that we don't get all of the cases right.

Filed PR12064; there are probably some other issues, but it's probably
not worth looking for them until we figure out how to fix that one.

-Eli




More information about the cfe-commits mailing list