[cfe-commits] r49058 - in /cfe/trunk: include/clang/AST/Decl.h include/clang/AST/DeclObjC.h include/clang/Basic/DiagnosticKinds.def lib/AST/Decl.cpp lib/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclObjC.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaExprObjC.cpp test/Sema/alias-test-1.m
Chris Lattner
clattner at apple.com
Tue Apr 1 17:44:21 PDT 2008
On Apr 1, 2008, at 5:38 PM, Steve Naroff wrote:
>>
>> Also, can 'isTypeName' just call LookupDecl?
>>
>
> I considered this, however LookupDecl calls LazilyCreateBuiltin
> (which I didn't think made sense when being called from isTypeName).
Good point.
> If I am wrong (and this is harmless), then I can make the change.
> If not, we could consider complicating the API a bit.
You're right, isTypeName shouldn't trigger this. However, the code
can still be factored somehow. Maybe LookupDecl can get a bool
(defaulting to false) to say whether it should create the decl?
> Yet another solution I considered was to have LookupDecl/isTypeName
> call a helper to walk the scope change (this would give us the
> single point of control we'd like).
This is another good solution. This is probably even cleaner than the
bool.
>>>
> Agreed. I plan on tweaking this later...
Understood, thanks Steve,
-Chris
More information about the cfe-commits
mailing list