r268366 - [libclang] Expose the ElaboratedType

2016-05-03 Thread Sergey Kalinichev via cfe-commits
Author: skalinichev Date: Tue May 3 01:58:29 2016 New Revision: 268366 URL: http://llvm.org/viewvc/llvm-project?rev=268366&view=rev Log: [libclang] Expose the ElaboratedType Differential Revision: http://reviews.llvm.org/D11797 Modified: cfe/trunk/bindings/python/clang/cindex.py cfe/tru

Re: [PATCH] D11797: [LIbClang] Report the named type for ElaboratedType

2016-05-03 Thread Sergey Kalinichev via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL268366: [libclang] Expose the ElaboratedType (authored by skalinichev). Changed prior to commit: http://reviews.llvm.org/D11797?vs=51109&id=55953#toc Repository: rL LLVM http://reviews.llvm.org/D117

Re: [PATCH] D18919: [Clang-tidy] Add check "modernize use using"

2016-05-03 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a comment. LGTM with some nits. Comment at: clang-tidy/modernize/UseUsingCheck.cpp:22 @@ +21,3 @@ +void UseUsingCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus) +return; Should be Cpl

Re: [PATCH] D19841: [clang-tidy] Lift common matchers to utils namespace

2016-05-03 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D19841#419488, @etienneb wrote: > Who is the owner of ASTMatcher? > > If he is willing to receive these matchers in ASTMatcher, I'll lift them. > Otherwise, we should at least lift them within clang-tidy. Send a patch to sbenza or klimek. I th

[clang-tools-extra] r268369 - Fix a crash in cppcoreguidelines-pro-type-member-init when checking a class that initializes itself as a base

2016-05-03 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue May 3 03:11:47 2016 New Revision: 268369 URL: http://llvm.org/viewvc/llvm-project?rev=268369&view=rev Log: Fix a crash in cppcoreguidelines-pro-type-member-init when checking a class that initializes itself as a base Summary: Fix a crash when a record type initializes i

Re: [PATCH] D19802: Fix a crash in cppcoreguidelines-pro-type-member-init when checking a class that initializes itself as a base

2016-05-03 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL268369: Fix a crash in cppcoreguidelines-pro-type-member-init when checking a class… (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D19802?vs=55904&id=55956#toc Repository: r

Re: [PATCH] D18919: [Clang-tidy] Add check "modernize use using"

2016-05-03 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/UseUsingCheck.cpp:22 @@ +21,3 @@ +void UseUsingCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus) +return; hokein wrote: > Should be CplusPlus11 here. BTW is there any

[clang-tools-extra] r268371 - [include-fixer] Abstract includeFixerMain function.

2016-05-03 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue May 3 03:38:35 2016 New Revision: 268371 URL: http://llvm.org/viewvc/llvm-project?rev=268371&view=rev Log: [include-fixer] Abstract includeFixerMain function. Modified: clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp Modified: clang-tools-extra/trun

Re: [PATCH] D19846: [clang-tidy] Lift parsing of sequence of names functions to utils.

2016-05-03 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/misc/SuspiciousStringCompareCheck.cpp:94 @@ +93,3 @@ + std::vector FunctionNames = utils::option::parseNames( + (llvm::Twine(KnownStringCompareFunctions) + String

Re: [PATCH] D18919: [Clang-tidy] Add check "modernize use using"

2016-05-03 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/modernize/UseUsingCheck.cpp:22 @@ +21,3 @@ +void UseUsingCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus) +return; Prazek wrote: > hokein wrote: > > Should be CplusPlus11 here.

Re: [PATCH] D18919: [Clang-tidy] Add check "modernize use using"

2016-05-03 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/UseUsingCheck.cpp:22 @@ +21,3 @@ +void UseUsingCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus) +return; hokein wrote: > Prazek wrote: > > hokein wrote: > > > Should

Re: [PATCH] D19412: [libcxx] Refactor pthread usage - II

2016-05-03 Thread Asiri Rathnayake via cfe-commits
rmaprath updated this revision to Diff 55961. rmaprath added a comment. As agreed, reverted back to using the native mutex / condition_variable types within library sources. @EricWF: Good to go now? Thanks. / Asiri http://reviews.llvm.org/D19412 Files: include/__config include/__mutex_b

r268372 - [Clang][AVX512][BUILTIN] Adding intrinsics for compressstore{df|di|sf|si} instruction set.

2016-05-03 Thread Michael Zuckerman via cfe-commits
Author: mzuckerm Date: Tue May 3 05:42:46 2016 New Revision: 268372 URL: http://llvm.org/viewvc/llvm-project?rev=268372&view=rev Log: [Clang][AVX512][BUILTIN] Adding intrinsics for compressstore{df|di|sf|si} instruction set. Differential Revision: http://reviews.llvm.org/D19808 Modified:

Re: [PATCH] D19412: [libcxx] Refactor pthread usage - II

2016-05-03 Thread Asiri Rathnayake via cfe-commits
rmaprath updated this revision to Diff 55965. rmaprath added a comment. Added missing initializer (typo). http://reviews.llvm.org/D19412 Files: include/__config include/__mutex_base include/__threading_support include/mutex include/thread src/algorithm.cpp src/condition_variable.c

Re: [PATCH] D19415: [libcxx][rfc] Externalized threading support

2016-05-03 Thread Asiri Rathnayake via cfe-commits
rmaprath updated this revision to Diff 55967. rmaprath added a comment. Re-spun on top of http://reviews.llvm.org/D19412. http://reviews.llvm.org/D19415 Files: include/__threading_support src/algorithm.cpp src/memory.cpp src/mutex.cpp Index: src/mutex.cpp ==

r268373 - [Clang][AVX512][Builtin] Adding intrinsics for vcvttpd2udq instruction set

2016-05-03 Thread Michael Zuckerman via cfe-commits
Author: mzuckerm Date: Tue May 3 06:05:24 2016 New Revision: 268373 URL: http://llvm.org/viewvc/llvm-project?rev=268373&view=rev Log: [Clang][AVX512][Builtin] Adding intrinsics for vcvttpd2udq instruction set Differential Revision: http://reviews.llvm.org/D19768 Modified: cfe/trunk/lib/Head

[clang-tools-extra] r268374 - Fix cppcoreguidelines-pro-type-member-init failure test on Windows.

2016-05-03 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue May 3 06:19:46 2016 New Revision: 268374 URL: http://llvm.org/viewvc/llvm-project?rev=268374&view=rev Log: Fix cppcoreguidelines-pro-type-member-init failure test on Windows. Modified: clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-type-member-init.cp

Re: [PATCH] D16962: clang-tidy: avoid std::bind

2016-05-03 Thread Jonathan B Coe via cfe-commits
jbcoe added inline comments. Comment at: clang-tidy/readability/ReadabilityTidyModule.cpp:37 @@ -35,1 +36,3 @@ +CheckFactories.registerCheck( +"readability-avoid-std-bind"); CheckFactories.registerCheck( aaron.ballman wrote: > I kind of wonder if

Re: [PATCH] D16962: clang-tidy: avoid std::bind

2016-05-03 Thread Jonathan B Coe via cfe-commits
jbcoe updated this revision to Diff 55970. jbcoe marked 16 inline comments as done. jbcoe added a comment. Minor fixes from review. http://reviews.llvm.org/D16962 Files: clang-tidy/readability/AvoidStdBindCheck.cpp clang-tidy/readability/AvoidStdBindCheck.h clang-tidy/readability/CMakeLis

Re: [PATCH] D16962: clang-tidy: avoid std::bind

2016-05-03 Thread Jonathan B Coe via cfe-commits
jbcoe updated this revision to Diff 55974. jbcoe added a comment. Remove unused function `isStdBind`. http://reviews.llvm.org/D16962 Files: clang-tidy/readability/AvoidStdBindCheck.cpp clang-tidy/readability/AvoidStdBindCheck.h clang-tidy/readability/CMakeLists.txt clang-tidy/readabilit

Re: [PATCH] D19849: [clang-tidy] MoveConstructorInitCheck - Add parameter name to check message.

2016-05-03 Thread Felix Berger via cfe-commits
flx removed rL LLVM as the repository for this revision. flx updated this revision to Diff 55975. http://reviews.llvm.org/D19849 Files: clang-tidy/misc/MoveConstructorInitCheck.cpp test/clang-tidy/misc-move-constructor-init.cpp Index: test/clang-tidy/misc-move-constructor-init.cpp ==

Re: [PATCH] D19849: [clang-tidy] MoveConstructorInitCheck - Add parameter name to check message.

2016-05-03 Thread Felix Berger via cfe-commits
flx marked an inline comment as done. flx added a comment. Done. http://reviews.llvm.org/D19849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19849: [clang-tidy] MoveConstructorInitCheck - Add parameter name to check message.

2016-05-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a comment. I'm not opposed to showing the name, but I'm not certain I understand under what circumstances the name would be useful. Since this is triggering on move constructors, and move constructors can only have one paramete

Re: [PATCH] D19849: [clang-tidy] MoveConstructorInitCheck - Add parameter name to check message.

2016-05-03 Thread Felix Berger via cfe-commits
flx added a comment. In http://reviews.llvm.org/D19849#419751, @aaron.ballman wrote: > I'm not opposed to showing the name, but I'm not certain I understand under > what circumstances the name would be useful. Since this is triggering on move > constructors, and move constructors can only have

Re: [PATCH] D19849: [clang-tidy] MoveConstructorInitCheck - Add parameter name to check message.

2016-05-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In http://reviews.llvm.org/D19849#419752, @flx wrote: > In http://reviews.llvm.org/D19849#419751, @aaron.ballman wrote: > > > I'm not opposed to showing the name, but I'm not certain I understand under > > what circumstances the name would be useful. Since this is

Re: [PATCH] D19851: Warn on binding reference to null in copy initialization

2016-05-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. Comment at: lib/Sema/SemaInit.cpp:3513 @@ -3512,1 +3512,3 @@ +static void CheckForNullPointerDereference(Sema &S, Expr *E) { + // Check to see if we are dereferencing a null pointer. If so, Can this take a `cons

r268376 - [Clang][AVX512][Builtin] Adding intrinsics for vcvt{ph|ps}2{ps|ph} instruction set

2016-05-03 Thread Michael Zuckerman via cfe-commits
Author: mzuckerm Date: Tue May 3 07:45:04 2016 New Revision: 268376 URL: http://llvm.org/viewvc/llvm-project?rev=268376&view=rev Log: [Clang][AVX512][Builtin] Adding intrinsics for vcvt{ph|ps}2{ps|ph} instruction set Differential Revision: http://reviews.llvm.org/D19767 Modified: cfe/trun

[PATCH] D19865: [clang-tidy] - PerformanceUnnecesaryCopyInitialization - only trigger for decl stmts with single VarDecl.

2016-05-03 Thread Felix Berger via cfe-commits
flx created this revision. flx added a reviewer: alexfh. flx added a subscriber: cfe-commits. flx set the repository for this revision to rL LLVM. This fixes bug: https://llvm.org/bugs/show_bug.cgi?id=27325 Repository: rL LLVM http://reviews.llvm.org/D19865 Files: clang-tidy/performance/Unn

Re: [PATCH] D19856: Create new library 'libc++experimental.a' for packaging TS symbols.

2016-05-03 Thread Ben Craig via cfe-commits
bcraig added a comment. LGTM http://reviews.llvm.org/D19856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19865: [clang-tidy] - PerformanceUnnecesaryCopyInitialization - only trigger for decl stmts with single VarDecl.

2016-05-03 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Is it a workaround to avoid breaking the code by incorrect fixes? Repository: rL LLVM http://reviews.llvm.org/D19865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

Re: [PATCH] D19849: [clang-tidy] MoveConstructorInitCheck - Add parameter name to check message.

2016-05-03 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thanks! Repository: rL LLVM http://reviews.llvm.org/D19849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D19866: [Analyzer] Correct stack address escape diagnostic

2016-05-03 Thread Phil Camp via cfe-commits
FlameTop created this revision. FlameTop added reviewers: zaks.anna, dcoughlin. FlameTop added a subscriber: cfe-commits. Leaking a stack address via a static variable refers to it in the diagnostic as a 'global'. This patch corrects the diagnostic for static variables. Patch by Phil Camp, SN S

Re: [PATCH] D16962: clang-tidy: avoid std::bind

2016-05-03 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Please regenerate the patch with the full context (see http://llvm.org/docs/Phabricator.html). Comment at: clang-tidy/readability/AvoidStdBindCheck.cpp:77 @@ +76,3 @@ + for (size_t I = 1; I <= PlaceholderCount; ++I) { +Stream << Delimiter << "auto &

Re: [PATCH] D19165: [clang-tidy] Add modernize-increment-bool check.

2016-05-03 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. ping @Alexfh have you check it? http://reviews.llvm.org/D19165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19827: Do not disable completely loop unroll according to optimization level.

2016-05-03 Thread Marianne Mailhot-Sarrasin via cfe-commits
mamai added a subscriber: tyler.nowicki. mamai added a comment. I think the blog comment is right. The pragma should make the loop unroll even in /Os. I think it is essential to allow the user to optimize some specific loops even if he generally wants to optimize for size the rest of the code. I

r268385 - [Clang][avx512][Builtin] Adding intrinsics for cvtw2mask{128|256|512} instruction set

2016-05-03 Thread Michael Zuckerman via cfe-commits
Author: mzuckerm Date: Tue May 3 09:12:23 2016 New Revision: 268385 URL: http://llvm.org/viewvc/llvm-project?rev=268385&view=rev Log: [Clang][avx512][Builtin] Adding intrinsics for cvtw2mask{128|256|512} instruction set Differential Revision: http://reviews.llvm.org/D19766 Modified: cfe/tr

Re: [PATCH] D19484: [OpenCL] Add supported OpenCL extensions to target info.

2016-05-03 Thread Yaxun Liu via cfe-commits
yaxunl added a comment. Hi Alexey, Any comments on this patch? Thanks. http://reviews.llvm.org/D19484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r268387 - [clang][AVX512][BuiltIn] Adding intrinsics for cast{pd|ps|si}128_{pd|ps|si}512 and castsi256_si512 instruction set

2016-05-03 Thread Michael Zuckerman via cfe-commits
Author: mzuckerm Date: Tue May 3 09:26:52 2016 New Revision: 268387 URL: http://llvm.org/viewvc/llvm-project?rev=268387&view=rev Log: [clang][AVX512][BuiltIn] Adding intrinsics for cast{pd|ps|si}128_{pd|ps|si}512 and castsi256_si512 instruction set Differential Revision: http://reviews.llvm.org

Re: [PATCH] D18919: [Clang-tidy] Add check "modernize use using"

2016-05-03 Thread Marek Kurdej via cfe-commits
curdeius added a subscriber: curdeius. curdeius added a comment. I'm really interested in the manner this check works when a typedef has multiple declarations in it (same example as in the comment): typedef int m_int, *m_int_p, &m_int_r, m_int_arr[10], (&m_int_fun)(int, int); I tried to imple

Re: [PATCH] D19865: [clang-tidy] - PerformanceUnnecesaryCopyInitialization - only trigger for decl stmts with single VarDecl.

2016-05-03 Thread Felix Berger via cfe-commits
flx added a comment. In http://reviews.llvm.org/D19865#419830, @alexfh wrote: > Is it a workaround to avoid breaking the code by incorrect fixes? Yes. We can't simply change the type of DeclStmt when we only look one of the VarDecls and how it is initialized. Repository: rL LLVM http://re

Re: [PATCH] D19827: Do not disable completely loop unroll according to optimization level.

2016-05-03 Thread Chad Rosier via cfe-commits
mcrosier added a comment. In http://reviews.llvm.org/D19827#419870, @mamai wrote: > I think the blog comment is right. The pragma should make the loop unroll > even in /Os. I think it is essential to allow the user to optimize some > specific loops even if he generally wants to optimize for siz

[PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Etienne Bergeron via cfe-commits
etienneb created this revision. etienneb added reviewers: alexfh, sbenza, klimek. etienneb added a subscriber: cfe-commits. Herald added a subscriber: klimek. This AST matcher will match a given CastExpr kind. It's an narrowing matcher on CastExpr. http://reviews.llvm.org/D19871 Files: include

Re: [PATCH] D19534: [clang-tidy] new google-default-arguments check

2016-05-03 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 56000. courbet marked 4 inline comments as done. courbet added a comment. Cosmetics + change error message. http://reviews.llvm.org/D19534 Files: clang-tidy/google/CMakeLists.txt clang-tidy/google/DefaultArgumentsCheck.cpp clang-tidy/google/DefaultArg

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. Is this required for some purpose? I'm not keen on adding new AST matchers that we cannot expose via the dynamic API, so I would prefer to solve that problem if we want

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. In http://reviews.llvm.org/D19871#419947, @aaron.ballman wrote: > Is this required for some purpose? It's used in clang-tidy checkers. see http://reviews.llvm.org/D19841 > I'm not keen on adding new AST matchers that we cannot expose via the dynamic > API, so

Re: [PATCH] D19534: [clang-tidy] new google-default-arguments check

2016-05-03 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: clang-tidy/google/GoogleTidyModule.cpp:40 @@ -38,1 +39,3 @@ void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { +CheckFactories.registerCheck( +"google-default-arguments"); hokein wro

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-03 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 56006. courbet marked an inline comment as done. courbet added a comment. implement overridden_methods_begin()/end() in terms of overridden_methods(). http://reviews.llvm.org/D19324 Files: docs/LibASTMatchersReference.html include/clang/AST/ASTContext.h

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In http://reviews.llvm.org/D19871#419954, @etienneb wrote: > In http://reviews.llvm.org/D19871#419947, @aaron.ballman wrote: > > > Is this required for some purpose? > > > It's used in clang-tidy checkers. > > see http://reviews.llvm.org/D19841 It's good to have

Re: [PATCH] D19869: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

2016-05-03 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: include-fixer/InMemoryXrefsDB.cpp:18 @@ +17,3 @@ +InMemoryXrefsDB::InMemoryXrefsDB( +std::map> LookupTable) { + for (const auto &Entry : LookupTable) { I'd make that a const ref. Comment at: include-

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/ASTContext.h:824 @@ -823,1 +823,3 @@ unsigned overridden_methods_size(const CXXMethodDecl *Method) const; + const ArrayRef overridden_methods( + const CXXMethodDecl *Method) const; This is

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Samuel Benzaquen via cfe-commits
sbenza added a comment. In http://reviews.llvm.org/D19871#419985, @aaron.ballman wrote: > In http://reviews.llvm.org/D19871#419954, @etienneb wrote: > > > In http://reviews.llvm.org/D19871#419947, @aaron.ballman wrote: > > > > > Is this required for some purpose? > > > > > > It's used in clang-ti

Re: [PATCH] D19062: Add functions in ctype.h to builtin function database (Fix)

2016-05-03 Thread Taewook Oh via cfe-commits
twoh added a comment. Ping. Can someone please commit this patch for me? Thanks! http://reviews.llvm.org/D19062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. > It's good to have that context in a review for functionality that isn't part > of the proposed patch. :-) Looking at the other patch, I would prefer to keep > this matcher narrowed to just clang-tidy unless you can also solve how to > expose it via the dynamic regist

Re: [PATCH] D18035: [GCC] PR23529 Mangler part of attrbute abi_tag support

2016-05-03 Thread Reid Kleckner via cfe-commits
rnk added a comment. I think Richard has a counterexample that shows that the "NullOut" approach to computing abi_tag sets isn't the right way to go. I wasn't able to craft it myself, but I figured I should send along the feedback that maybe a separate, up-front pass over the return type with a

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D19871#419947, @aaron.ballman wrote: > Is this required for some purpose? > > I'm not keen on adding new AST matchers that we cannot expose via the dynamic > API, so I would prefer to solve that problem if we want to add this matcher. I agree

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-03 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: include/clang/AST/ASTContext.h:824 @@ -823,1 +823,3 @@ unsigned overridden_methods_size(const CXXMethodDecl *Method) const; + const ArrayRef overridden_methods( + const CXXMethodDecl *Method) const; aaron.ballman

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/ASTContext.h:824 @@ -823,1 +823,3 @@ unsigned overridden_methods_size(const CXXMethodDecl *Method) const; + const ArrayRef overridden_methods( + const CXXMethodDecl *Method) const; courbet

Re: [PATCH] D19866: [Analyzer] Correct stack address escape diagnostic

2016-05-03 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Thanks for fixing! Devin, what do you think about the BugType wording? Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:229 @@ -228,3 +228,3 @@ BT_stackleak.reset( -new BuiltinBug(this, "Stack address s

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-03 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: include/clang/AST/ASTContext.h:824 @@ -823,1 +823,3 @@ unsigned overridden_methods_size(const CXXMethodDecl *Method) const; + const ArrayRef overridden_methods( + const CXXMethodDecl *Method) const; aaron.ballman

[Clang] Convergent Attribute

2016-05-03 Thread Ettore Speziale via cfe-commits
Hello, the attached patch introduces the `convergent` attribute. It is meant to be lowered into the LLVM `convergent` attribute, to restrict optimizations of attributed functions — e.g. you can attach convergent to OpenCL’s barrier, and thus prevent a call site being moved to another position

Re: [PATCH] D16989: Change interpretation of function definition in friend declaration of template class.

2016-05-03 Thread Serge Pavlov via cfe-commits
sepavloff updated this revision to Diff 56015. sepavloff added a comment. Updated patch. http://reviews.llvm.org/D16989 Files: include/clang/Sema/Sema.h lib/Sema/SemaDecl.cpp test/SemaCXX/PR25848.cpp test/SemaCXX/friend2.cpp Index: test/SemaCXX/friend2.cpp =

Re: [PATCH] D19816: [find-all-symbols] Add IWYU private pragma support.

2016-05-03 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: include-fixer/find-all-symbols/FindAllSymbols.cpp:173-182 @@ -165,1 +172,12 @@ +void FindAllSymbols::addPragmaHeader(FileID ID, llvm::StringRef FilePath) { + PragmaHeaderMap[ID] = FilePath; +} + +llvm::Optional FindAllSymbols::getPragma

Re: [PATCH] D16989: Change interpretation of function definition in friend declaration of template class.

2016-05-03 Thread Serge Pavlov via cfe-commits
2016-04-26 0:55 GMT+06:00 Richard Smith : > rsmith added inline comments. > > > Comment at: lib/Sema/SemaDecl.cpp:8611-8612 > @@ -8609,3 +8610,4 @@ > } else { > - // This needs to happen first so that 'inline' propagates. > - NewFD->setPreviousDeclaration(cast(OldDe

[libcxx] r268401 - [CMake] Fix a copy-paste error

2016-05-03 Thread Chris Bieneman via cfe-commits
Author: cbieneman Date: Tue May 3 11:54:20 2016 New Revision: 268401 URL: http://llvm.org/viewvc/llvm-project?rev=268401&view=rev Log: [CMake] Fix a copy-paste error Based on post commit feedback from Eric Fiselier. Modified: libcxx/trunk/include/CMakeLists.txt Modified: libcxx/trunk/inclu

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. > I agree that when possible, matchers should be available via the dynamic > matchers API. It doesn't seem overly complicated to add this support here. As > far as I understand, we just need to register the matcher in > lib/ASTMatchers/Dynamic/Registry.cpp and add su

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In http://reviews.llvm.org/D19871#420095, @etienneb wrote: > > I agree that when possible, matchers should be available via the dynamic > > matchers API. It doesn't seem overly complicated to add this support here. > > As far as I understand, we just need to regis

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. > though I would love if someday we could expose actual enumerations somehow > instead of string literals I would like too. Ditto for "equals" which is missing :) http://reviews.llvm.org/D19871 ___ cfe-commits mailing li

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 56022. etienneb added a comment. add dynamic parsing http://reviews.llvm.org/D19871 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Marshallers.h lib/ASTMatchers/Dynamic/Registry.cpp unitte

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 56023. etienneb added a comment. nit http://reviews.llvm.org/D19871 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Marshallers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/

Re: [PATCH] D19831: [scan-build] fix dead store warnings emitted on clang code base

2016-05-03 Thread David Blaikie via cfe-commits
Looks good to me - go ahead & commit whenever you're ready. On Mon, May 2, 2016 at 11:40 PM, Apelete Seketeli via cfe-commits < cfe-commits@lists.llvm.org> wrote: > apelete updated this revision to Diff 55952. > apelete added a comment. > > [scan-build] fix dead store warnings emitted on clang co

Re: [PATCH] D19684: Power9 - Support for -mcpu=pwr9 in the front end

2016-05-03 Thread Kit Barton via cfe-commits
kbarton accepted this revision. kbarton added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM http://reviews.llvm.org/D19684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D19876: Add an AST matcher for string-literal length

2016-05-03 Thread Etienne Bergeron via cfe-commits
etienneb created this revision. etienneb added reviewers: alexfh, sbenza, aaron.ballman, klimek. etienneb added a subscriber: cfe-commits. Herald added a subscriber: klimek. This patch is adding support for a matcher to check string literal length. This matcher is used in clang-tidy checkers and

Re: [PATCH] D19876: Add an AST matcher for string-literal length

2016-05-03 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 56025. etienneb added a comment. fix doc http://reviews.llvm.org/D19876 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/ASTMatchersTest.cpp Index: unittest

Re: [PATCH] D19869: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

2016-05-03 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 56026. ioeric marked an inline comment as done. ioeric added a comment. - Addressed reviewer comment. http://reviews.llvm.org/D19869 Files: include-fixer/CMakeLists.txt include-fixer/InMemoryXrefsDB.cpp include-fixer/InMemoryXrefsDB.h include-fixer/I

Re: [PATCH] D19869: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

2016-05-03 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/InMemoryXrefsDB.cpp:24-26 @@ +23,5 @@ +for (const auto &Header : Entry.second) { + SymbolInfo Info; + Info.Name = Names.back(); + Info.FilePath = Header; + for (auto IdentiferContext = Names.rbegin() +

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Samuel Benzaquen via cfe-commits
sbenza added a comment. > > So even if the above solution is working, we still need to call it that way > > (as a string): > > > clang-query> match castExpr(hasCastKind("CK_Dependent")) > > > Correct, that's expected behavior for clang-query (though I would love if > someday we could

Re: [PATCH] D19877: [clang-tidy] Speedup misc-static-assert.

2016-05-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. 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 for noticing that! http://reviews.llvm.org/D19877 _

[PATCH] D19877: [clang-tidy] Speedup misc-static-assert.

2016-05-03 Thread Samuel Benzaquen via cfe-commits
sbenza created this revision. sbenza added a reviewer: alexfh. sbenza added a subscriber: cfe-commits. Speedup the misc-static-assert check by not use `stmt()` as the toplevel matcher. The framework runs a filter on the matchers before trying them on each node and uses the toplevel type for this.

Re: [PATCH] D19871: Add an AST matcher for CastExpr kind

2016-05-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: lib/ASTMatchers/Dynamic/Marshallers.h:102 @@ +101,3 @@ + static clang::CastKind getCastKind(llvm::StringRef AttrKind) { +return llvm::StringSwitch(AttrKind) + .Case("CK_Dependent", CK_Dependent) This might

[PATCH] D19881: clang-cl: Print a blank line at the start of /showIncludes (PR27226)

2016-05-03 Thread Hans Wennborg via cfe-commits
hans created this revision. hans added reviewers: thakis, brad.king. hans added a subscriber: cfe-commits. MSVC prints a blank line there, and it turns out CMake (at least currently released versions) expects it to be there. http://reviews.llvm.org/D19881 Files: lib/Frontend/HeaderIncludeGen.

Re: [PATCH] D19881: clang-cl: Print a blank line at the start of /showIncludes (PR27226)

2016-05-03 Thread Nico Weber via cfe-commits
thakis added inline comments. Comment at: lib/Frontend/HeaderIncludeGen.cpp:106 @@ +105,3 @@ +// it to be there. +*OutputFile << '\n'; + } Doesn't do that for me: C:\src\ninja>cl /c test.cc /nologo /showIncludes test.cc Note: including file: c:\src\ninja

Re: [PATCH] D19881: clang-cl: Print a blank line at the start of /showIncludes (PR27226)

2016-05-03 Thread Hans Wennborg via cfe-commits
hans added inline comments. Comment at: lib/Frontend/HeaderIncludeGen.cpp:106 @@ +105,3 @@ +// it to be there. +*OutputFile << '\n'; + } thakis wrote: > Doesn't do that for me: > > C:\src\ninja>cl /c test.cc /nologo /showIncludes > test.cc > Note: includ

Re: [PATCH] D19881: clang-cl: Print a blank line at the start of /showIncludes (PR27226)

2016-05-03 Thread Brad King via cfe-commits
brad.king added a comment. I do not think MSVC starts off with an empty line with -showIncludes specifically. It is just that MSVC unconditionally prints the name of the source file first. This means that any showIncludes output is naturally preceded by a newline because at least one other li

r268416 - Change test to use regex instead of explicit value numbers. NFC.

2016-05-03 Thread Pete Cooper via cfe-commits
Author: pete Date: Tue May 3 13:32:01 2016 New Revision: 268416 URL: http://llvm.org/viewvc/llvm-project?rev=268416&view=rev Log: Change test to use regex instead of explicit value numbers. NFC. We were seeing an internal failure when running this test. I can't see a good reason for the differ

Re: r268385 - [Clang][avx512][Builtin] Adding intrinsics for cvtw2mask{128|256|512} instruction set

2016-05-03 Thread Pete Cooper via cfe-commits
Hi Michael I was seeing issues with the CHECK lines referencing explicit value numbers. i.e., %1, %2, etc. In r268416 I changed these to use a regex. I hope this was ok. Please let me know if you have an alternative you would prefer. Thanks, Pete > On May 3, 2016, at 7:12 AM, Michael Zucker

Re: [PATCH] D19881: clang-cl: Print a blank line at the start of /showIncludes (PR27226)

2016-05-03 Thread Nico Weber via cfe-commits
thakis added a comment. I agree with Brad that it'd be nice if we didn't have to add this :-) What's the workaround for current cmake releases? http://reviews.llvm.org/D19881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

Re: [PATCH] D19881: clang-cl: Print a blank line at the start of /showIncludes (PR27226)

2016-05-03 Thread Hans Wennborg via cfe-commits
hans added a comment. In http://reviews.llvm.org/D19881#420244, @thakis wrote: > I agree with Brad that it'd be nice if we didn't have to add this :-) > > What's the workaround for current cmake releases? Passing -DCMAKE_CL_SHOWINCLUDES_PREFIX="Note: including file: " is the work-around I used

r268418 - [MS] Pass CalleeDecl to adjustThisArgumentForVirtualFunctionCall

2016-05-03 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 3 13:44:29 2016 New Revision: 268418 URL: http://llvm.org/viewvc/llvm-project?rev=268418&view=rev Log: [MS] Pass CalleeDecl to adjustThisArgumentForVirtualFunctionCall If we are devirtualizing, then we want to compute the 'this' adjustment of the devirtualized target, n

Re: [PATCH] D19881: clang-cl: Print a blank line at the start of /showIncludes (PR27226)

2016-05-03 Thread Nico Weber via cfe-commits
thakis added a comment. (Also, this "only" affects .rc compilations, not regular source compilations -- those don't go through cmcldeps) http://reviews.llvm.org/D19881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

Re: [PATCH] D19881: clang-cl: Print a blank line at the start of /showIncludes (PR27226)

2016-05-03 Thread Nico Weber via cfe-commits
thakis added a comment. In http://reviews.llvm.org/D19881#420245, @hans wrote: > In http://reviews.llvm.org/D19881#420244, @thakis wrote: > > > I agree with Brad that it'd be nice if we didn't have to add this :-) > > > > What's the workaround for current cmake releases? > > > Passing -DCMAKE_CL_

r268419 - Fix use of LLVM IR names in lit test

2016-05-03 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue May 3 13:48:50 2016 New Revision: 268419 URL: http://llvm.org/viewvc/llvm-project?rev=268419&view=rev Log: Fix use of LLVM IR names in lit test Modified: cfe/trunk/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp Modified: cfe/trunk/test/CodeGenCXX/microsoft-abi-v

Re: [PATCH] D19881: clang-cl: Print a blank line at the start of /showIncludes (PR27226)

2016-05-03 Thread Hans Wennborg via cfe-commits
hans abandoned this revision. hans added a comment. In http://reviews.llvm.org/D19881#420250, @thakis wrote: > So ninja knows how to filter out the source line that cl.exe prints > unconditionally, without a way to disable that. If you add a bare newline, > ninja won't filter that out and this

Re: [PATCH] D19831: [scan-build] fix dead store warnings emitted on clang code base

2016-05-03 Thread Apelete Seketeli via cfe-commits
apelete added inline comments. Comment at: tools/c-index-test/c-index-test.c:1440 @@ -1440,3 +1439,3 @@ Record = Parent; Parent = clang_getCursorSemanticParent(Record); RecordIsAnonymous = clang_Cursor_isAnonymous(Record); This line now

Re: [PATCH] D19831: [scan-build] fix dead store warnings emitted on clang code base

2016-05-03 Thread Apelete Seketeli via cfe-commits
apelete updated this revision to Diff 56042. apelete added a comment. [scan-build] fix dead store warnings emitted on clang code base Changes since last revision: - Initialize 'CXCursor Parent' variable to avoid passing 'Record' variable as an un-initialized argument thereafter. http://review

Re: [PATCH] D19831: [scan-build] fix dead store warnings emitted on clang code base

2016-05-03 Thread Apelete Seketeli via cfe-commits
apelete added a comment. In http://reviews.llvm.org/D19831#420115, @dblaikie wrote: > Looks good to me - go ahead & commit whenever you're ready. If this last revision is good for you, please go ahead and commit this for me (I don't have commit access). Thanks. http://reviews.llvm.org/D1983

Re: [PATCH] D19869: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

2016-05-03 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: include-fixer/IncludeFixer.h:34-35 @@ -33,3 +33,4 @@ IncludeFixerActionFactory( - XrefsDB &Xrefs, std::vector &Replacements, + XrefsDBManager &XrefsDBMgr, + std::vector &Replacements, bool MinimizeIncludePaths = tr

r268422 - AArch64: simplify illegal vector check. NFC.

2016-05-03 Thread Tim Northover via cfe-commits
Author: tnorthover Date: Tue May 3 14:22:41 2016 New Revision: 268422 URL: http://llvm.org/viewvc/llvm-project?rev=268422&view=rev Log: AArch64: simplify illegal vector check. NFC. Use a utility function to check whether the number of elements is a power of 2 and drop the redundant upper limit (

Re: [PATCH] D19869: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

2016-05-03 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/IncludeFixer.h:34-35 @@ -33,3 +33,4 @@ IncludeFixerActionFactory( - XrefsDB &Xrefs, std::vector &Replacements, + XrefsDBManager &XrefsDBMgr, + std::vector &Replacements, bool MinimizeIncludePaths = tr

r268423 - AArch64: fixup comment after change

2016-05-03 Thread Tim Northover via cfe-commits
Author: tnorthover Date: Tue May 3 14:24:47 2016 New Revision: 268423 URL: http://llvm.org/viewvc/llvm-project?rev=268423&view=rev Log: AArch64: fixup comment after change Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp URL: http://llvm.org/vie

Re: [PATCH] D19876: Add an AST matcher for string-literal length

2016-05-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:1575 @@ +1574,3 @@ +/// \code +/// char *s = "abcd"; wchar_t *ws = L"abcd"; +/// char *t = "a"; Split these onto two lines? Comment at: include/clang/AST

  1   2   >