r320916 - [X86] Add the two files I forgot to commit in r320915.

2017-12-15 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri Dec 15 22:10:24 2017 New Revision: 320916 URL: http://llvm.org/viewvc/llvm-project?rev=320916=rev Log: [X86] Add the two files I forgot to commit in r320915. Added: cfe/trunk/lib/Headers/avx512vpopcntdqvlintrin.h cfe/trunk/test/CodeGen/avx512vpopcntdqvlintrin.c

r320915 - [X86] Add builtins and tests for 128 and 256 bit vpopcntdq.

2017-12-15 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri Dec 15 22:02:31 2017 New Revision: 320915 URL: http://llvm.org/viewvc/llvm-project?rev=320915=rev Log: [X86] Add builtins and tests for 128 and 256 bit vpopcntdq. Modified: cfe/trunk/include/clang/Basic/BuiltinsX86.def cfe/trunk/lib/CodeGen/CGBuiltin.cpp

[PATCH] D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment

2017-12-15 Thread Bob Wilson via Phabricator via cfe-commits
bob.wilson accepted this revision. bob.wilson added a comment. LGTM Repository: rC Clang https://reviews.llvm.org/D40998 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41076: [driver][darwin] Set the 'simulator' environment when it's specified in '-target'

2017-12-15 Thread Bob Wilson via Phabricator via cfe-commits
bob.wilson accepted this revision. bob.wilson added a comment. LGTM Comment at: lib/Driver/ToolChains/Darwin.cpp:1603 // Recognize iOS targets with an x86 architecture as the iOS simulator. - if (Platform != MacOS && (getTriple().getArch() == llvm::Triple::x86 || -

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2017-12-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I accidentally hit 'send' too early on my review, so here's part two. I still haven't fully reviewed the new IRGen file. Comment at: lib/CodeGen/CodeGenCStruct.cpp:27 + FK_Array // array that has non-trivial elements. +}; +}

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2017-12-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. You should add a __has_feature check for this (__has_feature(objc_arc_fields)?), as well as documentation. The documentation would go in the ARC spec. Comment at: include/clang/AST/Decl.h:3575 + /// Functions to query basic properties of

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2017-12-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2321 + !isa(ConvertType(Arg->getType())) && ArgI.getCoerceToType() == ConvertType(Ty) && ArgI.getDirectOffset() == 0) { I think the right fix is to change the

[PATCH] D41301: ASan+operator new[]: Fix operator new[] cookie poisoning

2017-12-15 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. LGTM. Repository: rC Clang https://reviews.llvm.org/D41301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-12-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. LGTM outside of a comment request; please feel free to commit when you'd made that change. Comment at: lib/Sema/SemaExprObjC.cpp:1361 +// pointer to the parent interface of the method when ARC is enabled ( +// because self can't be reassigned

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2017-12-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 127233. ahatanak added a comment. Insert an underscore before src-alignment in the BNF rule for alignment-info. ::= ["_" ] https://reviews.llvm.org/D41228 Files: include/clang/AST/Decl.h include/clang/AST/Type.h

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2017-12-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 127231. ahatanak added a comment. Fixed a bug where the code gets stuck in an infinite loop when a struct with an array field is passed to FieldInfoToString. Encoded the offset of an array in a struct into the function name. Also, added comments that

r320908 - [VerifyDiagnosticConsumer] support -verify=

2017-12-15 Thread Hal Finkel via cfe-commits
Author: hfinkel Date: Fri Dec 15 18:23:22 2017 New Revision: 320908 URL: http://llvm.org/viewvc/llvm-project?rev=320908=rev Log: [VerifyDiagnosticConsumer] support -verify= This mimics FileCheck's --check-prefixes option. The default prefix is "expected". That is, "-verify" is equivalent to

[PATCH] D39694: [VerifyDiagnosticConsumer] support -verify=

2017-12-15 Thread Hal Finkel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320908: [VerifyDiagnosticConsumer] support -verify=prefixes (authored by hfinkel, committed by ). Repository: rC Clang https://reviews.llvm.org/D39694 Files:

[PATCH] D41319: libcxx: Fix for basic_stringbuf::seekoff() after r320604.

2017-12-15 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: EricWF, mclow.lists. As a result of this change, the basic_stringbuf constructor that takes a mode ends up leaving __hm_ set to 0, causing the comparison "__hm_ - __str_.data() < __noff" in seekoff() to succeed, which caused the function to

r320904 - [TextDiagnosticBuffer] Fix diagnostic note emission order

2017-12-15 Thread Hal Finkel via cfe-commits
Author: hfinkel Date: Fri Dec 15 17:40:19 2017 New Revision: 320904 URL: http://llvm.org/viewvc/llvm-project?rev=320904=rev Log: [TextDiagnosticBuffer] Fix diagnostic note emission order The frontend currently groups diagnostics from the command line according to diagnostic level, but that

[PATCH] D40995: [TextDiagnosticBuffer] Fix diagnostic note emission order.

2017-12-15 Thread Hal Finkel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320904: [TextDiagnosticBuffer] Fix diagnostic note emission order (authored by hfinkel, committed by ). Repository: rC Clang https://reviews.llvm.org/D40995 Files:

[PATCH] D41149: [CodeGen] Specialize mixed-sign mul-with-overflow (fix PR34920)

2017-12-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320902: [CodeGen] Specialize mixed-sign mul-with-overflow (fix PR34920) (authored by vedantk, committed by ). Changed prior to commit: https://reviews.llvm.org/D41149?vs=126854=127220#toc Repository:

r320902 - [CodeGen] Specialize mixed-sign mul-with-overflow (fix PR34920)

2017-12-15 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Dec 15 17:28:25 2017 New Revision: 320902 URL: http://llvm.org/viewvc/llvm-project?rev=320902=rev Log: [CodeGen] Specialize mixed-sign mul-with-overflow (fix PR34920) This patch introduces a specialized way to lower overflow-checked multiplications with mixed-sign

[PATCH] D41149: [CodeGen] Specialize mixed-sign mul-with-overflow (fix PR34920)

2017-12-15 Thread Vedant Kumar via Phabricator via cfe-commits
vsk marked an inline comment as done. vsk added a comment. Thanks for the review! Comment at: lib/CodeGen/CGBuiltin.cpp:912 + auto IntMax = + llvm::APInt::getMaxValue(ResultInfo.Width).zextOrSelf(Op1Info.Width); + llvm::Value *TruncOverflow =

[PATCH] D41149: [CodeGen] Specialize mixed-sign mul-with-overflow (fix PR34920)

2017-12-15 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/CodeGen/CGBuiltin.cpp:912 + auto IntMax = + llvm::APInt::getMaxValue(ResultInfo.Width).zextOrSelf(Op1Info.Width); + llvm::Value

[PATCH] D41318: Start setting dso_local in clang

2017-12-15 Thread Rafael Ávila de Espíndola via Phabricator via cfe-commits
rafael created this revision. rafael added reviewers: rnk, rsmith. This starts adding dso_local to clang. The hope is to eventually have TargetMachine::shouldAssumeDsoLocal go away. My objective for now is to move enough of it to clang to remove the need for the TargetMachine one to handle PIE

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-15 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @alexshap That's a good question, and honestly I am not sure. It is probably a good idea to have the tests which run the counterexample dumper and check that it does not crash. As for the contents, I'm not sure: I would like to switch to generating HTML, and

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2017-12-15 Thread Weiming Zhao via Phabricator via cfe-commits
weimingz created this revision. weimingz added reviewers: EricWF, bcain. Herald added a subscriber: mgorny. The default implementation of random_device uses /dev/urandom, which may not be available to systems like bare-metals. This patch adds a CMake option "LIBCXX_ENABLE_RANDOM_DEVICE" to

[PATCH] D41087: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like builtin macros

2017-12-15 Thread Bob Wilson via Phabricator via cfe-commits
bob.wilson added a comment. Thanks! LGTM Repository: rC Clang https://reviews.llvm.org/D41087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2017-12-15 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. BTW, this is https://cplusplus.github.io/LWG/issue2157 , so please update `www` accordingly, and also test `{{}}` cases. https://reviews.llvm.org/D41223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41250: [analyzer] Model implied cast around operator new().

2017-12-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 127202. NoQ added a comment. `VisitCXXNewExpr` is too late. We need to perform cast before calling the constructor. Otherwise bad things happen, for instance `performTrivialCopy` would construct another void region :) Move the cast to

[PATCH] D41076: [driver][darwin] Set the 'simulator' environment when it's specified in '-target'

2017-12-15 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. Other than the comment inline, LGTM. Comment at: lib/Driver/ToolChains/Darwin.cpp:1603 // Recognize iOS targets with an x86 architecture as the iOS simulator. - if (Platform != MacOS && (getTriple().getArch() == llvm::Triple::x86 || -

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2017-12-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I'm wondering if it's not a better idea to have an explicit specialization for size == 0 template class array { // and so on. }; https://reviews.llvm.org/D41223 ___ cfe-commits mailing list

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. Are there any plans to add tests for this ? https://reviews.llvm.org/D40809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2017-12-15 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: rjmccall, rafael. Herald added subscribers: kristof.beyls, aemerson. When a function taking transparent union is declared as taking one of union members earlier in the translation unit, clang would hit an "Invalid cast" assertion during

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-15 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @dcoughlin @NoQ I think this version is reasonable enough to get committed. Another easy iteration would be to change visitor to simply add the diagnostic to path, and move the actual printing to `CounterexampleDiagnostics`. https://reviews.llvm.org/D40809

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-15 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 127197. george.karpenkov edited the summary of this revision. george.karpenkov added a comment. Herald added a subscriber: mgorny. Fixed formatting, moved output to diagnostic consumer. https://reviews.llvm.org/D40809 Files:

Re: r320750 - Fix many -Wsign-compare and -Wtautological-constant-compare warnings.

2017-12-15 Thread Galina Kistanova via cfe-commits
I fixed this with r320868. Thanks Galina On Thu, Dec 14, 2017 at 5:43 PM, Galina Kistanova wrote: > Hello Zachary, > > It looks like this commit added an error to one of our builders: > http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror/builds/3735 > > . . . >

[libunwind] r320880 - Creating release candidate final from release_501 branch

2017-12-15 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Fri Dec 15 14:19:37 2017 New Revision: 320880 URL: http://llvm.org/viewvc/llvm-project?rev=320880=rev Log: Creating release candidate final from release_501 branch Added: libunwind/tags/RELEASE_501/final/ (props changed) - copied from r320879,

[libcxxabi] r320874 - Creating release candidate final from release_501 branch

2017-12-15 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Fri Dec 15 14:18:28 2017 New Revision: 320874 URL: http://llvm.org/viewvc/llvm-project?rev=320874=rev Log: Creating release candidate final from release_501 branch Added: libcxxabi/tags/RELEASE_501/final/ - copied from r320873, libcxxabi/branches/release_50/

[libcxx] r320873 - Creating release candidate final from release_501 branch

2017-12-15 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Fri Dec 15 14:17:48 2017 New Revision: 320873 URL: http://llvm.org/viewvc/llvm-project?rev=320873=rev Log: Creating release candidate final from release_501 branch Added: libcxx/tags/RELEASE_501/final/ (props changed) - copied from r320872,

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-12-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaExprObjC.cpp:1357 +(ReceiverType->isObjCClassOrClassKindOfType() || + ReceiverType->isObjCQualifiedClassType()) && +Receiver->isObjCSelfExpr() && getLangOpts().ObjCAutoRefCount) {

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-12-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 127192. arphaman marked an inline comment as done. arphaman added a comment. - Remove redundant checks. - Remove the ARC-specific check. https://reviews.llvm.org/D36790 Files: include/clang/Sema/Sema.h lib/Sema/SemaExprObjC.cpp

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2017-12-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I just found that the code that creates the mangled name for a special function is not correct. Two structs with different record layouts can end up having functions that have the same name. I'll fix the bug and update the patch today.

[PATCH] D41308: [analyser] different.BitwiseOpBoolArg checker implementation

2017-12-15 Thread Alexey Knyshev via Phabricator via cfe-commits
alexey.knyshev created this revision. alexey.knyshev added reviewers: dcoughlin, dergachev.a, NoQ, zaks.anna, a.sidorin, kromanenkov. Herald added subscribers: cfe-commits, mgorny. Repository: rC Clang https://reviews.llvm.org/D41308 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td

[PATCH] D41306: [clangd] Update documentation page with new features, instructions

2017-12-15 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, ilya-biryukov, klimek. - Some features were implemented so mark them as such. - Add installation instructions (LLVM debian packages) Signed-off-by: Marc-Andre Laperle Repository: rCTE

[PATCH] D41087: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like builtin macros

2017-12-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D41087#956379, @bob.wilson wrote: > I'm concerned here about the check for the names as written vs. the canonical > names. @compnerd pointed out one specific case with armv7, and I see that > you've got special handling for "darwin", but I

r320854 - __is_target_environment: Check the environment after parsing it

2017-12-15 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Dec 15 12:07:53 2017 New Revision: 320854 URL: http://llvm.org/viewvc/llvm-project?rev=320854=rev Log: __is_target_environment: Check the environment after parsing it This ensures that target triples with environment versions can still work with

r320853 - __is_target_arch: Check the arch and subarch instead of the arch name

2017-12-15 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Dec 15 11:58:38 2017 New Revision: 320853 URL: http://llvm.org/viewvc/llvm-project?rev=320853=rev Log: __is_target_arch: Check the arch and subarch instead of the arch name This ensures that when compiling for "arm64" __is_target_arch will succeed for both "arm64" and

[PATCH] D41271: [RISCV] Propagate -mabi and -march values to GNU assembler.

2017-12-15 Thread Ana Pazos via Phabricator via cfe-commits
apazos updated this revision to Diff 127170. apazos added a comment. changed label prefix ILP64 to LP64 https://reviews.llvm.org/D41271 Files: lib/Driver/ToolChains/Gnu.cpp test/Driver/riscv-gnutools.c Index: test/Driver/riscv-gnutools.c

Re: [PATCH] D39622: Fix type name generation in DWARF for template instantiations with enum types and template specializations

2017-12-15 Thread David Blaikie via cfe-commits
On Fri, Dec 15, 2017 at 8:09 AM xgsa wrote: > David, thank you for the detailed answer and corner cases. > > Just to clarify: everywhere in my mail where I mentioned "debugger", I > meant LLDB, but not GDB (except, where I mentioned GDB explicitly). > Currently, I have no plans

[PATCH] D41284: [Concepts] Associated constraints infrastructure.

2017-12-15 Thread Saar Raz via Phabricator via cfe-commits
saar.raz updated this revision to Diff 127163. saar.raz added a comment. - Added requires clause matching for all kinds of template redeclarations instead of just classes. Repository: rC Clang https://reviews.llvm.org/D41284 Files: include/clang/AST/DeclTemplate.h

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-15 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127161. Nebiroth marked 27 inline comments as done. Nebiroth added a comment. inner class IncludeReferenceMap replaced by one map fillRangeVector() and findPreambleIncludes() code moved into wrapper class Open definition now returns an empty Range struct

[PATCH] D40813: [clang-tidy] Adding Fuchsia checker for virtual inheritance

2017-12-15 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. juliehockett marked 4 inline comments as done. Closed by commit rL320841: [clang-tidy] Adding Fuchsia checker for virtual inheritance (authored by juliehockett, committed by ). Herald added a subscriber: klimek. Changed

[clang-tools-extra] r320841 - [clang-tidy] Adding Fuchsia checker for virtual inheritance

2017-12-15 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Fri Dec 15 10:54:28 2017 New Revision: 320841 URL: http://llvm.org/viewvc/llvm-project?rev=320841=rev Log: [clang-tidy] Adding Fuchsia checker for virtual inheritance Adds a check to the Fuchsia module to warn if classes are defined with virtual inheritance. See

[PATCH] D41303: Add support for ObjectFormat to TargetSpecificAttr

2017-12-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: aaron.ballman, echristo. Looking through the code, I saw a FIXME on IFunc to switch it to a target specific attribute. In looking through it, i saw that the no-longer-appropriately-named TargetArch didn't support ObjectFormat

[PATCH] D41301: ASan+operator new[]: Fix operator new[] cookie poisoning

2017-12-15 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab created this revision. filcab added reviewers: rjmccall, kcc, rsmith. The C++ Itanium ABI says: No cookie is required if the new operator being used is ::operator new[](size_t, void*). We should only avoid poisoning the cookie if we're calling this operator, not others. This is dealt

r320829 - Remove "FunctionName -" from docs on FunctionDecl(NFC)

2017-12-15 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri Dec 15 08:37:14 2017 New Revision: 320829 URL: http://llvm.org/viewvc/llvm-project?rev=320829=rev Log: Remove "FunctionName -" from docs on FunctionDecl(NFC) Removed the repetative usage of the operator name on the documentation for FunctionDecl. Also reflowed some

r320826 - [OPENMP] Codegen `declare simd` for function declarations.

2017-12-15 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Dec 15 08:28:31 2017 New Revision: 320826 URL: http://llvm.org/viewvc/llvm-project?rev=320826=rev Log: [OPENMP] Codegen `declare simd` for function declarations. Previously the attributes were emitted only for function definitions. Patch adds emission of the attributes

Re: [PATCH] D39622: Fix type name generation in DWARF for template instantiations with enum types and template specializations

2017-12-15 Thread xgsa via cfe-commits
David, thank you for the detailed answer and corner cases. Just to clarify: everywhere in my mail where I mentioned "debugger", I meant LLDB, but not GDB (except, where I mentioned GDB explicitly). Currently, I have no plans to work on GDB, however I would like to make the clang+LLDB pair working

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D40671#954906, @xgsa wrote: > In https://reviews.llvm.org/D40671#954661, @alexfh wrote: > > > In https://reviews.llvm.org/D40671#953888, @aaron.ballman wrote: > > > > > FWIW, I think we should do something about unknown check names in NOLINT >

[PATCH] D35894: [clangd] Code hover for Clangd

2017-12-15 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127131. Nebiroth added a comment. Rebase on master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D35894 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D41280#956597, @sammccall wrote: > Can you give some more details about the problem (maybe offline)? > In my testing, I do see a FixIt in VSCode. It fails to apply, for reasons I > don't yet understand. As discussed offline, this is a

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 127129. hokein marked 2 inline comments as done. hokein added a comment. Update based on the offline discussion. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41280 Files: clangd/ClangdLSPServer.h clangd/Protocol.h Index:

[PATCH] D39694: [VerifyDiagnosticConsumer] support -verify=

2017-12-15 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In https://reviews.llvm.org/D39694#956661, @hfinkel wrote: > LGTM Thanks for accepting. I don't have commit privileges. Would you please commit for me? This depends on https://reviews.llvm.org/D40995, which also needs to be committed.

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

2017-12-15 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. In https://reviews.llvm.org/D30691#954740, @george.karpenkov wrote: > I've tried using the patch, and I got blocked at the following: CTU options > are only exposed when one goes through `analyze-build` frontend, which > requires `compile_commands.json` to be present.

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

2017-12-15 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. Some comments on the C++ inline. Comment at: include/clang/AST/ASTContext.h:82 class APValue; +class ASTImporter; class ASTMutationListener; Is this forward declaration needed? Comment at:

r320753 - [ThreadSafetyAnalysis] Fix isCapabilityExpr

2017-12-15 Thread Yi Kong via cfe-commits
Author: kongyi Date: Thu Dec 14 14:24:45 2017 New Revision: 320753 URL: http://llvm.org/viewvc/llvm-project?rev=320753=rev Log: [ThreadSafetyAnalysis] Fix isCapabilityExpr There are many more expr types that can be a capability expr, like CXXThisExpr, CallExpr, MemberExpr. Instead of enumerating

[PATCH] D41281: [clangd] Index-based code completion.

2017-12-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. A few drive-by comments, will look deeper if I have time but don't wait for me. Comment at: clangd/Position.cpp:34 + int Lines = JustBefore.count('\n'); + int Cols = JustBefore.size() - JustBefore.rfind('\n') - 1; + return {Lines, Cols};

[PATCH] D41289: [clangd] Build dynamic index and use it for code completion.

2017-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, ilya-biryukov, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41289 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp

[PATCH] D40548: [clangd] Symbol index interfaces and an in-memory index implementation.

2017-12-15 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/index/Index.h:134 + virtual bool + fuzzyFind(Context , const FuzzyFindRequest , +std::function Callback) const = 0; sammccall wrote: > ioeric wrote: > > malaperle wrote: > >

[PATCH] D41281: [clangd] Index-based code completion.

2017-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127118. ioeric added a comment. - Merge remote-tracking branch 'origin/master' into index-completion - Fix merge with origin/master. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41281 Files: clangd/CMakeLists.txt

[PATCH] D39694: [VerifyDiagnosticConsumer] support -verify=

2017-12-15 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel accepted this revision. hfinkel added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D39694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41284: Associated constraint infrastructure.

2017-12-15 Thread Saar Raz via Phabricator via cfe-commits
saar.raz created this revision. saar.raz added reviewers: changyu, hubert.reinterpretcast, rsmith, nwilson. Herald added a subscriber: cfe-commits. Added code to correctly calculate the associated constraints of a template. Depends on https://reviews.llvm.org/D41217. Repository: rC Clang

[PATCH] D24933: Enable configuration files in clang

2017-12-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 2 inline comments as done. sepavloff added inline comments. Comment at: include/clang/Config/config.h.cmake:40 +#cmakedefine CLANG_CONFIG_FILE_SYSTEM_DIR ${CLANG_CONFIG_FILE_SYSTEM_DIR} +#cmakedefine CLANG_CONFIG_FILE_USER_DIR ${CLANG_CONFIG_FILE_USER_DIR} +

[PATCH] D24933: Enable configuration files in clang

2017-12-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 127109. sepavloff added a comment. Updated patch Fixed cmake config file definition. Use llvm::sys::fs::make_absolute to get absolute path. https://reviews.llvm.org/D24933 Files: docs/UsersManual.rst include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D41150: [CFG] Adding new CFGStmt LoopEntrance for the StaticAnalyzer

2017-12-15 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp added inline comments. Comment at: include/clang/Analysis/CFG.h:179 /// entered. +class CFGLoopEntrance : public CFGElement { +public: This comment refers to the CFGLoopExit class. Please add a separate explaining comment to the CFGLoopEntrance.

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Can you give some more details about the problem (maybe offline)? In my testing, I do see a FixIt in VSCode. It fails to apply, for reasons I don't yet understand. Comment at: clangd/Protocol.h:326 - friend bool operator==(const Diagnostic ,

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Maybe we could use a struct containing only `range` and `message` (e.g. `pair`) as a key to search for fixits instead of `Diagnostic`? Having an `operator <` that does not take all fields into account seems shaky. Repository: rCTE Clang Tools

[PATCH] D41276: [clangd] Build in-memory index on symbols in files.

2017-12-15 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320807: [clangd] Build in-memory index on symbols in files. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D41276?vs=127098=127099#toc Repository: rL LLVM

[clang-tools-extra] r320807 - [clangd] Build in-memory index on symbols in files.

2017-12-15 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Dec 15 04:25:02 2017 New Revision: 320807 URL: http://llvm.org/viewvc/llvm-project?rev=320807=rev Log: [clangd] Build in-memory index on symbols in files. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits Differential

[PATCH] D41276: [clangd] Build in-memory index on symbols in files.

2017-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D41276#956513, @sammccall wrote: > I don't see `FileSymbols.{h,cpp}` being deleted, but maybe I'm bad at reading > diffs. No, I'm bad at creating diffs... Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41276

[PATCH] D41276: [clangd] Build in-memory index on symbols in files.

2017-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127098. ioeric marked 2 inline comments as done. ioeric added a comment. - Removed unused files and addressed comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41276 Files: clangd/CMakeLists.txt clangd/index/FileIndex.cpp

[PATCH] D41281: [clangd] Index-based code completion.

2017-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, mgorny, klimek. Use symbol index to populate completion results for qualfified IDs e.g. "nx::A^". Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41281 Files:

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: ilya-biryukov, klimek. We use Diagnostic as a key to find the corresponding FixIt when we do the "apply-fix", but the "severity" field could be omitted, in some cases, the codeAction request sent from LSP

[PATCH] D39694: [VerifyDiagnosticConsumer] support -verify=

2017-12-15 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny marked an inline comment as done. jdenny added inline comments. Comment at: lib/Frontend/VerifyDiagnosticConsumer.cpp:398 +// DToken is foo-bar-warning, but foo is the only -verify prefix). +if (Prefixes.end() == std::find(Prefixes.begin(), Prefixes.end(),

[PATCH] D39694: [VerifyDiagnosticConsumer] support -verify=

2017-12-15 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 127088. jdenny added a comment. Herald added a subscriber: mgrang. 1. Use std::binary_search, as suggested by Hal. 2. Fix another case of line wrapping. 3. Rebase onto a recent master, and remove rewrites of tests that have recently changed.

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320804: [clang] Add PPCallbacks list to preprocessor when building a preacompiled… (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D39375?vs=126984=127092#toc

r320804 - [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-15 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Dec 15 03:27:51 2017 New Revision: 320804 URL: http://llvm.org/viewvc/llvm-project?rev=320804=rev Log: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble. Summary: Revision D38639 needs this commit in order to properly make open

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM modulo a few comments. AFAIK, @Nebiroth does not have a commit access, so I'll land this with minor tweaks to unblock the other patch. Comment at:

[PATCH] D41276: [clangd] Build in-memory index on symbols in files.

2017-12-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. I don't see `FileSymbols.{h,cpp}` being deleted, but maybe I'm bad at reading diffs. Comment at: clangd/index/FileIndex.h:8 +//

[PATCH] D41276: [clangd] Build in-memory index on symbols in files.

2017-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127087. ioeric added a comment. - Minor cleanup Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41276 Files: clangd/CMakeLists.txt clangd/index/FileIndex.cpp clangd/index/FileIndex.h unittests/clangd/CMakeLists.txt

[PATCH] D41276: [clangd] Build in-memory index on symbols in files.

2017-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127086. ioeric added a comment. - Address review comments. Merge FileSymbols and tests into FileIndex. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41276 Files: clangd/CMakeLists.txt clangd/index/FileIndex.cpp

[PATCH] D40548: [clangd] Symbol index interfaces and an in-memory index implementation.

2017-12-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/index/Index.h:134 + virtual bool + fuzzyFind(Context , const FuzzyFindRequest , +std::function Callback) const = 0; ioeric wrote: > malaperle wrote: > > ioeric wrote: > > >

[PATCH] D41276: [clangd] Build in-memory index on symbols in files.

2017-12-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/index/FileMemIndexManager.h:23 +/// all symbols. +class FileMemIndexManager { +public: Discussed offline a bit: - FileIndex or PerFileIndex is a great name for this, if it implements `Index`. So I think it

[PATCH] D40548: [clangd] Symbol index interfaces and an in-memory index implementation.

2017-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/Index.h:134 + virtual bool + fuzzyFind(Context , const FuzzyFindRequest , +std::function Callback) const = 0; malaperle wrote: > ioeric wrote: > > malaperle wrote: > > > I

[PATCH] D40929: Unblock Swift Calling Convention Mangling on Windows

2017-12-15 Thread Thomas Roughton via Phabricator via cfe-commits
troughton marked an inline comment as done. troughton added a comment. > Which, I think is just adding something wacky like `@swiftcc@__Swift@@` which > would demangle as `__Swift::swiftcc` if the demangler expected an NNS there. > Of course, it doesn't, so it won't demangle, but at least you

[PATCH] D41276: [clangd] Build in-memory index on symbols in files.

2017-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, ilya-biryukov, mgorny, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41276 Files: clangd/CMakeLists.txt clangd/index/FileMemIndexManager.cpp