etienneb marked an inline comment as done.
etienneb added a comment.
Comment at: include/clang/AST/OperationKinds.def:15
@@ +14,3 @@
+//
+/// @file OperationKinds.def
+///
aaron.ballman wrote:
> Do we use @file doxygen comments usually? I'm not certain if I've
etienneb added a subscriber: etienneb.
etienneb added a comment.
drive-by, some nits.
Comment at: clang-tidy/performance/InefficientStringAdditionCheck.cpp:31
@@ +30,3 @@
+void InefficientStringAdditionCheck::registerMatchers(MatchFinder *Finder) {
+ auto BasicStringType =
has
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
There virtual destructor can't be found and cause a compilation error
on a shared build.
To repro: [Release + Shared]
```
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
```
Which produ
etienneb added a comment.
note: To repro, you must compile the tests.
% ninja check-all
http://reviews.llvm.org/D20218
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
etienneb added a subscriber: etienneb.
etienneb added a comment.
drive by
Comment at: clang-tidy/modernize/UseNoexceptCheck.cpp:40
@@ +39,3 @@
+ unsigned &Len) {
+ SourceManager &SM = *Result.SourceManager;
+ const ASTContext &Context = *Resul
Author: etienneb
Date: Thu May 12 14:51:18 2016
New Revision: 269334
URL: http://llvm.org/viewvc/llvm-project?rev=269334&view=rev
Log:
[Tooling] Fix broken dependency for shared build
Summary:
There virtual destructor can't be found and cause a compilation error
on a shared build.
To repro: [Rel
etienneb added a subscriber: etienneb.
Comment at: clang-tidy/utils/TypeTraits.cpp:35
@@ +34,3 @@
+return false;
+ for (const CXXConstructorDecl *Constructor : Record->ctors()) {
+if (Constructor->isCopyConstructor() && Constructor->isDeleted())
aaron.bal
etienneb added inline comments.
Comment at: clang-tidy/utils/TypeTraits.cpp:24
@@ -20,2 +23,3 @@
+
bool classHasTrivialCopyAndDestroy(QualType Type) {
auto *Record = Type->getAsCXXRecordDecl();
Should this be lifted to 'type_traits' ?
The same function exist
etienneb added a subscriber: etienneb.
Comment at: clang-tidy/modernize/UseUsingCheck.cpp:32
@@ +31,3 @@
+
+ diag(MatchedDecl->getLocStart(), "use using instead of typedef")
+ << FixItHint::CreateReplacement(
I think 'using' should be quote.
This message is
etienneb added a subscriber: etienneb.
Comment at: clang-tidy/misc/UnnecessaryMutableCheck.cpp:38
@@ +37,3 @@
+
+ void RunSearch(Decl *Declaration) {
+auto *Body = Declaration->getBody();
nit: Decl *Declaration -> const Decl *Declaration
and other visitor fu
Author: etienneb
Date: Thu May 12 15:58:56 2016
New Revision: 269347
URL: http://llvm.org/viewvc/llvm-project?rev=269347&view=rev
Log:
[AST] Move operations enum to a definition file.
Summary:
This patch moves the enum definitions to a definition (.def) file.
These modifications provide way to l
etienneb added inline comments.
Comment at: clang-tidy/modernize/UseNoexceptCheck.cpp:98
@@ +97,3 @@
+ const auto *FuncDecl = Result.Nodes.getNodeAs("functionDecl");
+ if (!FuncDecl)
+return;
I'm not saying to use 'const *FuncDecl', but 'const auto*'
==
etienneb updated this revision to Diff 57101.
etienneb marked an inline comment as done.
etienneb added a comment.
regenerate doc
http://reviews.llvm.org/D19871
Files:
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Marshallers.h
lib/AST
etienneb updated this revision to Diff 57123.
etienneb added a comment.
add unittest
http://reviews.llvm.org/D19871
Files:
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Marshallers.h
lib/ASTMatchers/Dynamic/Registry.cpp
unittests/AST
etienneb added a comment.
In http://reviews.llvm.org/D19871#428997, @jroelofs wrote:
> Drive-by thought: I think it would be useful to be able to match implicit
> casts separately from explicit casts when using this new matcher.
Jonathan, I think what you are asking for is already supported.
I
etienneb updated this revision to Diff 57124.
etienneb added a comment.
nit: indentation
http://reviews.llvm.org/D19871
Files:
docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/Dynamic/Marshallers.h
lib/ASTMatchers/Dynamic/Registry.cpp
unittests
etienneb added inline comments.
Comment at: clang-tidy/utils/TypeTraits.cpp:22
@@ -20,2 +21,3 @@
+
bool classHasTrivialCopyAndDestroy(QualType Type) {
auto *Record = Type->getAsCXXRecordDecl();
My bad! I didn't saw the file change when reading. Forget about it
etienneb created this revision.
etienneb added a reviewer: rsmith.
etienneb added a subscriber: cfe-commits.
Add some missing const qualifiers to AstContext.
The ASTContext can't be modified with accessors.
There is no behavior change. This patch is cleanup only.
http://reviews.llvm.org/D20226
etienneb added inline comments.
Comment at: clang-tidy/utils/TypeTraits.cpp:42
@@ -27,3 +41,3 @@
llvm::Optional isExpensiveToCopy(QualType Type, ASTContext &Context) {
if (Type->isDependentType())
You're right too.
But, it's possible to fix these prototypes:
Author: etienneb
Date: Fri May 13 09:31:44 2016
New Revision: 269418
URL: http://llvm.org/viewvc/llvm-project?rev=269418&view=rev
Log:
[AST] Add missing const qualifiers to AstContext in Type.cpp
Summary:
Add some missing const qualifiers to AstContext.
The ASTContext can't be modified with acces
etienneb added a comment.
In http://reviews.llvm.org/D19871#429466, @Prazek wrote:
> +1 I will probably also use this.
>
> Does hasCastKind works for implicitCastExpr?
Yes, there is a unittest with the code.
http://reviews.llvm.org/D19871
___
cfe
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
The build is broken due to a missing dependency.
To repro: [Release + Shared]
```
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
```
Which produce this error:
```
tools/clang/tools/ext
etienneb added a comment.
thanks, landing as soon as my other checkouts complete their tests (few
minutes).
http://reviews.llvm.org/D20240
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
Author: etienneb
Date: Fri May 13 10:38:54 2016
New Revision: 269429
URL: http://llvm.org/viewvc/llvm-project?rev=269429&view=rev
Log:
[clang-rename] Fix broken dependency on shared build.
Summary:
The build is broken due to a missing dependency.
To repro: [Release + Shared]
```
-DCMAKE_BUILD_TY
etienneb created this revision.
etienneb added reviewers: bkramer, hokein.
etienneb added a subscriber: cfe-commits.
The shared build is broken (again).
To repro: [Release + Shared]
```
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
```
Errors:
```
tools/clang/tools/extra/include-fixer/tool/C
Author: etienneb
Date: Fri May 13 12:38:22 2016
New Revision: 269441
URL: http://llvm.org/viewvc/llvm-project?rev=269441&view=rev
Log:
[include-fixer] Fix broken dependency shared build
Summary:
The shared build is broken (again).
To repro: [Release + Shared]
```
-DCMAKE_BUILD_TYPE=Release -DBUI
This revision was automatically updated to reflect the committed changes.
Closed by commit rL269441: [include-fixer] Fix broken dependency shared build
(authored by etienneb).
Changed prior to commit:
http://reviews.llvm.org/D20245?vs=57208&id=57221#toc
Repository:
rL LLVM
http://reviews.ll
etienneb added a comment.
In http://reviews.llvm.org/D20240#429910, @vmiklos wrote:
> Thanks for fixing the problem I introduced. :-)
No worries, I did the same twice this week.
http://reviews.llvm.org/D20240
___
cfe-commits mailing list
cfe-comm
Author: etienneb
Date: Fri May 13 14:36:55 2016
New Revision: 269460
URL: http://llvm.org/viewvc/llvm-project?rev=269460&view=rev
Log:
Add an AST matcher for CastExpr kind
Summary:
This AST matcher will match a given CastExpr kind.
It's an narrowing matcher on CastExpr.
Reviewers: klimek, alexfh
etienneb created this revision.
etienneb added a reviewer: rnk.
etienneb added a subscriber: cfe-commits.
When using a multi-configuration build (i.e. MSVC) the output path where
libraries are dropped is incorrect.
Example:
```
C:\src\llvm\examples>d:\src\llvm\build\Release\bin\clang-cl.exe
-fsa
etienneb added a comment.
In http://reviews.llvm.org/D20261#430151, @rnk wrote:
> Will this put the libraries in build/Release/bin/../lib/. aka
> build/Release/lib, or will they collide between build types?
If I get your question correctly, they won't collide since the first folder
below
etienneb added inline comments.
Comment at: clang-tidy/performance/InefficientStringAdditionCheck.cpp:35
@@ +34,3 @@
+
cxxOperatorCallExpr(hasAnyArgument(ignoringImpCasts(declRefExpr(BasicStringType))),
+ hasOverloadedOperatorName("+"));
+
--
etienneb added inline comments.
Comment at: clang-tidy/modernize/UseNoexceptCheck.cpp:22
@@ +21,3 @@
+static StringRef
+MakeDynamicExceptionString(const SourceManager &SM,
+ const CharSourceRange &FileMoveRange) {
coding style:
MakeDynami
etienneb updated this revision to Diff 57314.
etienneb marked an inline comment as done.
etienneb added a comment.
rebase over trunk. matchers are lifted to ASTMatchers.
http://reviews.llvm.org/D19841
Files:
clang-tidy/misc/BoolPointerImplicitConversionCheck.cpp
clang-tidy/modernize/UseNull
etienneb updated this revision to Diff 57316.
etienneb added a comment.
nits: indent
http://reviews.llvm.org/D19841
Files:
clang-tidy/misc/BoolPointerImplicitConversionCheck.cpp
clang-tidy/modernize/UseNullptrCheck.cpp
clang-tidy/performance/FasterStringFindCheck.cpp
clang-tidy/readabil
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
Cleanup some code by using appropriate APIs.
Some coding style cleanups.
There is no behavior changes.
http://reviews.llvm.org/D20279
Files:
clang-tidy/utils/DeclRefExprUtils.cpp
cla
Author: etienneb
Date: Mon May 16 09:34:20 2016
New Revision: 269656
URL: http://llvm.org/viewvc/llvm-project?rev=269656&view=rev
Log:
[clang-tidy] Cleanups utils files
Summary:
Cleanup some code by using appropriate APIs.
Some coding style cleanups.
There is no behavior changes.
- Function `I
Author: etienneb
Date: Tue May 17 14:36:09 2016
New Revision: 269804
URL: http://llvm.org/viewvc/llvm-project?rev=269804&view=rev
Log:
[clang-tidy] Lift common matchers to utils namespace
Summary:
This patch is lifting matchers used by more than one checkers
to the common namespace.
Reviewers: a
etienneb updated this revision to Diff 51927.
etienneb added a comment.
fix invalid comment.
http://reviews.llvm.org/D18475
Files:
clang-tidy/readability/RedundantStringCStrCheck.cpp
test/clang-tidy/readability-redundant-string-cstr.cpp
Index: test/clang-tidy/readability-redundant-string-c
etienneb marked an inline comment as done.
etienneb added a comment.
thanks, aaron.ballman@.
Comment at: clang-tidy/readability/RedundantStringCStrCheck.cpp:129
@@ +128,3 @@
+ // Detect: 'dst += str.c_str()' -> 'dst += str'
+ // Detect: 's == str.c_str()' -> 's == str'
+
etienneb marked an inline comment as done.
etienneb added a comment.
I'll to try to make a better way to describe redundant cases (as proposed by
sbenza@) with an array.
I like the array based approach, it's lean and clean.
I'll try to make a prototype of the generic overloaded functions matcher
etienneb updated this revision to Diff 51969.
etienneb marked 5 inline comments as done.
etienneb added a comment.
address alexfh@ comments.
http://reviews.llvm.org/D18457
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/SuspiciousMissingCommaCheck.
etienneb added inline comments.
Comment at: clang-tidy/misc/SuspiciousMissingCommaCheck.cpp:42
@@ +41,3 @@
+ const auto *ConcatenatedLiteral = Result.Nodes.getNodeAs("str");
+ if (InitializerList && ConcatenatedLiteral) {
+// Skip small arrays as they often generate false-po
etienneb updated this revision to Diff 52225.
etienneb marked 5 inline comments as done.
etienneb added a comment.
address alexfh@ comments.
http://reviews.llvm.org/D18457
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/SuspiciousMissingCommaCheck.
etienneb updated this revision to Diff 52226.
etienneb added a comment.
nits
http://reviews.llvm.org/D18457
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/SuspiciousMissingCommaCheck.cpp
clang-tidy/misc/SuspiciousMissingCommaCheck.h
docs/clang
etienneb added a comment.
ready to land.
Comment at: clang-tidy/misc/SuspiciousMissingCommaCheck.cpp:75
@@ +74,3 @@
+ diag(ConcatenatedLiteral->getLocStart(),
+ "suspicious string literal, probably missing a comma");
+}
alexfh wrote:
> xazax.hun wrote:
>
Author: etienneb
Date: Thu Mar 31 13:12:23 2016
New Revision: 265033
URL: http://llvm.org/viewvc/llvm-project?rev=265033&view=rev
Log:
[clang-tidy] Add a new checker to detect missing comma in initializer list.
Summary:
This checker is able to detect missing comma in
an array of string literals.
etienneb accepted this revision.
etienneb added a comment.
thanks for taking care of this.
Comment at: docs/ReleaseNotes.rst:131
@@ +130,3 @@
+ Finds unnecessary string initializations.
+
+Fixed bugs:
I just landed this one: http://reviews.llvm.org/D18457
I'll
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
This patch is adding detection of common string literal patterns
that should not trigger warnings.
[*] Add a limit on the number of concatenated token,
[*] Add support for parenthese s
etienneb updated this revision to Diff 52365.
etienneb added a comment.
Simplification and nits.
http://reviews.llvm.org/D18695
Files:
clang-tidy/misc/SuspiciousMissingCommaCheck.cpp
clang-tidy/misc/SuspiciousMissingCommaCheck.h
test/clang-tidy/misc-suspicious-missing-comma.cpp
Index: te
etienneb added a subscriber: etienneb.
etienneb added a comment.
some nits.
Comment at: clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.cpp:21
@@ +20,3 @@
+void InterfacesGlobalInitCheck::registerMatchers(MatchFinder *Finder) {
+ auto IsStaticGlobal =
+ allOf(hasGlo
etienneb added a comment.
more nits, sorry didn't saw them first time.
Comment at: test/clang-tidy/cppcoreguidelines-interfaces-global-init.cpp:32
@@ +31,3 @@
+// CHECK-MESSAGES: [[@LINE-1]]:12: warning: initializing static variable with
non-const expression depending on static
etienneb added a comment.
thanks alex, I'll give a day or two to people to jump in.
If no other comments, I'll land it.
http://reviews.llvm.org/D18695
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/list
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
This checker is validating suspicious usage of string compare functions.
Example:
```
if (strcmp(...)) // Implicitly compare to zero
if (!strcmp(...)) // Won't warn
if (st
etienneb added a comment.
As pointed by Eugene,
The following code seems to produce multiple errors.
int foo() {
if (strcmp(A, "a") == true)
return 0;
return 1;
}
Results:
/home/etienneb/examples/test.cc:56:7: warning: function 'strcmp' is compared
to a suspicious constant
etienneb added a comment.
You're right, both are outputted.
/home/etienneb/examples/test.cc:56:7: warning: function 'strcmp' is called
without explicitly comparing result [misc-suspicious-string-compare]
if (strcmp(A, "a"))
^
!= 0
/home/etienneb/examples/te
etienneb updated this revision to Diff 52420.
etienneb added a comment.
Fix support for C.
Adding test for C99 code.
http://reviews.llvm.org/D18703
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/SuspiciousStringCompareCheck.cpp
clang-tidy/misc/S
etienneb updated this revision to Diff 52421.
etienneb marked an inline comment as done.
etienneb added a comment.
nits and formatting
http://reviews.llvm.org/D18703
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/SuspiciousStringCompareCheck.cpp
etienneb added a comment.
Eugene, I double checked and the implicit bool version doesn't trigger in C.
This check is applied in C and C++.
(note: I needed to add code to fix C)
Comment at: docs/clang-tidy/checks/misc-suspicious-string-compare.rst:13
@@ +12,3 @@
+.. code:: c++
+
etienneb added a comment.
I spent time thinking about Eugene.Zelenko@ comment and I start to believe that
given the difference between the errors ratio and the warnings ratio, maybe we
should gate the report 'explicitly comparing result' under a configurable
option.
There is an order of magnit
etienneb created this revision.
etienneb added reviewers: rnk, alexfh.
etienneb added a subscriber: cfe-commits.
A character within a string literal is not escaped correctly.
In this case, there is no semantic change because the invalid character turn
out to be NUL anyway.
note: "\0x12" is equiv
Author: etienneb
Date: Mon Apr 4 10:46:38 2016
New Revision: 265303
URL: http://llvm.org/viewvc/llvm-project?rev=265303&view=rev
Log:
[clang-tidy] Reduce false-positive ratio in misc-suspicious-missing-comma check.
Summary:
This patch is adding detection of common string literal patterns
that sh
This revision was automatically updated to reflect the committed changes.
Closed by commit rL265303: [clang-tidy] Reduce false-positive ratio in
misc-suspicious-missing-comma check. (authored by etienneb).
Changed prior to commit:
http://reviews.llvm.org/D18695?vs=52365&id=52563#toc
Repository
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
The clang-tidy documentation generation was broken since commit :
http://reviews.llvm.org/D18457
I ran locally the documentation generation and I fixed errors related to that
specific ch
etienneb updated this revision to Diff 52601.
etienneb marked 3 inline comments as done.
etienneb added a comment.
add options, configurable list of function names, support for ! pattern.
http://reviews.llvm.org/D18703
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
etienneb updated this revision to Diff 52602.
etienneb added a comment.
nits
http://reviews.llvm.org/D18703
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/SuspiciousStringCompareCheck.cpp
clang-tidy/misc/SuspiciousStringCompareCheck.h
docs/cla
etienneb added a subscriber: etienneb.
etienneb added a comment.
this is cool.
Comment at: clang-tidy/misc/MultipleStatementMacroCheck.cpp:33
@@ +32,3 @@
+
+namespace {
+
I feel it nicer if you merge this namespace with the one at line 20.
Comm
etienneb added a comment.
thanks, lgtm.
http://reviews.llvm.org/D18766
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
This patch add the support for detecting suspicious string
literals and their usage.
The following example shows a incorrect character escaping leading
to an embedded NUL character.
```
etienneb updated this revision to Diff 52653.
etienneb added a comment.
Fix list.rst (bad merge)
http://reviews.llvm.org/D18783
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp
clang-tidy/misc/StringLiteralWit
Author: etienneb
Date: Mon Apr 4 20:41:02 2016
New Revision: 265375
URL: http://llvm.org/viewvc/llvm-project?rev=265375&view=rev
Log:
[clang-tidy] Fix documentation of misc-suspicious-missing-comma
Summary:
The clang-tidy documentation generation was broken since commit :
http://reviews.llvm.or
etienneb updated this revision to Diff 52707.
etienneb marked an inline comment as done.
etienneb added a comment.
fix comments.
http://reviews.llvm.org/D18783
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp
etienneb updated this revision to Diff 52708.
etienneb added a comment.
add missing reference in release-notes.
http://reviews.llvm.org/D18783
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp
clang-tidy/misc/S
etienneb updated this revision to Diff 52710.
etienneb added a comment.
alpha ordering
http://reviews.llvm.org/D18783
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp
clang-tidy/misc/StringLiteralWithEmbeddedN
etienneb added a comment.
In http://reviews.llvm.org/D18783#392486, @bcraig wrote:
> Is this checker able to connect a std::string with a pre-declared string
> literal (i.e. constant propagation)? For example...
>
> const char *bad_chars = "\0\1\2\3";
> std::string bad_str = bad_chars;
>
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
The clang-tidy documentation can't be generated because of broken links.
```
Warning, treated as error:
/home/etienneb/llvm/llvm/tools/clang/tools/extra/docs/clang-tidy/checks/google-reada
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
This patch remove the plugin argument from the command-line.
Loading plugins was making clang-tidy to fail when running over chromium
(linux).
Example of a command-line executed when run
Author: etienneb
Date: Wed Apr 6 08:57:22 2016
New Revision: 265539
URL: http://llvm.org/viewvc/llvm-project?rev=265539&view=rev
Log:
[clang-tidy] fix building clang-tidy documentation.
Summary:
The clang-tidy documentation can't be generated because of broken links.
```
Warning, treated as err
Author: etienneb
Date: Wed Apr 6 09:07:51 2016
New Revision: 265542
URL: http://llvm.org/viewvc/llvm-project?rev=265542&view=rev
Log:
[clang-tidy] filter plugins and plugin arguments of the command-line
Summary:
This patch remove the plugin argument from the command-line.
Loading plugins was ma
etienneb updated this revision to Diff 52788.
etienneb marked 4 inline comments as done.
etienneb added a comment.
alexfh@ comments.
http://reviews.llvm.org/D18806
Files:
clang-tidy/ClangTidy.cpp
Index: clang-tidy/ClangTidy.cpp
etienneb updated this revision to Diff 52791.
etienneb marked 2 inline comments as done.
etienneb added a comment.
alexfh comments.
http://reviews.llvm.org/D18783
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp
etienneb updated this revision to Diff 52793.
etienneb added a comment.
nits.
http://reviews.llvm.org/D18783
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp
clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.h
etienneb added a comment.
I finally get rid of the GetCharAt function.
Comment at: clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp:22
@@ +21,3 @@
+static unsigned int GetCharAt(const StringLiteral *SL, size_t offset) {
+ if (offset >= SL->getLength()) return 0;
+ return
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
Clang-tidy is reporting a warning of redundant string initialisation
on a string parameter initialized with empty string.
See bug: 27087
The reported example is:
```
#include
void fn(std
etienneb added a comment.
In http://reviews.llvm.org/D18783#393367, @LegalizeAdulthood wrote:
> There are some APIs where a series of strings are passed as a single `char *`
> with NUL separators between the strings and the last string is indicated by
> two NUL characters in a row. For instanc
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
In Release mode, the check was infinite looping over chromium code base.
It seems there is something strange with the creation of the Maps.
I believe the compiler is making some assumption
etienneb added a subscriber: etienneb.
etienneb added a comment.
I like this :)
http://reviews.llvm.org/D18509
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
etienneb updated this revision to Diff 52856.
etienneb added a comment.
rebased.
http://reviews.llvm.org/D18783
Files:
clang-tidy/misc/MisplacedWideningCastCheck.cpp
Index: clang-tidy/misc/MisplacedWideningCastCheck.cpp
===
---
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
This is the same kind of bug that [[ http://reviews.llvm.org/D18238 | D18238 ]].
Fix crashes caused by deferencing null pointer when declarations parsing may be
delayed.
The body of the
etienneb added a comment.
There are probably other instances of this error.
It's not an instance that got incorrectly fixed.
I may review other checkers to see if I can find more of them.
For now, I'm fixing them when they make clang-tidy crash over chromium code
(with a clang-tidy windows buil
Author: etienneb
Date: Thu Apr 7 09:18:53 2016
New Revision: 265671
URL: http://llvm.org/viewvc/llvm-project?rev=265671&view=rev
Log:
[clang-tidy] Fix FP with readability-redundant-string-init for default arguments
Summary:
Clang-tidy is reporting a warning of redundant string initialisation
on
etienneb updated this revision to Diff 52915.
etienneb added a comment.
add unittests.
http://reviews.llvm.org/D18852
Files:
clang-tidy/performance/UnnecessaryValueParamCheck.cpp
test/clang-tidy/performance-unnecessary-value-param-delayed.cpp
Index: test/clang-tidy/performance-unnecessary-
etienneb updated this revision to Diff 52919.
etienneb added a comment.
alexfh comments.
http://reviews.llvm.org/D18833
Files:
clang-tidy/misc/MisplacedWideningCastCheck.cpp
Index: clang-tidy/misc/MisplacedWideningCastCheck.cpp
etienneb updated this revision to Diff 52921.
etienneb added a comment.
nits, lower case names.
http://reviews.llvm.org/D18833
Files:
clang-tidy/misc/MisplacedWideningCastCheck.cpp
Index: clang-tidy/misc/MisplacedWideningCastCheck.cpp
=
etienneb updated this revision to Diff 52924.
etienneb marked an inline comment as done.
etienneb added a comment.
fix nits.
http://reviews.llvm.org/D18833
Files:
clang-tidy/misc/MisplacedWideningCastCheck.cpp
Index: clang-tidy/misc/MisplacedWideningCastCheck.cpp
Author: etienneb
Date: Thu Apr 7 09:52:52 2016
New Revision: 265679
URL: http://llvm.org/viewvc/llvm-project?rev=265679&view=rev
Log:
[clang-tidy] Fix infinite loop in MisplacedWideningCastCheck.
Summary:
In Release mode, the check was infinite looping over chromium code base.
It seems there is
Author: etienneb
Date: Thu Apr 7 09:58:13 2016
New Revision: 265681
URL: http://llvm.org/viewvc/llvm-project?rev=265681&view=rev
Log:
[clang-tidy] fix a crash with -fdelayed-template-parsing in
UnnecessaryValueParamCheck.
Summary:
This is the same kind of bug than [[ http://reviews.llvm.org/D18
etienneb updated this revision to Diff 52926.
etienneb marked 2 inline comments as done.
etienneb added a comment.
Revert last diff (invalid patchset).
http://reviews.llvm.org/D18783
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringLiteralWith
etienneb updated this revision to Diff 52927.
etienneb added a comment.
nit
http://reviews.llvm.org/D18783
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp
clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.h
etienneb updated this revision to Diff 52930.
etienneb marked 3 inline comments as done.
etienneb added a comment.
fix doc.
http://reviews.llvm.org/D18783
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp
clang
101 - 200 of 329 matches
Mail list logo