[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-08-14 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. Thank you for letting me know. I did try reproducing the issue with check-all yesterday but was unable to. I do not think I build with 'clang-tools-extra' project enabled though. I'll take another look today. Repository: rL LLVM CHANGES SINCE LAST ACTION https:/

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-08-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D61027#1627785 , @gribozavr wrote: > Like @riccibruno said, `check-clang-tools` will run them. However, before > committing a patch, please run `check-all` -- you never know what your patch > can affect. And also you'll ne

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-08-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. Like @riccibruno said, `check-clang-tools` will run them. However, before committing a patch, please run `check-all` -- you never know what your patch can affect. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61027/new/ https://reviews

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-08-13 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. I think that you have to run `check-clang-tools`. I too was surprised that it was not included in `check-clang`. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61027/new/ https://reviews.llvm.org/D61027 __

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-08-13 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. In D61027#1627655 , @gribozavr wrote: > Sorry, but this change broke ClangTidy tests: > http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/16398. I > reverted it. Yes I've been trying to reproduce it locally. Co

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-08-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. Sorry, but this change broke ClangTidy tests: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/16398. I reverted it. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61027/new/ https://reviews.llvm.org/D61027 _

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-08-13 Thread Elizabeth Andrews via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368706: Fix crash on switch conditions of non-integer types in templates (authored by eandrews, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to comm

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-08-07 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. Thanks for taking a look Reid! I rebased the patch and had a conflict with one of Richard's patches and so ran the lit tests again and noticed there are several new failures. I am taking a look at those now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61027

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-08-01 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Looks good to me. I was hoping Richard would take a look, but I reproduced the crash, and I'd rather see the fix land sooner than later. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-07-29 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61027/new/ https://reviews.llvm.org/D61027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-07-17 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. ping I just realized I modified the summary when I uploaded a new patch, but did not add a comment about the changes I made. Based on feedback from the bug report (https://bugs.llvm.org/show_bug.cgi?id=40982), I changed my approach for this crash. This patch changes t

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-06-10 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews updated this revision to Diff 203854. eandrews edited the summary of this revision. eandrews added a reviewer: rsmith. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61027/new/ https://reviews.llvm.org/D61027 Files: lib/AST/Expr.cpp lib/Sema/SemaChecking.cpp test/SemaTempla

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-04-24 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. I ran the test you provided and it does throw errors without instantiation bash-4.2$ clang -cc1 test/SemaTemplate/test2.cpp test/SemaTemplate/test2.cpp:3:7: error: statement requires expression of integer type ('int *' invalid) switch (N) case 0:; // should

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-04-24 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. (I am ensadc at bugzilla) Does this cause regression in the following case? template void f() { switch (N) case 0:; // should be diagnosed switch (0) case N:; // should be diagnosed } Currently clang diagnoses these `switch` statements even if the t

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-04-23 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. I apologize for the confusion. I was working on an incorrect branch earlier, and so abandoned that patch and uploaded a new revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61027/new/ https://reviews.llvm.org/D61027 __

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-04-23 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews created this revision. eandrews added reviewers: rnk, riccibruno, erichkeane. Clang currently crashes for switch statements inside a template when the condition is non-integer and instantiation dependent. This is because contextual implicit conversion is skipped while acting on switch c