[PATCH] D102251: Suppress Deferred Diagnostics in discarded statements.

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 11 09:35:47 PDT 2021


erichkeane created this revision.
erichkeane added reviewers: yaxunl, bader, ABataev, aaron.ballman.
erichkeane requested review of this revision.
Herald added a project: clang.

It doesn't really make sense to emit language specific diagnostics
in a discarded statement, and suppressing these diagnostics results in a
programming pattern that many users will feel is quite useful.

Basically, this makes sure we only emit errors from the 'true' side of a
'constexpr if'.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102251

Files:
  clang/include/clang/AST/Stmt.h
  clang/lib/AST/Stmt.cpp
  clang/lib/Sema/Sema.cpp
  clang/test/SemaCUDA/deferred-diags.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102251.344441.patch
Type: text/x-patch
Size: 4138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210511/4db2fcbb/attachment-0001.bin>


More information about the cfe-commits mailing list