| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.
Differential revision: https://reviews.llvm.org/D66259
llvm-svn: 368944
|
|
|
|
| |
llvm-svn: 356796
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect the new license.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351636
|
|
|
|
|
|
|
|
| |
Subscribers: nemanjai, ioeric, kbarton, cfe-commits
Differential Revision: https://reviews.llvm.org/D50355
llvm-svn: 339401
|
|
|
|
| |
llvm-svn: 308605
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Ran clang-format on all .c/.cpp/.h files in clang-tools-extra.
Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories.
Reviewers: klimek, alexfh
Subscribers: nemanjai
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D26329
llvm-svn: 286221
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The code
struct A {
int x[3];
};
gets an compiler-generated copy constructor that uses ArraySubscriptExpr (see below).
Previously, the check would generate a warning on that copy constructor.
This commit disables the warning on implicitly generated code.
AST:
|-CXXConstructorDecl 0x337b3c8 <col:8> col:8 implicit used constexpr A 'void (const struct A &) noexcept' inline
| |-ParmVarDecl 0x337b510 <col:8> col:8 used 'const struct A &'
| |-CXXCtorInitializer Field 0x3379238 'x' 'int [3]'
| | `-ImplicitCastExpr 0x337e158 <col:8> 'int' <LValueToRValue>
| | `-ArraySubscriptExpr 0x337e130 <col:8> 'const int' lvalue
| | |-ImplicitCastExpr 0x337e118 <col:8> 'const int *' <ArrayToPointerDecay>
| | | `-MemberExpr 0x337dfc8 <col:8> 'int const[3]' lvalue .x 0x3379238
| | | `-DeclRefExpr 0x337dfa0 <col:8> 'const struct A' lvalue ParmVar 0x337b510 '' 'const struct A &'
| | `-ImplicitCastExpr 0x337e098 <col:8> 'unsigned long' <LValueToRValue>
| | `-DeclRefExpr 0x337e070 <col:8> 'unsigned long' lvalue Var 0x337e010 '__i0' 'unsigned long'
Reviewers: alexfh, aaron.ballman
Subscribers: aemerson, nemanjai, cfe-commits
Differential Revision: https://reviews.llvm.org/D22381
llvm-svn: 275993
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
index in c++03 mode
Summary:
When the expression is value dependent,
isIntegerConstantExpr() crashes in C++03 mode with
../tools/clang/lib/AST/ExprConstant.cpp:9330: (anonymous namespace)::ICEDiag CheckICE(const clang::Expr *, const clang::ASTContext &):
Assertion `!E->isValueDependent() && "Should not see value dependent exprs!"' failed.
In C++11 mode, that assert does not trigger.
This commit works around this in the check. We don't check
value-dependent indices and instead check their specialization.
Reviewers: alexfh, aaron.ballman
Subscribers: nemanjai, cfe-commits
Differential Revision: http://reviews.llvm.org/D22190
llvm-svn: 275461
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is a step forward cleaning up the namespaces in clang-tidy/utils.
There is no behavior change.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19819
llvm-svn: 268356
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is http://reviews.llvm.org/D13746 but instead of including <array>,
a stub is provided.
This check flags all array subscriptions on static arrays and
std::arrays that either have a non-compile-time-constant index or are
out of bounds.
Dynamic accesses into arrays are difficult for both tools and humans to
validate as safe. array_view is a bounds-checked, safe type for
accessing arrays of data. at() is another alternative that ensures
single accesses are bounds-checked. If iterators are needed to access an
array, use the iterators from an array_view constructed over the array.
This rule is part of the "Bounds safety" profile of the C++ Core
Guidelines, see
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#-bounds2-only-index-into-arrays-using-constant-expressions
Reviewers: alexfh, sbenza, bkramer, aaron.ballman
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D15030
llvm-svn: 255470
|
|
|
|
|
|
|
|
| |
cppcoreguidelines-pro-bounds-constant-array-index"
cppcoreguidelines-pro-bounds-constant-array-index.cpp is failing in several hosts.
llvm-svn: 253428
|
|
Summary:
This check flags all array subscriptions on static arrays and
std::arrays that either have a non-compile-time-constant index or are
out of bounds.
Dynamic accesses into arrays are difficult for both tools and humans to
validate as safe. array_view is a bounds-checked, safe type for
accessing arrays of data. at() is another alternative that ensures
single accesses are bounds-checked. If iterators are needed to access an
array, use the iterators from an array_view constructed over the array.
This rule is part of the "Bounds safety" profile of the C++ Core
Guidelines, see
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#-bounds2-only-index-into-arrays-using-constant-expressions
Reviewers: alexfh, sbenza, bkramer, aaron.ballman
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D13746
llvm-svn: 253401
|