summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/checkers/bugprone-string-integer-assignment.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reapply "Fix crash on switch conditions of non-integer types in templates"Elizabeth Andrews2019-12-031-1/+3
| | | | | | | | | | | | | | | | | | | | This patch reapplies commit 759948467ea. Patch was reverted due to a clang-tidy test fail on Windows. The test has been modified. There are no additional code changes. Patch was tested with ninja check-all on Windows and Linux. Summary of code changes: Clang currently crashes for switch statements inside a template when the condition is a non-integer field member because contextual implicit conversion is skipped when parsing the condition. This conversion is however later checked in an assert when the case statement is handled. The conversion is skipped when parsing the condition because the field member is set as type-dependent based on its containing class. This patch sets the type dependency based on the field's type instead. This patch fixes Bug 40982.
* Revert "Reapply "Fix crash on switch conditions of non-integer types in ↵Melanie Blower2019-11-081-2/+0
| | | | | | | templates"" This reverts commit 759948467ea3181615d44d80f74ffeb260180fd0. There were build bot failures in clang-tidy
* Reapply "Fix crash on switch conditions of non-integer types in templates"Melanie Blower2019-11-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reapplies commit 76945821b9cad3. The first version broke buildbots due to clang-tidy test fails. The fails are because some errors in templates are now diagnosed earlier (does not wait till instantiation). I have modified the tests to add checks for these diagnostics/prevent these diagnostics. There are no additional code changes. Summary of code changes: Clang currently crashes for switch statements inside a template when the condition is a non-integer field member because contextual implicit conversion is skipped when parsing the condition. This conversion is however later checked in an assert when the case statement is handled. The conversion is skipped when parsing the condition because the field member is set as type-dependent based on its containing class. This patch sets the type dependency based on the field's type instead. This patch fixes Bug 40982. Reviewers: rnk, gribozavr2 Patch by: Elizabeth Andrews (eandrews) Differential revision: https://reviews.llvm.org/D69950
* [ClangTidy] Separate tests for infrastructure and checkersDmitri Gribenko2019-10-111-0/+109
Summary: This change moves tests for checkers and infrastructure into separate directories, making it easier to find infrastructure tests. Tests for checkers are already easy to find because they are named after the checker. Tests for infrastructure were difficult to find because they were outnumbered by tests for checkers. Now they are in a separate directory. Reviewers: jfb, jdoerfert, lebedev.ri Subscribers: srhines, nemanjai, aheejin, kbarton, christof, mgrang, arphaman, jfb, lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68807 llvm-svn: 374540
OpenPOWER on IntegriCloud