summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Cleaning namespaces to be more consistant across checkers.Etienne Bergeron2016-05-021-0/+2
| | | | | | | | | | | | | | Summary: The goal of the patch is to bring checkers in their appropriate namespace. This path doesn't change any behavior. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19811 llvm-svn: 268264
* Refactors AST matching code to use the new AST matcher names. This patch ↵Aaron Ballman2015-09-171-2/+2
| | | | | | correlates to r247885 which performs the AST matcher rename in Clang. llvm-svn: 247886
* Allow the static assert clang-tidy checker to run over C code.Aaron Ballman2015-08-311-4/+3
| | | | llvm-svn: 246495
* Using an early return as it is more clear; NFC.Aaron Ballman2015-08-311-38/+38
| | | | llvm-svn: 246447
* Disable clang-tidy misc checkers when not compiling in C++ mode. Many of the ↵Aaron Ballman2015-08-281-30/+42
| | | | | | checkers do not require additional testing as the tests will not compile for other languages or modes, or the checkers would never match a valid construct. llvm-svn: 246318
* [clang-tidy] Fix for llvm.org/PR23355Szabolcs Sipos2015-05-291-4/+7
| | | | | | 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-1/+3
| | | | | | 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-1/+1
| | | | | | | | | | 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-8/+12
| | | | | | | | The misc-static-assert check will not warn on the followings: assert("Some message" == NULL); assert(NULL == "Some message"); llvm-svn: 234596
* [clang-tidy] Fix false positives in the misc-static-assert check ↵Alexander Kornienko2015-03-151-3/+11
| | | | | | | | | | | | | | | | 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-1/+3
| | | | llvm-svn: 231620
* [clang-tidy] Assert related checkersAlexander Kornienko2015-03-021-0/+138
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