[PATCH] Implement -Wframe-larger-than backend diagnostic

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Jun 2 05:51:15 PDT 2014

Just some quick notes:

const Decl *Demangle

should probably be demangle, or maybe a getDeclForMangledName, since
it does more than demangle a string.

+  bool LookupRepresentativeDecl(

should start with a lowercase.

And a big thanks. This should let us produce far better diagnostics
for things that involve mangled names, like aliases!

btw, this also improves things a bit for pr18188, right?

On 30 May 2014 12:23, Alp Toker <alp at nuanti.com> wrote:
> The attached patch adds driver and frontend support for the GCC
> -Wframe-larger-than=bytes warning.
> As the first GCC-compatible backend diagnostic built around LLVM's reporting
> feature the patch adds infrastructure to perform reverse lookup from mangled
> names emitted after LLVM code generation. Using that we resolve precise
> locations and originating AST functions, lambdas or block declarations to
> provide rich codegen-guided diagnostics.
> Supporting changes:
>   * Get rid of the old MangleBuffer class that was only used for blocks
>   * Let StringMap maintain unique mangled name strings instead of allocating
> copies
> The test intentionally conflates driver, frontend and backend facilities for
> now, and I expect parts of the approach to evolve as we get a feel for how
> it'll play ball with LTO etc.
> Alp.
> --
> http://www.nuanti.com
> the browser experts
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

More information about the cfe-commits mailing list