[cfe-commits] r130670 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/AST/Stmt.h lib/AST/ASTImporter.cpp lib/AST/Expr.cpp lib/AST/StmtDumper.cpp lib/Sema/SemaOverload.cpp lib/Serialization/ASTReaderStmt.cpp lib/Serialization/ASTWriterStmt.cpp

Enea Zaffanella zaffanella at cs.unipr.it
Sun May 1 23:46:31 PDT 2011


Il 02/05/2011 01:48, Chandler Carruth ha scritto:
> Author: chandlerc
> Date: Sun May  1 18:48:14 2011
> New Revision: 130670
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=130670&view=rev
> Log:
> Add an optional field attached to a DeclRefExpr which points back to the
> Decl actually found via name lookup & overload resolution when that Decl
> is different from the ValueDecl which is actually referenced by the
> expression.
> 
> This can be used by AST consumers to correctly attribute references to
> the spelling location of a using declaration, and otherwise gain insight
> into the name resolution performed by Clang.

Great!

While you are at it ... you may also want to do something similar for
UsingShadowDecl, as suggested here:

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-March/014312.html

This way AST consumers will be able to detect unused UsingDecl's nodes.

Enea.



More information about the cfe-commits mailing list