[cfe-dev] Few questions related to type checking in clang
Nikola Smiljanic
popizdeh at gmail.com
Tue Sep 2 22:56:58 PDT 2014
1. Sema is responsible for building the ast, after doing all the checks.
Act methods are 'hooks' that Parser uses to call into Sema. Build methods
are used to build the actual ast nodes.
2. Various declaration classes have methods that return QualType, see
http://clang.llvm.org/docs/InternalsManual.html#the-qualtype-class. So
VarDecl has getType but FunctionDecl in addtion has getReturnType and
getFunctionType, etc.
On Wed, Sep 3, 2014 at 1:02 PM, Amila Jayasekara <thejaka.amila at gmail.com>
wrote:
> Hi All,
>
> I am fairly new to clang. I am trying to implement experimental type
> checking rules for lambda functions. I would mainly like to get feedback on
> following;
>
> 1. I believe clang/lib/Sema is responsible for carrying out type checking.
> In the files in clang/lib/Sema I mainly saw 2 types of functions; a.
> BuildXXX functions and ActOnXXX functions. Which function pattern contains
> actual type checking implementations ? (In other words in which functions
> we do type checking ? e.g. :- function type checking etc ...)
>
> 2. In clang where (the class responsible) do we keep the information about
> type environment (i.e. type information about each variable, function etc
> ...) and how to retrieve/update type information ?
>
> Will be great if I could get feedback on above.
>
> Thank you in advance.
>
> Regards
> Thejaka Amila
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140903/8bf30db7/attachment.html>
More information about the cfe-dev
mailing list