[PATCH] D43908: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC

2018-03-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 136471. mstorsjo edited the summary of this revision. mstorsjo added a comment. Added an error-by-default diagnostic (just like the existing warn_cxx_ms_struct) for this case, trigger it on all targets other than mingw (where the situation is quite likely t

[PATCH] D43928: [analyzer] Correctly measure array size in security.insecureAPI.strcpy

2018-03-01 Thread András Leitereg via Phabricator via cfe-commits
leanil created this revision. leanil added reviewers: dcoughlin, xazax.hun, NoQ. Herald added subscribers: a.sidorin, rnkovacs, szepet. Herald added a reviewer: george.karpenkov. This will handle those platforms that don't have 8-bit chars. This is a follow up fix to review https://reviews.llvm.or

[PATCH] D43928: [analyzer] Correctly measure array size in security.insecureAPI.strcpy

2018-03-01 Thread András Leitereg via Phabricator via cfe-commits
leanil updated this revision to Diff 136474. leanil added a comment. `getQuantity()` returns a signed type https://reviews.llvm.org/D43928 Files: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp Index: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp ==

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-03-01 Thread Frederic Tingaud via Phabricator via cfe-commits
ftingaud added inline comments. Comment at: clang-tidy/modernize/MakeUniqueCheck.cpp:21 +: MakeSmartPtrCheck(Name, Context, "std::make_unique"), + MinimumLanguageVersion(Options.get("MakeUniqueLanguageVersion", + getDefaultMinimumL

[PATCH] D43731: [clang-format] Fix documentation for SpaceAfterCStyleCast option

2018-03-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir requested changes to this revision. krasimir added a comment. This revision now requires changes to proceed. This rst file is generated from include/clang/Format/Format.h using docs/tools/dump_format_style.py. Update it there and run the tool to regenerate the .rst file. Repository:

[PATCH] D43869: [clangd] Support include canonicalization in symbol leve.

2018-03-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/index/CanonicalIncludes.cpp:83 + static const std::vector> SymbolMap = { + // Map symbols in to their preferred includes. + {"std::basic_filebuf", ""}, Looks like the list only contains stream-related s

[PATCH] D43869: [clangd] Support include canonicalization in symbol leve.

2018-03-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/CanonicalIncludes.cpp:83 + static const std::vector> SymbolMap = { + // Map symbols in to their preferred includes. + {"std::basic_filebuf", ""}, hokein wrote: > Looks like the list only contains

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D43847#1021967, @aaron.ballman wrote: > I need a bit more context because I'm unfamiliar with `absl`. What is this > module's intended use? As `absl` has been open-sourced (https://github.com/abseil/abseil-cpp), I think there will be more ab

r326426 - [clang-format] Add SpaceBeforeColon option

2018-03-01 Thread Francois Ferrand via cfe-commits
Author: typz Date: Thu Mar 1 02:09:13 2018 New Revision: 326426 URL: http://llvm.org/viewvc/llvm-project?rev=326426&view=rev Log: [clang-format] Add SpaceBeforeColon option Summary: When disabled, this option allows removing the space before colon, making it act more like the semi-colon. When en

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

2018-03-01 Thread Francois Ferrand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326426: [clang-format] Add SpaceBeforeColon option (authored by Typz, committed by ). Changed prior to commit: https://reviews.llvm.org/D32525?vs=136305&id=136483#toc Repository: rC Clang https://re

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

2018-03-01 Thread Francois Ferrand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326426: [clang-format] Add SpaceBeforeColon option (authored by Typz, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D32525 Files: cfe/trunk/do

[PATCH] D43108: Support for the mno-stack-arg-probe flag

2018-03-01 Thread Amara Emerson via Phabricator via cfe-commits
aemerson added a comment. In https://reviews.llvm.org/D43108#1023300, @nruslan wrote: > By default, stack probes are enabled (i.e., -mstack-arg-probe is the default > behavior) and have the size of 4K in x86. This part what I wanted to clarify, `-mstack-probe-arg` is enabling stack probes if

r326432 - Revert "[analyzer] Support for naive cross translation unit analysis"

2018-03-01 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Mar 1 04:43:39 2018 New Revision: 326432 URL: http://llvm.org/viewvc/llvm-project?rev=326432&view=rev Log: Revert "[analyzer] Support for naive cross translation unit analysis" Also revert "[analyzer] Fix a compiler warning" This reverts commits r326323 and r326324.

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-03-01 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin reopened this revision. a.sidorin added a comment. The changes were reverted: http://llvm.org/viewvc/llvm-project?rev=326432&view=rev Gabor, could you take a look? Repository: rC Clang https://reviews.llvm.org/D30691 ___ cfe-commits ma

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-03-01 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a reviewer: ilya-biryukov. xazax.hun added a subscriber: ilya-biryukov. xazax.hun added a comment. @ilya-biryukov Could you please provide some more details where the cyclic dependency is? I cannot reproduce the problem and usually cmake fails when there is a cyclic dependency a

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/absl/StringFindStartswithCheck.cpp:1 +#include "StringFindStartswithCheck.h" + nit: We need a LICENSE comment at the top of the file. Comment at: clang-tidy/absl/StringFindStartswithCheck.cpp

[PATCH] D43572: [Sema] Improve test coverage of narrowing conversion diagnostics

2018-03-01 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 accepted this revision. rogfer01 added a comment. This revision is now accepted and ready to land. Looks good to me. Thanks! https://reviews.llvm.org/D43572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-03-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54 + } else if (const auto *const Call = + Result.Nodes.getNodeAs("ptr_fun_call")) { +diag(Call->getLocStart(), Message) << "'std::ptr_fun'"; + } else if (const a

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-03-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54 + } else if (const auto *const Call = + Result.Nodes.getNodeAs("ptr_fun_call")) { +diag(Call->getLocStart(), Message) << "'std::ptr_fun'"; + } else if (const a

[PATCH] D43162: [Parser] (C++) Make -Wextra-semi slightly more useful

2018-03-01 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 136503. lebedev.ri edited the summary of this revision. lebedev.ri added a comment. Reworked stuff via new `CXX98CompatExtraSemi` diag group. As expected, passing `-Wno-c++98-compat-pedantic` disables the extra-semi diag, which exactly the opposite from w

[PATCH] D43928: [analyzer] Correctly measure array size in security.insecureAPI.strcpy

2018-03-01 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D43928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

Re: [PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-03-01 Thread Ilya Biryukov via cfe-commits
I replied to a commit in the wrong thread (https://reviews.llvm.org/rL326323), sorry. Here are the important bits: This change introduced the following cyclic dependency in the build system: StaticAnalyzerCore -> CrossTU -> Frontend -> StaticAnalyzerCore. I'm sorry, but I had to revert the commit

r326434 - UsersManual: beef up the clang-cl text a little

2018-03-01 Thread Hans Wennborg via cfe-commits
Author: hans Date: Thu Mar 1 06:00:19 2018 New Revision: 326434 URL: http://llvm.org/viewvc/llvm-project?rev=326434&view=rev Log: UsersManual: beef up the clang-cl text a little Modified: cfe/trunk/docs/UsersManual.rst Modified: cfe/trunk/docs/UsersManual.rst URL: http://llvm.org/viewvc/ll

Re: r326434 - UsersManual: beef up the clang-cl text a little

2018-03-01 Thread Nico Weber via cfe-commits
Should we also mention /p:CLToolExe for just swapping out the compiler without using a full toolset? Also, should we include some notes on cmake usage? I.e. -G "Visual Studio 14 2015" -T "LLVM-vs2014" for the MSVS generator, and -DCMAKE_C_COMPILER=/path/to/llvm/bin/clang-cl.exe -DCMAKE_CXX_COMPILE

[PATCH] D43869: [clangd] Support include canonicalization in symbol leve.

2018-03-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/index/CanonicalIncludes.h:47 + /// Sets the canonical include for any symbol with \p QualifiedName. + /// Header mappings are ignored if \p Qua

Re: [PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-03-01 Thread Gábor Horváth via cfe-commits
2018. márc. 1. 14:58 ezt írta ("Ilya Biryukov" ): I replied to a commit in the wrong thread (https://reviews.llvm.org/rL326323), sorry. Here are the important bits: This change introduced the following cyclic dependency in the build system: StaticAnalyzerCore -> CrossTU -> Frontend -> StaticAnaly

[PATCH] D43817: [x86] wbnoinvd intrinsic

2018-03-01 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 136510. GBuella edited the summary of this revision. GBuella added a comment. Added Ice Lake Server architecture. Removed wbinvd related code. https://reviews.llvm.org/D43817 Files: docs/ClangCommandLineReference.rst include/clang/Basic/BuiltinsX86.def

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D43847#1023452, @hokein wrote: > In https://reviews.llvm.org/D43847#1021967, @aaron.ballman wrote: > > > I need a bit more context because I'm unfamiliar with `absl`. What is this > > module's intended use? > > > As `absl` has been open

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. By the word, may be similar check for std::string::rfind() and std::string::ends_with() (does abseil have analog) should be added too? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43847 ___ cfe-com

Re: [PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-03-01 Thread Ilya Biryukov via cfe-commits
You're right. We have this extra dependency in our internal build files for some reason and I missed that. It's totally my fault. Should I resubmit the patch that I reverted or you would rather do it yourself? On Thu, Mar 1, 2018 at 3:07 PM Gábor Horváth wrote: > > > 2018. márc. 1. 14:58 ezt

Re: [PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-03-01 Thread Gábor Horváth via cfe-commits
I am away from my workstation so I would really appreciate if you could recommit. Thanks in advance, Gábor 2018. márc. 1. 15:28 ezt írta ("Ilya Biryukov" ): > You're right. We have this extra dependency in our internal build files > for some reason and I missed that. > It's totally my fault. > >

Re: [PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-03-01 Thread Benjamin Kramer via cfe-commits
Frontend depends on StaticAnalyzerCore by including "clang/StaticAnalyzer/Core/Analyses.def". That's a clear layering violation, but cmake doesn't model header dependencies. Maybe Analyses.def should move into its own library. On Thu, Mar 1, 2018 at 3:07 PM Gábor Horváth via llvm-commits < llvm-c

r326438 - UsersManual: improve the clang-cl text some more

2018-03-01 Thread Hans Wennborg via cfe-commits
Author: hans Date: Thu Mar 1 06:48:19 2018 New Revision: 326438 URL: http://llvm.org/viewvc/llvm-project?rev=326438&view=rev Log: UsersManual: improve the clang-cl text some more Modified: cfe/trunk/docs/UsersManual.rst Modified: cfe/trunk/docs/UsersManual.rst URL: http://llvm.org/viewvc/l

Re: r326434 - UsersManual: beef up the clang-cl text a little

2018-03-01 Thread Hans Wennborg via cfe-commits
Thanks! Added in r326438. On Thu, Mar 1, 2018 at 3:05 PM, Nico Weber via cfe-commits wrote: > Should we also mention /p:CLToolExe for just swapping out the compiler > without using a full toolset? > > Also, should we include some notes on cmake usage? I.e. -G "Visual Studio 14 > 2015" -T "LLVM-vs

r326439 - Resubmit [analyzer] Support for naive cross translation unit analysis

2018-03-01 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Mar 1 06:54:16 2018 New Revision: 326439 URL: http://llvm.org/viewvc/llvm-project?rev=326439&view=rev Log: Resubmit [analyzer] Support for naive cross translation unit analysis Originally submitted as r326323 and r326324. Reverted in r326432. Reverting the commit was

Re: [PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-03-01 Thread Ilya Biryukov via cfe-commits
Resubmitted as r326439. Sorry for all the trouble. We need to hack around the Analyses.def being required by Frontend, but it would nice to remove this dependency upstream. On Thu, Mar 1, 2018 at 3:34 PM Benjamin Kramer wrote: > Frontend depends on StaticAnalyzerCore by > including "clang/Stat

[PATCH] D42684: clang-format: Allow optimizer to break template declaration.

2018-03-01 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. In https://reviews.llvm.org/D42684#1022219, @Typz wrote: > Indeed, seems to apply to classes as well. Maybe I was mislead by my testing, > where I did not get the case (possibly because we use > `ConstructorInitializerAllOnOneLineOrOnePerLine=true`, so the continuation

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-03-01 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Are you sure that you are even addressing an important case? I have done some research on our codebase and this is something that happens incredibly rarely. The reason is that you have to have a very specific combination of line length, where the last parameter does not

[PATCH] D41102: Setup clang-doc frontend framework

2018-03-01 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 136520. juliehockett marked 14 inline comments as done. juliehockett added a comment. Fixing comments and adding tests https://reviews.llvm.org/D41102 Files: CMakeLists.txt clang-doc/BitcodeWriter.cpp clang-doc/BitcodeWriter.h clang-doc/CMakeLi

[PATCH] D43248: [Attr] Fix parameter indexing for attributes

2018-03-01 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. Hi Aaron. It occurs to me now that this patch has grown rather large and, in some places, a little subtle. Would it help the review if I were to break it up into a patch series that introduces ParamIdx to each attribute, one at a time? I'm not trying to rush you, but

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D43847#1023642, @Eugene.Zelenko wrote: > May be //abseil// is better name for module? I'd also go for "abseil". I'll try to get abseil folks to review this. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43847 ___

[PATCH] D43660: [OpenMP] Add OpenMP data sharing infrastructure using global memory

2018-03-01 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 136528. Repository: rC Clang https://reviews.llvm.org/D43660 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.h lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp lib/CodeGen/CGOpenMPRuntimeNVPTX.h lib/CodeGen/CGStmt

[PATCH] D43660: [OpenMP] Add OpenMP data sharing infrastructure using global memory

2018-03-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D43660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D43500: [clang-tidy]: modernize-use-default-member-init: Remove trailing comma and colon.

2018-03-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: unittests/clang-tidy/ClangTidyTest.h:145 + + if (Options.FormatStyle) { +llvm::Expected Style = format::getStyle( I wonder whe

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-03-01 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/MakeUniqueCheck.cpp:21 +: MakeSmartPtrCheck(Name, Context, "std::make_unique"), + MinimumLanguageVersion(Options.get("MakeUniqueLanguageVersion", + getDefaultMinimumLan

[PATCH] D43817: [x86] wbnoinvd intrinsic

2018-03-01 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D43817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D43162: [Parser] (C++) Make -Wextra-semi slightly more useful

2018-03-01 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. **If** i'm reading `git blame` correctly, the `-Wnewline-eof` diag, which i used as a base to model the previous version of this diff on, was added in https://reviews.llvm.org/rL189110 / https://github.com/llvm-mirror/clang/commit/7865b8e4324378e06f59adb4d60bec26a7d3d

[PATCH] D43108: Support for the mno-stack-arg-probe flag

2018-03-01 Thread Ruslan Nikolaev via Phabricator via cfe-commits
nruslan added a comment. @aemerson : yes, it is just part of MS ABI Repository: rC Clang https://reviews.llvm.org/D43108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43928: [analyzer] Correctly measure array size in security.insecureAPI.strcpy

2018-03-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:517 if (const auto *Array = dyn_cast(DeclRef->getType())) { - uint64_t ArraySize = BR.getContext().getTypeSize(Array) / 8; + auto ArraySize = BR.getContext().getTypeSizeI

[PATCH] D43953: clangformat-vs: Fix plugin not correctly loading in some cases

2018-03-01 Thread François-Xavier Roure via Phabricator via cfe-commits
fxroure-ubisoft created this revision. fxroure-ubisoft added a reviewer: clang. fxroure-ubisoft created this object with edit policy "Only User: fxroure-ubisoft (François-Xavier Roure)". Herald added a subscriber: cfe-commits. When installing the clang-format visual studio plugin

[clang-tools-extra] r326452 - [clangd] Forward all environment variables along with CLANGD_TRACE to clangd.

2018-03-01 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Mar 1 09:42:27 2018 New Revision: 326452 URL: http://llvm.org/viewvc/llvm-project?rev=326452&view=rev Log: [clangd] Forward all environment variables along with CLANGD_TRACE to clangd. Modified: clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts M

[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

2018-03-01 Thread Daniil Fukalov via Phabricator via cfe-commits
dfukalov added a comment. The problem is that if set addrspace "2" in description string, CanT.getAddressSpace() returns target addrspace value "11" (shifted in the enum) and compares it with input LangAS addrspace ("2", "opencl_local" in our case). So I cannot set a number a description string

[PATCH] D43015: clang-format: Introduce BreakInheritanceList option

2018-03-01 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? Repository: rC Clang https://reviews.llvm.org/D43015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-03-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54 + } else if (const auto *const Call = + Result.Nodes.getNodeAs("ptr_fun_call")) { +diag(Call->getLocStart(), Message) << "'std::ptr_fun'"; + } else if (

[PATCH] D42684: clang-format: Allow optimizer to break template declaration.

2018-03-01 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 136557. Typz added a comment. Change options values to No/MultiLine/Yes. Repository: rC Clang https://reviews.llvm.org/D42684 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp lib/Format/TokenAnnotator.cp

[PATCH] D43800: [ASTMatchers] Allow file-based narrowing matches to work with NestedNameSpecifierLocs.

2018-03-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Please add some test coverage for the NNS case. Repository: rC Clang https://reviews.llvm.org/D43800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-03-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/MakeUniqueCheck.cpp:21 +: MakeSmartPtrCheck(Name, Context, "std::make_unique"), + MinimumLanguageVersion(Options.get("MakeUniqueLanguageVersion", + getDefaultMin

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-03-01 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang-tidy/modernize/MakeUniqueCheck.cpp:21 +: MakeSmartPtrCheck(Name, Context, "std::make_unique"), + MinimumLanguageVersion(Options.get("MakeUniqueLanguageVersion", + getDefaultMinim

[PATCH] D43869: [clangd] Support include canonicalization in symbol leve.

2018-03-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 136561. ioeric marked 2 inline comments as done. ioeric added a comment. - Merge with origin/master - Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43869 Files: clangd/index/CanonicalIncludes.cpp clangd/index/Ca

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D43847#1023452, @hokein wrote: > In https://reviews.llvm.org/D43847#1021967, @aaron.ballman wrote: > > > I need a bit more context because I'm unfamiliar with `absl`. What is this > > module's intended use? > > > As `absl` has been open-

[PATCH] D43869: [clangd] Support include canonicalization in symbol leve.

2018-03-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/CanonicalIncludes.h:54 /// a canonical header name. - llvm::StringRef mapHeader(llvm::StringRef Header) const; + /// An optional qualified symbol name can be provided to check against the + /// symbol mapping. -

[clang-tools-extra] r326456 - [clangd] Support include canonicalization in symbol leve.

2018-03-01 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Mar 1 10:06:40 2018 New Revision: 326456 URL: http://llvm.org/viewvc/llvm-project?rev=326456&view=rev Log: [clangd] Support include canonicalization in symbol leve. Summary: Symbols with different canonical includes might be defined in the same header (e.g. symbols defin

[PATCH] D43869: [clangd] Support include canonicalization in symbol leve.

2018-03-01 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE326456: [clangd] Support include canonicalization in symbol leve. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D43869?vs=136561&id=136565#toc Repository: r

[PATCH] D43745: Fix cppcoreguidelines-pro-bounds-pointer-arithmetic not working for functions with auto return specifier.

2018-03-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Some minor formatting nits, but otherwise LGTM. You should run the patch through clang-format: https://clang.llvm.org/docs/ClangFormat.html#script-for-patch-reformatting Comment at: clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cp

[PATCH] D43957: Fixing issue where a space was not added before a global namespace variable when SpacesInParentheses is set

2018-03-01 Thread Darby Payne via Phabricator via cfe-commits
dpayne created this revision. dpayne added a reviewer: djasper. Herald added subscribers: cfe-commits, klimek. When SpacesInParentheses is set to true clang-format does not add a space before a global namespace variable. For example this is the output of clang-format for a somewhat contrived exa

[PATCH] D43625: [OpenMP] Remove implicit data sharing code gen that aims to use device shared memory

2018-03-01 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 136570. gtbercea added a comment. Add Source location. Repository: rC Clang https://reviews.llvm.org/D43625 Files: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp lib/CodeGen/CGOpenMPRuntimeNVPTX.h test/OpenMP/nvptx_data_sharing.cpp test/OpenMP/nvptx_paral

[PATCH] D43625: [OpenMP] Remove implicit data sharing code gen that aims to use device shared memory

2018-03-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D43625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D43162: [Parser] (C++) Make -Wextra-semi slightly more useful

2018-03-01 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose added a comment. It's been a long time since that commit, but I think the difference is that `-pedantic` / `Extension`-type diagnostics are magic and `-Wc++98-compat-pedantic` is not. I like Richard's way better and if it could be applied to -Wnewline-eof later as well then that sou

[clang-tools-extra] r326458 - [clangd] Make symbol name a required parameter for CanonicalIncludes::mapHeader

2018-03-01 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Mar 1 10:30:48 2018 New Revision: 326458 URL: http://llvm.org/viewvc/llvm-project?rev=326458&view=rev Log: [clangd] Make symbol name a required parameter for CanonicalIncludes::mapHeader Modified: clang-tools-extra/trunk/clangd/index/CanonicalIncludes.cpp clang-t

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

2018-03-01 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. After long inactivity (sorry!) i had a chance to look at it again: switch(i) { case 0:; case 1:; case 2:; ... } does *NOT* lead to the stack overflow. This is most likely an issue in the AST: https://godbolt.org/g/vZw2BD Empty case labels do nest, an empty

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-03-01 Thread Frederic Tingaud via Phabricator via cfe-commits
ftingaud updated this revision to Diff 136575. ftingaud added a comment. Remove customizable c++ version that added no real value. https://reviews.llvm.org/D43766 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp clang-tidy/modernize/MakeSmartPtrCheck.h clang-tidy/modernize/MakeUniqueChec

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-03-01 Thread Frederic Tingaud via Phabricator via cfe-commits
ftingaud added inline comments. Comment at: test/clang-tidy/modernize-make-unique-cxx14.cpp:10 + // CHECK-MESSAGES: :[[@LINE-1]]:17: warning: use std::make_unique instead + // CHECK-FIXES: auto my_ptr = std::make_unique(1); + return 0; Quuxplusone wrote: > IIU

r326461 - [analyzer] Enable cfg-temporary-dtors by default.

2018-03-01 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 1 10:53:13 2018 New Revision: 326461 URL: http://llvm.org/viewvc/llvm-project?rev=326461&view=rev Log: [analyzer] Enable cfg-temporary-dtors by default. Don't enable c++-temp-dtor-inlining by default yet, due to this reference counting pointe problem. Otherwise t

[PATCH] D43804: [analyzer] Enable cfg-temporary-dtors by default?

2018-03-01 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326461: [analyzer] Enable cfg-temporary-dtors by default. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D43804?vs=136

[PATCH] D43248: [Attr] Fix parameter indexing for attributes

2018-03-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Attr.h:206 + + void cmpable(const ParamIdx &I) const { +assert(isValid() && I.isValid() && The name here can be improved. How about `checkInvariants()`? Might as well make this inline while

[PATCH] D43248: [Attr] Fix parameter indexing for attributes

2018-03-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D43248#1023720, @jdenny wrote: > Hi Aaron. It occurs to me now that this patch has grown rather large and, in > some places, a little subtle. Would it help the review if I were to break it > up into a patch series that introduces Para

[PATCH] D43681: [WebAssembly] Add exception handling option

2018-03-01 Thread Derek Schuff via Phabricator via cfe-commits
dschuff accepted this revision. dschuff added a comment. This revision is now accepted and ready to land. This flag turns on CPU features (i.e. there's one for each new wasm feature proposal that has to be feature-detected), so I think this makes sense to be consistent with all the others. I cou

r326469 - Driver: hoist `-fno-rtti-data` to a driver flag

2018-03-01 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Thu Mar 1 11:13:43 2018 New Revision: 326469 URL: http://llvm.org/viewvc/llvm-project?rev=326469&view=rev Log: Driver: hoist `-fno-rtti-data` to a driver flag This is needed for building with the GNU driver (`clang++`) when targeting Windows and using msvcprt. This flag i

[PATCH] D43908: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC

2018-03-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. Awesome, thanks, this makes me feel much more comfortable. https://reviews.llvm.org/D43908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D42938: [Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages.

2018-03-01 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. It would be helpful to know how reasonable is the idea to handle more expression types in `Sema::CheckForIntOverflow`. https://reviews.llvm.org/D42938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D43841: Add an option to disable tail-call optimization for escaping blocks

2018-03-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 136580. ahatanak marked 3 inline comments as done. ahatanak added a comment. Address review comments. https://reviews.llvm.org/D43841 Files: include/clang/AST/Decl.h include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/Code

[PATCH] D43841: Add an option to disable tail-call optimization for escaping blocks

2018-03-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Driver/Options.td:1419 +def fno_disable_tail_calls_escaping_blocks : Flag<["-"], "fno-disable-tail-calls-escaping-blocks">, Group, Flags<[CC1Option]>; +def fdisable_tail_calls_escaping_blocks : Flag<["-"], "fdisable-tail

[PATCH] D43841: Add an option to disable tail-call optimization for escaping blocks

2018-03-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExpr.cpp:4846 +if (auto *BE = dyn_cast(Arg->IgnoreParenNoopCasts(Context))) + BE->getBlockDecl()->setDoesNotEscape(); + Can this be based on the noescape parameter bit on the function type?

[PATCH] D43773: Implement the container bits of P0805R1

2018-03-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 136582. mclow.lists added a comment. Add the `tuple` bits. Regularize the equality comparisons of the containers; i.e, don't try to be clever - let the compiler be clever. https://reviews.llvm.org/D43773 Files: include/array include/deque include

[PATCH] D43961: OpenBSD Driver basic sanitiser support

2018-03-01 Thread David CARLIER via Phabricator via cfe-commits
devnexen created this revision. devnexen added reviewers: krytarowski, vitalybuka, kettenis. devnexen created this object with visibility "All Users". Herald added a subscriber: cfe-commits. Basic support of Sanitiser to follow-up ubsan support in compiler-rt. Needs to use lld instead of base ld t

[PATCH] D41102: Setup clang-doc frontend framework

2018-03-01 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Thank you for working on this! Some more nitpicking. //Please// consider adding even more tests (ideally, all this code should have 100% test coverage) Comment at: clang-doc/BitcodeWriter.cpp:139 + {COMMENT_NAME, {"Name", &StringAbbrev}},

r326476 - [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC

2018-03-01 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Thu Mar 1 12:22:57 2018 New Revision: 326476 URL: http://llvm.org/viewvc/llvm-project?rev=326476&view=rev Log: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC Make types with sizes that aren't a power of two an error (that can be disabled) i

[PATCH] D43908: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC

2018-03-01 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326476: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC (authored by mstorsjo, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://r

[PATCH] D43841: Add an option to disable tail-call optimization for escaping blocks

2018-03-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:4846 +if (auto *BE = dyn_cast(Arg->IgnoreParenNoopCasts(Context))) + BE->getBlockDecl()->setDoesNotEscape(); + rjmccall wrote: > Can this

[PATCH] D43841: Add an option to disable tail-call optimization for escaping blocks

2018-03-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 136584. ahatanak marked an inline comment as done. ahatanak added a comment. Check the function prototype's noescape bit. https://reviews.llvm.org/D43841 Files: include/clang/AST/Decl.h include/clang/Driver/Options.td include/clang/Frontend/CodeGenOp

[PATCH] D43841: Add an option to disable tail-call optimization for escaping blocks

2018-03-01 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. Alright, this looks good to me. Comment at: lib/Sema/SemaExpr.cpp:4846 +if (auto *BE = dyn_cast(Arg->IgnoreParenNoopCasts(Context))) + BE->getBlockDecl()

[PATCH] D43248: [Attr] Fix parameter indexing for attributes

2018-03-01 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In https://reviews.llvm.org/D43248#1024183, @aaron.ballman wrote: > In https://reviews.llvm.org/D43248#1023720, @jdenny wrote: > > > Hi Aaron. It occurs to me now that this patch has grown rather large and, > > in some places, a little subtle. Would it help the review i

[PATCH] D43248: [Attr] Fix parameter indexing for attributes

2018-03-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Attr.h:206 + + void cmpable(const ParamIdx &I) const { +assert(isValid() && I.isValid() && jdenny wrote: > aaron.ballman wrote: > > The name here can be improved. How about `checkInvariants()

[PATCH] D43965: [CodeGen] Force the backend to follow clang's EmulatedTLS flag

2018-03-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: chh, jyknight. Since LLVM r326341, this is needed for the backend to actually respect the EmulatedTLS flag that is set, otherwise it just uses the target default flag instead. Repository: rC Clang https://reviews.llvm.org/D43965 Fil

[libcxx] r326485 - Added P0805 to the list of ready bits

2018-03-01 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Mar 1 13:16:07 2018 New Revision: 326485 URL: http://llvm.org/viewvc/llvm-project?rev=326485&view=rev Log: Added P0805 to the list of ready bits Modified: libcxx/trunk/www/upcoming_meeting.html Modified: libcxx/trunk/www/upcoming_meeting.html URL: http://llvm.org

[PATCH] D43965: [CodeGen] Force the backend to follow clang's EmulatedTLS flag

2018-03-01 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh commandeered this revision. chh edited reviewers, added: mstorsjo; removed: chh. chh added a comment. I will upload a different fix soon. We should set ExplicitEmulatedTLS only when -f[no-]emulated-tls flag is found at command line. Any front-end should only pass the flag and let backend deci

[PATCH] D43248: [Attr] Fix parameter indexing for attributes

2018-03-01 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny marked 3 inline comments as done. jdenny added inline comments. Comment at: include/clang/Basic/Attr.td:172-174 + // Whether the C++ implicit this parameter is allowed. Users that construct + // attributes from the source code use this information when validating + //

[PATCH] D43967: Add test helper Fixture

2018-03-01 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a.sidorin, xazax.hun, szepet. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. [ASTImporter] Add a helper test Fixture, so we can add tests which may check internal attributes of AST nodes. Also it makes possible to import from severa

[PATCH] D43967: Add test helper Fixture

2018-03-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. We add several test cases here, some of them are disabled. We plan to pass the disabled tests in different patches. Repository: rC Clang https://reviews.llvm.org/D43967 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D43965: [CodeGen] Force the backend to follow clang's EmulatedTLS flag

2018-03-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ok, thanks. Yes, this should probably only set it if some of those flags are set here. FWIW, clang also has got a list of targets where emulated TLS is enabled by default - could this be omitted somehow, now that LLVM can handle that on its own? Repository: rC Cla

  1   2   >