| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
repeated in the macro
llvm-svn: 239909
|
|
|
|
|
|
|
| |
* calculations in the replacement list should be inside parentheses
* macro arguments should be inside parentheses
llvm-svn: 239820
|
|
|
|
| |
llvm-svn: 239122
|
|
|
|
|
|
| |
misc-static-assert and misc-assert-side-effect will handle __builtin_expect based asserts correctly.
llvm-svn: 238548
|
|
|
|
| |
llvm-svn: 238326
|
|
|
|
|
|
| |
and assignments.
llvm-svn: 238202
|
|
|
|
|
|
|
|
|
| |
files included in other files.
This is done sometimes for testing purposes, and the check needs to handle this
consistently.
llvm-svn: 238193
|
|
|
|
|
|
| |
misc-static-assert won't report asserts whose conditions contain calls to non constexpr functions.
llvm-svn: 238098
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add a clang-tidy check (misc-noexcept-move-ctors) for move constructors
and assignment operators not using noexcept.
http://llvm.org/PR23519
Reviewers: klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D9933
llvm-svn: 238013
|
|
|
|
|
|
|
|
|
| |
Some people have reasons to compile their .c files as C++ in some configurations
(e.g. for testing purposes), so just looking at LangOptions is not enough. This
patch disables the check on all .c files (and also for the headers included from
.c files).
llvm-svn: 237905
|
|
|
|
|
|
| |
failing tests
llvm-svn: 237832
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enhance clang-tidy readability-simplify-boolean-expr check to handle chained
conditional assignment and chained conditional return.
Based on feedback from applying this tool to the clang/LLVM codebase, this
changeset improves the readability-simplify-boolean-expr check so that
conditional assignment or return statements at the end of a chain of if/else if
statements are left unchanged unless a configuration option is supplied.
http://reviews.llvm.org/D8996
Patch by Richard Thomson!
llvm-svn: 237541
|
|
|
|
|
|
|
| |
This solves some false negatives at a cost of adding some false positives that
can be fixed easily and (almost) automatically.
llvm-svn: 237120
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 236405
|
|
|
|
|
|
|
|
| |
clang-tools-extra/test/pp-trace/pp-trace-modules.cpp on win32 for now. Investigating."
It has been resolved.
llvm-svn: 236309
|
|
|
|
|
|
| |
now. Investigating.
llvm-svn: 236001
|
|
|
|
|
|
|
| |
might be a little too strict now, but better be too strict than do the
wrong thing.
llvm-svn: 235932
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This check looks for comparisons between boolean expressions and boolean
constants and simplifies them to just use the appropriate boolean expression
directly.
if (b == true) becomes if (b)
if (b == false) becomes if (!b)
if (b && true) becomes if (b)
if (b && false) becomes if (false)
if (b || true) becomes if (true)
if (b || false) becomes if (b)
e ? true : false becomes e
e ? false : true becomes !e
if (true) t(); else f(); becomes t();
if (false) t(); else f(); becomes f();
if (e) return true; else return false; becomes return (e);
if (e) return false; else return true; becomes return !(e);
if (e) b = true; else b = false; becomes b = e;
if (e) b = false; else b = true; becomes b = !(e);
http://reviews.llvm.org/D7648
Patch by Richard Thomson!
llvm-svn: 234626
|
|
|
|
|
|
|
|
| |
The misc-static-assert check will not warn on the followings:
assert("Some message" == NULL);
assert(NULL == "Some message");
llvm-svn: 234596
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Do not warn on .reset(.release()) expressions if the deleters are not
compatible.
Using plain assignment will probably not work.
Reviewers: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D8422
llvm-svn: 234512
|
|
|
|
|
|
|
| |
NamespaceCommentCheck: Don't remove the token placed immediately after the
namespace closing brace.
llvm-svn: 234403
|
|
|
|
| |
llvm-svn: 234094
|
|
|
|
|
|
|
|
| |
Use "constructors that are callable with a single argument" instead of
"single-argument constructors" when referring to constructors using default
arguments or parameter packs.
llvm-svn: 233702
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
readability-named-parameter.
Summary: The relevant style rule is going to be removed, thus the check is no longer needed in the Google module. Leaving the check in readability/ in case someone needs it.
Reviewers: djasper
Reviewed By: djasper
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D8261
llvm-svn: 232431
|
|
|
|
|
|
|
|
|
|
| |
readability-redundant-string-cstr
http://reviews.llvm.org/D7318
Patch by Richard Thomson!
llvm-svn: 232338
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Reviewed by: Alexander Kornienko
Differential Revision: http://reviews.llvm.org/D8164
llvm-svn: 231941
|
|
|
|
| |
llvm-svn: 231620
|
|
|
|
|
|
|
|
|
|
| |
right side is rvalue
http://reviews.llvm.org/D8071
Patch by Alexey Sokolov!
llvm-svn: 231365
|
|
|
|
|
|
| |
Print clang-tidy output and fixes applied.
llvm-svn: 231236
|
|
|
|
| |
llvm-svn: 230994
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
* Better error message when more than one of 'virtual', 'override' and 'final'
is present ("X is/are redundant since the function is already declared Y").
* Convert the messages to the style used in Clang diagnostics: lower case
initial letter, no trailing period.
* Don't run the check for files compiled in pre-C++11 mode
(http://llvm.org/PR22638).
llvm-svn: 230765
|
|
|
|
|
|
|
| |
Patch by Richard Thomson!
http://reviews.llvm.org/D7603
llvm-svn: 230491
|
|
|
|
| |
llvm-svn: 230483
|
|
|
|
|
|
| |
This reverts commit 230430.
llvm-svn: 230455
|
|
|
|
| |
llvm-svn: 230430
|
|
|
|
| |
llvm-svn: 230014
|
|
|
|
| |
llvm-svn: 229869
|
|
|
|
| |
llvm-svn: 229699
|
|
|
|
|
|
| |
header list.
llvm-svn: 229692
|
|
|
|
| |
llvm-svn: 229552
|
|
|
|
|
|
| |
Don't expect the list were on the current directory.
llvm-svn: 228991
|
|
|
|
| |
llvm-svn: 228945
|
|
|
|
| |
llvm-svn: 228941
|
|
|
|
|
|
| |
need to load multiple module maps.
llvm-svn: 228935
|
|
|
|
|
|
| |
private includes that purposefully get included inside blocks.
llvm-svn: 228846
|
|
|
|
| |
llvm-svn: 228692
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Algorithms like remove() does not actually remove any element from the
container but returns an iterator to the first redundant element at the end
of the container. These redundant elements must be removed using the
erase() method. This check warns when not all of the elements will be
removed due to using an inappropriate overload.
Reviewer: alexfh
Differential Revision: http://reviews.llvm.org/D7496
llvm-svn: 228679
|