This revision was automatically updated to reflect the committed changes.
Closed by commit rL250537: [clang-tidy] add check
cppcoreguidelines-pro-type-union-access (authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D13784?vs=37515&id=37621#toc
Repository:
rL LLVM
http://
mgehre added inline comments.
Comment at: clang-tidy/cppcoreguidelines/ProTypeVarargUseCheck.cpp:20
@@ +19,3 @@
+void ProTypeVarargUseCheck::registerMatchers(MatchFinder *Finder) {
+
Finder->addMatcher(callExpr(callee(functionDecl(isVariadic(.bind("expr"),
this);
+}
---
mgehre added inline comments.
Comment at: clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp:55
@@ +54,3 @@
+ if (!IndexExpr->isIntegerConstantExpr(Index, *Result.Context, nullptr,
true)) {
+//Fixit would need gsl::at()
+diag(Matched->getExprLoc(), "do not
mgehre updated this revision to Diff 37627.
mgehre marked 5 inline comments as done.
mgehre added a comment.
Thanks for the comments!
http://reviews.llvm.org/D13746
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/c
mgehre added a comment.
Fixed most comments in updated revision
http://reviews.llvm.org/D13746
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mgehre updated this revision to Diff 37790.
mgehre added a comment.
Revert "[clang-tidy] add cert's VariadicFunctionDefCheck as
cppcoreguidelines-pro-type-vararg-def"; warn about va_* in this check (to allow
SFINAE)
http://reviews.llvm.org/D13787
Files:
clang-tidy/cppcoreguidelines/CMakeLis
mgehre updated this revision to Diff 37814.
mgehre added a comment.
Only flag va_arg and variadic call. Suppress warning if the only vararg
argument is literal 0.
http://reviews.llvm.org/D13787
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuideline
mgehre updated this revision to Diff 37925.
mgehre added a comment.
removed __builtin_va_start; change f->foo() to f.foo()
http://reviews.llvm.org/D13787
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppcoreguide
mgehre added a comment.
Thanks for the good review!
Comment at: clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp:26
@@ +25,3 @@
+ Finder->addMatcher(
+ varDecl(hasType(pointsTo(cxxRecordDecl(hasName("__va_list_tag")
+ .bind("va_list"),
sben
Author: mgehre
Date: Wed Oct 21 15:09:02 2015
New Revision: 250939
URL: http://llvm.org/viewvc/llvm-project?rev=250939&view=rev
Log:
[clang-tidy] add check cppcoreguidelines-pro-type-vararg
Summary:
This check flags all calls to c-style vararg functions and all use
of va_list, va_start and va_arg
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250939: [clang-tidy] add check
cppcoreguidelines-pro-type-vararg (authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D13787?vs=37925&id=38040#toc
Repository:
rL LLVM
http://review
mgehre marked an inline comment as done.
Comment at:
test/clang-tidy/cppcoreguidelines-pro-bounds-array-to-pointer-decay.cpp:13
@@ +12,3 @@
+
+void pointerfun(int* p);
+void arrayfun(int p[]);
aaron.ballman wrote:
> > Currently, the diag is
> > ```
> > diag(Match
mgehre created this revision.
mgehre added a reviewer: krememek.
mgehre added a subscriber: cfe-commits.
VisitReturnStmt would create a new block with including Dtors, so the Dtors
created
in VisitCompoundStmts would be in an unreachable block.
Example:
struct S {
~S();
}
void f()
{
S s;
mgehre updated this revision to Diff 38090.
mgehre added a comment.
Fix formatting
http://reviews.llvm.org/D13973
Files:
lib/Analysis/CFG.cpp
Index: lib/Analysis/CFG.cpp
===
--- lib/Analysis/CFG.cpp
+++ lib/Analysis/CFG.cpp
@@ -
mgehre updated this revision to Diff 38157.
mgehre added a comment.
Add test case
http://reviews.llvm.org/D13973
Files:
lib/Analysis/CFG.cpp
test/Analysis/no-unreachable-dtors.cpp
Index: test/Analysis/no-unreachable-dtors.cpp
mgehre updated this revision to Diff 38353.
mgehre marked an inline comment as done.
mgehre added a comment.
Do not flag explicit casts
http://reviews.llvm.org/D13640
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy
mgehre added inline comments.
Comment at: lib/Analysis/CFG.cpp:1949-1952
@@ +1948,6 @@
+ }
+ if(!C->body_empty() && !dyn_cast(*C->body_rbegin())) {
+// If the body ends with a ReturnStmt, the dtors will be added in
VisitReturnStmt
+addAutomaticObjDtors(ScopePos, scopeBe
mgehre created this revision.
mgehre added reviewers: alexfh, sbenza, bkramer, aaron.ballman.
mgehre added a subscriber: cfe-commits.
Adapt clang-tidy/add_new_check.py according to commit r251010 "Add
%check_clang_tidy and %clang_tidy_diff"
http://reviews.llvm.org/D14049
Files:
clang-tidy/add
mgehre updated this revision to Diff 38359.
mgehre added a comment.
Update for review comments
http://reviews.llvm.org/D13973
Files:
lib/Analysis/CFG.cpp
test/Analysis/no-unreachable-dtors.cpp
Index: test/Analysis/no-unreachable-dtors.cpp
===
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251355: clang-tidy/add_new_check.py: Adapt to use
%check_clang_tidy in tests (authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D14049?vs=38354&id=38466#toc
Repository:
rL LLVM
h
Author: mgehre
Date: Mon Oct 26 16:48:08 2015
New Revision: 251355
URL: http://llvm.org/viewvc/llvm-project?rev=251355&view=rev
Log:
clang-tidy/add_new_check.py: Adapt to use %check_clang_tidy in tests
Summary: Adapt clang-tidy/add_new_check.py according to commit r251010 "Add
%check_clang_tidy
Author: mgehre
Date: Mon Oct 26 16:56:02 2015
New Revision: 251358
URL: http://llvm.org/viewvc/llvm-project?rev=251358&view=rev
Log:
[clang-tidy] Add new check cppcoreguidelines-pro-bounds-array-to-pointer-decay
Summary:
This check flags all array to pointer decays.
Pointers should not be used a
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251358: [clang-tidy] Add new check
cppcoreguidelines-pro-bounds-array-to-pointer-decay (authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D13640?vs=38353&id=38467#toc
Repository:
mgehre created this revision.
mgehre added reviewers: alexfh, sbenza, bkramer, aaron.ballman.
mgehre added a subscriber: cfe-commits.
This check flags all use of c-style casts that perform a static_cast
downcast, const_cast, or reinterpret_cast.
Use of these casts can violate type safety and caus
mgehre added inline comments.
Comment at: lib/Analysis/CFG.cpp:1949-1952
@@ +1948,6 @@
+ }
+ if (!C->body_empty() && !isa(*C->body_rbegin())) {
+// If the body ends with a ReturnStmt, the dtors will be added in
VisitReturnStmt
+addAutomaticObjDtors(ScopePos, scopeBeginP
mgehre updated this revision to Diff 38857.
mgehre added a comment.
Review comments: Formating and changed diag messages
http://reviews.llvm.org/D14096
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppcoreguideli
mgehre added a comment.
I see. Thinking about this, the same issue should also apply to a throw
inside the compound stmt. And it's not only about suppressing the dtors but
any CFG entries after return/throw. I'll prepare an updated patch.
Manuel Klimek schrieb am So., 1. Nov. 2015 23:04:
> klim
mgehre added inline comments.
Comment at: clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.cpp:79
@@ +78,3 @@
+ MatchedCast->getSubExprAsWritten()->IgnoreImpCasts();
+ std::string CastText = ("dynamic_cast<" + DestTypeString + ">").str();
+ if (!isa(SubExpr))
mgehre added a comment.
Basically, there are the following cases:
A)
void f() {
S s;
}
Everything OK, only one (reachable) destructor is generated
B)
int f() {
S s;
return 1;
}
In current trunk, this first generates dtor in a block when visiting the
CompoundStmt,
and then
mgehre added inline comments.
Comment at: clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.cpp:80
@@ +79,3 @@
+ std::string CastText = ("dynamic_cast<" + DestTypeString + ">").str();
+ if (!isa(SubExpr)) {
+CastText.push_back('(');
aaron.ballm
mgehre updated this revision to Diff 38981.
mgehre added a comment.
Update for review comments
http://reviews.llvm.org/D14096
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck
mgehre updated this revision to Diff 39576.
mgehre added a comment.
Update for review comments: add braces around else
http://reviews.llvm.org/D14096
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppcoreguideline
mgehre updated this revision to Diff 39601.
mgehre added a comment.
Add option GslHeader, generate fixes
http://reviews.llvm.org/D13746
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppcoreguidelines/ProBoundsCon
Author: mgehre
Date: Sun Nov 8 15:10:39 2015
New Revision: 252425
URL: http://llvm.org/viewvc/llvm-project?rev=252425&view=rev
Log:
[clang-tidy] add new check cppcoreguidelines-pro-type-cstyle-cast
Summary:
This check flags all use of c-style casts that perform a static_cast
downcast, const_cast
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252425: [clang-tidy] add new check
cppcoreguidelines-pro-type-cstyle-cast (authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D14096?vs=39576&id=39655#toc
Repository:
rL LLVM
http
mgehre created this revision.
mgehre added reviewers: alexfh, sbenza, bkramer, aaron.ballman.
mgehre added a subscriber: cfe-commits.
The current matcher is
implicitCastExpr(unless(hasParent(explicitCastExpr(
but the AST in the bug is
`-CXXStaticCastExpr 0x2bb64f8 'void *const *'
static_c
mgehre updated this revision to Diff 39948.
mgehre added a comment.
Update for review comments
http://reviews.llvm.org/D14517
Files:
clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp
clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h
test/clang-tidy/cppcoreg
mgehre updated this revision to Diff 39952.
mgehre added a comment.
update for review comments; removed bounds check on static arrays in favor of
clang-diagnostic-array-bounds
http://reviews.llvm.org/D13746
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/Cpp
mgehre updated this revision to Diff 39953.
mgehre added a comment.
simplify code
http://reviews.llvm.org/D13746
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cp
mgehre created this revision.
mgehre added reviewers: alexfh, sbenza, bkramer, aaron.ballman.
mgehre added a subscriber: cfe-commits.
Inside a range-based for-loop over an array, the compiler
generates pointer arithmetic (end = array + size). Don't flag this.
http://reviews.llvm.org/D14582
Files
mgehre added a comment.
I won't be able to do more about this issue than what the fix currently does (+
corrections/maybe a loop).
If this is not the preferred solution, and something more general should be
done,
I will abandon this patch for now.
Currently, I cannot work on a more general sol
mgehre added a comment.
Friendly ping
https://reviews.llvm.org/D22069
___
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: klimek, aaron.ballman, rsmith.
mgehre added a subscriber: cfe-commits.
A MemberExpr is non-dependent if
1) it is a member of the current instantiation
2) the member is non-dependent
We check 1) by asserting that the base of the
MemberExpr is a
This revision was automatically updated to reflect the committed changes.
Closed by commit rL275993: cppcoreguidelines-pro-bounds-constant-array-index:
ignore implicit constructor (authored by mgehre).
Changed prior to commit:
https://reviews.llvm.org/D22381?vs=64035&id=64515#toc
Repository:
Author: mgehre
Date: Tue Jul 19 12:02:54 2016
New Revision: 275993
URL: http://llvm.org/viewvc/llvm-project?rev=275993&view=rev
Log:
cppcoreguidelines-pro-bounds-constant-array-index: ignore implicit constructor
Summary:
The code
struct A {
int x[3];
};
gets an compiler-generated copy c
Author: mgehre
Date: Wed Jul 20 07:32:06 2016
New Revision: 276111
URL: http://llvm.org/viewvc/llvm-project?rev=276111&view=rev
Log:
clang-tidy modernize-loop-convert: preserve type of alias declaration (bug
28341)
Summary:
Previoly, the added test failed with the fillowing fixit:
char v[5
This revision was automatically updated to reflect the committed changes.
Closed by commit rL276111: clang-tidy modernize-loop-convert: preserve type of
alias declaration (bug… (authored by mgehre).
Changed prior to commit:
https://reviews.llvm.org/D22069?vs=63400&id=64672#toc
Repository:
rL
mgehre created this revision.
mgehre added reviewers: klimek, aaron.ballman, rsmith.
mgehre added a subscriber: cfe-commits.
Look through expressions to determine if a nontype template argument has been
given the value of the template parameter.
https://reviews.llvm.org/D22587
Files:
lib/AST/
mgehre updated this revision to Diff 64777.
mgehre added a comment.
- Properly check for being member of current instantiation.
- Add new testcase test/CXX/temp/temp.res/temp.dep/temp.dep.expr/p5.cpp
- Added assert() according to review comment
https://reviews.llvm.org/D22476
Files:
lib/AST/E
mgehre added inline comments.
Comment at: lib/AST/ASTContext.cpp:4456
@@ +4455,3 @@
+ // the template parameter and not an expression involving the template
parameter.
+ auto *E = Arg.getAsExpr()->IgnoreImpCasts();
+ while(auto *DeclRef = dyn_cast_or_null(E)) {
---
mgehre added a comment.
Friendly ping
https://reviews.llvm.org/D15031
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mgehre added a comment.
ping
https://reviews.llvm.org/D22476
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mgehre added a comment.
ping
https://reviews.llvm.org/D22587
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mgehre updated this revision to Diff 56800.
mgehre added a comment.
Update for review comment:
- Return Optional when looking for 'inline'
- Add test that hides 'inline' in a macro
http://reviews.llvm.org/D18914
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/Readabilit
mgehre added a comment.
Thank you very much for your review. I'm sorry that I'm currently quite busy,
but I will find some time to answer at the end of this week.
http://reviews.llvm.org/D15031
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
mgehre added inline comments.
Comment at: include/clang/Analysis/CFG.h:170
@@ -168,1 +169,3 @@
+class CFGAutomaticObjLeavesScope : public CFGElement {
+public:
rsmith wrote:
> What is this intended to model? There seem to be a few options here:
>
> 1) The poin
mgehre added a comment.
By the way, is there a tool to generate parts of the test based on clang
output, i.e.
something that will prefix the output of clang with "CHECK: " and "CHECK-NEXT:"
so I can copy-and-paste
it into my test file?
http://reviews.llvm.org/D15031
mgehre updated this revision to Diff 52959.
mgehre added a comment.
Update for review comments
- Change name from ObjLeavesScope to LifetimeEnds
- Make sure that trivially destructible objects end their lifetime after
non-trivial destructible objects
- Add test
- Add analyzer option to enable Li
mgehre updated this revision to Diff 53092.
mgehre added a comment.
Fix assert in LocalScope::const_iterator::distance when using goto to jump over
trivially constructable variable declarations
Added two test cases for this
http://reviews.llvm.org/D15031
Files:
include/clang/Analysis/Analysi
mgehre updated this revision to Diff 53097.
mgehre added a comment.
Update for renaming in http://reviews.llvm.org/D15031
http://reviews.llvm.org/D15032
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppcoreguidel
mgehre created this revision.
mgehre added reviewers: sbenza, bkramer, aaron.ballman, alexfh.
mgehre added a subscriber: cfe-commits.
This check flags redundant 'inline' specifiers.
It flags 'inline' on member functions defined inside a class definition
like
.. code-block:: c++
struct S {
i
mgehre updated this revision to Diff 53118.
mgehre added a comment.
Update for review comments
http://reviews.llvm.org/D18914
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tidy/readability/RedundantInlineCheck.cpp
clang-tidy/readabil
mgehre added a comment.
I'm thinking about extending the check to the following issue and would like to
hear your opinion.
In C++, the following three code snippets all have identical meaning
1:
struct S {
int f();
};
inline int S::f() {
return 0;
}
2:
struct S {
inline
mgehre updated this revision to Diff 53261.
mgehre added a comment.
Remove unused CFGBuilder::prependLifetimeEndsWithTerminator
http://reviews.llvm.org/D15031
Files:
include/clang/Analysis/AnalysisContext.h
include/clang/Analysis/CFG.h
include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
mgehre created this revision.
mgehre added reviewers: klimek, alexfh.
mgehre added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
The crash was reproduced by the included test case. It was initially
found through a crash of clang-tidy's misc-misplaced-widening-cast
check.
http://re
mgehre updated this revision to Diff 53315.
mgehre added a comment.
Update for review comments; simplified lexing, added proposed test case
http://reviews.llvm.org/D18914
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tidy/readability/R
mgehre updated this revision to Diff 53317.
mgehre added a comment.
Removed debug output
http://reviews.llvm.org/D18914
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tidy/readability/RedundantInlineCheck.cpp
clang-tidy/readability/Re
mgehre created this revision.
mgehre added reviewers: fowles, hokein, sbenza, alexfh.
mgehre added a subscriber: cfe-commits.
The Fix-Its for the added test cases were before:
-void F11(const unsigned int /*version*/);
+void F11(unsigned int int /*version*/);
-void F12(const bool b = true);
+void
mgehre added inline comments.
Comment at: test/clang-tidy/readability-redundant-inline.cpp:6
@@ +5,3 @@
+// CHECK-MESSAGES: :[[@LINE-1]]:14: warning: 'inline' is redundant because
method body is defined inside class [readability-redundant-inline]
+// CHECK-FIXES: {{^}} int f1()
Author: mgehre
Date: Tue Apr 12 00:43:18 2016
New Revision: 266043
URL: http://llvm.org/viewvc/llvm-project?rev=266043&view=rev
Log:
[ASTMatchers]: fix crash in hasReturnValue
Summary:
The crash was reproduced by the included test case. It was initially
found through a crash of clang-tidy's misc-
This revision was automatically updated to reflect the committed changes.
Closed by commit rL266043: [ASTMatchers]: fix crash in hasReturnValue (authored
by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D18991?vs=53311&id=53367#toc
Repository:
rL LLVM
http://reviews.llvm.org/D18
This revision was automatically updated to reflect the committed changes.
Closed by commit rL266044: [clang-tidy] fix
readability-avoid-const-params-in-decls creating invalid… (authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D18993?vs=53322&id=53368#toc
Repository:
rL L
Author: mgehre
Date: Tue Apr 12 00:45:13 2016
New Revision: 266044
URL: http://llvm.org/viewvc/llvm-project?rev=266044&view=rev
Log:
[clang-tidy] fix readability-avoid-const-params-in-decls creating invalid code
in fix-its
Summary:
The Fix-Its for the added test cases were before:
-void F11(cons
mgehre added a comment.
Ping
http://reviews.llvm.org/D15031
___
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, klimek.
mgehre added a subscriber: cfe-commits.
Previoly, the added test failed with the fillowing fixit:
char v[5];
-for(size_t i = 0; i < 5; ++i)
+for(char value : v)
{
-unsigned char value = v[i];
mgehre added inline comments.
Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:525
@@ +524,3 @@
+ DeclarationType = DeclarationType.getNonReferenceType();
+if (Descriptor.ElemType.isNull() || DeclarationType.isNull() ||
+!Context->hasSameUnqualifiedType(Decla
mgehre created this revision.
mgehre added a reviewer: alexfh.
mgehre added a subscriber: cfe-commits.
Previously, the added test cases crashed because
Ref.getTypePtr()->getAsTagDecl()
is nullptr.
http://reviews.llvm.org/D22188
Files:
clang-tidy/readability/IdentifierNamingCheck.cpp
test/cl
mgehre updated this revision to Diff 63397.
mgehre added a comment.
Add a second test case and fix
http://reviews.llvm.org/D22188
Files:
clang-tidy/readability/IdentifierNamingCheck.cpp
test/clang-tidy/readability-identifier-naming.cpp
Index: test/clang-tidy/readability-identifier-naming.c
mgehre added a comment.
I didn't see that bug before, but with my patch, I cannot reproduce the
reported crash.
So I guess that fixed it.
http://reviews.llvm.org/D22188
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/c
Author: mgehre
Date: Sat Jul 9 15:09:28 2016
New Revision: 274985
URL: http://llvm.org/viewvc/llvm-project?rev=274985&view=rev
Log:
clang-tidy/readability-identifier-naming: crash on
DependentTemplateSpecializationType
Summary:
Previously, the added test cases crashed because the passed a null
This revision was automatically updated to reflect the committed changes.
Closed by commit rL274985: clang-tidy/readability-identifier-naming: crash on…
(authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D22188?vs=63397&id=63398#toc
Repository:
rL LLVM
http://reviews.llv
mgehre updated this revision to Diff 63400.
mgehre added a comment.
Added assert.
Runs on llvm code-base without triggering the assert.
http://reviews.llvm.org/D22069
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
test/clang-tidy/modernize-loop-convert-extra.cpp
Index: test/clang-tidy/mo
mgehre created this revision.
mgehre added reviewers: alexfh, aaron.ballman.
mgehre added a subscriber: cfe-commits.
Herald added a subscriber: nemanjai.
When the expression is value dependent,
isIntegerConstantExpr() crashes in C++03 mode with
../tools/clang/lib/AST/ExprConstant.cpp:9330: (anony
mgehre added a comment.
Even if we change isIntegerConstantExpr() to return true instead of asserting,
we still need this fix to the check. Because
we call isIntegerConstantExpr() to find out if we can possibly calculate the
(constant) value of the index expression.
If it is value dependent, we
mgehre added a subscriber: mgehre.
mgehre added a comment.
Nice check. This should be mentioned in docs/ReleaseNotes.rst
http://reviews.llvm.org/D0
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/lis
mgehre updated this revision to Diff 63795.
mgehre added a comment.
Suppress diagnostics if index is value-dependent. Emit them in specializations.
http://reviews.llvm.org/D22190
Files:
clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
test/clang-tidy/cppcoreguidelines-pro-b
Author: mgehre
Date: Thu Jul 14 15:00:48 2016
New Revision: 275461
URL: http://llvm.org/viewvc/llvm-project?rev=275461&view=rev
Log:
cppcoreguidelines-pro-bounds-constant-array-index: crash for value dependent
index in c++03 mode
Summary:
When the expression is value dependent,
isIntegerConstant
This revision was automatically updated to reflect the committed changes.
Closed by commit rL275461: cppcoreguidelines-pro-bounds-constant-array-index:
crash for value dependent… (authored by mgehre).
Changed prior to commit:
https://reviews.llvm.org/D22190?vs=63795&id=64030#toc
Repository:
mgehre created this revision.
mgehre added reviewers: alexfh, aaron.ballman.
mgehre added a subscriber: cfe-commits.
Herald added subscribers: nemanjai, aemerson.
The code
struct A {
int x[3];
};
gets an compiler-generated copy constructor that uses ArraySubscriptExpr (see
below).
Previ
mgehre added a comment.
I additionally have run the check on blender and ITK and the assert did not
fire.
https://reviews.llvm.org/D22069
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
This revision was automatically updated to reflect the committed changes.
Closed by commit rL253107: CFG: Delay creating Dtors for CompoundStmts which
end in ReturnStmt (authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D13973?vs=38359&id=40188#toc
Repository:
rL LLVM
ht
Author: mgehre
Date: Fri Nov 13 18:36:50 2015
New Revision: 253107
URL: http://llvm.org/viewvc/llvm-project?rev=253107&view=rev
Log:
CFG: Delay creating Dtors for CompoundStmts which end in ReturnStmt
Summary:
VisitReturnStmt would create a new block with including Dtors, so the Dtors
created
in
Author: mgehre
Date: Tue Nov 17 17:35:39 2015
New Revision: 253399
URL: http://llvm.org/viewvc/llvm-project?rev=253399&view=rev
Log:
Fix bug 25362 "cppcoreguidelines-pro-bounds-array-to-pointer-decay does not
consider const"
Summary:
The current matcher is
implicitCastExpr(unless(hasParent(exp
This revision was automatically updated to reflect the committed changes.
Closed by commit rL253399: Fix bug 25362
"cppcoreguidelines-pro-bounds-array-to-pointer-decay does not… (authored by
mgehre).
Changed prior to commit:
http://reviews.llvm.org/D14517?vs=39948&id=40446#toc
Repository:
r
mgehre updated this revision to Diff 40448.
mgehre added a comment.
Simplified with Alex suggestion. Thanks!
http://reviews.llvm.org/D14582
Files:
clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp
test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp
Index: tes
Author: mgehre
Date: Tue Nov 17 17:43:20 2015
New Revision: 253401
URL: http://llvm.org/viewvc/llvm-project?rev=253401&view=rev
Log:
[clang-tidy] add check cppcoreguidelines-pro-bounds-constant-array-index
Summary:
This check flags all array subscriptions on static arrays and
std::arrays that eit
This revision was automatically updated to reflect the committed changes.
Closed by commit rL253401: [clang-tidy] add check
cppcoreguidelines-pro-bounds-constant-array-index (authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D13746?vs=39953&id=40449#toc
Repository:
rL LLV
mgehre added inline comments.
Comment at:
clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-bounds-constant-array-index.cpp:2
@@ +1,3 @@
+// RUN: %check_clang_tidy %s cppcoreguidelines-pro-bounds-constant-array-index
%t -- -config='{CheckOptions: [{key:
cppcoreguide
Author: mgehre
Date: Thu Nov 26 16:32:11 2015
New Revision: 254182
URL: http://llvm.org/viewvc/llvm-project?rev=254182&view=rev
Log:
[clang-tidy] cppcoreguidelines-pro-bounds-pointer-arithmetic: ignore generated
pointer arithmetic
Summary:
Inside a range-based for-loop over an array, the compile
This revision was automatically updated to reflect the committed changes.
Closed by commit rL254182: [clang-tidy]
cppcoreguidelines-pro-bounds-pointer-arithmetic: ignore… (authored by mgehre).
Changed prior to commit:
http://reviews.llvm.org/D14582?vs=40448&id=41272#toc
Repository:
rL LLVM
101 - 200 of 207 matches
Mail list logo