[PATCH] D31700: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-05-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Sorry, missed your patch somehow. LG with one nit. Comment at: clang-tidy/google/AvoidCStyleCastsCheck.cpp:139 ")"); + ReplaceRange =

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-16 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. I tried to add some test, but could not find a simple way: I could not find any 'parser' tests from which to start, and I don't see with current master how this can be an issue (though it becomes an issue with some of other patches). Any hint how to implement some test?

r303170 - [Sema] Avoid duplicate -Wunguarded-availability warnings in nested functions

2017-05-16 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue May 16 08:58:53 2017 New Revision: 303170 URL: http://llvm.org/viewvc/llvm-project?rev=303170=rev Log: [Sema] Avoid duplicate -Wunguarded-availability warnings in nested functions rdar://31862310 Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp

[PATCH] D32525: [clang-format] Add SpaceBeforeColon option

2017-05-16 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? https://reviews.llvm.org/D32525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32477: [clang-format] Allow customizing the penalty for breaking assignment

2017-05-16 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? https://reviews.llvm.org/D32477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32480: [clang-format] Add BinPackNamespaces option

2017-05-16 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? https://reviews.llvm.org/D32480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32479: [clang-format] Add BreakConstructorInitializersBeforeColon option

2017-05-16 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Or would it be better to replace (i.e. deprecate) the BreakConstructorInitializersBeforeComma option with a multiple choice option, as suggested here:

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 13 inline comments as done. yaxunl added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7296 + unsigned getASTAllocaAddressSpace() const override { +return LangAS::Count + getABIInfo().getDataLayout().getAllocaAddrSpace(); + }

[PATCH] D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts.

2017-05-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 99150. NoQ added a comment. Cover more cases and be more conservative. @Gábor: I didn't want to bother you with this, but i'm not entirely sure about how to deal with these false positives; since you're the original author of this check, if you see anything

[clang-tools-extra] r303180 - [clang-tidy] Optimize matchers in readability-implicit-bool-cast. NFC

2017-05-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue May 16 10:44:42 2017 New Revision: 303180 URL: http://llvm.org/viewvc/llvm-project?rev=303180=rev Log: [clang-tidy] Optimize matchers in readability-implicit-bool-cast. NFC Don't repeat `isInTemplateInstantiation()` and `hasAncestor()` unnecessarily. This speeds up the

[PATCH] D32751: [ASTImporter] Support new kinds of declarations (mostly Using*)

2017-05-16 Thread Peter Szecsi via Phabricator via cfe-commits
szepet added inline comments. Comment at: lib/AST/ASTImporter.cpp:1464 + + NamespaceDecl *TargetDecl = cast( +Importer.Import(D->getNamespace())); Since the Import can result nullptr (which is checked 2 lines below) this should be a cast_or_null as I

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-16 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 99136. Typz added a comment. Reformat and remove unneeded comment https://reviews.llvm.org/D32524 Files: lib/Format/UnwrappedLineParser.cpp Index: lib/Format/UnwrappedLineParser.cpp === ---

[PATCH] D33201: [clangd] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-16 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303173: [clangd] Refactor ProtocolHandlers to decouple them from ClangdLSPServer (authored by ibiryukov). Changed prior to commit: https://reviews.llvm.org/D33201?vs=99129=99145#toc Repository: rL

[PATCH] D32479: [clang-format] Add BreakConstructorInitializersBeforeColon option

2017-05-16 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? https://reviews.llvm.org/D32479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 99149. yaxunl marked an inline comment as done. yaxunl added a comment. Revised by John's comments. https://reviews.llvm.org/D32248 Files: include/clang/AST/ASTContext.h include/clang/AST/Type.h include/clang/Basic/AddressSpaces.h

[PATCH] D33250: [Sema][ObjC] Fix a bug where -Wunguarded-availability was emitted at the wrong location

2017-05-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 99235. erik.pilkington added a comment. Just noticed this can be simplified a bit, NFC compared to the last version of the diff. https://reviews.llvm.org/D33250 Files: lib/Sema/SemaDeclAttr.cpp test/SemaObjC/unguarded-availability.m Index:

r303233 - [ODRHash] Support NestedNameSpecifier

2017-05-16 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue May 16 22:23:35 2017 New Revision: 303233 URL: http://llvm.org/viewvc/llvm-project?rev=303233=rev Log: [ODRHash] Support NestedNameSpecifier Modified: cfe/trunk/lib/AST/ODRHash.cpp cfe/trunk/lib/Serialization/ASTReader.cpp cfe/trunk/test/Modules/odr_hash.cpp

[clang-tools-extra] r303187 - [clang-tidy] Optimize readability-implicit-bool-cast, NFC

2017-05-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue May 16 11:40:46 2017 New Revision: 303187 URL: http://llvm.org/viewvc/llvm-project?rev=303187=rev Log: [clang-tidy] Optimize readability-implicit-bool-cast, NFC Rearrange matchers to put the most expensive ones closer to the end. Speed up another 3-5x on some files.

RE: Potential self-hosting failure

2017-05-16 Thread John Brawn via cfe-commits
I've managed to reproduce this, but no luck so far in figuring out what exactly is going wrong. I'll continue looking into it tomorrow. John > -Original Message- > From: Renato Golin [mailto:renato.go...@linaro.org] > Sent: 16 May 2017 12:18 > To: John Brawn > Cc: James Molloy; Diana

[PATCH] D33250: [Sema][ObjC] Fix a bug where -Wunguarded-availability was emitted at the wrong location

2017-05-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. Previously, we used TypeLocs to find the correct SourceLocations to emit -Wunguarded-availability. Unfortunately, TypeLocs can't be trusted as they sometimes have an an empty SourceLocation component. This new patch maintains the enclosing SourceLocation

[clang-tools-extra] r303191 - [clang-tidy] Speed up performance-unnecessary-value-param check

2017-05-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue May 16 12:28:17 2017 New Revision: 303191 URL: http://llvm.org/viewvc/llvm-project?rev=303191=rev Log: [clang-tidy] Speed up performance-unnecessary-value-param check Moved slower matchers closer to the end. The total speed up on a large file I was interested in is not

r303192 - [index] Avoid another crash that happens when looking up a dependent name

2017-05-16 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue May 16 12:33:17 2017 New Revision: 303192 URL: http://llvm.org/viewvc/llvm-project?rev=303192=rev Log: [index] Avoid another crash that happens when looking up a dependent name in a record that has a base without a definition rdar://32224197 Modified:

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7296 + unsigned getASTAllocaAddressSpace() const override { +return LangAS::Count + getABIInfo().getDataLayout().getAllocaAddrSpace(); + } yaxunl wrote: > rjmccall wrote: > > Can we

Re: Potential self-hosting failure

2017-05-16 Thread Renato Golin via cfe-commits
On 16 May 2017 at 18:26, John Brawn wrote: > I've managed to reproduce this, but no luck so far in figuring out > what exactly is going wrong. I'll continue looking into it tomorrow. Thanks John, I have reverted it for now on r303193, to get the bots green. cheers, --renato

[PATCH] D32825: [clang-format] Improve understanding of combined typedef+record declarations

2017-05-16 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes marked an inline comment as done. jtbandes added a comment. Another ping. https://reviews.llvm.org/D32825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxxabi] r303175 - [libcxxabi] Align unwindHeader on a double-word boundary.

2017-05-16 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue May 16 10:19:08 2017 New Revision: 303175 URL: http://llvm.org/viewvc/llvm-project?rev=303175=rev Log: [libcxxabi] Align unwindHeader on a double-word boundary. r276215 made a change to annotate _Unwind_Exception with attribute "aligned" so that an exception object

r303158 - [StaticAnalyzer] Move inline counter increaser to inlineCall function

2017-05-16 Thread Peter Szecsi via cfe-commits
Author: szepet Date: Tue May 16 06:54:00 2017 New Revision: 303158 URL: http://llvm.org/viewvc/llvm-project?rev=303158=rev Log: [StaticAnalyzer] Move inline counter increaser to inlineCall function Even though the shouldInlineCall function returns true, it can happen that the function is not

[PATCH] D33263: [scan-build] Patch to scan-build tool to support "--target=" flag

2017-05-16 Thread Haowei Wu via Phabricator via cfe-commits
haowei created this revision. The scan-build script provided by clang can be used to detect defects in code in the compile time. However, we discovered that the "--target=" flag in clang is not properly handled by this script, which results in failures when analyzing projects that have used

[PATCH] D33259: Don't defer to the GCC driver for linking arm-baremetal

2017-05-16 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. While I fully agree that the current fallback-to-GCC behavior is far from helpful, I'm not sure how much sense providing linker support for bare-metal makes. I would expect this to changes wildly depending on the specific environment. https://reviews.llvm.org/D33259

Potential self-hosting failure

2017-05-16 Thread Renato Golin via cfe-commits
Hi John, It seems the LEApcrel patches have broken our self-hosting: http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15-full-sh/builds/1550 http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-selfhost-neon/builds/1349

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 99119. hokein marked an inline comment as done. hokein added a comment. Adress review comments. https://reviews.llvm.org/D33209 Files: clang-tidy/performance/InefficientVectorOperationCheck.cpp

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:92 + const auto VectorAppendCall = expr( + anyOf(VectorAppendCallExpr, exprWithCleanups(has(VectorAppendCallExpr; const

[clang-tools-extra] r303145 - [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls

2017-05-16 Thread Jakub Kuderski via cfe-commits
Author: kuhar Date: Tue May 16 01:32:38 2017 New Revision: 303145 URL: http://llvm.org/viewvc/llvm-project?rev=303145=rev Log: [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls Summary: This patch makes modernize-use-emplace remove unnecessary make_ calls from push_back

[PATCH] D33201: [ClangD] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/ClangdLSPServer.cpp:20 +template +std::string replacementsToEdits(StringRef Code, const T ) { + // Turn the replacements into the format specified by the Language Server Hm, this is a bit too generic for my

[PATCH] D33201: [ClangD] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 99129. ilya-biryukov marked 3 inline comments as done. ilya-biryukov added a comment. Addressed review comments https://reviews.llvm.org/D33201 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdMain.cpp

[PATCH] D32901: [clang-format] Handle trailing comment sections in import statement lines

2017-05-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @djasper: ping https://reviews.llvm.org/D32901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31588: Fix PR25627: Certain constant local variables must be usable as template arguments (without being odr-used)

2017-05-16 Thread Faisal Vali via Phabricator via cfe-commits
faisalv added a comment. *ping* *ping* https://reviews.llvm.org/D31588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33201: [ClangD] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. nit: rename this patch title to start with [clangd] https://reviews.llvm.org/D33201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33201: [clangd] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.cpp:20 +template +std::string replacementsToEdits(StringRef Code, const T ) { + // Turn the replacements into the format specified by the Language Server krasimir wrote: > Hm, this is a

[PATCH] D32351: [Tooling][libclang] Remove unused CompilationDatabase::MappedSources

2017-05-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @klimek: ping https://reviews.llvm.org/D32351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303157: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D33209?vs=99124=99127#toc Repository: rL

[clang-tools-extra] r303157 - [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue May 16 05:39:55 2017 New Revision: 303157 URL: http://llvm.org/viewvc/llvm-project?rev=303157=rev Log: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation. Reviewers: alexfh, aaron.ballman Reviewed By: alexfh Subscribers: cfe-commits, Prazek,

[PATCH] D33201: [ClangD] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/ClangdLSPServer.cpp:206 -std::vector ClangdLSPServer::codeComplete(PathRef File, - Position Pos) { - return Server.codeComplete(File, Pos); + // Set up

[PATCH] D25051: Fix PR 10758: Infinite recursion when dealing with copy-initialization

2017-05-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I will commit it today. Repository: rL LLVM https://reviews.llvm.org/D25051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33233: Restored r303067 and fixed failing test.

2017-05-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. Herald added a subscriber: mgorny. This commit restores r303067(reverted by r303094) and fixes the 'formatting.test' failure. The failure is due to destructors of `ClangdLSPServer`'s fields(`FixItsMap` and `FixItsMutex`) being called before destructor of

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:208 + "consider pre-allocating the vector capacity before the loop") + << VectorAppendCall->getMethodDecl()->getDeclName(); hokein wrote: >

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG once the comments are addressed. https://reviews.llvm.org/D33209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r303151 - Restored r303067 and fixed failing test.

2017-05-16 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue May 16 04:38:59 2017 New Revision: 303151 URL: http://llvm.org/viewvc/llvm-project?rev=303151=rev Log: Restored r303067 and fixed failing test. Summary: This commit restores r303067(reverted by r303094) and fixes the 'formatting.test' failure. The failure is due to

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 99124. hokein marked 3 inline comments as done. hokein added a comment. Improve tests. https://reviews.llvm.org/D33209 Files: clang-tidy/performance/InefficientVectorOperationCheck.cpp docs/clang-tidy/checks/performance-inefficient-vector-operation.rst

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:50 +static const char PushBackOrEmplaceBackCallName[] = +"push_back_or_emplace_back_call"; static const char LoopInitVarName[] = "loop_init_var"; alexfh

[clang-tools-extra] r303154 - Fixing compilation failures on buildbots.

2017-05-16 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue May 16 05:06:20 2017 New Revision: 303154 URL: http://llvm.org/viewvc/llvm-project?rev=303154=rev Log: Fixing compilation failures on buildbots. Modified: clang-tools-extra/trunk/clangd/ClangdServer.cpp clang-tools-extra/trunk/clangd/DraftStore.cpp

r303156 - Fix PR 10758: Infinite recursion when dealing with copy-initialization

2017-05-16 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue May 16 05:23:58 2017 New Revision: 303156 URL: http://llvm.org/viewvc/llvm-project?rev=303156=rev Log: Fix PR 10758: Infinite recursion when dealing with copy-initialization This commit fixes a bug that's tracked by PR 10758 and duplicates like PR 30343. The bug causes

[PATCH] D25051: Fix PR 10758: Infinite recursion when dealing with copy-initialization

2017-05-16 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303156: Fix PR 10758: Infinite recursion when dealing with copy-initialization (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D25051?vs=96122=99125#toc Repository: rL LLVM

[PATCH] D33207: Fix an assertion failure in FormatASTNodeDiagnosticArgument.

2017-05-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/SemaCXX/warn-shadow.cpp:214 +void handleLinkageSpec() { + typedef void externC; // expected-warning {{declaration shadows a typedef in linkage specification}} +} rsmith wrote: > We should be producing a diagnostic

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1120 +address.getPointer()->getType()->getPointerElementType()->getPointerTo( +getContext().getTargetAddressSpace(T.getAddressSpace())), +/*non-null*/ true); A lot of

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:208 + "consider pre-allocating the vector capacity before the loop") + << VectorAppendCall->getMethodDecl()->getDeclName(); Diagnostic builder

[PATCH] D33207: Fix an assertion failure in FormatASTNodeDiagnosticArgument.

2017-05-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 99112. alexfh added a comment. Herald added a subscriber: krytarowski. Instead of handling LinkageSpecDecl, use getRedeclContext() when issuing -Wshadow diagnostic. https://reviews.llvm.org/D33207 Files: lib/Sema/SemaDecl.cpp

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-05-16 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 99114. danielmarjamaki added a comment. Fix review comments Repository: rL LLVM https://reviews.llvm.org/D31029 Files: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h

[PATCH] D33053: [PowerPC] Implement vec_xxpermdi builtin.

2017-05-16 Thread Tony Jiang via Phabricator via cfe-commits
jtony marked 6 inline comments as done. jtony added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:8433 +if (getTarget().isLittleEndian()) { + switch (Index) { + case 0: nemanjai wrote: > The switch is overkill. You should just implement

[libunwind] r303206 - [libunwind] Fix executable stack directive on Linux.

2017-05-16 Thread Manoj Gupta via cfe-commits
Author: manojgupta Date: Tue May 16 15:18:57 2017 New Revision: 303206 URL: http://llvm.org/viewvc/llvm-project?rev=303206=rev Log: [libunwind] Fix executable stack directive on Linux. Summary: Disable executable stack on Linux. Also remove redundant Android check as it is covered by Android.

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7296 + unsigned getASTAllocaAddressSpace() const override { +return LangAS::Count + getABIInfo().getDataLayout().getAllocaAddrSpace(); + } rjmccall wrote: > yaxunl wrote: > > rjmccall

[libcxxabi] r303194 - [libcxxabi] Fix the test case committed in r303175.

2017-05-16 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue May 16 13:18:03 2017 New Revision: 303194 URL: http://llvm.org/viewvc/llvm-project?rev=303194=rev Log: [libcxxabi] Fix the test case committed in r303175. Free the __cxa_exception object allocated with __cxa_allocate_exception. This is an attempt to fix this asan bot:

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-16 Thread Vitaly Buka via cfe-commits
The patch breaks this test http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/1349/steps/check-clang%20msan/logs/stdio Script: -- /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm_build_msan/./bin/clang -cc1 -internal-isystem

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CodeGenTypes.cpp:95 - /// isRecordLayoutComplete - Return true if the specified type is already Why this change? Comment at: lib/CodeGen/TargetInfo.cpp:411 +

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-16 Thread Richard Smith via cfe-commits
On 16 May 2017 at 11:54, Vitaly Buka wrote: > The patch breaks this test http://lab.llvm.org:8011/ > builders/sanitizer-x86_64-linux-bootstrap/builds/1349/ > steps/check-clang%20msan/logs/stdio > Given the nature of this change, that's a surprise, but anything's possible.

[PATCH] D32449: Modifying PthreadLockChecker.cpp to reduce false positives.

2017-05-16 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 99179. malhar1995 added a comment. Added context. Also, I removed the inclusion of iostream and also added the repetitive code to the function setAppropriateLockState. Currently working on finding various corner cases and invariants. Repository: rL

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7296 + unsigned getASTAllocaAddressSpace() const override { +return LangAS::Count + getABIInfo().getDataLayout().getAllocaAddrSpace(); + } yaxunl wrote: > rjmccall wrote: > > yaxunl

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:411 +CodeGen::CodeGenFunction , llvm::Value *Src, unsigned SrcAddr, +unsigned DestAddr, llvm::Type *DestTy, bool isNonNull) const { // Since target may map different address spaces in AST to the

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-16 Thread Richard Smith via cfe-commits
On 15 May 2017 at 10:28, Jordan Rose via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi, Richard. Swift was using this information in order to put imported > macros in a particular context. It wouldn't surprise me to hear that we > were doing it wrong, and that there's a better way to go

[PATCH] D33259: Don't defer to the GCC driver for linking arm-baremetal

2017-05-16 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added inline comments. This revision now requires changes to proceed. Comment at: cmake/caches/BaremetalARM.cmake:1 +set(LLVM_TARGETS_TO_BUILD ARM CACHE STRING "") + Please rename this file to

r303228 - (1) Fixed mismatch in intrinsics names in declarations and in doxygen comments.

2017-05-16 Thread Ekaterina Romanova via cfe-commits
Author: kromanova Date: Tue May 16 20:46:11 2017 New Revision: 303228 URL: http://llvm.org/viewvc/llvm-project?rev=303228=rev Log: (1) Fixed mismatch in intrinsics names in declarations and in doxygen comments. (2) Removed uncessary anymore \c commands, since the same effect will be achived by

[PATCH] D33201: [clangd] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good! Comment at: clangd/ClangdLSPServer.h:33 + /// each instance of ClangdLSPServer. + void run(std::istream ); ilya-biryukov wrote: >

[PATCH] D32480: [clang-format] Add BinPackNamespaces option

2017-05-16 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. We have a large closed-source codebase with this style, and would welcome clang-format support. https://reviews.llvm.org/D32480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r303173 - [clangd] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-16 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue May 16 09:40:30 2017 New Revision: 303173 URL: http://llvm.org/viewvc/llvm-project?rev=303173=rev Log: [clangd] Refactor ProtocolHandlers to decouple them from ClangdLSPServer Summary: A refactoring to decouple ProtocolHandlers and Language Server input parsing loop

[clang-tools-extra] r303177 - Added missing includes in clangd to fix the build.

2017-05-16 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue May 16 10:23:55 2017 New Revision: 303177 URL: http://llvm.org/viewvc/llvm-project?rev=303177=rev Log: Added missing includes in clangd to fix the build. This commit should fix buildbot failures. Modified: clang-tools-extra/trunk/clangd/JSONRPCDispatcher.cpp

[PATCH] D33258: clang-cl: Fix path-based MSVC version detection

2017-05-16 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I'd rather not hardcode all the msvc archs. IMO we should just look up one level and check if that's called bin, and continue if so. I think I had: bool IsBin = llvm::sys::path::filename(PathEntry).compare_lower("bin"); if (!IsBin) { PathEntry =

[PATCH] D33259: Don't defer to the GCC driver for linking arm-baremetal

2017-05-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 99210. jroelofs added a comment. pass through linker flags, and remove my own paths from the test. https://reviews.llvm.org/D33259 Files: cmake/caches/BaremetalARM.cmake lib/Driver/CMakeLists.txt lib/Driver/Driver.cpp

[PATCH] D33258: clang-cl: Fix path-based MSVC version detection

2017-05-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans updated this revision to Diff 99213. hans added a comment. Addressing comments. https://reviews.llvm.org/D33258 Files: lib/Driver/ToolChains/MSVC.cpp Index: lib/Driver/ToolChains/MSVC.cpp === ---

[PATCH] D33258: clang-cl: Fix path-based MSVC version detection

2017-05-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans created this revision. The code wasn't taking the architecture-specific subdirectory into account. https://reviews.llvm.org/D33258 Files: lib/Driver/ToolChains/MSVC.cpp Index: lib/Driver/ToolChains/MSVC.cpp === ---

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 99204. yaxunl marked 4 inline comments as done. yaxunl added a comment. Herald added a subscriber: nhaehnle. Removed special handling of OpenCL from getTargetAddressSpace. https://reviews.llvm.org/D32248 Files: include/clang/AST/ASTContext.h

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7294 llvm::PointerType *T, QualType QT) const override; + }; yaxunl wrote: > rjmccall wrote: > > Spurious newline? > will remove it. Sorry this line is needed to separate it from the

[PATCH] D33258: clang-cl: Fix path-based MSVC version detection

2017-05-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a subscriber: thakis. hans added a comment. Nico asked about tests. This whole thing landed (r297851) without tests, and I'm not sure it's worth the effort adding one for this :-/ https://reviews.llvm.org/D33258 ___ cfe-commits mailing

[PATCH] D31588: Fix PR25627: Certain constant local variables must be usable as template arguments (without being odr-used)

2017-05-16 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Parse/ParseExpr.cpp:203-222 + // Create the ExpressionEvaluationContext on the stack - but only if asked to. + struct EnterExpressionEvaluationContextConditionalRAII { +

[PATCH] D33259: Don't defer to the GCC driver for linking arm-baremetal

2017-05-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs created this revision. Herald added subscribers: javed.absar, mgorny, rengolin, aemerson. https://reviews.llvm.org/D33259 Files: cmake/caches/BaremetalARM.cmake lib/Driver/CMakeLists.txt lib/Driver/Driver.cpp lib/Driver/ToolChains/BareMetal.cpp

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 14 inline comments as done. yaxunl added inline comments. Comment at: lib/CodeGen/CodeGenTypes.cpp:95 - /// isRecordLayoutComplete - Return true if the specified type is already Anastasia wrote: > Why this change? Will undo it.

[PATCH] D33263: [scan-build] Patch to scan-build tool to support "--target=" flag

2017-05-16 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Looks good. Thank you! Do you have commit access or should we commit? https://reviews.llvm.org/D33263 ___ cfe-commits mailing list

[PATCH] D33263: [scan-build] Patch to scan-build tool to support "--target=" flag

2017-05-16 Thread Haowei Wu via Phabricator via cfe-commits
haowei added a comment. In https://reviews.llvm.org/D33263#756900, @zaks.anna wrote: > Looks good. Thank you! > Do you have commit access or should we commit? I don't have commit access, so could you commit this patch? Thanks. https://reviews.llvm.org/D33263

[PATCH] D33259: Don't defer to the GCC driver for linking arm-baremetal

2017-05-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. > I would expect this to changes wildly depending on the specific environment. My assertion is that our default "specific environment" ought to cater to using llvm's own tools... at least until someone comes along and says they actually want `-fuse-ld=gcc`, or

[PATCH] D33258: clang-cl: Fix path-based MSVC version detection

2017-05-16 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D33258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r303222 - Fix scope of namespaced DISubprograms when the function definition is out-of-line.

2017-05-16 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Tue May 16 18:46:10 2017 New Revision: 303222 URL: http://llvm.org/viewvc/llvm-project?rev=303222=rev Log: Fix scope of namespaced DISubprograms when the function definition is out-of-line. This fixes a regression introduced in r302915. Using the lexical decl context is not

r303224 - [modules] When creating a declaration, cache its owning module immediately

2017-05-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue May 16 19:24:14 2017 New Revision: 303224 URL: http://llvm.org/viewvc/llvm-project?rev=303224=rev Log: [modules] When creating a declaration, cache its owning module immediately rather than waiting until it's queried. Currently this is only applied to local submodule

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-16 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Looks great, thank you for being patient. https://reviews.llvm.org/D32248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r303230 - [clang-tidy] Optimize misc-unused-parameters. NFCI

2017-05-16 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue May 16 21:25:11 2017 New Revision: 303230 URL: http://llvm.org/viewvc/llvm-project?rev=303230=rev Log: [clang-tidy] Optimize misc-unused-parameters. NFCI Don't traverse AST each time we need to find references to a certain function. Traverse the AST once using RAV and

r303231 - [ODRHash] Support more types in the ODR checker.

2017-05-16 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue May 16 21:29:02 2017 New Revision: 303231 URL: http://llvm.org/viewvc/llvm-project?rev=303231=rev Log: [ODRHash] Support more types in the ODR checker. Added support for TagType, TypeWithKeyword, and all children types. Modified: cfe/trunk/lib/AST/ODRHash.cpp