[PATCH] D59544: [OpenCL] Minor improvements in default header testing

2019-03-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: bader. Herald added subscribers: ebevhan, yaxunl. Suggested in https://reviews.llvm.org/D59486 https://reviews.llvm.org/D59544 Files: test/Headers/opencl-c-header.cl Index: test/Headers/opencl-c-header.cl

[PATCH] D58668: [ASTImporter] Fix redecl failures of FunctionTemplateSpec

2019-03-19 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356455: [ASTImporter] Fix redecl failures of FunctionTemplateSpec (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM

r356455 - [ASTImporter] Fix redecl failures of FunctionTemplateSpec

2019-03-19 Thread Gabor Marton via cfe-commits
Author: martong Date: Tue Mar 19 07:04:50 2019 New Revision: 356455 URL: http://llvm.org/viewvc/llvm-project?rev=356455=rev Log: [ASTImporter] Fix redecl failures of FunctionTemplateSpec Summary: Redecl chains of function template specializations are not handled well currently. We want to handle

[PATCH] D58668: [ASTImporter] Fix redecl failures of FunctionTemplateSpec

2019-03-19 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 191286. martong added a comment. - Rebase to master Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58668/new/ https://reviews.llvm.org/D58668 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index:

r356452 - [ASTImporter] Fix redecl failures of ClassTemplateSpec

2019-03-19 Thread Gabor Marton via cfe-commits
Author: martong Date: Tue Mar 19 06:34:10 2019 New Revision: 356452 URL: http://llvm.org/viewvc/llvm-project?rev=356452=rev Log: [ASTImporter] Fix redecl failures of ClassTemplateSpec Summary: Redecl chains of class template specializations are not handled well currently. We want to handle them

[PATCH] D58673: [ASTImporter] Fix redecl failures of ClassTemplateSpec

2019-03-19 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356452: [ASTImporter] Fix redecl failures of ClassTemplateSpec (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D59459: [analyzer][NFC] Prefer binary searches in CheckerRegistry

2019-03-19 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware requested changes to this revision. baloghadamsoftware added inline comments. This revision now requires changes to proceed. Comment at: lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp:70 + Collection, Info, + FullNameLT{}); +}

[PATCH] D59486: [OpenCL] Improve testing of default header in C++ mode

2019-03-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356450: [OpenCL] Improved testing of default header. (authored by stulova, committed by ). Herald added a project: clang. Repository: rC Clang CHANGES SINCE LAST ACTION

r356450 - [OpenCL] Improved testing of default header.

2019-03-19 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Tue Mar 19 06:04:17 2019 New Revision: 356450 URL: http://llvm.org/viewvc/llvm-project?rev=356450=rev Log: [OpenCL] Improved testing of default header. Improved some checks and moved testing of the default header in C++ mode into the Headers folder. Differential Revision:

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > We can't reliable import templates with the ASTImporter, so actually > reconstructing the template in the debug info AST and then importing it > doesn't work. Could you please elaborate how the import of templates fails in ASTImporter? Is it because the AST you

[PATCH] D59292: [clang-format] messes up indentation when using JavaScript private fields and methods

2019-03-19 Thread Martin Probst via Phabricator via cfe-commits
mprobst closed this revision. mprobst added a comment. Landed in r356449, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59292/new/ https://reviews.llvm.org/D59292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r356449 - [clang-format] [JS] handle private members.

2019-03-19 Thread Martin Probst via cfe-commits
Author: mprobst Date: Tue Mar 19 05:28:41 2019 New Revision: 356449 URL: http://llvm.org/viewvc/llvm-project?rev=356449=rev Log: [clang-format] [JS] handle private members. Addresses PR40999 https://bugs.llvm.org/show_bug.cgi?id=40999 Private fields and methods in JavaScript would get

[PATCH] D55170: [clang-format]: Add NonEmptyParentheses spacing option

2019-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM (landed here too https://github.com/mydeveloperday/clang-experimental/releases) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55170/new/

[PATCH] D59486: [OpenCL] Improve testing of default header in C++ mode

2019-03-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: test/Headers/opencl-c-header.cl:57-65 char f(char x) { -#if __OPENCL_C_VERSION__ != CL_VERSION_2_0 +#if !defined(__OPENCL_CPP_VERSION__) && (__OPENCL_C_VERSION__ != CL_VERSION_2_0)

[PATCH] D59292: [clang-format] messes up indentation when using JavaScript private fields and methods

2019-03-19 Thread Martin Probst via Phabricator via cfe-commits
mprobst accepted this revision. mprobst added a comment. This revision is now accepted and ready to land. Actually I'll fix the nits. Comment at: clang/docs/ReleaseNotes.rst:174 -- ... +- Add support for correct indenting of private fields and methods in Javascript.

[PATCH] D59292: [clang-format] messes up indentation when using JavaScript private fields and methods

2019-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added subscribers: mitchellwills, mprobst. MyDeveloperDay added a comment. ping @mprobst,@mitchellwills noticed you just reviewed another clang-format-js commit, wondered if you were interested in reviewing this for me?, finding it hard to get any review traction. CHANGES

[PATCH] D59492: [OpenCL] Allow variadic macros as Clang feature

2019-03-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D59492#1433796 , @arsenm wrote: > Should it be downgraded to a warning about an extension instead of just > removing it? What would you suggest to put in a warning message? Clang normally doesn't warn about extensions...

[PATCH] D59516: [analyzer] Make GenericTaintChecker configurable

2019-03-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added a comment. This revision now requires changes to proceed. I'm very much guilty of doing functional and refactoring changes within the same patch, but I think working on `GenericTaintChecker` AND in the same patch doing (seemingly

[PATCH] D59527: [clang-format] Don't insert break between JS template string and tag identifier

2019-03-19 Thread Martin Probst via Phabricator via cfe-commits
mprobst closed this revision. mprobst added a comment. Landed as r356447. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59527/new/ https://reviews.llvm.org/D59527 ___ cfe-commits mailing list

r356447 - [clang-format] [JS] Don't break between template string and tag

2019-03-19 Thread Martin Probst via cfe-commits
Author: mprobst Date: Tue Mar 19 04:15:52 2019 New Revision: 356447 URL: http://llvm.org/viewvc/llvm-project?rev=356447=rev Log: [clang-format] [JS] Don't break between template string and tag Before: const x = veryLongIdentifier `hello`; After: const x =

[PATCH] D59540: [clang-tidy] [PR41119] readability-identifier-naming incorrectly fixes lambda capture

2019-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: JonasToth, aaron.ballman, alexfh, michaelplatings. MyDeveloperDay added a project: clang-tools-extra. Herald added subscribers: jdoerfert, xazax.hun. While testing clang-tidy for D59251: [Documentation] Proposal for plan to

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. By the way if the `Import` of the strategy uses recursive import of other things this can cause same problems as it was in `ASTImporter` before the `GetImportedOrCreateDecl` was introduced. So this should be avoided or something similar to `GetImportedOrCreateDecl`

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Another observation: The `Import` function of the strategy now has no way to return an error. An even better version of it would be to include the possibility of import error (with `ImportError`, or other error type). Or the "PreImport" function could indicate if the

[PATCH] D59302: [clangd] Surface diagnostics from headers inside main file

2019-03-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.cpp:256 +// directive inside main file. +// If a header is transitively included in multiple direct includes of main, we +// choose the first one. We should find a way to point into an exact

[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-03-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:170 I.first->second = mergeSymbol(I.first->second, Sym); +// We re-count number of references while merging refs from scratch. +

[PATCH] D59527: [clang-format] Don't insert break between JS template string and tag identifier

2019-03-19 Thread Martin Probst via Phabricator via cfe-commits
mprobst accepted this revision. mprobst added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59527/new/ https://reviews.llvm.org/D59527 ___

[PATCH] D59302: [clangd] Surface diagnostics from headers inside main file

2019-03-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D59302#1431274 , @kadircet wrote: > The optional part is rather limiting number of diagnostics that is going to > be surfaced. So if you have thousands of errors inside preamble only first > 100 of them will appear

[PATCH] D59354: [clangd] Print arguments in template specializations

2019-03-19 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 with a few NITs. Thanks for fixing this! Comment at: clang-tools-extra/clangd/AST.cpp:86 +auto TL = Cls->getTypeAsWritten()->getTypeLoc(); +if

[PATCH] D59487: [Tooling] Add more scope specifiers until spelling is not ambiguous.

2019-03-19 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ioeric marked an inline comment as done. Closed by commit rL356446: [Tooling] Add more scope specifiers until spelling is not ambiguous. (authored by ioeric, committed by ). Herald added a project: LLVM. Herald added a

r356446 - [Tooling] Add more scope specifiers until spelling is not ambiguous.

2019-03-19 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Mar 19 03:12:15 2019 New Revision: 356446 URL: http://llvm.org/viewvc/llvm-project?rev=356446=rev Log: [Tooling] Add more scope specifiers until spelling is not ambiguous. Summary: Previously, when the renamed spelling is ambiguous, we simply use the full-qualfied name

[PATCH] D59302: [clangd] Surface diagnostics from headers inside main file

2019-03-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 191265. kadircet added a comment. - Only surface diagnostics with level fatal or error Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59302/new/ https://reviews.llvm.org/D59302 Files: clangd/ClangdServer.cpp

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @ioeric is the author of these completion metrics and evaluation tools. Eric, please feel free to correct me if I got something wrong or missed something. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59300/new/

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor planned changes to this revision. teemperor added a comment. I think we could also refactor the strategy into a `PreImport` call. That way we don't break all the user-code out there and it seems less intrusive to the ASTImporter code. I'll update the patch. CHANGES SINCE LAST ACTION

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Hi Jan, Sure! And sorry for posting these metrics for a while (we had other patches mentioning them) without proper explanation. We simulate a bunch of completions at random points in random files from our internal codebase. We assume the desired completion

[PATCH] D59457: [analyzer][NFC] Use capital variable names, move methods out-of-line, rename some in CheckerRegistry

2019-03-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D59457#1433180 , @baloghadamsoftware wrote: > Please rename the patch. Its name does not really express its content. Good point, sorry about that. In D59457#1433816 , @xazax.hun

[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-03-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. > I don't follow why this can over-count, FileIndex keeps only one RefSlab per > each file, so we can't over-count? Did you mean it will be more than #TUs ? Yes. This is how `Symbol::References` is described in its documentation. If we want to change/expand the

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356445: [clangd] Add support for type hierarchy (super types only for now) (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[clang-tools-extra] r356445 - [clangd] Add support for type hierarchy (super types only for now)

2019-03-19 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Tue Mar 19 02:27:04 2019 New Revision: 356445 URL: http://llvm.org/viewvc/llvm-project?rev=356445=rev Log: [clangd] Add support for type hierarchy (super types only for now) Summary: Patch by Nathan Ridge(@nridge)! This is an LSP extension proposed here:

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2019-03-19 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin added a comment. Yes, I considered it. But Microsoft documentation is not clear whether it will work or not for restoring inconsistent locales. The documentation shows how to save inconsistent locales with LC_ALL but doesn't provide an example for restoring them. Repository: rL

[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-03-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 2 inline comments as done. kadircet added a comment. In D59481#1432881 , @ioeric wrote: > I'm not sure if FileIndex is the correct layer to make decision about how > References is calculated. Currently, we have two use cases in clangd 1)

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. It looks better now. One "problem" is that now there is the strategy and there is the `Imported` function. It would be possible to unify these into a strategy that contains maybe a "import" and a "post-import" callback. (But this requires big changes in the

[PATCH] D59440: add steps to preprocess file and reduce command line args

2019-03-19 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/utils/creduce-clang-crash.py:45 + result = [] + for i, arg in enumerate(cmd): +if arg.startswith('$'): Useless enumerate here. You could even use a list comprehension here ``` return ' '.join(arg

[PATCH] D59487: [Tooling] Add more scope specifiers until spelling is not ambiguous.

2019-03-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: lib/Tooling/Core/Lookup.cpp:165 +if (UnspelledScopes.empty()) { + Disambiguated = "::" + Disambiguated; +} else { ioeric wrote: > kadircet wrote: > > maybe return or break afterwards? > I also struggled a

[PATCH] D59485: [ASTImporter] Allow adding a import strategy to the ASTImporter

2019-03-19 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 191257. teemperor retitled this revision from "[ASTImporter] Allow adding a shim to the ASTImporter" to "[ASTImporter] Allow adding a import strategy to the ASTImporter". teemperor edited the summary of this revision. teemperor added a comment. Thanks for

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-03-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Any comments? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59449/new/ https://reviews.llvm.org/D59449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D57662: [clang-tidy] Parallelize clang-tidy-diff.py

2019-03-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. One more gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59415: Do not resolve directory junctions for `-fdiagnostics-absolute-paths` on Windows.

2019-03-19 Thread Igor Kudrin via Phabricator via cfe-commits
ikudrin marked an inline comment as done. ikudrin added inline comments. Comment at: test/Frontend/absolute-paths-windows.test:4 +// RUN: mkdir -p %t.dir\real +// RUN: cmd /c mklink /j %t.dir\junc %t.dir\real +// RUN: echo "wrong code" > %t.dir\real\foo.cpp

[PATCH] D59533: [X86] Add __crc32b/__crc32w/__crc32d/__crc32q intrinsics to match gcc and icc.

2019-03-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 191251. craig.topper added a comment. Add the test file that I forgot to git add before running arcanist Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59533/new/ https://reviews.llvm.org/D59533 Files:

[PATCH] D59533: [X86] Add __crc32b/__crc32w/__crc32d/__crc32q intrinsics to match gcc and icc.

2019-03-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: spatel, RKSimon. Herald added a project: clang. craig.topper updated this revision to Diff 191251. craig.topper added a comment. Add the test file that I forgot to git add before running arcanist gcc has these intrinsics in

[PATCH] D59529: Refactor cast<>'s in if conditionals, which can only assert on failure.

2019-03-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356441: Refactor casts in if conditionals, which can only assert on failure. (authored by dhinton, committed by ). Changed prior to commit: https://reviews.llvm.org/D59529?vs=191228=191248#toc

r356441 - Refactor cast<>'s in if conditionals, which can only assert on failure.

2019-03-19 Thread Don Hinton via cfe-commits
Author: dhinton Date: Mon Mar 18 23:14:14 2019 New Revision: 356441 URL: http://llvm.org/viewvc/llvm-project?rev=356441=rev Log: Refactor cast<>'s in if conditionals, which can only assert on failure. Summary: This patch refactors several instances of cast<> used in if conditionals. Since

<    1   2