summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/misc-static-assert.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add %check_clang_tidy and %clang_tidy_diff.Manuel Klimek2015-10-221-1/+1
| | | | | | | | | | With this, site specific lit configs can inject parameters into the test scripts if they need site specific parameters. Next up: enable check_clang_tidy to take a resource dir to enable non-standard locations for builtin includes. llvm-svn: 251010
* [clang-tidy] Use a python script instead of a shell script to run clang-tidy ↵Alexander Kornienko2015-08-201-2/+1
| | | | | | | | | | | | | | | | | | | tests. Summary: Add check_clang_tidy.py script that is functionally identical to the check_clang_tidy.py, but should also be functional on windows. I've verified that the script works on linux. Would be nice if folks using Windows could test the patch before I break windows bots ;) Reviewers: chapuni, aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12180 llvm-svn: 245583
* [clang-tidy] Fix for llvm.org/PR23355Szabolcs Sipos2015-05-291-0/+11
| | | | | | misc-static-assert and misc-assert-side-effect will handle __builtin_expect based asserts correctly. llvm-svn: 238548
* [clang-tidy] Fix for llvm.org/PR23572Szabolcs Sipos2015-05-231-0/+6
| | | | | | misc-static-assert won't report asserts whose conditions contain calls to non constexpr functions. llvm-svn: 238098
* [clang-tidy] Fix for llvm.org/PR23161Szabolcs Sipos2015-05-081-0/+6
| | | | | | | | | | The misc-static-assert check will not warn on the followings: assert(NULL == "shouldn't warn"); assert(__null == "shouldn't warn"); Where NULL is a macro defined as __null. llvm-svn: 236812
* [clang-tidy] Fix for llvm.org/PR23161Szabolcs Sipos2015-04-101-0/+19
| | | | | | | | The misc-static-assert check will not warn on the followings: assert("Some message" == NULL); assert(NULL == "Some message"); llvm-svn: 234596
* [clang-tidy] Added a couple of tests for misc-static-assert.Alexander Kornienko2015-04-041-0/+9
| | | | llvm-svn: 234094
* [clang-tidy] Fix false positives in the misc-static-assert check ↵Alexander Kornienko2015-03-151-0/+8
| | | | | | | | | | | | | | | | http://llvm.org/PR22880 The misc-static-assert check will not warn on assert(false), assert(False), assert(FALSE); where false / False / FALSE are macros expanding to the false or 0 literals. Also added corresponding test cases. http://reviews.llvm.org/D8328 Patch by Szabolcs Sipos! llvm-svn: 232306
* [clang-tidy] Fix assertion when a dependent expression is used in an assert.Alexander Kornienko2015-03-091-0/+2
| | | | llvm-svn: 231620
* [clang-tidy] Assert related checkersAlexander Kornienko2015-03-021-0/+80
This patch contains two assert related checkers. These checkers are the part of those that is being open sourced by Ericsson (http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-December/040520.html). The checkers: AssertSideEffect: /// \brief Finds \c assert() with side effect. /// /// The conition of \c assert() is evaluated only in debug builds so a condition /// with side effect can cause different behaviour in debug / relesase builds. StaticAssert: /// \brief Replaces \c assert() with \c static_assert() if the condition is /// evaluatable at compile time. /// /// The condition of \c static_assert() is evaluated at compile time which is /// safer and more efficient. http://reviews.llvm.org/D7375 Patch by Szabolcs Sipos! llvm-svn: 230943
OpenPOWER on IntegriCloud