[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. This is a good start, a few comments. Also I'd suggest running clang-format on this patch -- I saw a few places violate the code style. Comment at: include/clang/Tooling/CommonOptionsParser.h:90 /// - /// This constructor exits program in case of er

[PATCH] D38110: [libunwind][MIPS]: Add support for unwinding in O32 and N64 processes.

2017-10-13 Thread Simon Dardis via Phabricator via cfe-commits
sdardis requested changes to this revision. sdardis added a comment. This revision now requires changes to proceed. Marking this as changes required to clear up my review queue - no further comments. https://reviews.llvm.org/D38110 ___ cfe-commits

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 118898. ioeric added a comment. - Minor cleanups. https://reviews.llvm.org/D34272 Files: include/clang/Tooling/CommonOptionsParser.h include/clang/Tooling/Execution.h include/clang/Tooling/ToolExecutorPluginRegistry.h include/clang/Tooling/Tooling.h

[PATCH] D38863: Typos in tutorial

2017-10-13 Thread Chad Rosier via Phabricator via cfe-commits
mcrosier closed this revision. mcrosier added a comment. Committed in r315652. https://reviews.llvm.org/D38863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r315678 - Fix regression of test/CodeGenOpenCL/address-spaces.cl on ppc

2017-10-13 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Oct 13 06:53:06 2017 New Revision: 315678 URL: http://llvm.org/viewvc/llvm-project?rev=315678&view=rev Log: Fix regression of test/CodeGenOpenCL/address-spaces.cl on ppc Modified: cfe/trunk/test/CodeGenOpenCL/address-spaces.cl Modified: cfe/trunk/test/CodeGenOpenCL/a

[PATCH] D38284: [clang-tidy] Fix google-readability-namespace-comments handling of C++17 nested namespaces

2017-10-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/NamespaceCommentCheck.cpp:97 + } + while (Lexer::getRawToken(LBracketLocation, Tok, Sources, getLangOpts()) || + !Tok.is(tok::l_brace)) { alexfh wrote: > alexfh wrote: > > The check starte

[PATCH] D38882: [clang-rename] Add function unit tests.

2017-10-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added subscribers: mgorny, klimek. Also contain some fixes: - Get rid of the "TranslationUnitDecl" special case in RenameClass, as we switch to use USR instead of AST matcher to find symbols. A bonus point is that now the test cases make more sense. - Fix a

[PATCH] D38813: [X86] Add skeleton support for "knm" cpu - clang side

2017-10-13 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/Basic/Targets/X86.cpp:232 + case CK_KNM: case CK_KNL: Worth adding a TODO comment for the missing features? https://reviews.ll

[PATCH] D38688: [clang-tidy] Misc redundant expressions checker updated for macros

2017-10-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Thanks for working on this, these additions look very useful to me. Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:124 + case Stmt::CXXFunctionalCastExprClass: +return cast(Left)->getTypeAsWritten() == You could merge

[PATCH] D38877: [analyzer] RetainCount: Accept "safe" CFRetain wrappers.

2017-10-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. Herald added subscribers: szepet, xazax.hun. CoreFoundation users often look for a "safe" wrapper around `CFRetain` and `CFRelease` that would gracefully accept (and ignore) a null CF reference. Users are trying to annotate it with `CF_RETURNS_RETAINED`, which misleads

Re: r315668 - [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-10-13 Thread Eric Liu via cfe-commits
Hi Yaxun, this is causing failures in ppc build bots ( http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/5486). I'll revert the patch for now. Please take a look. Thanks! On Fri, Oct 13, 2017 at 5:37 AM Yaxun Liu via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author:

[clang-tools-extra] r315682 - [clang-tidy] Add a regression test for google-readability-namespace-comments

2017-10-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Oct 13 07:11:14 2017 New Revision: 315682 URL: http://llvm.org/viewvc/llvm-project?rev=315682&view=rev Log: [clang-tidy] Add a regression test for google-readability-namespace-comments Add a regression test for the google-readability-namespace-comments bug introduced in r

Re: r315668 - [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-10-13 Thread Eric Liu via cfe-commits
Ah, I saw you already sent a fix in r315678. Thank you for the fix! No revert! :) On Fri, Oct 13, 2017 at 4:10 PM Eric Liu wrote: > Hi Yaxun, this is causing failures in ppc build bots ( > http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/5486). > I'll revert the patch for

[PATCH] D38284: [clang-tidy] Fix google-readability-namespace-comments handling of C++17 nested namespaces

2017-10-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/NamespaceCommentCheck.cpp:97 + } + while (Lexer::getRawToken(LBracketLocation, Tok, Sources, getLangOpts()) || + !Tok.is(tok::l_brace)) { alexfh wrote: > alexfh wrote: > > alexfh wrote: >

[PATCH] D38688: [clang-tidy] Misc redundant expressions checker updated for macros

2017-10-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:357 + ConstExpr = Result.Nodes.getNodeAs(CstId); + return ConstExpr && ConstExpr->isIntegerConstantExpr(Value, *Result.Context); +} xazax.hun wrote: > I think you could ju

[PATCH] D38629: [clangd] Added a callback-based codeComplete in clangd.

2017-10-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/ClangdServer.cpp:51 +template +std::future makeFutureAPIFromCallback( I'm not sure we need a template here rather than just writing the code directly. Comment at: clangd/ClangdServer.cpp:25

[PATCH] D38720: [clangd] Report proper kinds for 'Keyword' and 'Snippet' completion items.

2017-10-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. Going to land this on Ilya's behalf as he's out on vacation. https://reviews.llvm.org/D38720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 118911. JonasToth added a comment. ping: I don't understand the lack of feedback. This check should not be a frontend warning, since it warns for perfectly valid code. It is supposed to give stronger guarantees for developers requiring this. - rebased to

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld created this revision. Herald added a subscriber: mgorny. For the shuffle instructions in reductions we need at least sm_30 but the user may want to customize the default architecture. Also remove some code that went in while troubleshooting broken tests on external build bots. https://

[PATCH] D38882: [clang-rename] Add function unit tests.

2017-10-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lg https://reviews.llvm.org/D38882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 118915. arichardson edited the summary of this revision. arichardson added a comment. This revision is now accepted and ready to land. - Keep old behaviour for clang_getAddressSpace() - renamed to getLangASFromTargetAS() - rebased on latest trunk https:/

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/vector_swizzle_length.cl:7 void foo() { -float8 f2 = (float8)(0, 0, 0, 0, 0, 0, 0, 0); +float8 f2 = (float8){0, 0, 0, 0, 0, 0, 0, 0}; Even though this works in Clang, ideally OpenCL vector li

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added a comment. I very much like this check. I only have a few minor comments, but maybe this encourages others to have a look too! Comment at: clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp:85 +diag(ElseIfWithoutElse->getLocStart(), + "potential unco

r315688 - Remove an unused variable.

2017-10-13 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Oct 13 08:34:03 2017 New Revision: 315688 URL: http://llvm.org/viewvc/llvm-project?rev=315688&view=rev Log: Remove an unused variable. Fix -Wunused-but-set-variable warning. Modified: cfe/trunk/lib/Sema/SemaType.cpp Modified: cfe/trunk/lib/Sema/SemaType.cpp URL: ht

r315689 - Fix an unused-variable warning.

2017-10-13 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Oct 13 08:37:53 2017 New Revision: 315689 URL: http://llvm.org/viewvc/llvm-project?rev=315689&view=rev Log: Fix an unused-variable warning. Modified: cfe/trunk/lib/CodeGen/CGClass.cpp Modified: cfe/trunk/lib/CodeGen/CGClass.cpp URL: http://llvm.org/viewvc/llvm-proje

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() arichardson wrote: > Anastasia wrote: > >

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() Anastasia wrote: > arichardson wrote: >

[PATCH] D38857: [OpenCL] Improve printing and semantic check related to implicit addr space

2017-10-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Can we close https://bugs.llvm.org/show_bug.cgi?id=33418 after this commit? Comment at: test/SemaOpenCL/null_literal.cl:38 -#ifdef CL20 -// Accept expl

[PATCH] D38134: [OpenCL] Emit enqueued block as kernel

2017-10-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Great work! Thanks! https://reviews.llvm.org/D38134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-10-13 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. https://reviews.llvm.org/D37299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp:85 +diag(ElseIfWithoutElse->getLocStart(), + "potential uncovered codepath found; add an ending else branch"); +return; JDevlieghere wrote: > I'm not a big

r315699 - Hide "#pragma optimize("", off)" from clang when it pretends to be MSVC 2017

2017-10-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Oct 13 09:18:32 2017 New Revision: 315699 URL: http://llvm.org/viewvc/llvm-project?rev=315699&view=rev Log: Hide "#pragma optimize("", off)" from clang when it pretends to be MSVC 2017 These pragmas work around a bug in VC 1911 that isn't present in clang, and clang warns ab

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() arichardson wrote: > Anastasia wrote: > >

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() Anastasia wrote: > arichardson wrote: >

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38893: [change-namespace] do not change type locs in defaulted functions.

2017-10-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. https://reviews.llvm.org/D38893 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-namespace/ChangeNamespaceTests.cpp === --- un

r315702 - [CodeGen] EmitCXXMemberDataPointerAddress() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Fri Oct 13 09:38:32 2017 New Revision: 315702 URL: http://llvm.org/viewvc/llvm-project?rev=315702&view=rev Log: [CodeGen] EmitCXXMemberDataPointerAddress() to generate TBAA info along with LValue base info This patch should not bring in any functional changes. Differential

[PATCH] D38788: [CodeGen] EmitCXXMemberDataPointerAddress() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315702: [CodeGen] EmitCXXMemberDataPointerAddress() to generate TBAA info along with… (authored by kosarev). Changed prior to commit: https://reviews.llvm.org/D38788?vs=118560&id=118931#toc Repository:

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() arichardson wrote: > Anastasia wrote: >

r315704 - [CodeGen] EmitLoadOfPointer() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Fri Oct 13 09:47:22 2017 New Revision: 315704 URL: http://llvm.org/viewvc/llvm-project?rev=315704&view=rev Log: [CodeGen] EmitLoadOfPointer() to generate TBAA info along with LValue base info This patch should not bring in any functional changes. Differential Revision: http

[PATCH] D38791: [CodeGen] EmitLoadOfPointer() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315704: [CodeGen] EmitLoadOfPointer() to generate TBAA info along with LValue base info (authored by kosarev). Changed prior to commit: https://reviews.llvm.org/D38791?vs=118575&id=118932#toc Repositor

r315705 - [CodeGen] EmitLoadOfReference() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Fri Oct 13 09:50:50 2017 New Revision: 315705 URL: http://llvm.org/viewvc/llvm-project?rev=315705&view=rev Log: [CodeGen] EmitLoadOfReference() to generate TBAA info along with LValue base info This patch should not bring in any functional changes. Differential Revision: h

[PATCH] D38793: [CodeGen] EmitLoadOfReference() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315705: [CodeGen] EmitLoadOfReference() to generate TBAA info along with LValue base… (authored by kosarev). Changed prior to commit: https://reviews.llvm.org/D38793?vs=118578&id=118933#toc Repository:

r315707 - [SEH] Use the SEH personality on frontend-outlined funclets

2017-10-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Oct 13 09:55:14 2017 New Revision: 315707 URL: http://llvm.org/viewvc/llvm-project?rev=315707&view=rev Log: [SEH] Use the SEH personality on frontend-outlined funclets This allows __try inside __finally to work. Fixes PR34939 Modified: cfe/trunk/lib/CodeGen/CGException

r315708 - [CodeGen] getNaturalTypeAlignment() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Fri Oct 13 09:58:30 2017 New Revision: 315708 URL: http://llvm.org/viewvc/llvm-project?rev=315708&view=rev Log: [CodeGen] getNaturalTypeAlignment() to generate TBAA info along with LValue base info This patch should not bring in any functional changes. Differential Revisio

[PATCH] D38794: [CodeGen] getNaturalTypeAlignment() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315708: [CodeGen] getNaturalTypeAlignment() to generate TBAA info along with LValue… (authored by kosarev). Changed prior to commit: https://reviews.llvm.org/D38794?vs=118581&id=118934#toc Repository:

r315712 - Revert "[lit] Raise the logic for enabling clang & lld substitutions to llvm."

2017-10-13 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Fri Oct 13 10:11:13 2017 New Revision: 315712 URL: http://llvm.org/viewvc/llvm-project?rev=315712&view=rev Log: Revert "[lit] Raise the logic for enabling clang & lld substitutions to llvm." This reverts commit r315627, fixing bot failures: http://green.lab.llvm.org/green/job/

[PATCH] D38794: [CodeGen] getNaturalTypeAlignment() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added a comment. Right. Switching back to returning just AlignmentSource would make its name more adequate, but I suspect we intentionally want full-size lvalue base info here. Repository: rL LLVM https://reviews.llvm.org/D38794 ___ cfe

Re: r315627 - [lit] Raise the logic for enabling clang & lld substitutions to llvm.

2017-10-13 Thread Bruno Cardoso Lopes via cfe-commits
Hi Zachary, I reverted this in r315712, since it's making one of our bots red since yesterday (more explanations in the commit): http://green.lab.llvm.org/green/job/clang-stage1-configure-RA Cheers, On Thu, Oct 12, 2017 at 2:56 PM, Zachary Turner via cfe-commits wrote: > Author: zturner > Date:

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld marked an inline comment as done. Hahnfeld added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -

r315715 - [CodeGen] emitOMPArraySectionBase() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Fri Oct 13 10:34:18 2017 New Revision: 315715 URL: http://llvm.org/viewvc/llvm-project?rev=315715&view=rev Log: [CodeGen] emitOMPArraySectionBase() to generate TBAA info along with LValue base info Differential Revision: https://reviews.llvm.org/D38795 Modified: cfe/tr

[PATCH] D38795: [CodeGen] emitOMPArraySectionBase() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315715: [CodeGen] emitOMPArraySectionBase() to generate TBAA info along with LValue… (authored by kosarev). Changed prior to commit: https://reviews.llvm.org/D38795?vs=118585&id=118940#toc Repository:

[PATCH] D38877: [analyzer] RetainCount: Accept "safe" CFRetain wrappers.

2017-10-13 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Looks good to me! https://reviews.llvm.org/D38877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld marked 4 inline comments as done. Hahnfeld added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added inline comments. Comment at: clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp:96 +// Only the default branch (we explicitly matched for default!) exists. +if (CaseCount == 1) { + diag(SwitchWithDefault->getLocStart(), JonasToth wrote

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; I would also like to keep the spirit of this code if not in this exact form at least something that performs the same functionality. https://reviews.llvm.org/D38883 _

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38813: [X86] Add skeleton support for "knm" cpu - clang side

2017-10-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315723: [X86] Add skeleton support for knm cpu (authored by ctopper). Changed prior to commit: https://reviews.llvm.org/D38813?vs=118650&id=118945#toc Repository: rL LLVM https://reviews.llvm.org/D3

r315723 - [X86] Add skeleton support for knm cpu

2017-10-13 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri Oct 13 11:14:24 2017 New Revision: 315723 URL: http://llvm.org/viewvc/llvm-project?rev=315723&view=rev Log: [X86] Add skeleton support for knm cpu This adds support Knights Mill CPU. Preprocessor defines match gcc's implementation. Differential Revision: https://review

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; gtbercea wrote: > I would also like to keep the spirit of this code if not in this exact form > at least something that performs the same functionality. @tra what's your opini

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; gtbercea wrote: > gtbercea wrote: > > I would also like to keep the spirit of this code if not in this exact form > > at least something that performs the same functionality. > @tr

[PATCH] D38101: [Sema] Diagnose tautological comparison with type's min/max values

2017-10-13 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: cfe/trunk/test/Sema/tautological-constant-compare.c:23 + + if (c > macro(255)) + return; I'm having second thoughts about macro handling. Right now we completely ignore the comparisons when the constant is anyho

[PATCH] D37897: [StaticAnalyzer] Fix ProgramState for static variables that are not written

2017-10-13 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 118947. danielmarjamaki added a comment. Track modification of global static variables in CallGraph construction Repository: rL LLVM https://reviews.llvm.org/D37897 Files: include/clang/AST/Decl.h include/clang/StaticAnalyzer/Core/PathSensiti

r315729 - [X86] Remove 'knm' defines from predefined-arch-macros.c test.

2017-10-13 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri Oct 13 11:38:10 2017 New Revision: 315729 URL: http://llvm.org/viewvc/llvm-project?rev=315729&view=rev Log: [X86] Remove 'knm' defines from predefined-arch-macros.c test. Direction seems to be that we dont' want to keep adding these, but I forgot to remove it from the t

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; tra wrote: > gtbercea wrote: > > gtbercea wrote: > > > I would also like to keep the spirit of this code if not in this exact > > > form at least something that performs the s

r315731 - [CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Fri Oct 13 11:40:18 2017 New Revision: 315731 URL: http://llvm.org/viewvc/llvm-project?rev=315731&view=rev Log: [CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info Differential Revision: https://reviews.llvm.org/D38796 Modified: cfe/t

[PATCH] D38796: [CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315731: [CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue… (authored by kosarev). Changed prior to commit: https://reviews.llvm.org/D38796?vs=118599&id=118950#toc Repository:

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; gtbercea wrote: > tra wrote: > > gtbercea wrote: > > > gtbercea wrote: > > > > I would also like to keep the spirit of this code if not in this exact > > > > form at least som

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-13 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno marked 2 inline comments as done. bruno added inline comments. Comment at: test/SemaOpenCL/vector_swizzle_length.cl:7 void foo() { -float8 f2 = (float8)(0, 0, 0, 0, 0, 0, 0, 0); +float8 f2 = (float8){0, 0, 0, 0, 0, 0, 0, 0}; Anastasia wrote: > Ev

[PATCH] D38101: [Sema] Diagnose tautological comparison with type's min/max values

2017-10-13 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Forgot to add, i really noticed/though about it just now, in https://reviews.llvm.org/D38871, because i did not encountered any warnings in that code in stage-2 builds. Repository: rL LLVM https://reviews.llvm.org/D38101 ___

[PATCH] D37897: [StaticAnalyzer] Fix ProgramState for static variables that are not written

2017-10-13 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:123 + // Is variable changed anywhere in TU? + for (const Decl *D : AMgr.getASTContext().getTranslationUnitDecl()->decls()) { +if (isChanged(D, VD)) danielmarjamaki w

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

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

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 118951. JonasToth marked 2 inline comments as done. JonasToth added a comment. - major codechange https://reviews.llvm.org/D37808 Files: clang-tidy/hicpp/CMakeLists.txt clang-tidy/hicpp/HICPPTidyModule.cpp clang-tidy/hicpp/MultiwayPathsCoveredCheck.

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 6 inline comments as done. JonasToth added inline comments. Comment at: clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp:96 +// Only the default branch (we explicitly matched for default!) exists. +if (CaseCount == 1) { + diag(SwitchWithDefault->getLoc

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 4 inline comments as done. JonasToth added a comment. Improved check a lot. Hope reviewers now have an easier time reading it. https://reviews.llvm.org/D37808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

r315736 - [analyzer] RetainCount: Ignore annotations on user-made CFRetain wrappers.

2017-10-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Oct 13 12:10:42 2017 New Revision: 315736 URL: http://llvm.org/viewvc/llvm-project?rev=315736&view=rev Log: [analyzer] RetainCount: Ignore annotations on user-made CFRetain wrappers. It is not uncommon for the users to make their own wrappers around CoreFoundation's CF

[PATCH] D38877: [analyzer] RetainCount: Accept "safe" CFRetain wrappers.

2017-10-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315736: [analyzer] RetainCount: Ignore annotations on user-made CFRetain wrappers. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D38877?vs=118891&id=118953#toc Repository:

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-13 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:15055 } + // If it is the last field is checked elsewhere. } rjmccall wrote: > vsapsai wrote: > > rjmccall wrote: > > > "Whether" rather than "If", please. You sh

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. F5426271: llvm_lib_target_x86_paths Example output for `llvm/lib/Target/X86` Running it over the whole `llvm/lib` codebase generates a lot of warnings. Please note, that it seems to be common to write code like this: int Val; swi

[PATCH] D38900: libunwind: document tested FreeBSD configs and sort OS list

2017-10-13 Thread Ed Maste via Phabricator via cfe-commits
emaste created this revision. Herald added subscribers: kristof.beyls, krytarowski, aemerson. libunwind is known to work on FreeBSD/amd64 and FreeBSD/arm64, and is the default unwinder on both of those architectures. While here sort the OS list. https://reviews.llvm.org/D38900 Files: docs/i

[PATCH] D38900: libunwind: document tested FreeBSD configs and sort OS list

2017-10-13 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a subscriber: joerg. krytarowski added a comment. @joerg might have insight on ppc, sparc64, arm on NetBSD. https://reviews.llvm.org/D38900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

r315738 - [clang-refactor] Apply source replacements

2017-10-13 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Oct 13 12:42:05 2017 New Revision: 315738 URL: http://llvm.org/viewvc/llvm-project?rev=315738&view=rev Log: [clang-refactor] Apply source replacements This commit actually brings clang-refactor to a usable state as it can now apply the refactoring changes to source file

[PATCH] D38402: [clang-refactor] Apply source replacements

2017-10-13 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315738: [clang-refactor] Apply source replacements (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D38402?vs=118471&id=118959#toc Repository: rL LLVM https://reviews.llvm.o

[PATCH] D38110: [libunwind][MIPS]: Add support for unwinding in O32 and N64 processes.

2017-10-13 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb updated this revision to Diff 118960. bsdjhb added a comment. - Check _ABI* rather than _MIPS_SIM. - Save and restore lo/hi. - Expand FIXME comment for more missing registers. - Return UNW_SUCCESS from unw_getcontext(). - Use correct DWARF numbers for hi and lo and put hi first. - Bump high

r315739 - Revert "[CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info", r315731.

2017-10-13 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Fri Oct 13 12:55:01 2017 New Revision: 315739 URL: http://llvm.org/viewvc/llvm-project?rev=315739&view=rev Log: Revert "[CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info", r315731. With this change we fail on the clang-x86_64-linux-selfh

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld updated this revision to Diff 118961. Hahnfeld marked an inline comment as done. Hahnfeld edited the summary of this revision. Hahnfeld added a comment. Check that the user didn't specify a value lower than `sm_30` and re-add some code as discussed. https://reviews.llvm.org/D38883 Fil

[PATCH] D38901: [CUDA] Require libdevice only if needed

2017-10-13 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld created this revision. If the user passes -nocudalib, we can live without it being present. Simplify the code by just checking whether LibDeviceMap is empty. https://reviews.llvm.org/D38901 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp

[PATCH] D38901: [CUDA] Require libdevice only if needed

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. The change could use a test. https://reviews.llvm.org/D38901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r315741 - Basic: adjust attributes on `nan` LIBBUILTINs

2017-10-13 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Fri Oct 13 13:07:30 2017 New Revision: 315741 URL: http://llvm.org/viewvc/llvm-project?rev=315741&view=rev Log: Basic: adjust attributes on `nan` LIBBUILTINs The `nan` family of functions will inspect the contents of the parameter that they are passed. As a result, the func

[PATCH] D38797: [analyzer] CStringChecker: pr34460: Admit that some casts are hard to model.

2017-10-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315742: [analyzer] CStringChecker: pr34460: Avoid a crash when a cast is not modeled. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D38797?vs=118597&id=118964#toc Repositor

r315742 - [analyzer] CStringChecker: pr34460: Avoid a crash when a cast is not modeled.

2017-10-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Oct 13 13:11:00 2017 New Revision: 315742 URL: http://llvm.org/viewvc/llvm-project?rev=315742&view=rev Log: [analyzer] CStringChecker: pr34460: Avoid a crash when a cast is not modeled. The checker used to crash when a mempcpy's length argument is symbolic. In this cas

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; gtbercea wrote: > gtbercea wrote: > > tra wrote: > > > gtbercea wrote: > > > > gtbercea wrote: > > > > > I would also like to keep the spirit of this code if not in this > > > > >

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-13 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 118966. bruno marked 2 inline comments as done. bruno added a comment. Update patch after Anastasia's suggestions https://reviews.llvm.org/D38868 Files: lib/Sema/SemaExprMember.cpp test/Sema/vector_swizzle_length.c test/SemaOpenCL/vector_swizzle_length.

[PATCH] D38667: AMDGPU: Parse r600 CPU name early and expose FMAF capability

2017-10-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm accepted this revision. arsenm added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D38667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

  1   2   >