Re: [PATCH] D12031: Const std::move() argument ClangTidy check

2015-11-25 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Awesome! Thank you for the new check! There are a couple of nits, but I'll fix these before submitting the patch. Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:42

[clang-tools-extra] r254070 - [clang-tidy] Const std::move() argument ClangTidy check

2015-11-25 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Nov 25 09:56:11 2015 New Revision: 254070 URL: http://llvm.org/viewvc/llvm-project?rev=254070&view=rev Log: [clang-tidy] Const std::move() argument ClangTidy check ClangTidy check for finding cases when std::move() is called with const or trivially copyable arguments, tha

Re: [PATCH] D12031: Const std::move() argument ClangTidy check

2015-11-25 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL254070: [clang-tidy] Const std::move() argument ClangTidy check (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D12031?vs=41061&id=41146#toc Repository: rL LLVM http://reviews

Re: [PATCH] D12031: Const std::move() argument ClangTidy check

2015-11-25 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Missed a couple of comments. Anyway, I'm fixing these myself as a part of commit. Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:42 @@ +41,3 @@ +auto MoveRange = CharSourceRange::getCharRange(CallMove->getSourceRange()); +auto FileMove

[clang-tools-extra] r254074 - [clang-tidy] Fix a typo in my latest commit.

2015-11-25 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Nov 25 10:38:22 2015 New Revision: 254074 URL: http://llvm.org/viewvc/llvm-project?rev=254074&view=rev Log: [clang-tidy] Fix a typo in my latest commit. Modified: clang-tools-extra/trunk/clang-tidy/misc/MoveConstantArgumentCheck.cpp Modified: clang-tools-extra/trunk/

[clang-tools-extra] r254216 - [clang-tidy] google-explicit-constructor: improve the warning message

2015-11-27 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Nov 27 20:25:02 2015 New Revision: 254216 URL: http://llvm.org/viewvc/llvm-project?rev=254216&view=rev Log: [clang-tidy] google-explicit-constructor: improve the warning message Also switch some more tests to %check_clang_tidy. Modified: clang-tools-extra/trunk/clang

Re: [PATCH] D14824: [PATCH] Add clang-tidy check for static or thread_local objects where construction may throw

2015-11-30 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Comment at: clang-tidy/utils/Matchers.h:26 @@ -25,1 +25,3 @@ +AST_MATCHER(FunctionDecl, isNoThrow) { + const auto *FnTy = Node.getType()->getAs(); Anyth

Re: r254143 - Fix for merging decls in pragma weak

2015-12-03 Thread Alexander Kornienko via cfe-commits
Please fix or revert this patch. On Wed, Dec 2, 2015 at 6:07 PM, Joerg Sonnenberger via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Thu, Nov 26, 2015 at 09:34:31AM -, Alexander Musman via cfe-commits > wrote: > > Author: amusman > > Date: Thu Nov 26 03:34:30 2015 > > New Revision: 2

r254605 - Revert "Fix for merging decls in pragma weak Calling CheckFunctionDeclaration so that 2 decls for the 'weak' are merged. Differential Revision: http://reviews.llvm.org/D13048"

2015-12-03 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Dec 3 05:37:28 2015 New Revision: 254605 URL: http://llvm.org/viewvc/llvm-project?rev=254605&view=rev Log: Revert "Fix for merging decls in pragma weak Calling CheckFunctionDeclaration so that 2 decls for the 'weak' are merged. Differential Revision: http://reviews.llvm

Re: r254143 - Fix for merging decls in pragma weak

2015-12-03 Thread Alexander Kornienko via cfe-commits
I've reverted the commit in r254605. On Thu, Dec 3, 2015 at 11:20 AM, Alexander Kornienko wrote: > Please fix or revert this patch. > > On Wed, Dec 2, 2015 at 6:07 PM, Joerg Sonnenberger via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Thu,

Re: [PATCH] D15203: clang-tidy readability identifiers: better diagnostic location

2015-12-04 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thank you! http://reviews.llvm.org/D15203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

Re: [PATCH] D15030: [clang-tidy] add check cppcoreguidelines-pro-bounds-constant-array-index

2015-12-04 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Sorry for the delay. Missed this patch somehow. A couple of comments in addition to what Aaron wrote. Comment at: clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h:25 @@ +24,3 @@ +class ProBoundsConstantArrayIndexCheck : public ClangTidyChe

Re: [PATCH] D12761: MPI-Checker patch for Clang Static Analyzer

2015-12-07 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Before I can tell you whether this checker makes sense as a clang-tidy check, can you please explain to me (don't want to deduce this from the code) what specific issues does this check target? Is this limited to a set of AST patterns or is there (or is going to be) some

Re: [PATCH] D12761: MPI-Checker patch for Clang Static Analyzer

2015-12-07 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. The only conclusion I can make is that this patch is huge and very inconvenient to review. I'm fine with moving the AST-based checks to clang-tidy, but I strongly prefer each separate check to go in a separate patch. http://reviews.llvm.org/D12761 ___

Re: [PATCH] D12761: MPI-Checker patch for Clang Static Analyzer

2015-12-08 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D12761#304651, @Alexander_Droste wrote: > @Anna > Thanks for having a look once more! I will submit these parts as separate > patches. > > @Alexander > This should be only about the AST-based checks, as Anna takes care of the > path-sensitiv

Re: [PATCH] D12359: New warning -Wnonconst-parameter when a pointer parameter can be const

2015-12-08 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Wow, that's a patch with history ;) My first comment is that the `misc` module mostly consists of checks that are safe to turn on by default. This check does not necessarily meet this bar, so I'd better move it to `readability`. You could also send a new patch, since the

Re: [PATCH] D15332: new clang-tidy checker readability-non-const-parameter

2015-12-08 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:20 @@ +19,3 @@ +void NonConstParameterCheck::registerMatchers(MatchFinder *Finder) { + // TODO: This checker doesn't handle C++ to start with. There are problems + // for example with par

Re: [PATCH] D15087: [PATCH] Add CERT license clarification

2015-12-08 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Daniel, is the proposed solution fine? http://reviews.llvm.org/D15087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12761: MPI-Checker patch for Clang Static Analyzer

2015-12-09 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D12761#304823, @Alexander_Droste wrote: > Ah ok, I wasn't aware that clang-tidy is not restricted to checks which > verify stylistic issues. > What makes it more convenient to integrate the checks in clang-tidy? Is it > how the AST-Matcher >

Re: [PATCH] D15332: new clang-tidy checker readability-non-const-parameter

2015-12-09 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Please add tests with templates and macros. Please also run this on LLVM/Clang to ensure a) it doesn't crash; b) the number of warnings is sane; c) a representative sample of warnings doesn't contain false positives. http://reviews.llvm.org/D15332 ___

Re: [PATCH] D15087: [PATCH] Add CERT license clarification

2015-12-10 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. Just to be in a good company ;) LGTM http://reviews.llvm.org/D15087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r255243 - [clang-tidy] Sort includes case-sensitively.

2015-12-10 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Dec 10 06:24:19 2015 New Revision: 255243 URL: http://llvm.org/viewvc/llvm-project?rev=255243&view=rev Log: [clang-tidy] Sort includes case-sensitively. The motivation is: 1. consistency with clang-format, vim :sort etc. 2. we don't want the tools to depend on the cur

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-10 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. That's quite a surprising behavior. Looks like a bug in the library implementation (or in the standard) to me. But the check is awesome. Thank you! Comment at: clang-tidy/misc/StringAssignmentCheck.cpp:21 @@ +20,3 @@ +void StringAssignmentCheck::registe

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-10 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. BTW, Richard, is the possibility of assignment of an integer to a std::string a bug in the standard? http://reviews.llvm.org/D15411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

Re: [PATCH] D15030: [clang-tidy] add check cppcoreguidelines-pro-bounds-constant-array-index

2015-12-10 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. One more nit. Leaving the rest to Aaron, since most of the comments were his. Comment at: clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h:25 @@ +24,3 @@ +class ProBoundsConstantArrayIndexCheck : public ClangTidyCheck { + std::string GslHe

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-10 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/StringIntegerAssignmentCheck.cpp:45 @@ +44,3 @@ + + auto Diag = diag(Loc, "probably missing to_string operation"); + if (!Loc.isMacroID() && getLangOpts().CPlusPlus11) { I'd expand the message with an exp

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-10 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D15411#307274, @aaron.ballman wrote: > In http://reviews.llvm.org/D15411#307030, @alexfh wrote: > > > BTW, Richard, is the possibility of assignment of an integer to a > > std::string a bug in the standard? > > > This is the result of: > > bas

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-14 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/StringIntegerAssignmentCheck.cpp:20 @@ +19,3 @@ +AST_MATCHER(QualType, isAnyCharacter) { return Node->isAnyCharacterType(); } +} // namespace + I prefer `isAnyCharacter` for consistency with `isInteger`. I'

Re: [PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

2015-12-14 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good with a few nits. Thank you for the new awesome check! Comment at: clang-tidy/misc/StringIntegerAssignmentCheck.cpp:74 @@ +73,3 @@ +return; + } else if (IsLite

Re: [PATCH] D15528: Teach clang-tidy how to -Werror checks.

2015-12-15 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Jonathan, can you explain what specific use case does this patch address? Why one severity level of native clang-tidy warnings (the current situation) is not enough, and two levels a

Re: [PATCH] D15528: Teach clang-tidy how to -Werror checks.

2015-12-15 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D15528#311053, @jroelofs wrote: > In http://reviews.llvm.org/D15528#311019, @alexfh wrote: > > > Jonathan, can you explain what specific use case does this patch address? > > Why one severity level of native clang-tidy warnings (the current > >

[clang-tools-extra] r255758 - [clang-tidy] Fix a crash in misc-new-delete-overloads

2015-12-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Dec 16 04:58:14 2015 New Revision: 255758 URL: http://llvm.org/viewvc/llvm-project?rev=255758&view=rev Log: [clang-tidy] Fix a crash in misc-new-delete-overloads Modified: clang-tools-extra/trunk/clang-tidy/misc/NewDeleteOverloadsCheck.cpp clang-tools-extra/trunk/

[clang-tools-extra] r255765 - [clang-tidy] Don't use diag() for debug output

2015-12-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Dec 16 07:19:08 2015 New Revision: 255765 URL: http://llvm.org/viewvc/llvm-project?rev=255765&view=rev Log: [clang-tidy] Don't use diag() for debug output Modified: clang-tools-extra/trunk/clang-tidy/readability/BracesAroundStatementsCheck.cpp Modified: clang-tools

Re: [PATCH] D15571: Add namespace support to add_new_check.py

2015-12-16 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/add_new_check.py:99 @@ -97,1 +98,3 @@ + 'check_name_dashes': check_name_dashes, + 'namespace': module}) Thinking about this once again, let's replace `namespace` with `module` for consistency. ==

Re: [PATCH] D15571: Add namespace support to add_new_check.py

2015-12-16 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good. Thank you! I'll commit the patch for you. http://reviews.llvm.org/D15571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

Re: [PATCH] D15571: Add namespace support to add_new_check.py

2015-12-16 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL255770: [clang-tidy] Add namespace support to add_new_check.py (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D15571?vs=43007&id=43008#toc Repository: rL LLVM http://reviews.

[clang-tools-extra] r255770 - [clang-tidy] Add namespace support to add_new_check.py

2015-12-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Dec 16 09:05:27 2015 New Revision: 255770 URL: http://llvm.org/viewvc/llvm-project?rev=255770&view=rev Log: [clang-tidy] Add namespace support to add_new_check.py Summary: Without namespace you can not create checks with same name in different modules Reviewers: alexfh

[clang-tools-extra] r255772 - [clang-tidy] google-readability-namespace-comments: ignore stray semicolons

2015-12-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Dec 16 09:44:42 2015 New Revision: 255772 URL: http://llvm.org/viewvc/llvm-project?rev=255772&view=rev Log: [clang-tidy] google-readability-namespace-comments: ignore stray semicolons Modified: clang-tools-extra/trunk/clang-tidy/readability/NamespaceCommentCheck.cpp

Re: [PATCH] D15528: Teach clang-tidy how to -Werror checks.

2015-12-16 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for explaining. The use case seems to be important enough to support it. And the solution seems to be good for now. A few concerns: 1. `Werrors` isn't a good name for this. The only reason why a similar thing is called `-Werror` in compilers is that they use `-

[clang-tools-extra] r255886 - Remove clang-modernize.

2015-12-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Dec 17 05:49:19 2015 New Revision: 255886 URL: http://llvm.org/viewvc/llvm-project?rev=255886&view=rev Log: Remove clang-modernize. Summary: clang-modernize transforms have moved to clang-tidy. Removing the old tool now. Reviewers: klimek Subscribers: cfe-commits Diffe

r256150 - [scan-view] replace deprecated optparse with argparse

2015-12-21 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Dec 21 06:19:13 2015 New Revision: 256150 URL: http://llvm.org/viewvc/llvm-project?rev=256150&view=rev Log: [scan-view] replace deprecated optparse with argparse Summary: scan-view migrated from optparse deprecated Python module to its replacement (argparse) and resolved

Re: [PATCH] D15370: [scan-view] replace deprecated optparse with argparse

2015-12-21 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL256150: [scan-view] replace deprecated optparse with argparse (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D15370?vs=42636&id=43358#toc Repository: rL LLVM http://reviews.l

Re: [PATCH] D15685: [clang-tidy] introducing cppcoreguidelines-enum-all-caps check

2015-12-21 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. There's already the readability-identifier-naming check that is highly configurable. It might miss the "use any naming style except for this one" functionality, but I'd prefer it to be add

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2015-12-22 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/google/DefinitionsInHeadersCheck.cpp:23 @@ +22,3 @@ +bool inHeaderFile(const SourceManager* SM, + const SourceLocation& Location) { + StringRef Filename = SM->getFilename(SM->getExpansionLoc(Location)); ---

[clang-tools-extra] r256253 - [clang-tools-extra] Text formatting

2015-12-22 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 22 11:08:57 2015 New Revision: 256253 URL: http://llvm.org/viewvc/llvm-project?rev=256253&view=rev Log: [clang-tools-extra] Text formatting Modified: clang-tools-extra/trunk/docs/index.rst Modified: clang-tools-extra/trunk/docs/index.rst URL: http://llvm.org/vie

[clang-tools-extra] r256254 - Updated year (2014-2015).

2015-12-22 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 22 11:10:34 2015 New Revision: 256254 URL: http://llvm.org/viewvc/llvm-project?rev=256254&view=rev Log: Updated year (2014-2015). Modified: clang-tools-extra/trunk/LICENSE.TXT clang-tools-extra/trunk/docs/conf.py Modified: clang-tools-extra/trunk/LICENSE.TXT

[clang-tools-extra] r256259 - [clang-tidy] Updates to documentation: formatting, titles, etc.

2015-12-22 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 22 11:36:49 2015 New Revision: 256259 URL: http://llvm.org/viewvc/llvm-project?rev=256259&view=rev Log: [clang-tidy] Updates to documentation: formatting, titles, etc. Modified: clang-tools-extra/trunk/clang-tidy/add_new_check.py clang-tools-extra/trunk/docs/c

[clang-tools-extra] r256261 - [clang-tidy] Added documentation for modernize-redundant-void-arg

2015-12-22 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 22 12:13:00 2015 New Revision: 256261 URL: http://llvm.org/viewvc/llvm-project?rev=256261&view=rev Log: [clang-tidy] Added documentation for modernize-redundant-void-arg Added: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-redundant-void-arg.rst Modifi

Re: [clang-tools-extra] r255886 - Remove clang-modernize.

2015-12-22 Thread Alexander Kornienko via cfe-commits
Sure, will do On Dec 17, 2015 6:44 PM, "Aaron Ballman" wrote: > Can you also be sure to update the release notes for this change? > > ~Aaron > > On Thu, Dec 17, 2015 at 6:49 AM, Alexander Kornienko via cfe-commits > wrote: > > Author: alexfh > > Date: T

Re: [PATCH] D15737: [clang-tidy] Preserve comments and preprocessor directives when simplifying boolean expressions

2015-12-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for the fix. See the comments inline. Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:493 @@ +492,3 @@ +const ast_matchers::MatchFinder::MatchResult &Result, SourceRange Range) { + CharSourceRange CharRange = Lexer::makeFile

Re: [PATCH] D15737: [clang-tidy] Preserve comments and preprocessor directives when simplifying boolean expressions

2015-12-28 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Thanks! Looks good with one nit. Do you need me to commit the patch for you? Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:519 @@ +518,3 @@ + + DiagnosticB

Re: [PATCH] D10021: Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers

2015-12-28 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh added a comment. I assume, Richard doesn't have svn commit access yet. I'll commit the patch for him. http://reviews.llvm.org/D10021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

r256491 - Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers

2015-12-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Dec 28 07:06:58 2015 New Revision: 256491 URL: http://llvm.org/viewvc/llvm-project?rev=256491&view=rev Log: Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers Summary: Use clang-tidy to simplify boolean conditional return values Revi

[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)

2024-07-02 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Thanks for proposing a fix! I've been hinted though that Clang may be incorrect in accepting explicit specializations of a templated static class data member in the class scope. It looks like with all the restrictions in the standard it may only be allowed to place explicit speci

[clang] [Clang][Sema] Treat explicit specializations of static data member templates declared without 'static' as static data members when diagnosing uses of 'auto' (PR #97425)

2024-07-03 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh approved this pull request. https://github.com/llvm/llvm-project/pull/97425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-09 Thread Alexander Kornienko via cfe-commits
alexfh wrote: What about this case: https://godbolt.org/z/1TsK96ao8 ? It's a reduction of one of a large number of broken builds we see after this patch. https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

2024-08-15 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Hi @a-tarasyuk, it looks like this patch introduces a couple of problems. I guess, this boils down to marking the declaration of main() invalid in case it's declared with `extern "C"`, but I may be wrong here. The first problem is a clang crash: https://gcc.godbolt.org/z/dWETErhz

[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

2024-08-16 Thread Alexander Kornienko via cfe-commits
@@ -12210,7 +12220,18 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, return Redeclaration; } -void Sema::CheckMain(FunctionDecl* FD, const DeclSpec& DS) { +void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) { + // [basic.start.main]p3 + //

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
@@ -264,6 +264,7 @@ Bug Fixes to C++ Support - Properly reject defaulted copy/move assignment operators that have a non-reference explicit object parameter. - Clang now properly handles the order of attributes in `extern` blocks. (#GH101990). - Fixed an assertion failure by p

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh approved this pull request. Looks good with one nit. https://github.com/llvm/llvm-project/pull/104594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/104594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh commented: One more comment, actually. https://github.com/llvm/llvm-project/pull/104594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/104594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
@@ -12233,7 +12233,6 @@ void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) { FD->getDeclContext()->getRedeclContext()->isTranslationUnit())) { Diag(FD->getLocation(), diag::ext_main_invalid_linkage_specification) << FD->getLanguageLinkage(); -FD-

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/104594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
@@ -122,6 +119,26 @@ namespace ns2 { extern "C++" void main() {} // ok } +#elif TEST14 +extern "C" { + int main(); // expected-warning {{'main' should not be 'extern "C"'}} +} + +extern "C" int main(); // expected-warning {{'main' should not be 'extern "C"'}} + +#elif TEST

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
@@ -264,6 +264,7 @@ Bug Fixes to C++ Support - Properly reject defaulted copy/move assignment operators that have a non-reference explicit object parameter. - Clang now properly handles the order of attributes in `extern` blocks. (#GH101990). - Fixed an assertion failure by p

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Thanks for the fix, @a-tarasyuk! Can you merge the PR or should I do this for you? https://github.com/llvm/llvm-project/pull/104594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] Avoid accessing unset optional, workaround for #100095 (PR #100408)

2024-07-24 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh created https://github.com/llvm/llvm-project/pull/100408 This is not a proper fix, but enables Clang to continue working with more libc++ runtime checks enabled. >From af5b5c114252cf1f6815b51871e2ad6436ffa723 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko D

[clang] Avoid accessing unset optional, workaround for #100095 (PR #100408)

2024-07-24 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh updated https://github.com/llvm/llvm-project/pull/100408 >From af5b5c114252cf1f6815b51871e2ad6436ffa723 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Wed, 24 Jul 2024 17:44:26 +0200 Subject: [PATCH] Avoid accessing unset optional, workaround for #100

[clang] Avoid accessing unset optional, workaround for #100095 (PR #100408)

2024-07-24 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh ready_for_review https://github.com/llvm/llvm-project/pull/100408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Avoid accessing unset optional, workaround for #100095 (PR #100408)

2024-07-24 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/100408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Avoid accessing unset optional, workaround for #100095 (PR #100408)

2024-07-24 Thread Alexander Kornienko via cfe-commits
alexfh wrote: > Can you please add a reference to #100095 in the summary so folks just > reading the git log have more context w/o going to the commit itself. > > I would like to see a more flushed out long-term plan for fixing this > properly but I think it makes sense. I've added more detai

[clang] Add a test for #100095 (PR #100556)

2024-07-25 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh created https://github.com/llvm/llvm-project/pull/100556 The test is set to XFAIL with assertions enabled. >From 09cf032759b43e8a30720be9ef2f9caf13bcb0cb Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Thu, 25 Jul 2024 13:02:38 +0200 Subject: [PATCH] Ad

[clang] Avoid accessing unset optional, workaround for #100095 (PR #100408)

2024-07-25 Thread Alexander Kornienko via cfe-commits
alexfh wrote: > ... I'd like to see at least a test added to this PR. See #100556. The test would fail with assertions enabled (thus, marked XFAIL: asserts), and when compiled against hardened libc++ (e.g. libc++ built with `-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST`). https://gith

[clang] Avoid accessing unset optional, workaround for #100095 (PR #100408)

2024-07-26 Thread Alexander Kornienko via cfe-commits
alexfh wrote: > Could we merge the test into this change? I think we could then land this as > a temporary workaround indeed. I'll keep looking into fixing this proper and > will remove the XFAIL line when appropriate. I've added the test to the change and verified it: * fails without the Sem

[clang] Avoid accessing unset optional, workaround for #100095 (PR #100408)

2024-07-26 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh closed https://github.com/llvm/llvm-project/pull/100408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add a test for #100095 (PR #100556)

2024-07-28 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh closed https://github.com/llvm/llvm-project/pull/100556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Just to confirm: is this the intentional outcome of this patch? https://gcc.godbolt.org/z/Kf9YK1qM3 ``` enum { a = 1<<12, b = (-1)<<13 }; ``` ``` :3:9: error: expression is not an integral constant expression 3 | b = (-1)<<13 | ^~~~ :3:13: note: le

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: I see. Thanks for the explanation and for the suggestion on how to fix that. Actually, the only instance I've seen, had already been fixed upstream (https://hg.openjdk.org/jdk/jdk/rev/71495d579a65), so the impact of this compiler behavior change is quite low in my part of the uni

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Now there's a different and more subtle side-effect of this patch: https://gcc.godbolt.org/z/YP3EfGern The invalid expression `1 << 59` leads to the compiler silently ignoring the in-class initializer of the static data member. https://github.com/llvm/llvm-project/pull/70307 ___

[clang-tools-extra] 8a944d8 - [clang-tidy] Add option to ignore macros in readability-function-cognitive-complexity check.

2021-04-12 Thread Alexander Kornienko via cfe-commits
Author: Jens Massberg Date: 2021-04-12T18:46:12+02:00 New Revision: 8a944d82cd14001a92ef088229041ee0fb1fd1e6 URL: https://github.com/llvm/llvm-project/commit/8a944d82cd14001a92ef088229041ee0fb1fd1e6 DIFF: https://github.com/llvm/llvm-project/commit/8a944d82cd14001a92ef088229041ee0fb1fd1e6.diff

[clang-tools-extra] 8883cb3 - Fix nits.

2021-04-12 Thread Alexander Kornienko via cfe-commits
Author: Alexander Kornienko Date: 2021-04-12T18:46:13+02:00 New Revision: 8883cb3e4004aebddf9bd0f92ea47ba897397794 URL: https://github.com/llvm/llvm-project/commit/8883cb3e4004aebddf9bd0f92ea47ba897397794 DIFF: https://github.com/llvm/llvm-project/commit

Re: [PATCH] D111109: AddGlobalAnnotations for function with or without function body.

2021-10-21 Thread Alexander Kornienko via cfe-commits
::FrontendAction::Execute() /usr/local/google/home/alexfh/work/llvm-project/clang/lib/Frontend/FrontendAction.cpp:966:7 #33 0x05c8468a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /usr/local/google/home/alexfh/work/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1030:2

[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

2024-08-16 Thread Alexander Kornienko via cfe-commits
@@ -12210,7 +12220,18 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, return Redeclaration; } -void Sema::CheckMain(FunctionDecl* FD, const DeclSpec& DS) { +void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) { + // [basic.start.main]p3 + //

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-12 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Hi @mizvekov, we started seeing crashes after this commit. I'm working on a shareable test case, but here's the assertion failure and the stack trace: ``` assert.h assertion failed at llvm-project/clang/lib/AST/TemplateName.cpp:184 in TemplateDecl *clang::TemplateName::getAsTempl

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-12 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Here's a reduced test case: https://gcc.godbolt.org/z/jxer3W39W As usual, it's hard to say if the code got invalid during automatic reduction, but it at least compiles well with clang before this commit. https://github.com/llvm/llvm-project/pull/94981

[clang] [clang] Implement transforms for DeducedTemplateName (PR #108491)

2024-09-13 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Unfortunately, the original code, from which I reduced the test case for this, still breaks (without crashing Clang though). I'm trying to come up with another test case now. https://github.com/llvm/llvm-project/pull/108491 ___ cfe-comm

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2024-09-13 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Apologies for resurrecting this old thread, but I found a problem with this patch. It seems like it makes a comparator violate strict weak ordering requirements. This manifests as an assertion failure when Clang is compiled with the corresponding libc++ check: ``` clang -O1 -c -o

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2024-09-13 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Filed #108618 https://github.com/llvm/llvm-project/pull/73662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement transforms for DeducedTemplateName (PR #108491)

2024-09-13 Thread Alexander Kornienko via cfe-commits
alexfh wrote: I could reduce the code to something that compiles with Clang before fa6580470547411667b866362941db0b02e25578, but not after it, this PR doesn't fix the issue. The example is: https://gcc.godbolt.org/z/odWYhxGxK Note that the code doesn't compile with Clang 18.1, but should compi

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-13 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Thanks! The fix resolves the crash, but the original code still doesn't compile. See https://github.com/llvm/llvm-project/pull/108491#issuecomment-2350634130 https://github.com/llvm/llvm-project/pull/94981 ___ cfe-commits mailing list c

[clang] [clang] Fix incorrect partial ordering context setting (PR #108491)

2024-09-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh approved this pull request. Thanks! This fixes the issues we've found so far, and it seems to be a quite clear correctness fix. LGTM https://github.com/llvm/llvm-project/pull/108491 ___ cfe-commits mailing list cfe-commits@li

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-16 Thread Alexander Kornienko via cfe-commits
alexfh wrote: @mizvekov another distinct compilation error after this commit (and not fixed by https://github.com/llvm/llvm-project/pull/107972 and other follow-up commits): https://gcc.godbolt.org/z/zMG5nsda3 (reduced from https://github.com/hlslibs/ac_math/blob/20bbf040834c5815b01a9ed8e523e4

[clang] Fix out-of-bounds access to std::unique_ptr (PR #111581)

2024-10-09 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh closed https://github.com/llvm/llvm-project/pull/111581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix out-of-bounds access to std::unique_ptr (PR #111581)

2024-10-08 Thread Alexander Kornienko via cfe-commits
__checker_.__in_bounds(std::__to_address(__ptr_), __i) failed: unique_ptr::operator[](index): index out of range` >From ab7e28fb704cd3a2235cb366bc39891e50f83d03 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Tue, 8 Oct 2024 22:19:07 +0200 Subject: [PATCH] Fix out-of-bounds access to

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: It was faster than I thought. The original code for case 2 is indeed invalid. Having looked carefully at the two definitions of PrintTo, I clearly see they are violating ODR. And both are originating in the internal code, so nothing specific to Eigen. Thanks again for the good ex

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Thanks for the clarification! The fact that there's code around that isn't quite following the standard, is not news, but the regular way to approach tightening the compiler is to provide an opt-out mechanism for some time (one release cycle?) in the shape of a flag or otherwise

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: > However, I suspect that the parentheses reduction and the one with a ternary > are actually the same issue - The code is IFNDR per > https://eel.is/c++draft/temp.over.link#5 > > In you last example, M*2 and the conditional with M+N after the substitution > of the default argum

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: I see. A clear diagnostic wouldn't hurt indeed. Thanks a lot for the analysis! No more concerns from our side at this point. https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

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