[PATCH] D75739: [clangd][vscode] Enable dot-to-arrow fixes in clangd completion.

2020-03-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. How does this handle cases where an object overloads the `->` operator or worse still overloads the operator and has conflicting names when accessed with `. ` or `->`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75739/n

[PATCH] D75749: [clang-tidy] extend bugprone-signed-char-misuse check.

2020-03-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.cpp:74 +void SignedCharMisuseCheck::registerMatchers(MatchFinder *Finder) { + const auto IntegerType = qualType(allOf(isInteger(), unless(isAnyCharacter()), +

[PATCH] D75800: [ASTMatchers] adds isComparisonOperator to BinaryOperator and CXXOperatorCallExpr

2020-03-07 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75800 Files: clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cp

[PATCH] D75749: [clang-tidy] extend bugprone-signed-char-misuse check.

2020-03-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.cpp:97 + const auto CompareOperator = + expr(binaryOperator(anyOf(hasOperatorName("=="), hasOperatorName("!=")), + anyOf(allOf(hasLHS(SignedCharC

[PATCH] D75800: [ASTMatchers] adds isComparisonOperator to BinaryOperator and CXXOperatorCallExpr

2020-03-07 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp:570 const auto RelationalExpr = ignoringParenImpCasts(binaryOperator( - isComparisonOperator(), expr().bind(Id), + ma

[PATCH] D75803: [clang-tidy] [NFC] Remove unnecessary matchers

2020-03-07 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, kbarton, xazax.hun, nemanjai. Herald added a project: clang. njames93 added a parent revision: D75800: [ASTMatchers] adds isComparisonOperator to BinaryOperator and CXXOperatorCallExpr. Herald added a subscriber: wuzish. njames

[PATCH] D75800: [ASTMatchers] adds isComparisonOperator to BinaryOperator and CXXOperatorCallExpr

2020-03-08 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfc3c80c38643: [ASTMatchers] adds isComparisonOperator to BinaryOperator and… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75800/new/

[PATCH] D75803: [clang-tidy] [NFC] Remove unnecessary matchers

2020-03-09 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG223a43ee8d89: [clang-tidy] [NFC] Remove unnecessary matchers (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D75803?vs=248918&id=249040#toc Repository: rG LLVM Github Monore

[PATCH] D75841: [ASTMatchers] Add hasAnyOverloadedOperatorName matcher

2020-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75841 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/ASTMatcher

[PATCH] D75714: Add Optional overload to DiagnosticBuilder operator <

2020-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang/include/clang/Basic/Diagnostic.h:1318 + const llvm::Optional &Opt) { + if (Opt) { +DB << *Opt; Should this be disabled on f

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. LGTM Comment at: clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h:44-46 bool parseFileExtensions(StringRef AllFileExtensions, - FileExtensionsSet &FileExtensions, char Delimiter); +

[PATCH] D75749: [clang-tidy] extend bugprone-signed-char-misuse check.

2020-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. LGTM However, how does this handle cases when the type is written as `char`. They can be signed/unsigned based on what platform is being targeted. But on a platform where `char` is signed

[PATCH] D75714: Add Optional overload to DiagnosticBuilder operator <

2020-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75714#1912326 , @lebedev.ri wrote: > What's the use case here? Mainly syntactic sugar, If you have a function that maybe returns a `FixItHint` or `SourceRange` you can pass it directly to the `DiagnosticBuilder`. Reposito

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h:44-46 bool parseFileExtensions(StringRef AllFileExtensions, - FileExtensionsSet &FileExtensions, char Delimiter); + FileExtensions

[PATCH] D75714: Add Optional overload to DiagnosticBuilder operator <

2020-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 249121. njames93 added a comment. - Removed template in favour of specific overloads Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75714/new/ https://reviews.llvm.org/D75714 Files: clang/include/clang/Basic

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. How are local and global options handled. For example in root .clang-tidy: CheckOptions: - key: some-check.GlobalOption value: '1' and in a subfolder .clang-tidy: CheckOptions: - key: GlobalOption value:

[PATCH] D75714: Add Optional overload to DiagnosticBuilder operator <

2020-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75714#1913230 , @aaron.ballman wrote: > Is there any code we can cleanup as a result of adding these overloads? I > would have expected to see some code changes justifying each additional > overload, which would also give u

[PATCH] D75841: [ASTMatchers] Add hasAnyOverloadedOperatorName matcher

2020-03-09 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG77eec38626cb: [ASTMatchers] Add hasAnyOverloadedOperatorName matcher (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75841/new/ https:

[PATCH] D75714: Add Optional overload to DiagnosticBuilder operator <

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 249307. njames93 added a comment. Herald added subscribers: arphaman, kbarton, nemanjai. - Add usages, removed optional on arrayrefs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75714/new/ https://reviews.llv

[PATCH] D75901: [clang-tidy] misc-unconventional-assign-operator suggest to use rvalue references in C++03 mode

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Please add a test case for this Comment at: clang-tools-extra/clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp:76-77 } else { +const ASTContext *ASTCtx = Result.Context; +const LangOptions &Opts = ASTCtx->getLangOpts(); static con

[PATCH] D75911: [clang-tidy] Added hasAnyListedName matcher

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, alexfh, Eugene.Zelenko. Herald added subscribers: cfe-commits, kbarton, xazax.hun, mgorny, nemanjai. Herald added a project: clang. Adds a utils matcher called `hasAnyListedName` to alleviate all the hackery usin

[PATCH] D75911: [clang-tidy] Added hasAnyListedName matcher

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 249356. njames93 added a comment. - Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75911/new/ https://reviews.llvm.org/D75911 Files: clang-tools-extra/clang-tidy/abseil/StringFindStartswithChe

[PATCH] D75714: Add Optional overload to DiagnosticBuilder operator <

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 249361. njames93 marked 2 inline comments as done. njames93 added a comment. - remove unnecessary semi colons Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75714/new/ https://reviews.llvm.org/D75714 Files:

[PATCH] D75911: [clang-tidy] Added hasAnyListedName matcher

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.cpp:17 + +Matcher hasAnyListedName(std::vector Names) { + return Matcher(new HasNameMatcher(std::move(Names))); gribozavr2 wrote: > This matcher sounds generally useful. I th

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75184#1914705 , @DmitryPolukhin wrote: > You are absolutely right about current behaviour. Thank you for catching this > odd behaviour. I'm not 100% confident what is the right behaviour but my > guess is that overriding lo

[PATCH] D75901: [clang-tidy] misc-unconventional-assign-operator suggest to use rvalue references in C++03 mode

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. If you need help for the test case. Create a file in the `clang-tools-extra/test/clang-tidy/checkers`. Name it something like `misc-unconventional-assign-operator-pre11.cpp` and paste this in // RUN: %check_clang_tidy -std=c++98,c++03 %s misc-unconventional-assign-

[PATCH] D75714: Add Optional overload to DiagnosticBuilder operator <

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG66945b62f42f: Add Optional overload to DiagnosticBuilder operator << (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75714/new/ https:

[PATCH] D75569: [clang-tidy] New check for methods marked __attribute__((unavailable)) that do not override a method from a superclass.

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/MethodUnavailableNotOverrideCheck.cpp:34 +// Matches Objective-C methods that are not overriding a superclass method. +AST_MATCHER(ObjCMethodDecl, isNotOverriding) { return !Node.isOverriding(); } + --

[PATCH] D75911: [clang-tidy] Added hasAnyListedName matcher

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.cpp:17 + +Matcher hasAnyListedName(std::vector Names) { + return Matcher(new HasNameMatcher(std::move(Names))); gribozavr2 wrote: >

[PATCH] D75901: [clang-tidy] misc-unconventional-assign-operator suggest to use rvalue references in C++03 mode

2020-03-11 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. LGTM For the record `check-clang-tools` is sufficient for testing all clang tidy checks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75901/new/ https://reviews.llvm.org/D75901

[PATCH] D76037: [clang] tooling replacements are escaped when exporting to YAML

2020-03-11 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, AlexanderLanin. Herald added a project: clang. Herald added a subscriber: cfe-commits. Escapes replacement text when exporting to yaml and unescapes when importing from yaml. Repository: rG LLVM Github Monore

[PATCH] D76037: [clang] tooling replacements are escaped when exporting to YAML

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 249856. njames93 added a comment. Herald added a subscriber: mgorny. - Moved escape/unescape impl to source file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76037/new/ https://reviews.llvm.org/D76037 Files:

[PATCH] D76037: [clang] tooling replacements are escaped when exporting to YAML

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 249857. njames93 added a comment. - Small tidy of code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76037/new/ https://reviews.llvm.org/D76037 Files: clang/include/clang/Tooling/ReplacementsYaml.h clang/

[PATCH] D76037: [clang] tooling replacements are escaped when exporting to YAML

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 249860. njames93 added a comment. - Fix test case not being ran Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76037/new/ https://reviews.llvm.org/D76037 Files: clang/include/clang/Tooling/ReplacementsYaml.h

[PATCH] D76037: [clang] tooling replacements are escaped when exporting to YAML

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang/unittests/Tooling/ReplacementsYamlTest.cpp:68 + ASSERT_EQ(Doc.Replacements.size(), NewDoc.Replacements.size()); + if (Doc.Replacements.size() == NewDoc.Replacements.size()) { +for (

[PATCH] D76037: [clang] tooling replacements are escaped when exporting to YAML

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 249875. njames93 added a comment. - Fix broken dependencies Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76037/new/ https://reviews.llvm.org/D76037 Files: clang-tools-extra/clang-apply-replacements/CMakeLi

[PATCH] D76054: [clang-apply-replacements] No longer deduplucates replacements from the same TU

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Test cases will follow, just time constrained for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76054/new/ https://reviews.llvm.org/D76054 ___ cfe-commits mailing list cf

[PATCH] D76054: [clang-apply-replacements] No longer deduplucates replacements from the same TU

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, AlexanderLanin. Herald added a project: clang. Herald added a subscriber: cfe-commits. njames93 added a comment. Test cases will follow, just time constrained for now. clang-apply-replacements currently deduplic

[PATCH] D76037: [clang] tooling replacements are escaped when exporting to YAML

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 250038. njames93 added a comment. - Fix another broken dependency Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76037/new/ https://reviews.llvm.org/D76037 Files: clang-tools-extra/clang-apply-replacements/C

[PATCH] D76037: [clang] tooling replacements are escaped when exporting to YAML

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 250053. njames93 marked 6 inline comments as done. njames93 added a comment. - Extend tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76037/new/ https://reviews.llvm.org/D76037 Files: clang-tools-extra/

[PATCH] D76037: [clang] tooling replacements are escaped when exporting to YAML

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/lib/Tooling/ReplacementsYaml.cpp:22 +static constexpr Escapes EscapeChars[] = { +{'\n', 'n'}, {'\r', 'r'}, {'\t', 't'}, {'\\', '\\'}}; + AlexanderLanin wrote: > Just so I have asked ;-) > Escaping every \ woul

[PATCH] D76054: [clang-apply-replacements] No longer deduplucates replacements from the same TU

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 250054. njames93 added a comment. - Added test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76054/new/ https://reviews.llvm.org/D76054 Files: clang-tools-extra/clang-apply-replacements/lib/Tooling/Ap

[PATCH] D75901: [clang-tidy] misc-unconventional-assign-operator suggest to use rvalue references in C++03 mode

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75901#1916119 , @tetsuo-cpp wrote: > @njames93 @MaskRay > Thanks for helping me with testing. I'll remember this for next time. > > I also saw this pattern of retrieving `LangOptions` from an `ASTContext` in > some other ch

[PATCH] D76083: [clang-tidy] Expand the list of functions in bugprone-unused-return-value

2020-03-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Please upload diffs with full context. If you are using `git diff` to generate the patch, pass the flag `-U99` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76083/new/ https://reviews.llvm.org/D76083 __

[PATCH] D75911: [clang-tidy] Added hasAnyListedName matcher

2020-03-13 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:53-55 +ast_matchers::internal::Matcher +hasAnyListedName(std::vector Names); + alexfh wrote: > We could change all checks to use t

[PATCH] D76196: [ASTMatchers] Extend hasReturnValue to GNU StmtExpr

2020-03-15 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, klimek. Herald added a project: clang. Herald added a subscriber: cfe-commits. Extend hasReturnValue to match the last statement in a gnu statement expression if the last statement is an expression. Repository: rG LLVM G

[PATCH] D76196: [ASTMatchers] Extend hasReturnValue to GNU StmtExpr

2020-03-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D76196#1923524 , @aaron.ballman wrote: > I don't think this is a natural fit for the functionality. A statement > expression doesn't have a return value so much as it is a value expression > that can contain multiple stateme

[PATCH] D76196: [ASTMatchers] Extend hasReturnValue to GNU StmtExpr

2020-03-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D76196#1924393 , @aaron.ballman wrote: > I'm still not understanding your use case, so it's a bit hard for me to tell > whether this approach is good or not. Do you have a situation where you > cannot match on the expression

[PATCH] D76196: [ASTMatchers] Extend hasReturnValue to GNU StmtExpr

2020-03-16 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 250569. njames93 added a comment. - Rename matcher to hasFinalExpr - Don't review it yet Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76196/new/ https://reviews.llvm.org/D76196 Files: clang/docs/LibASTMatc

[PATCH] D76229: [clang-tidy] Added PlacementNewStorageCheck

2020-03-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Also fix the test case, premerge found a failure Comment at: clang-tools-extra/clang-tidy/cert/PlacementNewStorageCheck.cpp:23 + + for (const Stmt *Child : TheStmt->children()) { +if (const auto *TheDeclRefExpr = dyn_cast(Child))

[PATCH] D75220: [clang-tidy] RenamerClangTidy now correctly renames `using namespace` decls

2020-03-18 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Ping?? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75220/new/ https://reviews.llvm.org/D75220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D75901: [clang-tidy] misc-unconventional-assign-operator suggest to use rvalue references in C++03 mode

2020-03-18 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9bb5685b2161: [clang-tidy] misc-unconventional-assign-operator suggest to use rvalue… (authored by tetsuo-cpp, committed by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D75220: [clang-tidy] RenamerClangTidy now correctly renames `using namespace` decls

2020-03-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 251190. njames93 added a comment. - Fixed comment nit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75220/new/ https://reviews.llvm.org/D75220 Files: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck

[PATCH] D75220: [clang-tidy] RenamerClangTidy now correctly renames `using namespace` decls

2020-03-18 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1365ab4b63b7: [clang-tidy] RenamerClangTidy now correctly renames `using namespace` decls (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D73052: [clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved

2020-03-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 251231. njames93 added a comment. - rebase and small nit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files: clang-tools-extra/clang-tidy/bugprone/ReservedIdentif

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75184#1932764 , @alexfh wrote: > There's one more thing to consider: just by looking at the name of a local > option we don't know whether it will be read using `get()` or > `getLocalOrGlobal()`. By removing local options we

[PATCH] D73580: [clang-tidy] rename_check.py: maintain alphabetical order in Renamed checks section

2020-01-31 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. It looks good, but could you maybe create a child revision showing what it looks like with a few checks renamed to make sure everything is all working correctly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73580/new/ h

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-31 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added a comment. In D73413#1851432 , @tonyelewis wrote: > Thanks so much for all the effort on this. I think it's really wonderful. > > I've added a couple of comments elsewhere. > > My other query: does/

[PATCH] D73715: - Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory

2020-01-31 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf99133e853bf: - Update .clang-tidy to ignore parameters of main like functions for naming… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D73580: [clang-tidy] rename_check.py: maintain alphabetical order in Renamed checks section

2020-02-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. So I tried to ran `./rename_check.py readability-braces-around-statements readability-braces` and results were less than desirable. It renamed the `readability-braces-around-statements` but it also renamed the google alias to `google-readability-braces`. In the documen

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-02-01 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/MissingHeaderFileDeclarationCheck.cpp:75 + continue; +if (AnyHeader || File->NamePart.equals_lower(ThisFile->NamePart)) + return; // Found a goo

[PATCH] D73841: [clang-tidy] Fixed crash 44745 in readability-else-after-return

2020-02-01 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73841 Files: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp clang-tools-extra/test/clang-tidy/ch

[PATCH] D73841: [clang-tidy] Fixed crash 44745 in readability-else-after-return

2020-02-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 241902. njames93 added a comment. - new line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73841/new/ https://reviews.llvm.org/D73841 Files: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp

[PATCH] D73843: [clang-tidy] Fix false positive for cppcoreguidelines-init-variables

2020-02-01 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, kbarton, nemanjai. Herald added a project: clang. njames93 retitled this revision from "[clang-tidt] Fix false positive for cppcoreguidelines-init-variables" to "[clang-tidy] Fix false positive for cppcoreguidelines-init-varia

[PATCH] D73843: [clang-tidy] Fix false positive for cppcoreguidelines-init-variables

2020-02-01 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp:37 + optionally(hasParent(declStmt(hasParent( + cxxForRangeStmt(hasLoopVariable(varDecl().b

[PATCH] D73841: [clang-tidy] Fixed crash 44745 in readability-else-after-return

2020-02-02 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd591bdce6d62: [clang-tidy] Fixed crash 44745 in readability-else-after-return (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73841/new

[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

2020-02-02 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 241924. njames93 added a comment. - Small reformat Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73548/new/ https://reviews.llvm.org/D73548 Files: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp clan

[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

2020-02-02 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:262 + << (Var->getType().isLocalVolatileQualified() ? "volatile " : "") + << Var->getName() << FixItHint::Creat

[PATCH] D73843: [clang-tidy] Fix false positive for cppcoreguidelines-init-variables

2020-02-02 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGefcd09cea9a5: [clang-tidy] Fix false positive for cppcoreguidelines-init-variables (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7384

[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

2020-02-02 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. njames93 marked an inline comment as done. Closed by commit rG8a68c40a1bf2: [clang-tidy] Added option for disabling const qualifiers in readability… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-02-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 243545. njames93 added a comment. - Relaxed corresponding header - Added support for tag types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73413/new/ https://reviews.llvm.org/D73413 Files: clang-tools-ext

[PATCH] D73052: [clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved

2020-02-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D74374: [clang-tidy] Added check to disable bugprone-infinite-loop on known false condition

2020-02-10 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. njames93 edited the summary of this revision. njames93 added reviewers: aaron.ballman, alexfh, hokein, gribozavr2, JonasToth. njames93 added a project: clang-tools-extra. Addresses bugp

[PATCH] D74374: [clang-tidy] Added check to disable bugprone-infinite-loop on known false condition

2020-02-11 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc69ec6476806: [clang-tidy] Added check to disable bugprone-infinite-loop on known false… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D73052: [clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved

2020-02-11 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 243953. njames93 added a comment. - Simplified member expr restrictions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files: clang-tools-extra/clang-tidy/bugprone/

[PATCH] D73052: [clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved

2020-02-12 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244087. njames93 added a comment. - Made AggressiveDependentMemberLookup option Global Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files: clang-tools-extra/clang

[PATCH] D72553: [clang-tidy] Add performance-prefer-preincrement check

2020-02-13 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244555. njames93 added a comment. - Added option to enable transforming template dependent types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553 Files: clang-tools-e

[PATCH] D72553: [clang-tidy] Add performance-prefer-preincrement check

2020-02-13 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244557. njames93 added a comment. - Fix order in release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553 Files: clang-tools-extra/clang-tidy/llvm/LLVMTidyModul

[PATCH] D73052: [clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved

2020-02-14 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244601. njames93 added a comment. - Small refactor of code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files: clang-tools-extra/clang-tidy/bugprone/ReservedIdent

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D74689 Files: clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp clang-tools-extra/clang-t

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244867. njames93 added a comment. - New line and undo clang format artefact Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74689/new/ https://reviews.llvm.org/D74689 Files: clang-tools-extra/clang-tidy/perfo

[PATCH] D74463: [clang-tidy] Add new check avoid-adjacent-unrelated-parameters-of-the-same-type

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I have a feeling this check is going to throw so many false positives that it'll be too noisy to run on any real codebase. There should be a way to silence this when it is undesired like in the example for `int max(int a, int b);`. A possible solution could be based o

[PATCH] D74463: [clang-tidy] Add new check avoid-adjacent-unrelated-parameters-of-the-same-type

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidAdjacentParametersOfTheSameTypeCheck.cpp:18 +namespace cppcoreguidelines { +// FIXME: Make sure this matcher only accepts functions with minimum 2 +// parameters njam

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I have a feeling this check should be called something along the lines of bugprone-suspicous-include. Comment at: clang-tools-extra/clang-tidy/misc/NoIncludeCPPCheck.cpp:62 + Check.diag(HashLoc, "suspicious #include") + << FixItHint::Cre

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/NoIncludeCPPCheck.cpp:11-13 +#include "clang/ASTMatchers/ASTMatchFinder.h" + +using namespace clang::ast_matchers; You don't need to include or use the AST matchers in a preprocessor on

[PATCH] D74463: [clang-tidy] Add new check avoid-adjacent-unrelated-parameters-of-the-same-type

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D74463#1878290 , @vingeldal wrote: > I am pretty sure that an option to allow short names would cause a > relatively big hit on performance (relative to how it runs without the > option) for this check while also potentially

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.cpp:43 + +void SuspiciousIncludePPCallbacks::InclusionDirective( +SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, This function is us

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244939. njames93 added a comment. - Added check if size() method is const for range loops - Optimised FixItHint creation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74689/new/ https://reviews.llvm.org/D74689

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244952. njames93 added a comment. - Moved const size method check to matcher Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74689/new/ https://reviews.llvm.org/D74689 Files: clang-tools-extra/clang-tidy/perf

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D74689#1879065 , @hokein wrote: > Thanks for the patch. May I know the motivation of this patch? Personally, > I'd be conservative of exposing too many options. I was using custom classes with a different naming convention w

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 245115. njames93 added a comment. - Added support for converting loops over c style arrays Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74689/new/ https://reviews.llvm.org/D74689 Files: clang-tools-extra/c

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 245116. njames93 added a comment. - Small nit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74689/new/ https://reviews.llvm.org/D74689 Files: clang-tools-extra/clang-tidy/performance/InefficientVectorOperat

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 245240. njames93 added a comment. - Better template support - Removed excess code - Refactor alot of the check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74689/new/ https://reviews.llvm.org/D74689 Files:

[PATCH] D72553: [clang-tidy] Add performance-prefer-preincrement check

2020-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238740. njames93 added a comment. - Streamlined replacement application Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553 Files: clang-tools-extra/clang-tidy/llvm/LLVM

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238753. njames93 added a comment. - added few more functions, fix format error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llvm.org/D72488 Files: clang-tools-extra/clang-tidy/ce

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2020-01-17 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf9c46229e4ac: [clang-tidy] Disable Checks on If constexpr statements in template… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71980

[PATCH] D72448: [clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

2020-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238764. njames93 added a comment. - Updated to trunk, fix release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72448/new/ https://reviews.llvm.org/D72448 Files: clang-tools-extra/clang-tidy/readabili

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238775. njames93 marked an inline comment as done. njames93 added a comment. - Fix If stmt and optimise building function name list Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llvm

[PATCH] D73052: [clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved

2020-01-20 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. njames93 retitled this revision from "First Draft" to "[clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved". njames93 added reviewers: aaron.ballman,

[PATCH] D73052: [clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved

2020-01-20 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239150. njames93 added a comment. - replace auto when type isnt explicit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files: clang-tools-extra/clang-tidy/utils/Re

<    12   13   14   15   16   17   18   19   20   21   >