This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE359801: Fixed: Duck-typing in
readability-redundant-smartptr-get didnt catch MSVC STL… (authored by
fgross, committed by ).
Changed prior to commit:
fgross updated this revision to Diff 196960.
fgross added a comment.
Fixed test file format
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61209/new/
https://reviews.llvm.org/D61209
Files:
clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
fgross updated this revision to Diff 196911.
fgross added a comment.
Fixed format
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61209/new/
https://reviews.llvm.org/D61209
Files:
clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
fgross created this revision.
fgross added reviewers: aaron.ballman, alexfh, sbenza.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
The MSVC STL defines smart pointer `operator*` and `operator->` as method
templates. The existing duck typing implementation doesn't catch
fgross added a comment.
> If you've written your own copy functions then you probably want to write
> your own move functions to allow moving, so `AllowMissingMoveFunctions`
> doesn't make sense.
The scenario I had in mind was legacy code which was written back when it still
was the "rule of
This revision was automatically updated to reflect the committed changes.
Closed by commit rL310095: [ASTMatcher] Add handling for DeducedType to
HasDeclarationMatcher (authored by fgross).
Changed prior to commit:
https://reviews.llvm.org/D36308?vs=109795=109796#toc
Repository:
rL LLVM
fgross updated this revision to Diff 109795.
fgross added a comment.
Changed comment, added some clang-tidy test cases.
https://reviews.llvm.org/D36308
Files:
include/clang/ASTMatchers/ASTMatchersInternal.h
test/clang-tidy/misc-use-after-move.cpp
fgross created this revision.
HasDeclarationMatcher did not handle DeducedType, it always returned false for
deduced types.
So with code like this:
struct X{};
auto x = X{};
This did no longer match:
varDecl(hasType(recordDecl(hasName("X"
Because HasDeclarationMatcher didn't
This revision was automatically updated to reflect the committed changes.
Closed by commit rL304657: [clang-tidy] Make misc-static-assert accept
assert(!"msg") (authored by fgross).
Changed prior to commit:
https://reviews.llvm.org/D33827?vs=101197=101311#toc
Repository:
rL LLVM
fgross created this revision.
Herald added a subscriber: xazax.hun.
Added negated string literals to the set of IsAlwaysFalse expressions to avoid
flagging of
assert(!"msg")
https://reviews.llvm.org/D33827
Files:
clang-tidy/misc/StaticAssertCheck.cpp
fgross updated this revision to Diff 99576.
fgross added a comment.
After some digging into it, here is my uneducated guess:
The comment in `findEndLocation` states that //"Loc points to the beginning of
the last token before ';'"//. But `checkStmt` calls it with
fgross created this revision.
Herald added a subscriber: xazax.hun.
template
struct C {
C();
};
template
C::C() = default;
Causes a readability-redundant-declaration diagnostic. This is caused by
`isDefinition` not matching defaulted functions.
fgross created this revision.
Herald added a subscriber: xazax.hun.
Single-line if statements cause a false positive when the last token in the
conditional statement is a char constant:
if (condition)
return 'a';
For some reason `findEndLocation` seems to skips too many (vertical)
fgross updated this revision to Diff 92026.
fgross added a comment.
Now using `ASTContext::getParents` instead of `ChainedIfs` map.
For some reason I thought of `getParents` as an expensive function to call...
https://reviews.llvm.org/D30841
Files:
fgross added a comment.
I don't have commit access, so could someone please commit this for me? Thanks!
https://reviews.llvm.org/D30841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
fgross added a comment.
No commit access, could someone please take care of this? Thanks!
https://reviews.llvm.org/D30610
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
fgross updated this revision to Diff 91473.
fgross added a comment.
Replaced std::map with llvm::DenseMap, added comment about traversal.
I just assumed it would traverse in the "right" way, is there any documentation
about AST / matcher traversal?
https://reviews.llvm.org/D30841
Files:
fgross created this revision.
Herald added a subscriber: JDevlieghere.
Fixed erroneously flagging of chained if statements when styled like this:
if (cond) {
}
else if (cond) {
}
else {
}
https://reviews.llvm.org/D30841
Files:
fgross updated this revision to Diff 91188.
fgross added a comment.
Diff was missing cppcoreguidelines-special-member-functions-relaxed.cpp...
https://reviews.llvm.org/D30610
Files:
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp
fgross updated this revision to Diff 91183.
fgross added a comment.
Added examples to options doc.
https://reviews.llvm.org/D30610
Files:
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
fgross updated this revision to Diff 90607.
fgross marked an inline comment as done.
fgross added a comment.
reformatted
https://reviews.llvm.org/D30610
Files:
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
fgross marked 6 inline comments as done.
fgross added inline comments.
Comment at: clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:110
+ClassWithSpecialMembers[ID];
+if (find(Members, Kind) == Members.end())
+ Members.push_back(Kind);
fgross updated this revision to Diff 90593.
fgross added a comment.
Updated documentation, got rid of code duplication.
https://reviews.llvm.org/D30610
Files:
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
fgross created this revision.
Herald added subscribers: JDevlieghere, nemanjai.
Added two options to cppcoreguidelines-special-member-functions to allow a more
relaxed checking.
With 'AllowSoleDefaultDtor' set to 1, classes with explicitly defaulted
destructors but no other special members are
fgross updated this revision to Diff 90572.
fgross added a comment.
Updated test case.
https://reviews.llvm.org/D30592
Files:
clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
test/clang-tidy/misc-throw-by-value-catch-by-reference.cpp
Index:
fgross created this revision.
Herald added a subscriber: JDevlieghere.
catch (std::exception ex)
{
}
Was flagged with "catch handler catches a pointer value".
https://reviews.llvm.org/D30592
Files:
clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
Index:
26 matches
Mail list logo