[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-28 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D69518 Files: clang/include/clang/AST/Expr.h clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaExprCXX.cpp

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-28 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:3679 + CallExpr *Call = dyn_cast(CondExpr->IgnoreParens()); + if (IsConstexpr && Call && Call->isCallToStdIsConstantEvaluated()) +Diag(Call->getBeginLoc(),

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-28 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 226758. xbolva00 added a comment. Support !E. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69518/new/ https://reviews.llvm.org/D69518 Files: clang/include/clang/AST/Expr.h clang/include/clang/Basic/Diagn

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-28 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 226759. xbolva00 added a comment. New tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69518/new/ https://reviews.llvm.org/D69518 Files: clang/include/clang/AST/Expr.h clang/include/clang/Basic/Diagnos

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8410 + "'std::is_constant_evaluated' will always evaluate to " + "'true' in constexpr mode">, InGroup; def warn_comparison_bitwise_always : Warning< "constexpr mode" isn

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-29 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked 3 inline comments as done. xbolva00 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8410 + "'std::is_constant_evaluated' will always evaluate to " + "'true' in constexpr mode">, InGroup; def warn_comparison_bitwise_always : W

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8410 + "'std::is_constant_evaluated' will always evaluate to " + "'true' in constexpr mode">, InGroup; def warn_comparison_bitwise_always : Warning< xbolva00 wrote: > rs

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 227192. xbolva00 added a comment. - Merge branch 'master' of https://github.com/llvm/llvm-project === Removed old unused change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 227191. xbolva00 added a comment. - Merge branch 'master' of https://github.com/llvm/llvm-project Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69518/new/ https://reviews.llvm.org/D69518 Files: clang/includ

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked 2 inline comments as done. xbolva00 added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:10595 +const auto *Callee = Info.CurrentCall->getCallee(); +if (Info.InConstantContext && !Info.CheckingPotentialConstantExpression && +(Info.Call

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Basic/DiagnosticASTKinds.td:333 +def warn_is_constant_evaluated_always_true_constexpr : Warning< + "'%0' will always evaluate to 'true' i

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticASTKinds.td:334 + "'%0' will always evaluate to 'true' in constexpr context">, + InGroup>; + rsmith wrote: > Looks like you decided not to

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 227237. xbolva00 added a comment. Fixed review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69518/new/ https://reviews.llvm.org/D69518 Files: clang/include/clang/Basic/DiagnosticASTKinds.td cla

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Thanks you for the review and advices! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69518/new/ https://reviews.llvm.org/D69518 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-10-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb06305e44949: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode (authored by xbolva00). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69518

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-11-01 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added a comment. This broke two stage builds of libc++. Can we revert this until a fix is ready? FAIL: libc++ :: std/utilities/meta/meta.const.eval/is_constant_evaluated.fail.cpp (55845 of 59103) TEST 'libc++ :: std/utilities/meta/meta.const.eval/is_consta

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-11-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Line 918 Add: self.cxx.addWarningFlagIfSupported('-Wno-constant-evaluated') to libcxx/utils/libcxx/test/config.py Can you please try? cc @EricWF Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69518/new/ https://reviews.

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-11-01 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added a comment. Hi @xbolva00 – Thanks. That does make the libcxx test suite pass. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69518/new/ https://reviews.llvm.org/D69518 ___ cfe-commits

[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

2019-11-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Thanks! Commited in rGdba83965722b540f6baf43163210943c41e1378a Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69518/new/ https://reviews.llvm.org/D69518