Re: [PATCH] D24862: Workaround ASTMatcher crashes. Added some more test cases.

2016-09-23 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D24862#550628, @ioeric wrote: > In https://reviews.llvm.org/D24862#550615, @aaron.ballman wrote: > > > Should this perhaps be fixed in the AST matchers rather than in the check > > itself? > > > I'll file bugs for the crashes, but the fi

Re: [PATCH] D24862: Workaround ASTMatcher crashes. Added some more test cases.

2016-09-23 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D24862#550646, @ioeric wrote: > Acked, and I totally agree with you :) It's just that the change in this > patch would still be valid after the underlying bugs are fixed, so I thought > it was fine to fix those bugs after this. I migh

Re: [PATCH] D24862: Workaround ASTMatcher crashes. Added some more test cases.

2016-09-23 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D24862#550665, @ioeric wrote: > Sorry for the confusion. I guess I should've been clearer in the comments and > patch summary... The changes would've been what we wanted even without the > underlying bugs and would not be reverted after

[PATCH] D24874: Fully implement the matcher for CXXCtorInitializer

2016-09-23 Thread Aaron Ballman via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: klimek, sbenza. aaron.ballman added a subscriber: cfe-commits. Herald added a subscriber: klimek. It turns out that our support for the `cxxCtorInitializer()` matcher was incomplete in that it could not be used as a top-level mat

Re: [PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D24669#548984, @vbyakovlcl wrote: > Clang 3.8 balances vector shift operand erroneous using CheckVectorOperands > which converts one of operand to the type of another. In > https://reviews.llvm.org/D21678 it was fixed by using checkVect

Re: [PATCH] D24862: Workaround ASTMatcher crashes. Added some more test cases.

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you! Comment at: change-namespace/ChangeNamespace.cpp:279-281 @@ -276,3 +278,5 @@ Finder->addMatche

Re: [PATCH] D24887: [clang-tidy] cert-err58-cpp should not apply to function scope objects

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Good catch, I will fix up the CERT rule to match the check accordingly. Thank you for this! https://reviews.llvm.org/D24887 ___

[clang-tools-extra] r282409 - Silence a false positive with the cert-err58-cpp check; now allows objects with static or thread storage duration at function block scope.

2016-09-26 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Sep 26 10:00:45 2016 New Revision: 282409 URL: http://llvm.org/viewvc/llvm-project?rev=282409&view=rev Log: Silence a false positive with the cert-err58-cpp check; now allows objects with static or thread storage duration at function block scope. Patch by Malcolm P

Re: [PATCH] D24887: [clang-tidy] cert-err58-cpp should not apply to function scope objects

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Commit in r282409 https://reviews.llvm.org/D24887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23236: When ARC is enabled, no warning will be generated when a method1. Returns 'nil' in a method that is attributed to return a 'nonnull'2. The return-statement is a ConditionalOperator

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, but please wait for @dcoughlin or @ahatanak to chime in as well. https://reviews.llvm.org/D23236 ___ cfe-commits mailing list

Re: [PATCH] D24886: Add [[clang::suppress(rule, ...)]] attribute

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. I'm generally in favor of this patch, but it's missing some pieces, like test cases. Also, I suspect we will want this attribute to also be written on types, but there

Re: [PATCH] D24892: [clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:377 @@ +376,3 @@ +else if (type->isIntegerType()) + Initializer = " = 0"; +else if (type->isFloatingType()) What about cases where a s

Re: [PATCH] D24888: [clang-tidy] Use [[clang::suppress]] with cppcoreguidelines-pro-type-reinterpret-cast

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp:25 @@ -23,2 +24,3 @@ - Finder->addMatcher(cxxReinterpretCastExpr().bind("cast"), this); + std::vector Rules{"type", "type.1", "cppcoreguidelines-pro-type-reinterpret-

Re: [PATCH] D24848: [clang-tidy] fix false-positive for cppcoreguidelines-pro-type-member-init with in-class initializers

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM with Malcom's test suggestions addressed. https://reviews.llvm.org/D24848 ___ cfe-commits mailing list cfe-commits@lists.llvm.

Re: [PATCH] D24821: [ASTMatcher] Add isStaticStorageClass matcher for varDecl and functionDecl.

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. Comment at: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h:3391 @@ +3390,3 @@ +/// \brief Matches variable/function declarations that have static storage class +/// (with "static" key word) written in the source. +/// --

Re: [PATCH] D24928: [ASTMatcher] Clarify isStaticStorageClass and hasStaticStorageDuration documents.

2016-09-26 Thread Aaron Ballman 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 clarifications! Comment at: include/clang/ASTMatchers/ASTMatchers.h:3395 @@ -3392,1 +3394,3 @@ +/// \brief Matches variable/function decl

r282417 - Complete support for the cxxCtorInitializer() AST matcher so that it can be used as a top-level matcher.

2016-09-26 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Sep 26 12:04:27 2016 New Revision: 282417 URL: http://llvm.org/viewvc/llvm-project?rev=282417&view=rev Log: Complete support for the cxxCtorInitializer() AST matcher so that it can be used as a top-level matcher. Modified: cfe/trunk/include/clang/ASTMatchers/AS

Re: [PATCH] D24874: Fully implement the matcher for CXXCtorInitializer

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks! Commit in r282417 https://reviews.llvm.org/D24874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24886: Add [[clang::suppress(rule, ...)]] attribute

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D24886#552859, @rsmith wrote: > Giving this the name `[[clang::suppress(...)]]` seems unhelpful. This > attribute is specified by the C++ core guidelines, not by clang, and > presumably we want code using this attribute to be portable a

r282484 - Silencing a Sphinx diagnostic with options, again.

2016-09-27 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Sep 27 07:17:05 2016 New Revision: 282484 URL: http://llvm.org/viewvc/llvm-project?rev=282484&view=rev Log: Silencing a Sphinx diagnostic with options, again. Warning, treated as error: /opt/llvm/build.attributes.src/tools/clang/docs/CommandGuide/clang.rst:413: WAR

Re: [PATCH] D14326: ASTImporter: expressions, pt.2

2016-09-27 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM with two minor nits. Comment at: lib/AST/ASTImporter.cpp:5563-5564 @@ +5562,4 @@ +const TemplateArgumentLoc *FromArgArray = E->getTemplateArgs(); +for (unsigned i = 0, e = E->getNumTemplateArgs();

Re: [PATCH] D24848: [clang-tidy] fix false-positive for cppcoreguidelines-pro-type-member-init with in-class initializers

2016-09-27 Thread Aaron Ballman via cfe-commits
On Tue, Sep 27, 2016 at 2:05 PM, Matthias Gehre wrote: > mgehre updated this revision to Diff 72677. > mgehre added a comment. > > Rename the struct that was introduced in the test. Note that I need to keep > the function Bug30487, > because that is where the false-positive warning was emitted.

Re: [PATCH] D24886: Add [[clang::suppress(rule, ...)]] attribute

2016-09-27 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D24886#554130, @mgehre wrote: > Thank your very much for your comments! > Let me try to give me reasoning for those points: > > 1. But it's missing some pieces, like test cases I though about how to test > this, having no semantic meani

Re: [llvm-dev] Upgrading phabricator

2016-09-30 Thread Aaron Ballman via cfe-commits
On Fri, Sep 30, 2016 at 2:04 AM, Eric Liu via cfe-commits wrote: > I've switched the default email format to be plain text only now. This > option should be per-user configurable, but somehow it is not shown in the > "Settings"; I'll try if I can make the option personalized. Thank you for workin

Re: [llvm-dev] Upgrading phabricator

2016-09-30 Thread Aaron Ballman via cfe-commits
On Fri, Sep 30, 2016 at 9:21 AM, Eric Liu wrote: > Thanks for the feedback Aaron! :) > > I've disabled it. I think the annoying part really is the status (e.g. > Request, Closed etc) in the tag, and I am wondering if a tag with just line > numbers like "(N Loc)" would be better. But I'm not really

[PATCH] D24894: [clang-tidy] Prefer transparent functors to non-transparent one.

2016-10-02 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. > UseTransparentFunctorsCheck.cpp:26 > + unless(hasAnyTemplateArgument(refersToType(voidType(, > + hasAnyName("::std::plus", "::std::minus", "::std::multiplies", > + "::std::divides", "::std::modulus", "::std::negate", Should we

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. > vbyakovlcl wrote in DiagnosticGroups.td:522 > Gcc prints error messages > > t.c:21:13: error: invalid operands to binary << (have vector_int8 and > vector_short8) > > vi8 = vi8 << vs8; > > I could not find a flag controlling this error. I would not ad

[PATCH] D22910: Add support for CXXOperatorCallExpr in Expr::HasSideEffects

2016-10-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. This patch is missing tests for the new functionality. > aaron.ballman wrote in ExprCXX.h:109 > Missing the full stop at the end of the sentence. It looks like this comment has not been handled yet. > ExprCXX.h:120 > + // Check to see if a given overloaded oper

[PATCH] D24965: [clang-tidy] Fix cppcoreguidelines-pro-type-member-init false negatives

2016-10-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. > ProTypeMemberInitCheck.cpp:307 > + Result.Nodes.getNodeAs("record")) { > +assert(Record->hasDefaultConstructor()); > +checkMissingMemberInitializer(*Result.Context, Record, nullptr); Please add an explanatory string literal to the as

[PATCH] D25024: [clang-tidy] Add check for detecting declarations with multiple names

2016-10-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. > CppCoreGuidelinesTidyModule.cpp:40 > +CheckFactories.registerCheck( > +"cppcoreguidelines-one-name-per-declaration"); > CheckFactories.registerCheck( Can you also register this check under the name `cert-dcl04-c` as well? It fits the behav

[PATCH] D25106: Packed member warning: Use the typedef name for anonymous structures when it is available

2016-10-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. > SemaChecking.cpp:11284 > +if (ND->getName().empty()) { > + if (const auto *TypedefDecl = m.RD->getTypedefNameForAnonDecl()) > +ND = TypedefDecl; Please don't use `auto` here since the type is not spelled directly in the initialization. >

[PATCH] D25106: Packed member warning: Use the typedef name for anonymous structures when it is available

2016-10-04 Thread Aaron Ballman 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! Repository: rL LLVM https://reviews.llvm.org/D25106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D24965: [clang-tidy] Fix cppcoreguidelines-pro-type-member-init false negatives

2016-10-04 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. Generally looks good to me, sorry I missed these tiny nits last time around. > ProTypeMemberInitCheck.h:49 >void checkMissingMemberInitializer(ASTContext &Context, > + const CXXRecordDecl *ClassDecl, >

[PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-10-04 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. > readability-redundant-member-init.cpp:162 > + const S f; > +}; Missing a test for `union` member initializers. Also, a test that multiple inheritance doesn't cause a fixit malfunction would be nice. https://reviews.llvm.org/D24339

[PATCH] D24965: [clang-tidy] Fix cppcoreguidelines-pro-type-member-init false negatives

2016-10-04 Thread Aaron Ballman 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/D24965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[clang-tools-extra] r283224 - Fix some false-positives with cppcoreguidelines-pro-type-member-init. Handle classes with default constructors that are defaulted or are not present in the AST.

2016-10-04 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Oct 4 09:48:05 2016 New Revision: 283224 URL: http://llvm.org/viewvc/llvm-project?rev=283224&view=rev Log: Fix some false-positives with cppcoreguidelines-pro-type-member-init. Handle classes with default constructors that are defaulted or are not present in the A

[PATCH] D24965: [clang-tidy] Fix cppcoreguidelines-pro-type-member-init false negatives

2016-10-04 Thread Aaron Ballman via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit in r283224. https://reviews.llvm.org/D24965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25273: Fix PR30520: Fix incomplete type crash when dealing with transparent_union attribute

2016-10-05 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, thank you! Repository: rL LLVM https://reviews.llvm.org/D25273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

Re: Buildbot numbers for the week of 9/25/2016 - 10/1/2016

2016-10-05 Thread Aaron Ballman via cfe-commits
On Wed, Oct 5, 2016 at 7:40 PM, Galina Kistanova via cfe-commits wrote: > Hello everyone, > > Below are some buildbot numbers for the last week of 9/25/2016 - 10/1/2016. > > Please see the same data in attached csv files: Can we please fix the clang-tools-sphinx-docs builder or take it offline en

[PATCH] D25244: [clang-tidy] Add a whitelist option in google-runtime-references.

2016-10-07 Thread Aaron Ballman 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 small nit. Comment at: clang-tidy/google/NonConstReferences.cpp:71-75 + for (const auto &WhiteListType: WhiteListTypes) { +if (ReferencedType.g

[PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-10-10 Thread Aaron Ballman 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/D24339 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D25238: [clang-tidy] Ignore empty members and bases in cppcoreguidelines-pro-type-member-init

2016-10-10 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, with one small commenting nit. Comment at: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:320 +// copied from clang/lib/Sema/SemaDeclCXX.cpp +s

[PATCH] D25283: AvailabilityAttrs: Refactor context checking when diagnosing an availability violation

2016-10-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added inline comments. Comment at: include/clang/Sema/Sema.h:9747 + AvailabilityResult ShouldDiagnoseAvailabilityOfDecl(NamedDecl *&D, + std::string *Message); ---

[PATCH] D25308: [Sema] Ignore transparent_union attributes in C++

2016-10-10 Thread Aaron Ballman via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added inline comments. This revision now requires changes to proceed. Comment at: lib/Sema/SemaDeclAttr.cpp:3011 const AttributeList &Attr) { + if (S.getLangOpts().CPlusPlus)

[PATCH] D20428: Tracking exception specification source locations

2016-10-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D20428#564511, @sbarzowski wrote: > What's happening here? It's accepted, but not merged and the last activity is > 3 months old while my change is waiting for it. Can I help somehow? It was accepted, but then caused build failures. I

[PATCH] D25316: [clang-tidy] Enhance modernize-use-auto to casts

2016-10-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:346 -const auto *NewExpr = cast(V->getInit()->IgnoreParenImpCasts()); -// Ensure that every VarDecl has a CXXNewExpr initializer. -if (!NewExpr) +const auto *Expr = cast(V->g

[PATCH] D25430: [Sema] Prevent using member declaration diagnostic if the base class is invalid.

2016-10-10 Thread Aaron Ballman 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/D25430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D25406: Fix doubled whitespace in modernize-use-auto fixit

2016-10-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:378 + Lexer::getLocForEndOfToken(Range.getEnd(), 0, SM, Context->getLangOpts()); + bool Whitespace = isWhitespace(*FullSourceLoc(Next, SM).getCharacterData()); + Oye, th

[PATCH] D25308: [Sema] Ignore transparent_union attributes in C++

2016-10-10 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D25308#566176, @arphaman wrote: > The updated patch now makes clang warn every time it encounters this > attribute in C++ mode. Would that be the desi

[PATCH] D25406: Fix doubled whitespace in modernize-use-auto fixit

2016-10-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:378 + Lexer::getLocForEndOfToken(Range.getEnd(), 0, SM, Context->getLangOpts()); + bool Whitespace = isWhitespace(*FullSourceLoc(Next, SM).getCharacterData()); + malcolm

[PATCH] D25437: [clang-tidy] Fix template agrument false positives in unused-using-decls.

2016-10-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/misc-unused-using-decls.cpp:191 +// n::N is using in the explicit template instantiations. +template void h(n::M* t); Can you add a test using a non-type template argument, like an integer literal?

[PATCH] D25437: [clang-tidy] Fix template agrument false positives in unused-using-decls.

2016-10-11 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/misc-unused-using-decls.cpp:191 +// n::N is using in the explicit template instantiations. +template void h(n::M* t); hokein wrote: > aaron.ballman wrote: > > Can you add a test using a non-type tem

[PATCH] D25437: [clang-tidy] Fix template agrument false positives in unused-using-decls.

2016-10-11 Thread Aaron Ballman 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/D25437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D24886: Add [[clang::suppress(rule, ...)]] attribute

2016-10-11 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1469 + let Spellings = [CXX11<"clang", "suppress">, CXX11<"gsl", "suppress">]; + let Args = [VariadicStringArgument<"Rules">]; + let Documentation = [SuppressDocs]; Perhaps we should

[PATCH] D24888: [clang-tidy] Use [[clang::suppress]] with cppcoreguidelines-pro-type-reinterpret-cast

2016-10-11 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp:25 - Finder->addMatcher(cxxReinterpretCastExpr().bind("cast"), this); + std::vector Rules{"type", "type.1", "cppcoreguidelines-pro-type-reinterpret-cast"}; + Finde

[PATCH] D24888: [clang-tidy] Use [[clang::suppress]] with cppcoreguidelines-pro-type-reinterpret-cast

2016-10-11 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp:25 - Finder->addMatcher(cxxReinterpretCastExpr().bind("cast"), this); + std::vector Rules{"type", "type.1", "cppcoreguidelines-pro-type-reinterpret-cast"}; + Finde

[PATCH] D24656: [clang-tidy] Add check readability-redundant-declaration

2016-10-12 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/RedundantDeclarationCheck.cpp:60 +auto Diag = diag(D->getLocation(), "redundant '%0' declaration") +<< cast(D)->getName(); +if (!MultiVar && !DifferentHeaders) danielmarjamaki

[PATCH] D25406: Fix doubled whitespace in modernize-use-auto fixit

2016-10-12 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:378 + Lexer::getLocForEndOfToken(Range.getEnd(), 0, SM, Context->getLangOpts()); + bool Whitespace = isWhitespace(*FullSourceLoc(Next, SM).getCharacterData()); + malcolm

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-12 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/AttrDocs.td:612 + let Content = [{ +The ``convergent`` attribute can be placed on function declarations. It is +translated to LLVM ``convergent`` attribute, which indicates the call on a functi

[PATCH] D25406: Fix doubled whitespace in modernize-use-auto fixit

2016-10-12 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:378 + Lexer::getLocForEndOfToken(Range.getEnd(), 0, SM, Context->getLangOpts()); + bool Whitespace = isWhitespace(*FullSourceLoc(Next, SM).getCharacterData()); + malcolm

[PATCH] D25024: [clang-tidy] Add check for detecting declarations with multiple names

2016-10-13 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/cppcoreguidelines-one-name-per-declaration.cpp:8 + { +int x = 42, y = 43; +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: Do not declare multiple names per declaration [cppcoreguidelines-one-name-per-declarat

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-13 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Aside from some minor nits, the attribute functionality looks fine to me. As to whether we think this is a worthy attribute to add or not, I leave that to people who know CUDA an

[PATCH] D25600: [ASTMatcher] Add isStaticDataMember matcher for varDecl.

2016-10-14 Thread Aaron Ballman via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:3005 +/// \endcode +AST_MATCHER(VarDecl, isStaticDataMember) { + return Node.isStaticDataMember(); How does this differ from t

[PATCH] D25283: AvailabilityAttrs: Refactor context checking when diagnosing an availability violation

2016-10-14 Thread Aaron Ballman 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/D25283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D25600: [ASTMatcher] Add isStaticDataMember matcher for varDecl.

2016-10-14 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:3005 +/// \endcode +AST_MATCHER(VarDecl, isStaticDataMember) { + return Node.isStaticDataMember(); hokein wrote: > aaron.ballman wrote: > > How does this differ from the exi

[PATCH] D25642: [clang-tidy] Use ignoreImplicit in cert-err58-cpp check

2016-10-15 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In what is surely a record response time for code reviews on a weekend, this LGTM. :-D https://reviews.llvm.org/D25642 ___ cfe-com

[clang-tools-extra] r318921 - Fixing a typo; NFC.

2017-11-23 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Nov 23 06:57:24 2017 New Revision: 318921 URL: http://llvm.org/viewvc/llvm-project?rev=318921&view=rev Log: Fixing a typo; NFC. Modified: clang-tools-extra/trunk/clangd/JSONExpr.cpp Modified: clang-tools-extra/trunk/clangd/JSONExpr.cpp URL: http://llvm.org/vie

Re: [clang-tools-extra] r318809 - Silence some MSVC warnings about not all control paths returning a value; NFC.

2017-11-23 Thread Aaron Ballman via cfe-commits
On Thu, Nov 23, 2017 at 1:47 AM, Kim Gräsman wrote: > > > Den 21 nov. 2017 11:24 em skrev "Aaron Ballman via cfe-commits" > : > > Author: aaronballman > Date: Tue Nov 21 14:24:13 2017 > New Revision: 318809 > > URL: http://llvm.org/viewvc/llvm-project?r

[clang-tools-extra] r319111 - Add an option to misc-move-const-arg to not diagnose on trivially copyable types.

2017-11-27 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Nov 27 14:59:33 2017 New Revision: 319111 URL: http://llvm.org/viewvc/llvm-project?rev=319111&view=rev Log: Add an option to misc-move-const-arg to not diagnose on trivially copyable types. Patch by Oleg Smolsky Added: clang-tools-extra/trunk/test/clang-tidy/

[clang-tools-extra] r319225 - Add a new clang-tidy module for Fuchsia as an umbrella to diagnose issues with the Fuschia and Zircon coding guidelines (https://fuchsia.googlesource.com/zircon/+/master/

2017-11-28 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Nov 28 13:09:25 2017 New Revision: 319225 URL: http://llvm.org/viewvc/llvm-project?rev=319225&view=rev Log: Add a new clang-tidy module for Fuchsia as an umbrella to diagnose issues with the Fuschia and Zircon coding guidelines (https://fuchsia.googlesource.com/zir

r319360 - Add the hasDefinition() AST matcher to match class declarations that also have a definition.

2017-11-29 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Nov 29 13:21:51 2017 New Revision: 319360 URL: http://llvm.org/viewvc/llvm-project?rev=319360&view=rev Log: Add the hasDefinition() AST matcher to match class declarations that also have a definition. Patch by Julie Hockett. Modified: cfe/trunk/docs/LibASTMatc

r319383 - Perform a bounds check on a function's argument list before accessing any index value specified by an 'argument_with_type_tag' attribute. Fixes PR28520.

2017-11-29 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Nov 29 15:10:14 2017 New Revision: 319383 URL: http://llvm.org/viewvc/llvm-project?rev=319383&view=rev Log: Perform a bounds check on a function's argument list before accessing any index value specified by an 'argument_with_type_tag' attribute. Fixes PR28520. Patc

r319549 - Remove duplicate, nonsense information from an attribute diagnostic. The NonParmVar subject does not need to mention functions, and the resulting diagnostic definitely does not need to menti

2017-12-01 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Dec 1 07:54:29 2017 New Revision: 319549 URL: http://llvm.org/viewvc/llvm-project?rev=319549&view=rev Log: Remove duplicate, nonsense information from an attribute diagnostic. The NonParmVar subject does not need to mention functions, and the resulting diagnostic

r319555 - Disallow a cleanup attribute from appertaining to a parameter (the attribute only appertains to local variables and is silently a noop on parameters). This repurposes the unused (and syntact

2017-12-01 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Dec 1 08:53:49 2017 New Revision: 319555 URL: http://llvm.org/viewvc/llvm-project?rev=319555&view=rev Log: Disallow a cleanup attribute from appertaining to a parameter (the attribute only appertains to local variables and is silently a noop on parameters). This r

r319672 - Changing mixed CRLFs back to LFs; NFC.

2017-12-04 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Dec 4 10:36:34 2017 New Revision: 319672 URL: http://llvm.org/viewvc/llvm-project?rev=319672&view=rev Log: Changing mixed CRLFs back to LFs; NFC. Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h Modified: cfe/trunk/include/clang/ASTMatchers/

r319688 - Now that C++17 is official (https://www.iso.org/standard/68564.html), start changing the C++1z terminology over to C++17. NFC intended, these are all mechanical changes.

2017-12-04 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Dec 4 12:27:34 2017 New Revision: 319688 URL: http://llvm.org/viewvc/llvm-project?rev=319688&view=rev Log: Now that C++17 is official (https://www.iso.org/standard/68564.html), start changing the C++1z terminology over to C++17. NFC intended, these are all mechani

r320089 - Add new language mode flags for C17.

2017-12-07 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Dec 7 13:46:26 2017 New Revision: 320089 URL: http://llvm.org/viewvc/llvm-project?rev=320089&view=rev Log: Add new language mode flags for C17. This adds -std=c17, -std=gnu17, and -std=iso9899:2017 as language mode flags for C17 and updates the value of __STDC_VER

Re: r320089 - Add new language mode flags for C17.

2017-12-07 Thread Aaron Ballman via cfe-commits
t. Sorry about the inadvertent churn there! ~Aaron > > -Ahmed > >> On 7 December 2017 at 13:46, Aaron Ballman via cfe-commits >> wrote: >>> >>> Author: aaronballman >>> Date: Thu Dec 7 13:46:26 2017 >>> New Revision: 320089 >>> &

r320113 - Correct line endings that got mixed up in r320089; NFC.

2017-12-07 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Dec 7 15:04:11 2017 New Revision: 320113 URL: http://llvm.org/viewvc/llvm-project?rev=320113&view=rev Log: Correct line endings that got mixed up in r320089; NFC. Modified: cfe/trunk/include/clang/Frontend/LangStandard.h cfe/trunk/include/clang/Frontend/Lan

Re: r320089 - Add new language mode flags for C17.

2017-12-07 Thread Aaron Ballman via cfe-commits
gt; >> Should be taken care of in r320112. > > Thanks, I was just getting on that. Sorry about the inadvertent churn there! I corrected the rest of the line endings in r320113. ~Aaron > > ~Aaron > >> >> -Ahmed >> >>> On 7 December 2017 at 13:46, A

r320115 - Correct line endings that got mixed up in r320088; NFC.

2017-12-07 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Dec 7 15:10:09 2017 New Revision: 320115 URL: http://llvm.org/viewvc/llvm-project?rev=320115&view=rev Log: Correct line endings that got mixed up in r320088; NFC. Modified: cfe/trunk/test/Preprocessor/has_c_attribute.c Modified: cfe/trunk/test/Preprocessor/has

r320131 - Add a test that the __STDC_VERSION__ macro reports the correct value for -std=c17.

2017-12-07 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Dec 7 18:39:26 2017 New Revision: 320131 URL: http://llvm.org/viewvc/llvm-project?rev=320131&view=rev Log: Add a test that the __STDC_VERSION__ macro reports the correct value for -std=c17. Added: cfe/trunk/test/Preprocessor/c17.c Added: cfe/trunk/test/Prepro

[clang] 123062e - Expose QualType::getUnqualifiedType in libclang

2022-08-29 Thread Aaron Ballman via cfe-commits
Author: Luca Di Sera Date: 2022-08-29T08:16:18-04:00 New Revision: 123062ec2f3e45bb1614a63bcb79c22527d9b914 URL: https://github.com/llvm/llvm-project/commit/123062ec2f3e45bb1614a63bcb79c22527d9b914 DIFF: https://github.com/llvm/llvm-project/commit/123062ec2f3e45bb1614a63bcb79c22527d9b914.diff

[clang] b345be1 - Make this test slightly less fragile; NFC

2022-08-29 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-08-29T09:41:23-04:00 New Revision: b345be177d03166add391f090fd0288a23413934 URL: https://github.com/llvm/llvm-project/commit/b345be177d03166add391f090fd0288a23413934 DIFF: https://github.com/llvm/llvm-project/commit/b345be177d03166add391f090fd0288a23413934.diff

[clang] 5b86174 - Clarifying the documentation for diagnostic formats; NFC

2022-08-31 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-08-31T08:32:58-04:00 New Revision: 5b861743539aa9a1184589647f6e9ce96da8b620 URL: https://github.com/llvm/llvm-project/commit/5b861743539aa9a1184589647f6e9ce96da8b620 DIFF: https://github.com/llvm/llvm-project/commit/5b861743539aa9a1184589647f6e9ce96da8b620.diff

Re: [clang] b58ed43 - Revert "[clang] Fix a crash in constant evaluation"

2022-08-31 Thread Aaron Ballman via cfe-commits
On Wed, Aug 31, 2022 at 4:13 AM Kadir Cetinkaya via cfe-commits wrote: > > > Author: Kadir Cetinkaya > Date: 2022-08-31T10:12:52+02:00 > New Revision: b58ed43a7f6b67bdb03ab746b654c823f54c261f > > URL: > https://github.com/llvm/llvm-project/commit/b58ed43a7f6b67bdb03ab746b654c823f54c261f > DIFF:

[clang] 3b00e48 - Further update -Wbitfield-constant-conversion for 1-bit bitfield

2022-08-31 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-08-31T09:23:45-04:00 New Revision: 3b00e486797c0a28f0b5216ea507329d098ce573 URL: https://github.com/llvm/llvm-project/commit/3b00e486797c0a28f0b5216ea507329d098ce573 DIFF: https://github.com/llvm/llvm-project/commit/3b00e486797c0a28f0b5216ea507329d098ce573.diff

[clang] fb38bae - Removing an accidentally duplicated heading; NFC

2022-09-01 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-09-01T11:44:11-04:00 New Revision: fb38baef8727fbdee0babbe74620f4f6755a9fda URL: https://github.com/llvm/llvm-project/commit/fb38baef8727fbdee0babbe74620f4f6755a9fda DIFF: https://github.com/llvm/llvm-project/commit/fb38baef8727fbdee0babbe74620f4f6755a9fda.diff

[clang] e7d9917 - Expose QualType::getNonReferenceType in libclang

2022-09-02 Thread Aaron Ballman via cfe-commits
Author: Luca Di Sera Date: 2022-09-02T09:54:10-04:00 New Revision: e7d9917a60dca60da05d0114de9858ed7acb015c URL: https://github.com/llvm/llvm-project/commit/e7d9917a60dca60da05d0114de9858ed7acb015c DIFF: https://github.com/llvm/llvm-project/commit/e7d9917a60dca60da05d0114de9858ed7acb015c.diff

Re: [clang] b7a7aee - [clang] Qualify auto in range-based for loops (NFC)

2022-09-04 Thread Aaron Ballman via cfe-commits
FWIW, sweeping NFC changes like this cause a fair amount of code churn (which makes tools like git blame a bit harder to use) for a relatively small improvement to code readability, which is why our developer policy asks that you "Avoid committing formatting- or whitespace-only changes outside of c

[clang] 3c604e9 - Update the clang and clang-tools-extra code owners files

2022-09-06 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-09-06T08:28:03-04:00 New Revision: 3c604e9f15606fa395b088ca341a232ffda2bb7d URL: https://github.com/llvm/llvm-project/commit/3c604e9f15606fa395b088ca341a232ffda2bb7d DIFF: https://github.com/llvm/llvm-project/commit/3c604e9f15606fa395b088ca341a232ffda2bb7d.diff

[clang] e1ebe47 - Fix Clang Sphinx docs build

2022-09-06 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-09-06T09:52:22-04:00 New Revision: e1ebe476e45a677535f8cae3cc9f7fb84f477fdd URL: https://github.com/llvm/llvm-project/commit/e1ebe476e45a677535f8cae3cc9f7fb84f477fdd DIFF: https://github.com/llvm/llvm-project/commit/e1ebe476e45a677535f8cae3cc9f7fb84f477fdd.diff

[clang] d3d334a - Fix the Clang sphinx build bot; NFC

2022-09-06 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-09-06T16:50:22-04:00 New Revision: d3d334a625ddb784baecd483346c4892d33d33a5 URL: https://github.com/llvm/llvm-project/commit/d3d334a625ddb784baecd483346c4892d33d33a5 DIFF: https://github.com/llvm/llvm-project/commit/d3d334a625ddb784baecd483346c4892d33d33a5.diff

[clang] 6ed21fc - Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-07 Thread Aaron Ballman via cfe-commits
Author: yronglin Date: 2022-09-07T12:46:20-04:00 New Revision: 6ed21fc515230ac2ea459d8aa90566e9a467bbb0 URL: https://github.com/llvm/llvm-project/commit/6ed21fc515230ac2ea459d8aa90566e9a467bbb0 DIFF: https://github.com/llvm/llvm-project/commit/6ed21fc515230ac2ea459d8aa90566e9a467bbb0.diff LOG:

Re: [clang] b7a7aee - [clang] Qualify auto in range-based for loops (NFC)

2022-09-09 Thread Aaron Ballman via cfe-commits
the quality/value/justification for a cleanup change like > this. It also would have matched our coding style. (We document it somewhat poorly as an example showing "observe" and "change", but reviewers who call for cleanups with auto are pretty consistent about asking to ma

Re: [clang] b7a7aee - [clang] Qualify auto in range-based for loops (NFC)

2022-09-11 Thread Aaron Ballman via cfe-commits
these massive files up so >> that churn is less painful.) >> >> > & yeah, adding the `const` too if/when that's relevant would've >> > improved the quality/value/justification for a cleanup change like >> > this. >> >> It also would hav

[clang] ea26ed1 - Rewording note note_constexpr_invalid_cast

2022-09-12 Thread Aaron Ballman via cfe-commits
Author: Muhammad Usman Shahid Date: 2022-09-12T07:47:39-04:00 New Revision: ea26ed1f9c37465e0123c3357e459dd819c7d402 URL: https://github.com/llvm/llvm-project/commit/ea26ed1f9c37465e0123c3357e459dd819c7d402 DIFF: https://github.com/llvm/llvm-project/commit/ea26ed1f9c37465e0123c3357e459dd819c7d4

Re: [clang] b7a7aee - [clang] Qualify auto in range-based for loops (NFC)

2022-09-12 Thread Aaron Ballman via cfe-commits
erts/recommits. Unfortunately, the tooling > >> around viewing git blames of large files (like Clang tends to have) > >> makes these sorts of commits surprisingly painful when you do have to > >> dig to see where changes came from. (So I find myself having far le

[clang] 1b19df1 - Correct the __has_c_attribute value for nodiscard

2022-09-13 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-09-13T08:13:01-04:00 New Revision: 1b19df12b84a7045f75e34009a3a7ff44f599375 URL: https://github.com/llvm/llvm-project/commit/1b19df12b84a7045f75e34009a3a7ff44f599375 DIFF: https://github.com/llvm/llvm-project/commit/1b19df12b84a7045f75e34009a3a7ff44f599375.diff

[clang] 0f28cf4 - Correct the __has_c_attribute value for maybe_unused

2022-09-13 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-09-13T09:33:20-04:00 New Revision: 0f28cf416d00a0fa0cb6cf572dd7ebbc19529190 URL: https://github.com/llvm/llvm-project/commit/0f28cf416d00a0fa0cb6cf572dd7ebbc19529190 DIFF: https://github.com/llvm/llvm-project/commit/0f28cf416d00a0fa0cb6cf572dd7ebbc19529190.diff

<    1   2   3   4   5   6   7   8   9   10   >