[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In D81272#2218090 , @baloghadamsoftware wrote: > In D81272#2218050 , @aaron.ballman > wrote: >

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D81272#2218173 , @whisperity wrote: > In D81272#2218050 , @aaron.ballman > wrote: > >> Thanks to the new info, I think the check basically LGTM. Can you add some >> negative tests

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. In D81272#2218246 , @whisperity wrote: > In D81272#2218175 , @aaron.ballman > wrote: > >> While I agree with your observation about data and flow

[PATCH] D85612: [Sema] Use proper integral cast for an enumerate with a fixed bool type

2020-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for the fix! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85612/new/ https://reviews.llvm.org/D85612 ___ cf

[PATCH] D80514: [clang-tidy] modernize-use-trailing-return-type support for C++20 concepts and decltype

2020-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit on your behalf in 345053390ac17dd4a2e759de9e0e24c2605035db , thank you for the patch! Comment at: clang-tools-extra/clang-tidy/

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1288 +def Likely : StmtAttr { + let Spellings = [CXX11<"", "likely", 201803>]; + let Documentation = [LikelihoodDocs]; Mordante wrote: > aaron.ballman wrote: > > Hmm, I'm on the

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-08-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1288 +def Likely : StmtAttr { + let Spellings = [CXX11<"", "likely", 201803>]; + let Documentation = [LikelihoodDocs]; Mordante wrote: > Mordante wrote: > > aaron.ballman wrote:

[PATCH] D31130: B32239 clang-tidy should not warn about array to pointer decay on system macros

2020-08-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D31130#2220729 , @fiesh wrote: > Ping everybody? This is a rather important issue I think since it makes > clang-tidy not usable in a lot of cases, and the fix would be all done. > Please let's get this merged! Sorry

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-08-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/attr-likelihood.cpp:101 +} +#endif Quuxplusone wrote: > aaron.ballman wrote: > > Mordante wrote: > > > aaron.ballman wrote: > > > > Mordante wrote: > > > > > Quuxplusone wrote: > > > > > > I'd li

[PATCH] D79236: [docs] Regenerate DiagnosticsReference.rst

2020-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D79236#2018190 , @rsandifo-arm wrote: > OK, I'll leave the file as-is in that case. I think it's preferable to commit the file in its updated state so that the public documentation is kept up to date rather than being

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2755-2756 +def warn_nomerge_attribute_ignored_in_stmt: Warning< + "%0 attribute is ignored because there exists no call expression inside the " + "statement">; def err_nsobject_at

[PATCH] D79334: [clang-tidy]: Add cert-str34-c alias for bugprone-signed-char-misuse.

2020-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.cpp:33 + CharTypdefsToIgnoreList(Options.get("CharTypdefsToIgnore", "")), + CertSTR34C(Options.get("CertSTR34C", false)) {} Same request for t

[PATCH] D76646: Rename/refactor isIntegerConstantExpression to getIntegerConstantExpression

2020-05-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from the formatting nits. I think this is a nice cleanup, thanks! Comment at: clang/include/clang/AST/Expr.h:503 - /// isIntegerConstantExpr - Ret

[PATCH] D79334: [clang-tidy]: Add cert-str34-c alias for bugprone-signed-char-misuse.

2020-05-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from some small nits with the documentation. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-signed-char-misuse.rst:117 + + When non-

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

2020-05-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In D76083#2026375 , @jranieri-grammatech wrote: > Ping? It sounds like the consensus is to commit this as-is and, if there's a > negativ

[PATCH] D79477: [clang-tidy] Add --use-color command line option and UseColor option to control colors in diagnostics

2020-05-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.h:130 + + /// Use colors in diagnostics. If missing, colors will be used if standard + /// output is connected to a terminal. hokein wrote: > nit: ... wil be used if

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

2020-05-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.h:44 + virtual void storeCheckOptions(ClangTidyOptions::OptionMap &Opts) {} + njames93 wrote: > aaron.ballman wrote: > > I'd appreciate some comments here

[PATCH] D46317: [clang-tidy] New check bugprone-map-subscript-operator-lookup

2020-05-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D46317#2023406 , @khuttun wrote: > Any comments on this? Is this checker something that could be part of > clang-tidy? Thank you for posting some of the diagnostics found by the check, that was really helpful informati

[PATCH] D46317: [clang-tidy] New check bugprone-map-subscript-operator-lookup

2020-05-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D46317#2027330 , @khuttun wrote: > In D46317#2027071 , @aaron.ballman > wrote: > > > In D46317#2023406 , @khuttun wrote: > > > > > Any comm

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

2020-05-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052

[PATCH] D73037: Add a way to set traversal mode in clang-query

2020-05-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D73037#1839391 , @aaron.ballman wrote: > There should also be a mention of this in the release notes (especially if > the default behavior winds up changing). It looks like none of the comments in the review have not b

[PATCH] D72531: Set traversal explicitly where needed in tests

2020-05-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D72531#1845686 , @shafik wrote: > I was looking at the changes to `ASTImporterTest.cpp` and it not obvious to > me how you determined where it was needed. Some of the changes were reasonably obvious to me because they i

[PATCH] D72532: Make the ExprMutationAnalyzer explicit about how it traverses the AST

2020-05-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, assuming that this causes existing tests cover the changes so we don't need new tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D72534: Change default traversal in AST Matchers to ignore invisible nodes

2020-05-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from some documentation nits. Comment at: clang/docs/ReleaseNotes.rst:255 + This means that many uses of the ``ignoringImplicit()`` and similar matc

[PATCH] D72530: Set traversal explicitly where needed in clang-tidy

2020-05-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The changes here look reasonable, but can some of this code be simplified to use the default behavior and less complex matchers that don't have to carefully ignore implicit nodes? This would demonstrate that the feature really is an improvement over the status quo

[PATCH] D78508: [Clang] Allow long as size_t printf argument on 32-bit Windows platforms.

2020-05-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D78508#2038793 , @amccarth wrote: > I'll re-iterate my opinion that the casts currently required to bypass the > warnings are useful (e.g., if you ever want to port the code to 64-bit). > There are lots of places where

[PATCH] D72531: Set traversal explicitly where needed in tests

2020-05-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/unittests/Tooling/StencilTest.cpp:63 ASTContext &Context = AstUnit->getASTContext(); - auto Matches = ast_matchers::match(wrapMatcher(Matcher), Context); + auto Matches = ast_matchers::match( + traverse(ast_type_tra

[PATCH] D80054: [ASTMatchers] Added BinaryOperator hasOperands matcher

2020-05-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80054/new/ https://reviews.llvm.org/D80054

[PATCH] D72530: Set traversal explicitly where needed in clang-tidy

2020-05-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In D72530#2040521 , @steveire wrote: > In D72530#2038561 , @aaron.ballman > wrote: > > > The cha

[PATCH] D78508: [Clang] Allow long as size_t printf argument on 32-bit Windows platforms.

2020-05-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D78508#2041432 , @hans wrote: > Doing special handling for SIZE_T, as opposed to long in general, on Windows > as Richard suggests seems reasonable to me. I would be fine with this so long as it doesn't allow `%zu` to m

[PATCH] D72531: Set traversal explicitly where needed in tests

2020-05-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/unittests/Tooling/StencilTest.cpp:63 ASTContext &Context = AstUnit->getASTContext(); - auto Matches = ast_matchers::match(wrapMatche

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39722#933699, @a.sidorin wrote: > Hello Takafumi, > > This is almost OK to me but there is an inline comment we need to resolve in > order to avoid Windows buildbot failures. > In addition, as Gabor pointed, when we add a new matcher,

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39722#933838, @xazax.hun wrote: > In https://reviews.llvm.org/D39722#933828, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D39722#933699, @a.sidorin wrote: > > > > > Hello Takafumi, > > > > > > This is almost OK to me but there

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/fuchsia/DefaultArgumentsCheck.cpp:35-38 +SourceRange RemovalRange( + Lexer::getLocForEndOfToken(D->getLocation(), 0, +*Result.SourceManager, Result.Context->getLangOpts()), + D->get

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

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D30610#934452, @malcolm.parsons wrote: > I'd like an `AllowDeletedCopyFunctions` option that allows move and > destructor functions to be missing when copying is disabled. > > struct A { > A(const A&) = delete; > A& operator=(c

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

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D30610#934704, @malcolm.parsons wrote: > In https://reviews.llvm.org/D30610#934617, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D30610#934452, @malcolm.parsons wrote: > > > > > I'd like an `AllowDeletedCopyFunctions` option th

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:553 + EXPECT_TRUE(testImport("template struct declToImport {" + " void m() { __is_pod(T); };" + "};" Drop the spurious semicolon a

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. In https://reviews.llvm.org/D39722#934781, @tk1012 wrote: > Hello Aaron, > > I remove the semicolon. > > > Is this type actually correct for C++? > > Yes, it is. > clang generates the AST for `declToImport` struct like this. >

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39722#934783, @aaron.ballman wrote: > In https://reviews.llvm.org/D39722#934781, @tk1012 wrote: > > > Hello Aaron, > > > > I remove the semicolon. > > > > > Is this type actually correct for C++? > > > > Yes, it is. > > clang generates

[PATCH] D40448: Add a printing policy for AST dumping

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. The AST dump functionality does not currently make use of a printing policy, so when dumping C++ code, you will see `_Bool`, `struct Foo` and other C-isms in the output. This patch adds a `PrintingPolicy` object to the AST dumper to get slightly improved out

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

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D30610#934891, @malcolm.parsons wrote: > I have 1000s of warnings from this check. > > A lot of them are about google tests: > warning: class 'Foo_Bar_Test' defines a copy constructor and a copy > assignment operator but does not define

[PATCH] D39913: [ObjC] warn about availability attributes missing from a method's declaration when they're specified for a method's definition

2017-11-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added inline comments. This revision now requires changes to proceed. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2921 +def warn_availability_on_implementation_not_interface : Warning< + "method declarati

[PATCH] D40225: Add -std=c17 as a flag

2017-11-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping https://reviews.llvm.org/D40225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39665: Support __has_c_attribute

2017-11-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping https://reviews.llvm.org/D39665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D15935: Improve diagnostics for literal conversion to Boolean

2017-11-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 124308. aaron.ballman added a comment. Ping. Rebased on ToT. https://reviews.llvm.org/D15935 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaChecking.cpp test/Analysis/casts.c test/CXX/d

[PATCH] D18768: Refactoring attribute subject diagnostics

2017-11-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I had the chance to finalize this long-standing review by fixing up the remaining test cases and removing the unused enumerators from AttributeList.h. I've commit in r319002 (but cannot close the review because the "Accept" didn't happen). https://reviews.llvm.o

[PATCH] D33563: Track whether a unary operation can overflow

2017-11-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 124320. aaron.ballman added a comment. Rebased against ToT, ping. https://reviews.llvm.org/D33563 Files: include/clang/AST/Expr.h lib/AST/ASTDumper.cpp lib/AST/ASTImporter.cpp lib/AST/ExprConstant.cpp lib/CodeGen/CGExprScalar.cpp lib/CodeG

[PATCH] D40487: [clang-tidy] Move checks from misc- to performance-

2017-11-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D40487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D39857: [AMDGPU] Late parsed / dependent arguments for AMDGPU kernel attributes

2017-11-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. Please add test cases for this new functionality. Comment at: lib/CodeGen/TargetInfo.cpp:7665 +static llvm::APSInt getConstexprInt(const Expr *E, cons

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from one small nit with the test file missing a trailing newline. Comment at: test/clang-tidy/fuchsia-default-arguments.cpp:82 +} \ No newline at end

[PATCH] D40505: [clang-tidy] Ignore ExprWithCleanups when looking for else-after-throw

2017-11-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM with a minor formatting nit. Comment at: test/clang-tidy/readability-else-after-return.cpp:7 + ~string(); +}; +} Indentation is incor

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for the nit fix. If you'd like me to commit this on your behalf, just let me know. https://reviews.llvm.org/D40108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit in r319225. https://reviews.llvm.org/D40108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40574: Bounds check argument_with_type_tag attribute.

2017-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7922-7925 +def err_type_tag_out_of_range : Error< + "type tag index %0 is greater than the number of arguments specified">; +def err_arg_tag_out_of_range : Error< + "argument tag index %

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:58 + // Interfaces should have exclusively pure methods. + for (auto method : Node->methods()) { +if (method->isUserProvided() && !method->isPure()) { Eugene.Ze

[PATCH] D40611: Add has definition AST matcher

2017-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Aside from a minor commenting nit, LGTM! Do you need me to commit this on your behalf? (If so, I can take care of the commenting fix.) Comment at: include/clan

[PATCH] D40611: Add has definition AST matcher

2017-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Commit in r319360 https://reviews.llvm.org/D40611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40574: Bounds check argument_with_type_tag attribute.

2017-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Thanks, LGTM! https://reviews.llvm.org/D40574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D40625: Harmonizing attribute GNU/C++ spellings

2017-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. Herald added subscribers: kristof.beyls, Anastasia, mehdi_amini, aemerson. Based on discussions at the WG21 meeting in Albuquerque and follow-up email discussions, I believe the correct approach to exposing attributes from Clang is to provide them with GNU-st

[PATCH] D40574: Bounds check argument_with_type_tag attribute.

2017-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In https://reviews.llvm.org/D40574#939693, @mattd wrote: > Thanks for the approval Aaron. I do not have commit access, would you mind > submitting this on my behalf? Happy to do so -- I've commit in r319383, thank you for the

[PATCH] D40625: Harmonizing attribute GNU/C++ spellings

2017-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: dcoughlin, sbaranga, jmolloy. aaron.ballman added a comment. Added @dcoughlin for opinions about the static analyzer, added @sbaranga and @jmolloy for questions about NEON. Comment at: include/clang/Basic/Attr.td:602 def AnalyzerNoReturn : Inh

[PATCH] D40448: Add a printing policy for AST dumping

2017-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping. https://reviews.llvm.org/D40448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38921: [analyzer] LoopUnrolling: update the matched assignment operators

2017-12-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Aside from a request for another test, the matcher parts LGTM. Comment at: unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:1992 + EXPECT_TRUE(matches("void x() { int a; a &= 3; }", AsOperator)); + EXPECT_TRUE(notMatches("void x() { int a; if(

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:295 + unsigned DiagID, const ClangTidyContext &Context) { + const auto NolintIndex = Line.find(NolintMacro); + if (NolintIndex != StringRef::npos) {

[PATCH] D15406: Add warning for attribute-cleanup on function parameter.

2017-12-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I committed a different fix for this in r319555. https://reviews.llvm.org/D15406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D40625: Harmonizing attribute GNU/C++ spellings

2017-12-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:602 def AnalyzerNoReturn : InheritableAttr { - let Spellings = [GNU<"analyzer_noreturn">]; + let Spellings = [Clang<"analyzer_noreturn">]; let Documentation = [Undocumented]; dcoug

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This feature should probably be mentioned in the release notes. https://reviews.llvm.org/D40671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-12-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:35 + StringRef Name = Node->getIdentifier()->getName(); + auto Pair = InterfaceMap.find(Name); + if (Pair == InterfaceMap.end()) Don't use `auto` as the type is no

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-12-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:35 + StringRef Name = Node->getIdentifier()->getName(); + auto Pair = InterfaceMap.find(Name); + if (Pair == InterfaceMap.end()) Eugene.Zelenko wrote: > aaron.ball

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:60 + // To be an interface, all base classes must be interfaces as well. + for (const auto &I : Node->bases()) { +const auto *Ty = I.getType()->getAs(); julieho

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:299 +size_t BracketIndex = NolintIndex + NolintMacro.size(); +// Check if the specific checks are specified in brackets +if (BracketIndex < Line.size() && Line[BracketIndex] ==

[PATCH] D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test

2017-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I would like to see the large test case added back in -- it was demonstrating a real problem with the code and it would be good to ensure we don't regress that behavior again in the future. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40737

[PATCH] D39665: Support __has_c_attribute

2017-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping https://reviews.llvm.org/D39665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40225: Add -std=c17 as a flag

2017-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping https://reviews.llvm.org/D40225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Aside from a minor commenting nit, this LGTM. Thanks! Comment at: docs/clang-tidy/index.rst:280 +lint-command +lint-command lint-args +

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: docs/clang-tidy/index.rst:280 +lint-command +lint-command lint-args + xgsa wrote: > aaron.ballman wrote: > > This should have a subscript `opt` following `lint-args` to denote that the > > args are optiona

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ReplaceUncaughtExceptionCheck.cpp:59 + if (!BeginLoc.isMacroID()) { +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s");

[PATCH] D40225: Add -std=c17 as a flag

2017-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 125407. aaron.ballman added a comment. Rebased on ToT and given more context. https://reviews.llvm.org/D40225 Files: include/clang/Basic/LangOptions.def include/clang/Frontend/LangStandard.h include/clang/Frontend/LangStandards.def lib/Fronten

[PATCH] D40625: Harmonizing attribute GNU/C++ spellings

2017-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:602 def AnalyzerNoReturn : InheritableAttr { - let Spellings = [GNU<"analyzer_noreturn">]; + let Spellings = [Clang<"analyzer_noreturn">]; let Documentation = [Undocumented]; dcoug

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-12-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/fuchsia-multiple-inheritance.cpp:48 +}; + +// Inherits from multiple concrete classes. juliehockett wrote: > aaron.ballman wrote: > > The virtual base test cases I was thinking of were: > > ``` > >

[PATCH] D40813: [clang-tidy] Adding Fuchsia checker for virtual inheritance

2017-12-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/fuchsia/FuchsiaTidyModule.cpp:28-29 "fuchsia-default-arguments"); +CheckFactories.registerCheck( +"fuchsia-virtual-inheritance"); } Formatting looks off here. ==

[PATCH] D40829: [clang-tidy] adjust cppcoreguidelines-owning-memory documentation

2017-12-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. This is reasonable, though if the list starts getting longer, we should consider trying to fix the bug rather than enumerate them. Comment at: docs/clang-tidy/

[PATCH] D40813: [clang-tidy] Adding Fuchsia checker for virtual inheritance

2017-12-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/fuchsia-virtual-inheritance.cpp:30 +class D : public B, public C { + // CHECK-MESSAGES: [[@LINE-1]]:1: warning: virtual inheritance is disallowed [fuchsia-virtual-inheritance] + // CHECK-NEXT: class C : public B,

[PATCH] D40895: Ignore pointers to incomplete types when diagnosing misaligned addresses

2017-12-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you! https://reviews.llvm.org/D40895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D40625: Harmonizing attribute GNU/C++ spellings

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 4 inline comments as done. aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1218-1228 def NeonPolyVectorType : TypeAttr { - let Spellings = [GNU<"neon_polyvector_type">]; + let Spellings = [Clang<"neon_polyvector_type">]; let

[PATCH] D40625: Harmonizing attribute GNU/C++ spellings

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 126015. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Updated based on review feedback. This patch leaves off attributes with custom parsing, as well as `analyzer_noreturn`, so that we can handle them as special cases.

[PATCH] D40225: Add -std=c17 as a flag

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D40225#944113, @aaron.ballman wrote: > Rebased on ToT and given more context. Ping. I'd like to get this in before the 6.0 branch. https://reviews.llvm.org/D40225 ___ cfe-commits mailing

[PATCH] D40448: Add a printing policy for AST dumping

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 126016. aaron.ballman added a comment. Ping. Added more context to the patch. https://reviews.llvm.org/D40448 Files: include/clang/AST/Type.h lib/AST/ASTDumper.cpp lib/AST/TypePrinter.cpp lib/StaticAnalyzer/Checkers/PaddingChecker.cpp test/C

[PATCH] D39665: Support __has_c_attribute

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Commit in r320088. https://reviews.llvm.org/D39665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40225: Add -std=c17 as a flag

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Commit in r320089. https://reviews.llvm.org/D40225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. In https://reviews.llvm.org/D40671#947762, @xgsa wrote: > So can this patch be submitted? Should I do something to make it happen? There are still some outstanding con

[PATCH] D40937: [clang-tidy] Infinite loop checker

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: dcoughlin. aaron.ballman added a subscriber: dcoughlin. aaron.ballman added a comment. I share the concerns that @Eugene.Zelenko brought up regarding this not being in the analyzer. This is a path sensitive problem that I'm not certain clang-tidy is the best home

[PATCH] D41016: [Sema] Fix crash in unused-lambda-capture warning for VLAs

2017-12-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rC Clang https://reviews.llvm.org/D41016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ReplaceUncaughtExceptionCheck.cpp:59 + if (!BeginLoc.isMacroID()) { +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s");

[PATCH] D40625: Harmonizing attribute GNU/C++ spellings

2017-12-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:602 def AnalyzerNoReturn : InheritableAttr { - let Spellings = [GNU<"analyzer_noreturn">]; + let Spellings = [Clang<"analyzer_noreturn">]; let Documentation = [Undocumented]; alexf

[PATCH] D40854: [clang-tidy] WIP implement cppcoreguidelines check for mixed integer arithmetic

2017-12-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The "enforcement" listed on the C++ Core Guidelines is very unhelpful, so it might be worth bringing it up as an issue on their bug tracker. ES.100 basically says "you know what we mean, wink wink" as enforcement and doesn't give any guidance as to what is safe or

[PATCH] D41064: Suppress -Wuser-defined-literals for and

2017-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think that it would be more appropriate to fix this in Clang rather than libc++. For instance, we don't want libstdc++ to have to silence our same diagnostic here. Repository: rCXX libc++ https://reviews.llvm.org/D41064 ___

[PATCH] D41056: [clang-tidy] New check misc-uniqueptr-release-unused-retval

2017-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D41056#951083, @alexfh wrote: > In https://reviews.llvm.org/D41056#950605, @khuttun wrote: > > > In https://reviews.llvm.org/D41056#950570, @Eugene.Zelenko wrote: > > > > > May be //bugprone// is better module then //misc//? > > > > > > M

[PATCH] D41080: Don't trigger -Wuser-defined-literals for system headers

2017-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This is missing a test case. Repository: rC Clang https://reviews.llvm.org/D41080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41080: Don't trigger -Wuser-defined-literals for system headers

2017-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM (wait for a day or so for @rsmith to respond in case he disagrees). Repository: rC Clang https://reviews.llvm.org/D41080 __

<    18   19   20   21   22   23   24   25   26   27   >