[PATCH] D60561: [clang] fixing diagnostics of constexpr callstack

2019-04-14 Thread Gauthier via Phabricator via cfe-commits
Tyker updated this revision to Diff 195056. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60561/new/ https://reviews.llvm.org/D60561 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/constant-expression-cxx1y.cpp Index: clang/test/SemaCXX/constant-expression-cxx1y.cpp ===

[PATCH] D60561: [clang] fixing diagnostics of constexpr callstack

2019-04-14 Thread Gauthier via Phabricator via cfe-commits
Tyker updated this revision to Diff 195055. Tyker added a comment. i changed the way arguments are stored. to make it more controllable. added an argument call stack where it is needed. this version slows down compilation by around 0.5% in average over 200 run for SemaDecl -fsyntax-only CHANGES

[PATCH] D60561: [clang] fixing diagnostics of constexpr callstack

2019-04-13 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D60561#1465373 , @Tyker wrote: > the impact was much higher than i expected, around 1% slower in average on > 50 compilation of SemaDecl with -fsyntax-only. Good to know, thanks for doing the measurement ! CHANGES SINCE

[PATCH] D60561: [clang] fixing diagnostics of constexpr callstack

2019-04-13 Thread Gauthier via Phabricator via cfe-commits
Tyker added a comment. the impact was much higher than i expected, around 1% slower in average on 50 compilation of SemaDecl with -fsyntax-only. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60561/new/ https://reviews.llvm.org/D60561 ___

[PATCH] D60561: [clang] fixing diagnostics of constexpr callstack

2019-04-12 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D60561#1464740 , @Tyker wrote: > @rsmith i don't think collecting theses values is expansive compared to > evaluating the expression. > but i agree that we can disable the collection of these values when no > diagnostics c

[PATCH] D60561: [clang] fixing diagnostics of constexpr callstack

2019-04-12 Thread Gauthier via Phabricator via cfe-commits
Tyker added a comment. @rsmith i don't think collecting theses values is expansive compared to evaluating the expression. but i agree that we can disable the collection of these values when it isn't needed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60561/new/ https://reviews.llvm.

[PATCH] D60561: [clang] fixing diagnostics of constexpr callstack

2019-04-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This seems liable to be moderately expensive, especially for large argument values, and it's a cost that is unnecessary in the common case where evaluation succeeds. I wonder if we'd be better off speculatively trying the entire evaluation without storing any such value

[PATCH] D60561: [clang] fixing diagnostics of constexpr callstack

2019-04-11 Thread Gauthier via Phabricator via cfe-commits
Tyker updated this revision to Diff 194684. Tyker added a comment. @Quuxplusone edited based of feedback i simplified the test but didn't put the original because this one test arguments for variable and literal and there may be corner case differences CHANGES SINCE LAST ACTION https://revi

[PATCH] D60561: [clang] fixing diagnostics of constexpr callstack

2019-04-11 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:486 +/// diagnostics +ConstArgs ConstantArgs; + Please don't use a typedef for this. Follow the style of the surrounding lines. const APValue *ConstantArgs; (The pointer m

[PATCH] D60561: [clang] fixing diagnostics of constexpr callstack

2019-04-11 Thread Gauthier via Phabricator via cfe-commits
Tyker created this revision. Tyker added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. this is a bugfix for this added a constant copy of argument to CallStackFrame. and use it in describeCall instead of th