Author: mgehre
Date: Tue Jul 16 14:19:00 2019
New Revision: 366265
URL: http://llvm.org/viewvc/llvm-project?rev=366265&view=rev
Log:
[clang-tidy] initial version of readability-convert-member-functions-to-static
Summary:
Finds non-static member functions that can be made ``static``.
I have run t
Author: mgehre
Date: Thu Jul 25 10:50:51 2019
New Revision: 367040
URL: http://llvm.org/viewvc/llvm-project?rev=367040&view=rev
Log:
Add lifetime categories attributes
Summary:
This is the first part of work announced in
"[RFC] Adding lifetime analysis to clang" [0],
i.e. the addition of the [[gs
Author: mgehre
Date: Wed Aug 7 03:45:36 2019
New Revision: 368147
URL: http://llvm.org/viewvc/llvm-project?rev=368147&view=rev
Log:
gsl::Owner/gsl::Pointer: Add implicit annotations for some std types
Summary:
Hard code gsl::Owner/gsl::Pointer for std types. The paper mentions
some types explici
Author: mgehre
Date: Wed Aug 14 14:55:57 2019
New Revision: 368929
URL: http://llvm.org/viewvc/llvm-project?rev=368929&view=rev
Log:
[LifetimeAnalysis] Support std::stack::top() and std::optional::value()
Summary: Diagnose dangling pointers that come from std::stack::top() and
std::optional::val
Author: mgehre
Date: Fri Jun 21 14:30:25 2019
New Revision: 364106
URL: http://llvm.org/viewvc/llvm-project?rev=364106&view=rev
Log:
[clang-tidy] misc-unused-parameters: don't comment out parameter name for C code
Summary: The fixit `int square(int /*num*/)` yields `error: parameter name
omitted
Author: mgehre
Date: Mon May 13 12:21:57 2019
New Revision: 360613
URL: http://llvm.org/viewvc/llvm-project?rev=360613&view=rev
Log:
[clang-tidy] readability-redundant-declaration: fix false positive with C
"extern inline"
Summary:
readability-redundant-declaration was diagnosing a redundant dec
Author: mgehre
Date: Tue May 14 11:23:10 2019
New Revision: 360698
URL: http://llvm.org/viewvc/llvm-project?rev=360698&view=rev
Log:
[clang-tidy] Fix invalid fixit for readability-static-accessed-through-instance
(bug 40544)
Summary:
Fixed https://bugs.llvm.org/show_bug.cgi?id=40544
Before, we w
Author: mgehre
Date: Thu May 23 22:46:57 2019
New Revision: 361601
URL: http://llvm.org/viewvc/llvm-project?rev=361601&view=rev
Log:
[clang-tidy] Add option "LiteralInitializers" to
cppcoreguidelines-pro-type-member-init
Differential Revision: D24892
Added:
clang-tools-extra/trunk/test/cla
Author: Matthias Gehre
Date: 2020-06-03T12:19:06+02:00
New Revision: add51e152aa6dc3aa7a51901a099b2ebe8cfe377
URL:
https://github.com/llvm/llvm-project/commit/add51e152aa6dc3aa7a51901a099b2ebe8cfe377
DIFF:
https://github.com/llvm/llvm-project/commit/add51e152aa6dc3aa7a51901a099b2ebe8cfe377.diff
Author: Matthias Gehre
Date: 2020-04-09T19:26:41+02:00
New Revision: eaa55590945a130131a47a4d2b89e3bbdfced79e
URL:
https://github.com/llvm/llvm-project/commit/eaa55590945a130131a47a4d2b89e3bbdfced79e
DIFF:
https://github.com/llvm/llvm-project/commit/eaa55590945a130131a47a4d2b89e3bbdfced79e.diff
Author: Matthias Gehre
Date: 2020-04-17T10:37:24+02:00
New Revision: 0642e5e7a7e54a11120262cfafea0193e3a75faf
URL:
https://github.com/llvm/llvm-project/commit/0642e5e7a7e54a11120262cfafea0193e3a75faf
DIFF:
https://github.com/llvm/llvm-project/commit/0642e5e7a7e54a11120262cfafea0193e3a75faf.diff
Author: Matthias Gehre
Date: 2020-04-27T14:23:23+02:00
New Revision: 145dcef8bdf9da9684c9c4e34a8e6c45baafab74
URL:
https://github.com/llvm/llvm-project/commit/145dcef8bdf9da9684c9c4e34a8e6c45baafab74
DIFF:
https://github.com/llvm/llvm-project/commit/145dcef8bdf9da9684c9c4e34a8e6c45baafab74.diff
mgehre created this revision.
mgehre added reviewers: alexfh, aaron.ballman, hokein.
mgehre added a subscriber: cfe-commits.
When having
``` c++
#define MACRO code-with-warning
MACRO; // NOLINT
```
clang-tidy would still show the warning, because
it searched for "NOLINT" only in the first
mgehre created this revision.
mgehre added reviewers: alexfh, aaron.ballman.
mgehre added a subscriber: cfe-commits.
Herald added a subscriber: nemanjai.
This fixes https://llvm.org/bugs/show_bug.cgi?id=30487 where
```
warning: uninitialized record type: 's' [cppcoreguidelines-pro-type-member-init
mgehre created this revision.
mgehre added reviewers: alexfh, aaron.ballman, rsmith.
mgehre added a subscriber: cfe-commits.
This patch implements parsing of [[clang::suppress(rule, ...)]]
attributes.
C++ Core Guidelines depend heavily on tool support for
rule enforcement. They also propose a way
mgehre created this revision.
mgehre added reviewers: alexfh, aaron.ballman.
mgehre added a subscriber: cfe-commits.
Herald added a subscriber: nemanjai.
This is a proof-of-concept how the [[clang::suppress(tags,...)]] attribute can
work with suppressing clang-tidy warnings.
The list of tags that
mgehre updated this revision to Diff 72365.
mgehre added a comment.
Minor fix
https://reviews.llvm.org/D24888
Files:
clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp
clang-tidy/cppcoreguidelines/Suppression.h
docs/clang-tidy/checks/cppcoreguidelines-pro-type-reinterpret-cast.r
mgehre updated this revision to Diff 72366.
mgehre added a comment.
Include link to corresponding clang-tidy patch
https://reviews.llvm.org/D24886
Files:
include/clang/Basic/Attr.td
lib/Sema/SemaDeclAttr.cpp
lib/Sema/SemaStmtAttr.cpp
Index: lib/Sema/SemaStmtAttr.cpp
=
Author: mgehre
Date: Sat Sep 24 11:06:53 2016
New Revision: 282330
URL: http://llvm.org/viewvc/llvm-project?rev=282330&view=rev
Log:
[clang-tidy] fix for NOLINT after macro expansion
Summary:
When having
``` c++
#define MACRO code-with-warning
MACRO; // NOLINT
```
clang-tidy would still s
This revision was automatically updated to reflect the committed changes.
Closed by commit rL282330: [clang-tidy] fix for NOLINT after macro expansion
(authored by mgehre).
Changed prior to commit:
https://reviews.llvm.org/D24845?vs=72214&id=72391#toc
Repository:
rL LLVM
https://reviews.llv
mgehre added a comment.
I'm sorry if this sounds dumb, but is there a way for me to follow that
particular discussion?
https://reviews.llvm.org/D22587
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/lis
mgehre created this revision.
mgehre added reviewers: alexfh, aaron.ballman, hokein.
mgehre added a subscriber: cfe-commits.
Herald added a subscriber: nemanjai.
Adds the option "LiteralInitializers" to
cppcoreguidelines-pro-type-member-init.
If set to non-zero, the check will provide fix-its with
mgehre updated this revision to Diff 72394.
mgehre added a comment.
Extend test to negative case
https://reviews.llvm.org/D24892
Files:
clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h
docs/clang-tidy/checks/cppcoreguidelines-pr
mgehre added a comment.
Thank your very much for your comments!
Let me try to give me reasoning for those points:
1. But it's missing some pieces, like test cases
I though about how to test this, having no semantic meaning itself.
I could look at the AST dump, but it does not even show the
rules
mgehre updated this revision to Diff 72677.
mgehre added a comment.
Rename the struct that was introduced in the test. Note that I need to keep the
function Bug30487,
because that is where the false-positive warning was emitted.
https://reviews.llvm.org/D24848
Files:
clang-tidy/utils/TypeTra
mgehre added a comment.
I would like to close that particular bug report, and thus I would like to have
the reproducer of that bug as part of the test case.
The PositivePartiallyInClassInitialized is also a good test, but I fail to see
how it is proves that that particular bug is solved.
Are yo
mgehre added inline comments.
Comment at: clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp:25
@@ -23,2 +24,3 @@
- Finder->addMatcher(cxxReinterpretCastExpr().bind("cast"), this);
+ std::vector Rules{"type", "type.1",
"cppcoreguidelines-pro-type-reinterpret-cast"};
mgehre added a comment.
In the C++ Core Guidelines issue on namespaceing of the [[suppress]], it was
state that Microsoft uses
[[gsl::suppress]] and it is the intent to update the C++ Core Guidelines to
[[gsl::suppress]].
https://reviews.llvm.org/D24886
_
Author: mgehre
Date: Wed Sep 28 15:06:18 2016
New Revision: 282625
URL: http://llvm.org/viewvc/llvm-project?rev=282625&view=rev
Log:
[clang-tidy] fix false-positive for cppcoreguidelines-pro-type-member-init with
in-class initializers
Summary:
This fixes https://llvm.org/bugs/show_bug.cgi?id=304
This revision was automatically updated to reflect the committed changes.
Closed by commit rL282625: [clang-tidy] fix false-positive for
cppcoreguidelines-pro-type-member-init… (authored by mgehre).
Changed prior to commit:
https://reviews.llvm.org/D24848?vs=72677&id=72885#toc
Repository:
rL
mgehre added a comment.
My main goal is to be able to suppress any clang-tidy warning through an
attribute. Initially, I though we could reuse the C++ Core Guidelines attribute
for that,
(because I though it was plain [[suppress]]). As a bonus (not more), we would
have interoperability with oth
mgehre updated this revision to Diff 72981.mgehre added a comment.
View RevisionAdd additional gsl::suppress spelling, add test, add documentationhttps://reviews.llvm.org/D24886Files:include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
lib/Sema/SemaDeclAttr.cpp
lib/Sema/SemaStmtAttr.cpp
test
Author: mgehre
Date: Wed Aug 21 15:08:59 2019
New Revision: 369591
URL: http://llvm.org/viewvc/llvm-project?rev=369591&view=rev
Log:
[LifetimeAnalysis] Support more STL idioms (template forward declaration and
DependentNameType)
Summary:
This fixes inference of gsl::Pointer on std::set::iterator
t;
>> If we can make the gsl::Pointer diagnostics false-positive-free, that's
>> great, but otherwise we should use a different warning flag for the
>> warnings that involve these annotations and use -Wreturn-stack-address for
>> only the zero-false-positive cases
Author: mgehre
Date: Fri Sep 6 01:56:30 2019
New Revision: 371182
URL: http://llvm.org/viewvc/llvm-project?rev=371182&view=rev
Log:
Reland [LifetimeAnalysis] Support more STL idioms (template forward declaration
and DependentNameType)
Reland after https://reviews.llvm.org/D66806 fixed the false
Author: mgehre
Date: Fri Sep 6 12:15:02 2019
New Revision: 371241
URL: http://llvm.org/viewvc/llvm-project?rev=371241&view=rev
Log:
[LifetimeAnalysis] don't use raw string literals in macros
They broke the AArch64 bots (gcc does not support it)
Modified:
cfe/trunk/unittests/Sema/GslOwnerPoi
s/stdio
>
> Thanks,
> Yvan
>
> On Fri, 6 Sep 2019 at 10:54, Matthias Gehre via cfe-commits
> wrote:
> >
> > Author: mgehre
> > Date: Fri Sep 6 01:56:30 2019
> > New Revision: 371182
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=371182&view=
Author: Matthias Gehre
Date: 2022-06-09T07:15:03+01:00
New Revision: 7e17e15c9f01a04283524c6a6735d639aac39fe6
URL:
https://github.com/llvm/llvm-project/commit/7e17e15c9f01a04283524c6a6735d639aac39fe6
DIFF:
https://github.com/llvm/llvm-project/commit/7e17e15c9f01a04283524c6a6735d639aac39fe6.diff
Author: Matthias Gehre
Date: 2019-11-06T09:27:02+01:00
New Revision: 24130d661ed42c30f009b695d3c9ce57d2208b5e
URL:
https://github.com/llvm/llvm-project/commit/24130d661ed42c30f009b695d3c9ce57d2208b5e
DIFF:
https://github.com/llvm/llvm-project/commit/24130d661ed42c30f009b695d3c9ce57d2208b5e.diff
Author: mgehre
Date: Fri Mar 17 16:41:20 2017
New Revision: 298126
URL: http://llvm.org/viewvc/llvm-project?rev=298126&view=rev
Log:
Implement DR 373 "Lookup on namespace qualified name in using-directive"
Summary:
3.4.6 [basic.lookup.udir] paragraph 1:
In a using-directive or namespace-alias-def
Author: mgehre
Date: Mon Mar 27 14:45:24 2017
New Revision: 298880
URL: http://llvm.org/viewvc/llvm-project?rev=298880&view=rev
Log:
Add [[clang::suppress(rule, ...)]] attribute
Summary:
This patch implements parsing of [[clang::suppress(rule, ...)]]
and [[gsl::suppress(rule, ...)]] attributes.
Author: mgehre
Date: Tue Apr 4 15:11:13 2017
New Revision: 299465
URL: http://llvm.org/viewvc/llvm-project?rev=299465&view=rev
Log:
[clang-format] fix crash in NamespaceEndCommentsFixer (PR32438)
Summary:
The new test case was crashing before. Now it passes
as expected.
Reviewers: djasper
Subs
Author: mgehre
Date: Wed Jul 12 00:04:19 2017
New Revision: 307759
URL: http://llvm.org/viewvc/llvm-project?rev=307759&view=rev
Log:
CFG: Add CFGElement for automatic variables that leave the scope
Summary:
This mimics the implementation for the implicit destructors. The
generation of this scope
mgehre added inline comments.
Comment at: clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp:25
- Finder->addMatcher(cxxReinterpretCastExpr().bind("cast"), this);
+ std::vector Rules{"type", "type.1",
"cppcoreguidelines-pro-type-reinterpret-cast"};
+
Finder->addM
mgehre added inline comments.
Comment at: include/clang/Basic/AttrDocs.td:2509
+to suppress specific clang-tidy warnings. They can be attached to a scope,
+statement or type. The ``[[gsl::suppress]]`` is an alias of
``[[clang::suppress]]``
+which is intended to be used for suppr
mgehre added a comment.
With this fix, is there still a warning on the following code?
if(b) {
...
if(c)
return;
else
doSomething()
...
}
I would expect that the check still warns on it.
https://reviews.llvm.org/D26125
mgehre created this revision.
mgehre added a subscriber: cfe-commits.
This check flags all uses of reinterpret_cast in C++ code.
Use of these casts can violate type safety and cause the program to
access a variable that is actually of type X to be accessed as if it
were of an unrelated type Z.
T
mgehre updated this revision to Diff 36291.
mgehre added a comment.
Renamed the check to cppcoreguidelines-pro-type-reinterpret-cast
http://reviews.llvm.org/D13313
Files:
clang-tidy/CMakeLists.txt
clang-tidy/Makefile
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelin
mgehre updated this revision to Diff 36294.
mgehre added a comment.
Fix add_new_check.py for capitalization of CppCoreGuidelinesTidyModule.cpp
http://reviews.llvm.org/D13313
Files:
clang-tidy/CMakeLists.txt
clang-tidy/Makefile
clang-tidy/add_new_check.py
clang-tidy/cppcoreguidelines/CMa
mgehre updated this revision to Diff 36296.
mgehre added a comment.
Read 'Check' suffix on ProTypeReinterpretCastCheck
http://reviews.llvm.org/D13313
Files:
clang-tidy/CMakeLists.txt
clang-tidy/Makefile
clang-tidy/add_new_check.py
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy
mgehre updated this revision to Diff 36300.
mgehre added a comment.
Port to cppcoreguidelines module.
Add checks for post/pre increment/decrement and array access.
http://reviews.llvm.org/D13311
Files:
clang-tidy/CMakeLists.txt
clang-tidy/Makefile
clang-tidy/add_new_check.py
clang-tidy/
mgehre updated this revision to Diff 36305.
mgehre added a comment.
Remove inclusion of misc-no-reinterpret-cast in this patch set
http://reviews.llvm.org/D13311
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppc
mgehre created this revision.
mgehre added reviewers: alexfh, sbenza, bkramer, aaron.ballman.
mgehre added a subscriber: cfe-commits.
mgehre added a dependency: D13313: [clang-tidy] new check
cppcoreguidelines-pro-type-reinterpret-cast.
This check flags all usages of static_cast, where a base cla
mgehre updated this revision to Diff 36371.
mgehre added a comment.
Rebased
Removed "(C++ Core Guidelines, rule Type.1)" from diagnostic
Can someone please commit this?
http://reviews.llvm.org/D13313
Files:
clang-tidy/CMakeLists.txt
clang-tidy/Makefile
clang-tidy/add_new_check.py
clang
mgehre updated this revision to Diff 36372.
mgehre added a comment.
Shot to fast, fixed test.
Now it's ready
http://reviews.llvm.org/D13313
Files:
clang-tidy/CMakeLists.txt
clang-tidy/Makefile
clang-tidy/add_new_check.py
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreg
mgehre updated this revision to Diff 36399.
mgehre added a comment.
rebased
http://reviews.llvm.org/D13313
Files:
clang-tidy/CMakeLists.txt
clang-tidy/Makefile
clang-tidy/add_new_check.py
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyMod
mgehre added a comment.
I'm not sure what you mean by ToT. I rebased this against master @
http://llvm.org/git/clang-tools-extra.git
http://reviews.llvm.org/D13313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bi
mgehre updated this revision to Diff 36403.
mgehre marked 7 inline comments as done.
mgehre added a comment.
Incorporated comments
Simplied matcher: Instead of checking argument types, just check that the
result of the arithmetic operation is a pointer
http://reviews.llvm.org/D13311
Files:
c
mgehre added a comment.
Thank you for the review comments!
Comment at: clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp:38
@@ +37,3 @@
+ Finder->addMatcher(
+ arraySubscriptExpr(hasBase(implicitCastExpr(hasSourceExpression(
+ has
mgehre updated this revision to Diff 36404.
mgehre added a comment.
Fix typo
http://reviews.llvm.org/D13311
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp
cl
mgehre created this revision.
mgehre added reviewers: alexfh, sbenza, bkramer, aaron.ballman.
mgehre added a subscriber: cfe-commits.
mgehre added a dependency: D13313: [clang-tidy] new check
cppcoreguidelines-pro-type-reinterpret-cast.
This check flags all uses of const_cast in C++ code.
Modify
mgehre updated this revision to Diff 36465.
mgehre marked 3 inline comments as done.
mgehre added a comment.
Fixed comments. Only show fixit for polymorphic classes. Ignore template
instantiations for now
http://reviews.llvm.org/D13368
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
cla
mgehre marked 2 inline comments as done.
mgehre added a comment.
Thank you for the detailed review.
I disabled checks in template instantiations for now.
Ideally, I would want to see something like:
warning: do not use static_cast to cast from base class to derived class.
note: in instantiati
mgehre updated this revision to Diff 36557.
mgehre added a comment.
Rebased
http://reviews.llvm.org/D13313
Files:
clang-tidy/CMakeLists.txt
clang-tidy/Makefile
clang-tidy/add_new_check.py
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyMod
mgehre updated this revision to Diff 36561.
mgehre added a comment.
"arc diff" produced a invalid patch file (due to some file being "moved"?)
This patch is manually generated by git format-patch. I checked that it applies
cleanly against svn trunk.
http://reviews.llvm.org/D13313
Files:
clan
mgehre updated this revision to Diff 36564.
mgehre added a comment.
Fixed space after //
http://reviews.llvm.org/D13311
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCh
mgehre marked an inline comment as done.
Comment at: clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.cpp:53
@@ +52,3 @@
+ } else {
+diag(MatchedCast->getOperatorLoc(), "do not use static_cast to cast from
base class to derived class.");
+ }
aaro
mgehre updated this revision to Diff 36567.
mgehre marked 2 inline comments as done.
mgehre added a comment.
Simplify logic to check for BaseToDerived cast. Add test for object to
reference cast. Fixed comments
http://reviews.llvm.org/D13368
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
mgehre added inline comments.
Comment at: clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.cpp:33
@@ +32,3 @@
+ const auto *SourceDecl = SourceType->getPointeeCXXRecordDecl();
+ if(!SourceDecl)
+SourceDecl = SourceType->getAsCXXRecordDecl();
aaron
mgehre marked 2 inline comments as done.
Comment at:
test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp:37
@@ +36,3 @@
+ q -= i;
+ // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: do not use pointer arithmetic
+ q -= ENUM_LITERAL;
aaron.ballman wro
mgehre updated this revision to Diff 36664.
mgehre added a comment.
Remove trailing [cppcoreguidelines-pro-type-static-cast-downcast] on tests
http://reviews.llvm.org/D13368
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
cla
mgehre marked an inline comment as done.
mgehre added a comment.
I cannot think of any way to improve the usefulness of the diagnostic in the
non-polymorphic case.
For now, this patch has a link to the CppCoreGuidelines document in the
docs/**/*.rst file.
Also, this check is not enabled by defa
mgehre updated this revision to Diff 36668.
mgehre added a comment.
Rebased
http://reviews.llvm.org/D13398
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.cpp
clang-tidy/cp
mgehre added a subscriber: mgehre.
Comment at: clang-tidy/rename_check.py:39
@@ +38,3 @@
+ if len(sys.argv) != 4:
+print('Usage: rename_check.py , e.g.\n')
+print('rename_check.py misc awesome-functions new-awesome-function\n')
Should be
```
Usage: renam
mgehre added a comment.
The user will see [cppcoreguidelines-c-copy-assignment-signature] in warnings,
but there is no
docs/clang-tidy/checks/cppcoreguidelines-c-copy-assignment-signature.rst.
The user won't know that he needs to look for misc-assign-operator-signature.
Maybe create a link to
mgehre created this revision.
mgehre added a reviewer: klimek.
mgehre added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
Add decayedType and hasDecayedType AST matchers
http://reviews.llvm.org/D13639
Files:
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Regi
mgehre updated this revision to Diff 37066.
mgehre added a comment.
Add test
http://reviews.llvm.org/D13639
Files:
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Registry.cpp
unittests/ASTMatchers/ASTMatchersTest.cpp
Index: unittests/ASTMatchers/ASTMatchersTest.cpp
=
Author: mgehre
Date: Sun Oct 11 17:55:29 2015
New Revision: 250002
URL: http://llvm.org/viewvc/llvm-project?rev=250002&view=rev
Log:
Test commit
Modified:
clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
Modified:
clang-tools-extra/trunk/clang-tidy/cppco
mgehre created this revision.
mgehre added reviewers: alexfh, sbenza, bkramer, aaron.ballman.
mgehre added a subscriber: cfe-commits.
This check flags all array to pointer decays.
Pointers should not be used as arrays. array_view is a bounds-checked,
safe alternative to using pointers to access a
mgehre updated this revision to Diff 37155.
mgehre marked an inline comment as done.
mgehre added a comment.
Add test for static_cast with const
http://reviews.llvm.org/D13368
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
c
Author: mgehre
Date: Mon Oct 12 15:46:53 2015
New Revision: 250098
URL: http://llvm.org/viewvc/llvm-project?rev=250098&view=rev
Log:
[clang-tidy] add check cppcoreguidelines-pro-type-static-cast-downcast
Summary:
This check flags all usages of static_cast, where a base class is casted
to a derive
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250098: [clang-tidy] add check
cppcoreguidelines-pro-type-static-cast-downcast (authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D13368?vs=37155&id=37164#toc
Repository:
rL LLVM
Author: mgehre
Date: Mon Oct 12 16:46:07 2015
New Revision: 250114
URL: http://llvm.org/viewvc/llvm-project?rev=250114&view=rev
Log:
Add decayedType and hasDecayedType AST matchers
Summary: Add decayedType and hasDecayedType AST matchers
Reviewers: klimek
Subscribers: klimek, cfe-commits
Diffe
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250114: Add decayedType and hasDecayedType AST matchers
(authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D13639?vs=37066&id=37178#toc
Repository:
rL LLVM
http://reviews.llvm.or
Author: mgehre
Date: Mon Oct 12 16:53:19 2015
New Revision: 250116
URL: http://llvm.org/viewvc/llvm-project?rev=250116&view=rev
Log:
[clang-tidy] new check cppcoreguidelines-pro-bounds-pointer-arithmetic
Summary:
This check flags all usage of pointer arithmetic, because it could lead
to an
invali
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250116: [clang-tidy] new check
cppcoreguidelines-pro-bounds-pointer-arithmetic (authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D13311?vs=36564&id=37183#toc
Repository:
rL LLVM
mgehre added inline comments.
Comment at:
clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp:29
@@ +28,3 @@
+ implicitCastExpr(unless(hasParent(arraySubscriptExpr())),
+
unless(hasSourceExpression(declRefExpr(to(varDecl(hasName("__range
mgehre created this revision.
mgehre added reviewers: alexfh, sbenza, bkramer, aaron.ballman.
mgehre added a subscriber: cfe-commits.
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
mgehre updated this revision to Diff 37396.
mgehre marked an inline comment as done.
mgehre added a comment.
Test more complex array arithmetic, test gsl::array_view works, add "use
array_view instead" to diagnostic
http://reviews.llvm.org/D13640
Files:
clang-tidy/cppcoreguidelines/CMakeList
mgehre updated this revision to Diff 37401.
mgehre added a comment.
Remove dead codet
http://reviews.llvm.org/D13746
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexChec
mgehre updated this revision to Diff 37417.
mgehre marked 7 inline comments as done.
mgehre added a comment.
Matcher does not rely on __range anymore
http://reviews.llvm.org/D13640
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cp
mgehre added a comment.
Updated commit to fix comments
http://reviews.llvm.org/D13640
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mgehre created this revision.
mgehre added reviewers: alexfh, sbenza, bkramer, aaron.ballman.
mgehre added a subscriber: cfe-commits.
This check flags all access to members of unions. Passing unions as a
whole is not flagged.
Reading from a union member assumes that member was the last one
writte
mgehre created this revision.
mgehre added reviewers: alexfh, sbenza, bkramer, aaron.ballman.
mgehre added a subscriber: cfe-commits.
Import the cert check for variadic function definitions into
cppcoreguidelines module to check part of
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCo
mgehre created this revision.
mgehre added reviewers: alexfh, sbenza, bkramer, aaron.ballman.
mgehre added a subscriber: cfe-commits.
This check flags all calls to c-style vararg functions.
Passing to varargs assumes the correct type will be read. This is
fragile because it cannot generally be en
mgehre added a comment.
I have commit privileges :-)
http://reviews.llvm.org/D13785
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: mgehre
Date: Thu Oct 15 17:40:45 2015
New Revision: 250468
URL: http://llvm.org/viewvc/llvm-project?rev=250468&view=rev
Log:
[clang-tidy] add cert's VariadicFunctionDefCheck as
cppcoreguidelines-pro-type-vararg-def
Summary:
Import the cert check for variadic function definitions into
cpp
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250468: [clang-tidy] add cert's VariadicFunctionDefCheck as
cppcoreguidelines-pro… (authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D13785?vs=37516&id=37532#toc
Repository:
rL L
Author: mgehre
Date: Fri Oct 16 13:46:30 2015
New Revision: 250537
URL: http://llvm.org/viewvc/llvm-project?rev=250537&view=rev
Log:
[clang-tidy] add check cppcoreguidelines-pro-type-union-access
Summary:
This check flags all access to members of unions. Passing unions as a
whole is not flagged.
mgehre marked an inline comment as done.
mgehre added a comment.
http://reviews.llvm.org/D13784
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 207 matches
Mail list logo