[PATCH] D76937: Fix infinite recursion in deferred diagnostic emitter

2020-04-01 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5767085c8de9: Fix infinite recursion in deferred diag emitter (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D76937: Fix infinite recursion in deferred diagnostic emitter

2020-04-01 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76937/new/ https://reviews.llvm.org/D76937 ___ cfe-commits mailing list

[PATCH] D76937: Fix infinite recursion in deferred diagnostic emitter

2020-04-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 254262. yaxunl added a comment. fix assert message CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76937/new/ https://reviews.llvm.org/D76937 Files: clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaDecl.cpp

[PATCH] D76937: Fix infinite recursion in deferred diagnostic emitter

2020-04-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 254261. yaxunl added a comment. Revised by John's comments. Also only check file scope variables. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76937/new/ https://reviews.llvm.org/D76937 Files: clang/lib/Sema/Sema.cpp

[PATCH] D76937: Fix infinite recursion in deferred diagnostic emitter

2020-03-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D76937#1950764 , @yaxunl wrote: > In D76937#1950077 , @rjmccall wrote: > > > Can you explain what exactly the emission/semantic model is for variables? > > Normal code-generation

[PATCH] D76937: Fix infinite recursion in deferred diagnostic emitter

2020-03-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D76937#1950077 , @rjmccall wrote: > Can you explain what exactly the emission/semantic model is for variables? > Normal code-generation absolutely triggers the emission of many variables > lazily (e.g. internal-linkage

[PATCH] D76937: Fix infinite recursion in deferred diagnostic emitter

2020-03-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Can you explain what exactly the emission/semantic model is for variables? Normal code-generation absolutely triggers the emission of many variables lazily (e.g. internal-linkage globals, C++ inline variables); and any variable that's *not* being emitted lazily

[PATCH] D76937: Fix infinite recursion in deferred diagnostic emitter

2020-03-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, ABataev. Herald added a reviewer: jdoerfert. Currently deferred diagnostic emitter checks variable decl in DeclRefExpr, which causes infinite recursion for cases like `long a = (long)`. Deferred diagnostic emitter does not need