[PATCH] D61209: [clang-tidy] Fix readability-redundant-smartptr-get for MSVC STL

2019-05-02 Thread Florian Gross via Phabricator via cfe-commits
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:

[PATCH] D61209: [clang-tidy] Fix readability-redundant-smartptr-get for MSVC STL

2019-04-27 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D61209: [clang-tidy] Fix readability-redundant-smartptr-get for MSVC STL

2019-04-26 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D61209: Fix readability-redundant-smartptr-get for MSVC STL

2019-04-26 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-11-24 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D36308: Add handling for DeducedType to HasDeclarationMatcher

2017-08-04 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D36308: Add handling for DeducedType to HasDeclarationMatcher

2017-08-04 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D36308: Add handling for DeducedType to HasDeclarationMatcher

2017-08-04 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D33827: [clang-tidy] misc-static-assert shouldn't flag assert(!"msg")

2017-06-03 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D33827: [clang-tidy] misc-static-assert shouldn't flag assert(!"msg")

2017-06-02 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D33354: [clang-tidy] readability-braces-around-statements false positive with char literals

2017-05-19 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D33358: [clang-tidy] readability-redundant-declaration false positive for defaulted function

2017-05-19 Thread Florian Gross via Phabricator via cfe-commits
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.

[PATCH] D33354: [clang-tidy] readability-braces-around-statements false positive with char literals

2017-05-19 Thread Florian Gross via Phabricator via cfe-commits
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)

[PATCH] D30841: [clang-tidy] readability-misleading-indentation: fix chained if

2017-03-16 Thread Florian Gross via Phabricator via cfe-commits
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:

[PATCH] D30841: [clang-tidy] readability-misleading-indentation: fix chained if

2017-03-15 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-03-13 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D30841: [clang-tidy] readability-misleading-indentation: fix chained if

2017-03-11 Thread Florian Gross via Phabricator via 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:

[PATCH] D30841: [clang-tidy] readability-misleading-indentation: fix chained if

2017-03-10 Thread Florian Gross via Phabricator via cfe-commits
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:

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-03-09 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-03-09 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-03-05 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-03-04 Thread Florian Gross via Phabricator via cfe-commits
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);

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-03-04 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-03-04 Thread Florian Gross via Phabricator via cfe-commits
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

[PATCH] D30592: [clang-tidy] Fix diag message for catch-by-value

2017-03-04 Thread Florian Gross via Phabricator via cfe-commits
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:

[PATCH] D30592: [clang-tidy] Fix diag message for catch-by-value

2017-03-03 Thread Florian Gross via Phabricator via cfe-commits
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: