[cfe-dev] Help reg. clang

Nemanja Ivanovic via cfe-dev cfe-dev at lists.llvm.org
Fri Apr 1 05:18:14 PDT 2016

There is already some handling for this type of thing. Perhaps this does
not suffice for your purposes but it is likely worth a look.
See warnings in Sema::ActOnIfStmt (that calls Sema::DiagnoseEmptyStmtBody)
and Sema::DiagnoseEmptyLoopBody (in lib/Sema/SemaChecking.cpp and
lib/Sema/SemaStmt.cpp respectively).


On Fri, Apr 1, 2016 at 12:43 PM, Swaresh Sankpal via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hi,
> I am trying to produce warnings when semicolon is found after if,for,while
> loops.How to achieve this solution using ast matcher?.Basically, have to
> match null statement inside a loop(for,if,while).Any help is appreciated.
> Swaresh
> IIT Bombay,India
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160401/4981534d/attachment.html>

More information about the cfe-dev mailing list