r343075 - [CUDA] Fix two failed test cases using --cuda-path-ignore-env

2018-09-26 Thread Jiading Gai via cfe-commits
Author: jiadinggai Date: Wed Sep 26 00:07:48 2018 New Revision: 343075 URL: http://llvm.org/viewvc/llvm-project?rev=343075&view=rev Log: [CUDA] Fix two failed test cases using --cuda-path-ignore-env Add --cuda-path-ignore-env option to those test cases to ensure the clang driver always pick the

[PATCH] D52259: [CUDA] Fix two failed test cases using --cuda-path-ignore-env

2018-09-26 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343075: [CUDA] Fix two failed test cases using --cuda-path-ignore-env (authored by jiadinggai, committed by ). Repository: rC Clang https://reviews.llvm.org/D52259 Files: test/Driver/cuda-detect.cu

[PATCH] D52529: [Frontend] Simplify -print-decl-contexts with DeclNodes.inc

2018-09-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: rsmith, arphaman. Herald added subscribers: cfe-commits, jfb. Currently the switch conditions display Decl nodes with space-separated lowercase words. Some conditions are missing and will cause llvm_unreachable() failure. It is simpler to j

[PATCH] D52530: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: sylvestre.ledru, alexfh, jroelofs, ygribov. Herald added subscribers: Szelethus, mikhail.ramalho, a.sidorin, szepet, xazax.hun. Herald added a reviewer: george.karpenkov. This has been bothering me for a while, but only now i have actu

[PATCH] D52499: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074)

2018-09-26 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In https://reviews.llvm.org/D52499#1245474, @majnemer wrote: > FWIW, Microsoft's newest documentation does not say that `/O2` and `/O1` > imply `/Gs`: > https://docs.microsoft.com/en-us/cpp/build/reference/o1-o2-minimize-size-maximize-speed?view=vs-2017 Great, thanks for

[PATCH] D52397: [libc++] Remove Fuchsia-specific knowledge to pick the ABI version

2018-09-26 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rCXX libc++ https://reviews.llvm.org/D52397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D52499: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074)

2018-09-26 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343077: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074) (authored by hans, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D

r343077 - [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074)

2018-09-26 Thread Hans Wennborg via cfe-commits
Author: hans Date: Wed Sep 26 00:39:04 2018 New Revision: 343077 URL: http://llvm.org/viewvc/llvm-project?rev=343077&view=rev Log: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074) Differential revision: https://reviews.llvm.org/D52499 Modified: cfe/trunk/include/clang/Drive

[PATCH] D52499: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074)

2018-09-26 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343077: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074) (authored by hans, committed by ). Repository: rL LLVM https://reviews.llvm.org/D52499 Files: include/clang/Driver/CLCompat

[PATCH] D52530: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 167060. lebedev.ri added a reviewer: krememek. lebedev.ri added a comment. Updated the `--help`, too. Repository: rC Clang https://reviews.llvm.org/D52530 Files: tools/scan-build/bin/scan-build Index: tools/scan-build/bin/scan-build ==

[PATCH] D52531: [clangd] clangd-indexer gathers refs and stores them in index files.

2018-09-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52531 Files: clangd/index/IndexAction.cpp clangd/index/IndexAction.

[PATCH] D52492: [AArch64][v8.5A] Test optional Armv8.5-A random number extension

2018-09-26 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D52492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D52493: [AArch64][v8.5A] Test clang option for the Memory Tagging Extension

2018-09-26 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D52493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D52503: [clangd] More precise index memory usage estimate

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Dex.cpp:251 Bytes += InvertedIndex.getMemorySize(); - for (const auto &P : InvertedIndex) -Bytes += P.second.bytes(); + for (const auto &TokenToPostingList : InvertedIndex) +Bytes += Token

[PATCH] D52503: [clangd] More precise index memory usage estimate

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 167062. kbobyrev edited the summary of this revision. kbobyrev added a comment. - Prevent `sizeof(std::vector)` to be counted twice in the memory estimates - Pull memory usage logging to the caller side: it is currently incorrect because `Dex::BackingDataSi

[PATCH] D52296: [Clang] - Add -gsingle-file-split-dwarf option.

2018-09-26 Thread George Rimar via Phabricator via cfe-commits
grimar added a comment. In https://reviews.llvm.org/D52296#1243688, @echristo wrote: > In https://reviews.llvm.org/D52296#1241928, @probinson wrote: > > > Do we generate the .dwo file directly these days? If not, I can imagine > > wanting to avoid the overhead of the objcopy hack; as long as th

[PATCH] D52533: [test] Use --sysroot instead of -B in print-multi-directory.c

2018-09-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: chrib, dyung. This avoids finding a similar matching GCC installation outside of the test directory tree in the surrounding environment, which would make the test fail. Repository: rC Clang https://reviews.llvm.org/D52533 Files: te

[PATCH] D52047: [clangd] Add building benchmark and memory consumption tracking

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 167067. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Don't include misc changes elsewhere: focus on adding more benchmarks in this revision. https://reviews.llvm.org/D52047 Files: clang-tools-extra/clangd/benchmarks/IndexBenchmar

[PATCH] D52047: [clangd] Add building benchmark and memory consumption tracking

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:96 -static void DexQueries(benchmark::State &State) { +// This is not a *real* benchmark: it shows size of built MemIndex (in bytes). +// Same for the next "benchmark". --

[PATCH] D52534: [clangd] NFC: Update Serialization routine documentation

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: sammccall, ioeric. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. According to new implementation, `readIndexFile` can also process YAML symbol collections. Also, it might make

[PATCH] D52225: [clang] Implement Override Suggestions in Sema.

2018-09-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 167071. kadircet added a comment. - Change order of fucntions for better diff. - Add tests. Repository: rC Clang https://reviews.llvm.org/D52225 Files: include/clang/Sema/CodeCompleteConsumer.h lib/Sema/SemaCodeComplete.cpp test/CodeCompletion/ove

[PATCH] D52535: clang-format: [JS] space after parameter naming.

2018-09-26 Thread Martin Probst via Phabricator via cfe-commits
mprobst created this revision. mprobst added a reviewer: mboehme. Previously: foo(/*bar=*/baz); Now: foo(/*bar=*/ baz); The run-in parameter naming comment is not intended in JS. Repository: rC Clang https://reviews.llvm.org/D52535 Files: lib/Format/TokenAnnotator.cpp unittests/F

[PATCH] D52534: [clangd] NFC: Update Serialization routine documentation

2018-09-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. The wording change is in https://reviews.llvm.org/D52531. https://reviews.llvm.org/D52534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52226: [clangd] Remove override result handling logic from clangd

2018-09-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 167075. kadircet added a comment. - Remove test, since it has been moved into Sema. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52226 Files: clangd/CodeComplete.cpp Index: clangd/CodeComplete.cpp =

[PATCH] D52397: [libc++] Remove Fuchsia-specific knowledge to pick the ABI version

2018-09-26 Thread Louis Dionne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343079: [libc++] Remove Fuchsia-specific knowledge to pick the ABI version (authored by ldionne, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.or

r343080 - clang-format: [JS] space after parameter naming.

2018-09-26 Thread Martin Probst via cfe-commits
Author: mprobst Date: Wed Sep 26 01:28:33 2018 New Revision: 343080 URL: http://llvm.org/viewvc/llvm-project?rev=343080&view=rev Log: clang-format: [JS] space after parameter naming. Summary: Previously: foo(/*bar=*/baz); Now: foo(/*bar=*/ baz); The run-in parameter naming comment is no

[PATCH] D52535: clang-format: [JS] space after parameter naming.

2018-09-26 Thread Martin Probst via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343080: clang-format: [JS] space after parameter naming. (authored by mprobst, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52535 Files: cfe

[PATCH] D52535: clang-format: [JS] space after parameter naming.

2018-09-26 Thread Martin Probst via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343080: clang-format: [JS] space after parameter naming. (authored by mprobst, committed by ). Changed prior to commit: https://reviews.llvm.org/D52535?vs=167073&id=167077#toc Repository: rL LLVM ht

[PATCH] D52503: [clangd] Fix bugs with incorrect memory estimate report

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 167079. kbobyrev retitled this revision from "[clangd] More precise index memory usage estimate" to "[clangd] Fix bugs with incorrect memory estimate report". kbobyrev edited the summary of this revision. kbobyrev added a comment. As discussed offline, using

[PATCH] D52517: [clangd] clangd-indexer: Drop support for MR-via-YAML

2018-09-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D52536: clang-format: [JS] conditional types.

2018-09-26 Thread Martin Probst via Phabricator via cfe-commits
mprobst created this revision. mprobst added a reviewer: krasimir. This change adds some rudimentary support for conditional types. Specifically it avoids breaking before `extends` and `infer` keywords, which are subject to Automatic Semicolon Insertion, so breaking before them creates incorrect s

[clang-tools-extra] r343083 - Removed extra semicolon to fix Wpedantic. (NFCI).

2018-09-26 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Sep 26 02:02:45 2018 New Revision: 343083 URL: http://llvm.org/viewvc/llvm-project?rev=343083&view=rev Log: Removed extra semicolon to fix Wpedantic. (NFCI). Modified: clang-tools-extra/trunk/clangd/index/IndexAction.cpp Modified: clang-tools-extra/trunk/clangd/inde

[PATCH] D52290: [driver][mips] Adjust target triple accordingly to provided ABI name

2018-09-26 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan added a comment. In https://reviews.llvm.org/D52290#1245222, @rnk wrote: > Should `--target=mipsZZZ -mabi=n64` be meaningful? What does `clang > --target=i686-linux-gnu -m64` do? If this matches that, then let's do it. Thanks. Initially I thought that providing different target tripl

r343085 - Removed extra semicolon to fix Wpedantic. (NFCI).

2018-09-26 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Sep 26 02:12:55 2018 New Revision: 343085 URL: http://llvm.org/viewvc/llvm-project?rev=343085&view=rev Log: Removed extra semicolon to fix Wpedantic. (NFCI). Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp Modified: cfe/trunk/lib/StaticAnalyz

[PATCH] D52538: [MinGW] Allow using ASan

2018-09-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added a reviewer: rnk. Linking to ASan for MinGW is similar to MSVC, but MinGW always links the CRT dynamically, so there is only one of the MSVC cases to consider. When linking to a shared compiler runtime library on MinGW, the suffix of the import libr

[PATCH] D52534: [clangd] NFC: Update Serialization routine documentation

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In https://reviews.llvm.org/D52534#1246190, @sammccall wrote: > The wording change is in https://reviews.llvm.org/D52531. Oh, I didn't see that one. Thanks! https://reviews.llvm.org/D52534 ___ cfe-commits mailing list cf

[PATCH] D52534: [clangd] NFC: Update Serialization routine documentation

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev abandoned this revision. kbobyrev added a comment. This is no longer needed then. https://reviews.llvm.org/D52534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51689: [clangd] Dense posting lists proof-of-concept

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev resigned from this revision. kbobyrev added a comment. For anyone interested in the direction of posting list compression, an implementation of Variable length Byte compression (VByte) has landed: https://reviews.llvm.org/D52300. Repository: rCTE Clang Tools Extra https://reviews.l

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2018-09-26 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Hey @mgrang! Let's see some results on some projects and answer NoQ's comment, then I think we can put this in for all the world to see. https://reviews.llvm.org/D50488 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D52290: [driver][mips] Adjust target triple accordingly to provided ABI name

2018-09-26 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan updated this revision to Diff 167091. atanasyan edited the summary of this revision. atanasyan added a comment. Always adjust target triple (explicitly and implicitly provided) accordingly to ABI name. Repository: rC Clang https://reviews.llvm.org/D52290 Files: lib/Driver/Driver

[PATCH] D52503: [clangd] Fix bugs with incorrect memory estimate report

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Dex.cpp:251 Bytes += InvertedIndex.getMemorySize(); - for (const auto &P : InvertedIndex) -Bytes += P.second.bytes(); + for (const auto &TokenToPostingList : InvertedIndex) +Bytes += TokenTo

[PATCH] D52117: Generate llvm.loop.parallel_accesses instead of llvm.mem.parallel_loop_access metadata.

2018-09-26 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur updated this revision to Diff 167099. Meinersbur added a comment. Herald added subscribers: llvm-commits, dexonsmith, steven_wu, eraman, mehdi_amini. - Rebase - Use call access group if instruction's access group is not set Repository: rL LLVM https://reviews.llvm.org/D52117 File

[PATCH] D52334: [clang-tidy] Build it even without static analyzer

2018-09-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Can I go ahead and merge this now? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52390: [analyzer] Add StackSizeChecker to StaticAnalyzer

2018-09-26 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. One final nit apart from a few in-line comments (most of them are just arguing with @Szelethus anyways 😛): KB vs. KiB (remember how a 2 TB hard drive appears as 1.8 TB on your machine? Because it's TiB!) is one of my pet peeve

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-09-26 Thread Whisperity via Phabricator via cfe-commits
whisperity added a subscriber: baloghadamsoftware. whisperity added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:1038 + + SmallString<128> NewAddNullTermExprStr; + NewAddNullTermExprStr = "\n"; aaron.ballman wrote: > This sh

[PATCH] D52034: [Clang] Add options -Xclang -coverage-filter and -Xclang -coverage-exclude to filter the files to instrument with gcov

2018-09-26 Thread calixte via Phabricator via cfe-commits
calixte updated this revision to Diff 167101. calixte added a comment. Fix tests Repository: rC Clang https://reviews.llvm.org/D52034 Files: include/clang/Driver/CC1Options.td include/clang/Frontend/CodeGenOptions.h lib/CodeGen/BackendUtil.cpp lib/Frontend/CompilerInvocation.cpp te

[PATCH] D52034: [Clang] Add options -Xclang -coverage-filter and -Xclang -coverage-exclude to filter the files to instrument with gcov

2018-09-26 Thread calixte via Phabricator via cfe-commits
calixte added a comment. I reported a bug for gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87442 @vsk I'd like to add documentation in Docs/UsersManual.rst, but I've no idea on what's a good place for this (I look for option -coverage-no-function-names-in-data, but I didn't get anything). S

[PATCH] D52334: [clang-tidy] Build it even without static analyzer

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52334#1246356, @steveire wrote: > Can I go ahead and merge this now? In https://reviews.llvm.org/D52334#1242813, @lebedev.ri wrote: > `#ifdef` hell is usually messy and is a source of problems. > May i ask what is the motivation for t

[PATCH] D52392: [X86] For lzcnt/tzcnt intrinsics use cttz/ctlz intrinsics with zero_undef flag set to false.

2018-09-26 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. This revision is now accepted and ready to land. LGTM, thanks for checking. Please update the *-intrinsics-fast-isel.ll llvm test cases to match the *-builtins.c changes. Repository: rC Clang https://reviews.llvm.org/D52392 ___

[PATCH] D52360: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Config option is a good idea but it must not be empty by default. The checker must ignore all pointer and references by default based on their names. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52360

[PATCH] D51402: [OpenCL] Adding cl_intel_planar_yuv extension

2018-09-26 Thread Dmitry Sidorov via Phabricator via cfe-commits
sidorovd added inline comments. Comment at: lib/Headers/opencl-c.h:26 +#if __OPENCL_C_VERSION__ >= CL_VERSION_1_2 +#ifndef cl_intel_planar_yuv +#define cl_intel_planar_yuv Anastasia wrote: > Anastasia wrote: > > @yaxunl, do you think we need to add some kind of a

[PATCH] D52360: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Danila Malyutin via Phabricator via cfe-commits
danilaml added a comment. Would that also skip checks for something like `shared_ptr`? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D52544: Improve diagnostics range reporting.

2018-09-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, ioeric. Herald added subscribers: cfe-commits, arphaman, jkorous, ilya-biryukov. If we have some range information coming from clang diagnostic, promote that one even if it doesn't contain diagnostic location inside. Repository

[PATCH] D52360: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52360#1246440, @baloghadamsoftware wrote: > Config option is a good idea but it must not be empty by default. The checker > must ignore all pointer and references by default based on their names. I disagree, it **must** not have false-ne

Re: [clang-tools-extra] r342730 - [clangd] Remember to serialize symbol origin in YAML.

2018-09-26 Thread Eric Liu via cfe-commits
I think it depends on how you interpret the origin. You could tie the origin to the index or to the producer of the symbol. The current model seems to be the later (origin is a configuration in SymbolCollector. MergeIndex manipulates the origin, but I would rather treat that as a special case). And

[PATCH] D52499: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074)

2018-09-26 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Thanks! lgtm. Comment at: include/clang/Driver/CLCompatOptions.td:94 +def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">, + Alias, AliasArgs<["4096"]>; def _SLASH_Gs : CLJoined<"Gs">, https://docs.microsoft.com/en-us/cpp/build/

[PATCH] D52499: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074)

2018-09-26 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: include/clang/Driver/CLCompatOptions.td:94 +def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">, + Alias, AliasArgs<["4096"]>; def _SLASH_Gs : CLJoined<"Gs">, thakis wrote: > https://docs.microsoft.com/en-us/cpp/bu

[PATCH] D52530: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

2018-09-26 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D52530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D52360: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D52360#1246443, @danilaml wrote: > Would that also skip checks for something like `shared_ptr`? Yes, everything ending on `pointer`, `ptr`, `reference` or `ref`, first letter case insensitive. Repository: rCTE Clang Tools Extr

[PATCH] D52545: [docs] Update PostingList string representation format

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous. Because `PostingList` objects are compressed, it is now impossible to see elements other than the current one and the do

[PATCH] D52360: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D52360#1246452, @lebedev.ri wrote: > I disagree, it **must** not have false-negatives by default. What kind of false-negatives could be caused by smart pointers or references? Sane people do not name a type pointer or reference if

[PATCH] D52390: [analyzer] Add StackSizeChecker to StaticAnalyzer

2018-09-26 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/StackUsageMeasuringVisitor.h:102-111 + bool hasEmptyFlaggedUsageStored(const Stmt *S) const { +auto iter = StmtSubtreeUsages.find(S); +return iter != StmtSubtreeUsages.end() && +

r343105 - [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

2018-09-26 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Wed Sep 26 06:08:44 2018 New Revision: 343105 URL: http://llvm.org/viewvc/llvm-project?rev=343105&view=rev Log: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build Summary: This has been bothering me for a while, but o

[PATCH] D52530: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52530#1246459, @jroelofs wrote: > LGTM Thank you for the speedy review! Repository: rC Clang https://reviews.llvm.org/D52530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

[PATCH] D52530: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

2018-09-26 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343105: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit… (authored by lebedevri, committed by ). Repository: rC Clang https://reviews.llvm.org/D52530 Files: tools/scan

[PATCH] D52533: [test] Use --sysroot instead of -B in print-multi-directory.c

2018-09-26 Thread Christian Bruel via Phabricator via cfe-commits
chrib added a reviewer: jroelofs. chrib added a comment. Hi Martin, maybe just a NIT, use --sysroot= rather than just --sysroot for consistency with other tests. Otherwise looks good to me, thanks (adding Jonathan as I'm not sure I can accept) Repository: rC Clang https://reviews.llvm.org

[PATCH] D52547: Tell whether file/folder for include completions.

2018-09-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, ioeric, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52547 Files: clangd/CodeComplete.cpp clangd/Protocol.h unittests/clangd/Code

[PATCH] D51340: Add /Zc:DllexportInlines option to clang-cl

2018-09-26 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. The static local stuff still makes me nervous. How much does Chromium break if we just ignore the problem? And how does -fvisibility-inlines-hidden handle the issue? Also, Sema already has a check for static locals in C inline functions: $ echo "inline void f() { static

[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 167124. ioeric marked 7 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52419 Files: clangd/CMakeLists.txt clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd

[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ClangdUnit.cpp:339 +llvm::ErrorOr status(const Twine &Path) override { + auto I = StatCache.find(Path.str()); + return (I != StatCache.end()) ? I->getValue() : FS->status(Path); ilya-biryukov wrote: >

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-09-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:1038 + + SmallString<128> NewAddNullTermExprStr; + NewAddNullTermExprStr = "\n"; whisperity wrote: > aaron.ballman wrote: > > This should be done using a `Twine`.

[PATCH] D52334: [clang-tidy] Build it even without static analyzer

2018-09-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Please wait for explicit approval from @alexfh Am 26.09.2018 um 13:05 schrieb Stephen Kelly via Phabricator: > steveire added a comment. > > Can I go ahead and merge this now? > > Repository: > > rCTE Clang Tools Extra > > https://reviews.llvm.org/D52334 Reposi

[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. This looks good to me, but you probably want to wait for someone else to review this, too. https://reviews.llvm.org/D52421 ___ cfe-commi

[PATCH] D52549: [VFS] Add a VFS wrapper which avoids opening nonexistent files by reading dirs.

2018-09-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: ioeric, ilya-biryukov. Herald added subscribers: cfe-commits, jfb, mgorny. This is intended to reduce the number of syscalls when building large translation units that have long include paths. This is a WIP for early feedback: - obvious

[PATCH] D52549: [VFS] Add a VFS wrapper which avoids opening nonexistent files by reading dirs.

2018-09-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 167126. sammccall added a comment. remove commented code Repository: rC Clang https://reviews.llvm.org/D52549 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/AvoidStatsVFS.cpp lib/Basic/CMakeLists.txt lib/Basic/VirtualFileSystem.cpp I

[PATCH] D52549: [VFS] Add a VFS wrapper which avoids opening nonexistent files by reading dirs.

2018-09-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. As noted, this is really early stage, but would appreciate design feedback (I think both of you have spent some time fighting VFS by now...) Repository: rC Clang https://reviews.llvm.org/D52549 ___ cfe-commits mailing

[PATCH] D52503: [clangd] Fix bugs with incorrect memory estimate report

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Dex.cpp:251 Bytes += InvertedIndex.getMemorySize(); - for (const auto &P : InvertedIndex) -Bytes += P.second.bytes(); + for (const auto &TokenToPostingList : InvertedIndex) +Bytes += Token

[PATCH] D52360: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52360#1246474, @baloghadamsoftware wrote: > In https://reviews.llvm.org/D52360#1246452, @lebedev.ri wrote: > > > I disagree, it **must** not have false-negatives by default. > > > What kind of false-negatives could be caused by smart pointe

[PATCH] D52315: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52315#1245747, @dblaikie wrote: > ... I think this has been attempted to be superseded by https://reviews.llvm.org/D52360, although that has the same basic issue. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52315

[PATCH] D52360: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Felix Berger via Phabricator via cfe-commits
flx added a comment. In https://reviews.llvm.org/D52360#1246472, @baloghadamsoftware wrote: > In https://reviews.llvm.org/D52360#1246443, @danilaml wrote: > > > Would that also skip checks for something like `shared_ptr`? > > > Yes, everything ending on `pointer`, `ptr`, `reference` or `ref`, fir

[PATCH] D52286: [Intrinsic] Signed Saturation Intirnsic

2018-09-26 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1119 + case ISD::SSAT: +// Target legalization checked here? +Action = TargetLowering::Expand; leonardchan wrote: > ebevhan wrote: > > leonardchan wrote: > > > ebevhan wr

r343111 - [ARM/AArch64][v8.5A] Add Armv8.5-A target

2018-09-26 Thread Oliver Stannard via cfe-commits
Author: olista01 Date: Wed Sep 26 07:20:29 2018 New Revision: 343111 URL: http://llvm.org/viewvc/llvm-project?rev=343111&view=rev Log: [ARM/AArch64][v8.5A] Add Armv8.5-A target This patch allows targetting Armv8.5-A from Clang. Most of the implementation is in TargetParser, so this is mostly just

[PATCH] D52491: [ARM/AArch64][v8.5A] Add Armv8.5-A target

2018-09-26 Thread Oliver Stannard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343111: [ARM/AArch64][v8.5A] Add Armv8.5-A target (authored by olista01, committed by ). Changed prior to commit: https://reviews.llvm.org/D52491?vs=166908&id=167130#toc Repository: rC Clang https:/

[PATCH] D52552: [clang-tidy] Flag Classes Inheriting From Structs

2018-09-26 Thread Dennis Melamed via Phabricator via cfe-commits
DennisMelamed created this revision. DennisMelamed added reviewers: alexfh, aaron.ballman, hokein, JonasToth. Herald added subscribers: xazax.hun, mgorny. [clang-tidy] Flag Classes Inheriting From Structs Added a check which flags cases of a class inheriting from a struct, which can cause uninte

[PATCH] D52364: [clangd] Initial supoprt for cross-namespace global code completion.

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 167135. ioeric marked 14 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52364 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/index/Index.h clangd

[PATCH] D52364: [clangd] Initial supoprt for cross-namespace global code completion.

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/Index.h:430 /// - /// The global scope is "", a top level scope is "foo::", etc. + /// The global scope is "", a top level scope is "foo::", etc. "*" is + /// wildcard. sammccall wrote: > I'm not a big

[PATCH] D52552: [clang-tidy] Flag Classes Inheriting From Structs

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Please upload patches with full context. Please do follow coding style, clang-format your patches. Would it make sense to not catch-all all the `class : struct`, but consider the explicitly specified inheritance visibility? Comment at: clang-tidy/m

[PATCH] D52545: [docs] Update PostingList string representation format

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Iterator.h:97 /// ChildN is N-th iterator child. Raw iterators over PostingList are - /// represented as "[ID1, ID2, ..., {IDN}, ... END]" where IDN is N-th - /// PostingList entry and the element w

[PATCH] D52545: [docs] Update PostingList string representation format

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 167138. kbobyrev added a comment. Simplify the documentation format. https://reviews.llvm.org/D52545 Files: clang-tools-extra/clangd/index/dex/Iterator.h Index: clang-tools-extra/clangd/index/dex/Iterator.h =

[clang-tools-extra] r343116 - [docs] Update PostingList string representation format

2018-09-26 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Wed Sep 26 07:59:49 2018 New Revision: 343116 URL: http://llvm.org/viewvc/llvm-project?rev=343116&view=rev Log: [docs] Update PostingList string representation format Because `PostingList` objects are compressed, it is now impossible to see elements other than the current on

[PATCH] D52545: [docs] Update PostingList string representation format

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343116: [docs] Update PostingList string representation format (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52545?vs=

[PATCH] D52554: [WIP] [clangd] Tests for special methods code-completion

2018-09-26 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: sammccall, ilya-biryukov. jkorous added a project: clang-tools-extra. Herald added subscribers: cfe-commits, kadircet, arphaman, dexonsmith, MaskRay, ioeric. Created in order to check we agree on what are the requirements and would later wr

[clang-tools-extra] r343117 - [clangd] Fix bugs with incorrect memory estimate report

2018-09-26 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Wed Sep 26 08:06:23 2018 New Revision: 343117 URL: http://llvm.org/viewvc/llvm-project?rev=343117&view=rev Log: [clangd] Fix bugs with incorrect memory estimate report * With the current implementation, `sizeof(std::vector)` is added twice to the `Dex` memory estimate which

[PATCH] D52503: [clangd] Fix bugs with incorrect memory estimate report

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE343117: [clangd] Fix bugs with incorrect memory estimate report (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D52503?vs=167079&id=167143#toc Repository: rC

Re: [clang-tools-extra] r342730 - [clangd] Remember to serialize symbol origin in YAML.

2018-09-26 Thread Ilya Biryukov via cfe-commits
> The downside is probably that all symbols in yaml would have the same origin, which is a bit redundant but doesn't seem to matter much. All my comments boil down to this one, but the argument is not only redundant - it does not make sense design-wise to store an origin in the serialized static in

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-09-26 Thread Brian Gesiak via Phabricator via cfe-commits
modocache accepted this revision. modocache added a comment. This revision is now accepted and ready to land. This is great, thanks! Sorry for letting it languish. I defer to @GorNishanov, but I don't see why this couldn't go in now and if there're any edge cases I'm missing we can address those

[PATCH] D52547: Tell whether file/folder for include completions.

2018-09-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. A drive-by comment. Would it be cleaner to pass this information from clang? Relying on completion label seems shaky. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52547 ___ cfe-commits mailing list

[PATCH] D52281: [clang-tidy] Add modernize check to use std::invoke in generic code

2018-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:70 +const auto *Paren = dyn_cast(MFunctor->getCallee()); +const auto *BinOp = dyn_cast(Paren->getSubExpr()); + How do you know `Paren` won't be null?

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:1038 + + SmallString<128> NewAddNullTermExprStr; + NewAddNullTermExprStr = "\n"; JonasToth wrote: > whisperity wrote: > > aaron.ballman wrote: > > > This shoul

[PATCH] D52552: [clang-tidy] Flag Classes Inheriting From Structs

2018-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This strikes me as likely being a very chatty diagnostic. For instance, it will trigger on harmless code that uses empty base class optimization (in addition to other concerns pointed out by @lebedev.ri). It seems like the real concern here is unintentional inform

  1   2   >