[PATCH] D52047: [clangd] Add a "benchmark" for tracking memory

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:69 +// This is not a *real* benchmark: it shows size of built MemIndex (in bytes). +// Same for the next "benchmark". ioeric wrote: > The hack might not be obviou

[PATCH] D51926: [scan-build-py] Prevent crashes of CTU analysis by suppressing warnings

2018-09-20 Thread Lorinc Balog via Phabricator via cfe-commits
lorincbalog added a comment. Yes, `-w` suppresses all warnings (without raising an error) regardless of the options' sequence, even if `-Wall -Werror` are present,. Repository: rC Clang https://reviews.llvm.org/D51926 ___ cfe-commits mailing lis

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

2018-09-20 Thread Marco Castelluccio via Phabricator via cfe-commits
marco-c added inline comments. Comment at: include/clang/Driver/CC1Options.td:236 +def coverage_exclude_EQ : Joined<["-"], "coverage-exclude=">, + Alias; def coverage_exit_block_before_body : Flag<["-"], "coverage-exit-block-before-body">, calixte wrote: > vsk

[PATCH] D52047: [clangd] Add a "benchmark" for tracking memory

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166240. kbobyrev marked 4 inline comments as done. https://reviews.llvm.org/D52047 Files: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp clang-tools-extra/clangd/index/SymbolYAML.cpp clang-tools-extra/clangd/index/dex/Dex.cpp Index: clang-tool

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

2018-09-20 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan created this revision. atanasyan added reviewers: rsmith, rnk, zturner. Herald added subscribers: jrtc27, arichardson, sdardis. All MIPS target architectures can be divided into four categories: 32-bit little-endian, 32-bit big-endian, 64-bit little-endian, and 64-bit big-endian. If, f

[PATCH] D52233: [dexp] Dump JSON representations of fuzzy find requests

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166241. kbobyrev marked an inline comment as done. kbobyrev retitled this revision from "[dexp] Allow users to dump JSON representations of fuzzy find requests" to "[dexp] Dump JSON representations of fuzzy find requests". kbobyrev edited the summary of this

r342636 - FileCheckify test/Driver/Xarch.c

2018-09-20 Thread Hans Wennborg via cfe-commits
Author: hans Date: Thu Sep 20 02:29:35 2018 New Revision: 342636 URL: http://llvm.org/viewvc/llvm-project?rev=342636&view=rev Log: FileCheckify test/Driver/Xarch.c Modified: cfe/trunk/test/Driver/Xarch.c Modified: cfe/trunk/test/Driver/Xarch.c URL: http://llvm.org/viewvc/llvm-project/cfe/tr

[PATCH] D52292: [Sema][OpenCL] Improve diagnostics for not viable overloadable function candidates

2018-09-20 Thread Dmitry Sidorov via Phabricator via cfe-commits
sidorovd created this revision. sidorovd added reviewers: Anastasia, yaxunl. Herald added a subscriber: cfe-commits. Allowed extension name (that ought to be disabled) printing in the note message. This diagnostic was proposed here: https://reviews.llvm.org/D51341 Repository: rC Clang https:

[PATCH] D51432: [AArch64] Unwinding support for return address signing

2018-09-20 Thread Oliver Stannard via Phabricator via cfe-commits
olista01 accepted this revision. olista01 added a comment. This revision is now accepted and ready to land. LGTM, thanks! https://reviews.llvm.org/D51432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D52266: [clang-cl] Provide separate flags for all the /O variants

2018-09-20 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Sorry, I didn't realize we both set off to do this in parallel. I've incorporated your changes into my patch. Comment at: test/Driver/Xarch.c:5 +// RUN: not grep ' "-O3" ' %t.log +// RUN: grep "argument unused during compilation: '-Xarch_i386 -O3'" %t.log

[PATCH] D52266: [clang-cl] Provide separate flags for all the /O variants

2018-09-20 Thread Hans Wennborg via Phabricator via cfe-commits
hans updated this revision to Diff 166252. hans added a comment. Uploading new diff. https://reviews.llvm.org/D52266 Files: include/clang/Driver/CLCompatOptions.td lib/Driver/ToolChains/MSVC.cpp test/Driver/Xarch.c Index: test/Driver/Xarch.c ==

r342638 - [OpenCL] Diagnose redundant address space conversion

2018-09-20 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Thu Sep 20 03:07:27 2018 New Revision: 342638 URL: http://llvm.org/viewvc/llvm-project?rev=342638&view=rev Log: [OpenCL] Diagnose redundant address space conversion Add a warning if a parameter with a named address space is passed to a to_addr builtin. For example: int i;

[PATCH] D51411: [OpenCL] Improve diagnostic of argument in address space conversion builtins

2018-09-20 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342638: [OpenCL] Diagnose redundant address space conversion (authored by svenvh, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51411?vs=164

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

2018-09-20 Thread George Rimar via Phabricator via cfe-commits
grimar created this revision. grimar added reviewers: dblaikie, echristo, probinson, compnerd. Herald added subscribers: JDevlieghere, aprantl. The DWARF5 specification says(Appendix F.1): "The sections that do not require relocation, however, **can be written to the relocatable object (.o) file

[PATCH] D51464: clang: fix MIPS/N32 triple and paths

2018-09-20 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan requested changes to this revision. atanasyan added a comment. This revision now requires changes to proceed. This patch fails the following test cases: - tools/clang/test/CodeGen/target-data.c - tools/clang/test/Driver/mips-cs.cpp Comment at: lib/Basic/Targets/Mips.

[PATCH] D51484: [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension

2018-09-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/OpenCLExtensionTypes.def:27 + +INTEL_SGAVC_TYPE(mce_payload_t, McePayload) +INTEL_SGAVC_TYPE(ime_payload_t, ImePayload) AlexeySotkin wrote: > Anastasia wrote: > > AlexeySachkov wrote: > > > Anastasi

[PATCH] D52292: [Sema][OpenCL] Improve diagnostics for not viable overloadable function candidates

2018-09-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Sema/Sema.h:8576 + + /// Find and extension in an extension map and return its name + template and extension -> an extension ? Comment at: lib/Sema/Sema.cpp:1856 +std::string Sema::

[PATCH] D51402: [OpenCL] Adding cl_intel_planar_yuv extension

2018-09-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia 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: > @yaxunl, do you think we need to add some kind of architecture guard fo

[PATCH] D52268: [AST] Squeeze some bits in LinkageComputer

2018-09-20 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 166264. riccibruno marked 3 inline comments as done. riccibruno added a comment. Removed the superfluous static_assert. Repository: rC Clang https://reviews.llvm.org/D52268 Files: lib/AST/Linkage.h Index: lib/AST/Linkage.h

[PATCH] D52280: Don't trim non-alphanumeric characters in 'file not found' errors for include directives.

2018-09-20 Thread Christy Lee via Phabricator via cfe-commits
christylee accepted this revision. christylee added a comment. This revision is now accepted and ready to land. Thanks for the fix! Repository: rC Clang https://reviews.llvm.org/D52280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

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

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166266. kbobyrev retitled this revision from "[clangd] Add a "benchmark" for tracking memory" to "[clangd] Add building benchmark and memory consumption tracking". kbobyrev edited the summary of this revision. kbobyrev added a comment. Add symbol index build

[PATCH] D52292: [Sema][OpenCL] Improve diagnostics for not viable overloadable function candidates

2018-09-20 Thread Dmitry Sidorov via Phabricator via cfe-commits
sidorovd updated this revision to Diff 166270. sidorovd marked an inline comment as done. https://reviews.llvm.org/D52292 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/Sema.cpp lib/Sema/SemaOverload.cpp test/SemaOpenCL/extension-begin.cl Index: t

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

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166269. kbobyrev added a comment. Add benchmark for `SymbolSlab` loading from file. This might be useful for RIFF/YAML symbol loader optimizations. https://reviews.llvm.org/D52047 Files: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp clang-too

[PATCH] D52292: [Sema][OpenCL] Improve diagnostics for not viable overloadable function candidates

2018-09-20 Thread Dmitry Sidorov via Phabricator via cfe-commits
sidorovd added inline comments. Comment at: include/clang/Sema/Sema.h:8576 + + /// Find and extension in an extension map and return its name + template Anastasia wrote: > and extension -> an extension ? Thanks! Comment at: lib/Sema/Sema.cpp:

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

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166271. kbobyrev added a comment. Remove `BuildMem` benchmark, which collects data about `MemIndex` building time (which is essentially nothing and therefore not really interesting). https://reviews.llvm.org/D52047 Files: clang-tools-extra/clangd/benchm

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

2018-09-20 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. This needs a test when calling in a `constexpr` function. I believe `std::invoke` is not `constepxr`, so a function object call in a `constexpr` function should not suggest `std::invoke`. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52281

[PATCH] D52300: [clangd] Implement VByte PostingList compression

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, sammccall, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, mgorny. kbobyrev edited the summary of this revision. This patch implements Variable-length Byte

[PATCH] D52300: [clangd] Implement VByte PostingList compression

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166278. kbobyrev added a comment. - Update unit tests with iterator tree string representation to comply with the new format - Don't mark constructor `explicit` (previously it only had one parameter) - Fix `Limits` explanation comment (`ID > Limits[I]` -> `I

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-09-20 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Another ping. Anyone up for reviewing this patch? Repository: rC Clang https://reviews.llvm.org/D51211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52301: [clang] Set TypeSourceInfo for vardecl's in addition to type when we can deduce.

2018-09-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D52301 Files: include/clang/AST/PrettyPrinter.h include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/AST/T

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

2018-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Also not sure about the trick: - Would be surprising to see the "ms" instead of "mbytes" - Time tends to vary between runs, so using Google Benchmark's capabilities to run multiple times and report aggregated times seems useful. Not so much for the memory usage: i

[PATCH] D52261: [Sema] Generate completion fix-its for C code as well

2018-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D52261#1240143, @yvvan wrote: > I tried that first but did not I find a way just to copy an expression (we > basically need the same expr for such case). Do you know how to properly > generate a copy of expression or some other way to g

r342648 - [OPENMP] Add support for mapping memory pointed by member pointer.

2018-09-20 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Sep 20 06:54:02 2018 New Revision: 342648 URL: http://llvm.org/viewvc/llvm-project?rev=342648&view=rev Log: [OPENMP] Add support for mapping memory pointed by member pointer. Added support for map(s, s.ptr[0:1]) kind of mapping. Modified: cfe/trunk/lib/CodeGen/CGOpe

[PATCH] D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer.

2018-09-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: unittests/Analysis/ExprMutationAnalyzerTest.cpp:67 +if (const auto *DRE = dyn_cast(E)) { + if (DRE->getNameInfo().getAsString()[0] == 'p') +Finder = PointeeMutationFinder; shuaiwang wrote: > JonasToth

r342614 - [PowerPC] [Clang] Add vector int128 pack/unpack builtins

2018-09-20 Thread QingShan Zhang via cfe-commits
Author: qshanz Date: Wed Sep 19 22:04:57 2018 New Revision: 342614 URL: http://llvm.org/viewvc/llvm-project?rev=342614&view=rev Log: [PowerPC] [Clang] Add vector int128 pack/unpack builtins unsigned long long builtin_unpack_vector_int128 (vector int128_t, int); vector int128_t builtin_pack_vector

[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion

2018-09-20 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: arphaman, vsapsai, sammccall, ilya-biryukov. jkorous added a project: clang. Herald added subscribers: cfe-commits, dexonsmith, eraman. Destructors don't have return type "void", they don't have any return type at all. Repository: rC Cla

[PATCH] D52266: [clang-cl] Provide separate flags for all the /O variants

2018-09-20 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In https://reviews.llvm.org/D52266#1240304, @hans wrote: > Sorry, I didn't realize we both set off to do this in parallel. I've > incorporated your changes into my patch. No worries, I didn't do anything I wouldn't have done for reviewing this :-) Thoughts on "As far a

[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion

2018-09-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. When you're *calling* a destructor, I believe the expression does have type void. Are we sure this is incorrect? Calling a destructor is really unusual though. IIRC we decided to just not show them in clangd in member context (maybe this is broken or was never implem

[PATCH] D52280: Don't trim non-alphanumeric characters in 'file not found' errors for include directives.

2018-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rC Clang https://reviews.llvm.org/D52280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion

2018-09-20 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. You might be right - I am assuming here that we want consistent behaviour between constructors and destructors. IIUC ctors are currently skipped in code completions (in most cases) but they also don't have any type associated while result of their call definitely has s

[PATCH] D51949: [WIP][clang-tidy] initial ideas to isolate variable declarations

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Sorry, I didn't get time to review the patch properly, these are few stylistic comments. Hopefully, I'll be able to give more feedback when I get more time. Comment at: clang-tidy/readability/IsolateDeclCheck.cpp:21 + +#define PRINT_DEBUG 1 +

[PATCH] D51809: [CUDA][HIP] Fix assertion in LookupSpecialMember

2018-09-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping https://reviews.llvm.org/D51809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion

2018-09-20 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Sorry my bad. You are right, we aren't showing destructors in clangd for normal classes. The case where I noticed is kind of a corner case with template class. {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: ioeric, sammccall, simark. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52311 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clan

[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion

2018-09-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D52308#1240642, @jkorous wrote: > You might be right - I am assuming here that we want consistent behaviour > between constructors and destructors. > > IIUC ctors are currently skipped in code completions (in most cases) but they > also don

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov planned changes to this revision. ilya-biryukov added a comment. Posted to make sure it's visible that I've started doing this. Still need to update the tests and check for the capability from the client (and fallback to SymbolInformation if client does not support the new implemen

[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion

2018-09-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D52308#1240680, @jkorous wrote: > Sorry my bad. You are right, we aren't showing destructors in clangd for > normal classes. The case where I noticed is kind of a corner case with > template class. > > > {"jsonrpc":"2.0","id":0,"method":

[PATCH] D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer.

2018-09-20 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added inline comments. Comment at: unittests/Analysis/ExprMutationAnalyzerTest.cpp:67 +if (const auto *DRE = dyn_cast(E)) { + if (DRE->getNameInfo().getAsString()[0] == 'p') +Finder = PointeeMutationFinder; JonasToth wrote: > shuaiwang

[PATCH] D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer.

2018-09-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: unittests/Analysis/ExprMutationAnalyzerTest.cpp:67 +if (const auto *DRE = dyn_cast(E)) { + if (DRE->getNameInfo().getAsString()[0] == 'p') +Finder = PointeeMutationFinder; shuaiwang wrote: > JonasToth

[PATCH] D52300: [clangd] Implement VByte PostingList compression

2018-09-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Very nice! I think the data structures can be slightly tighter, and some of the implementation could be easier to follow. But this seems like a nice win. Right-sizing the vectors seems like an important optimization. Comment at: clang-tools-extra/c

[PATCH] D52313: [clang-doc] Avoid parsing undefined base classes

2018-09-20 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: jakehehrlich, leonardchan, lebedev.ri. juliehockett added a project: clang-tools-extra. Don't try to parse base classes for declarations that are not definitions (segfaults, as there is no DefinitionData to access). https://revie

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-09-20 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. Ohh awesome, I didn't know the LSP supported that. I'll try it it Theia when I have time. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

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

2018-09-20 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: alexfh, aaron.ballman, flx. The three checks mentioned in the Title are two noisy if the code uses intrusive smart (reference counting) pointers. LLVM/Clang is such a code, it has lots of such types, e.g. StringRef, Sy

r342666 - [OPENMP] Fix spelling of getLoopCounter (NFC)

2018-09-20 Thread Mike Rice via cfe-commits
Author: mikerice Date: Thu Sep 20 10:19:41 2018 New Revision: 342666 URL: http://llvm.org/viewvc/llvm-project?rev=342666&view=rev Log: [OPENMP] Fix spelling of getLoopCounter (NFC) Modified: cfe/trunk/include/clang/AST/OpenMPClause.h cfe/trunk/lib/AST/OpenMPClause.cpp cfe/trunk/lib/Co

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

2018-09-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/utils/TypeTraits.cpp:47 + + // Do not consider "expensive to copy" types not greater than a pointer + if (Context.getTypeSize(Type) <= Context.getTypeSize(Context.VoidPtrTy)) Please make that comment a sen

[PATCH] D51926: [scan-build-py] Prevent crashes of CTU analysis by suppressing warnings

2018-09-20 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. If that helps you, then sure. I'm not sure I understand why having warnings causes the collection process to fail, but I guess ultimately it's not important. Repository:

[PATCH] D52280: Don't trim non-alphanumeric characters in 'file not found' errors for include directives.

2018-09-20 Thread Eric Christopher via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342667: r342177 introduced a hint in cases where an #included file is not found. It… (authored by echristo, committed by ). Changed prior to commit: https://reviews.llvm.org/D52280?vs=166184&id=166327#t

[PATCH] D52280: Don't trim non-alphanumeric characters in 'file not found' errors for include directives.

2018-09-20 Thread Eric Christopher via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342667: r342177 introduced a hint in cases where an #included file is not found. It… (authored by echristo, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://revi

r342667 - r342177 introduced a hint in cases where an #included file is not found. It tries to find a suggestion by removing leading or trailing non-alphanumeric characters and checking if a matching

2018-09-20 Thread Eric Christopher via cfe-commits
Author: echristo Date: Thu Sep 20 10:21:56 2018 New Revision: 342667 URL: http://llvm.org/viewvc/llvm-project?rev=342667&view=rev Log: r342177 introduced a hint in cases where an #included file is not found. It tries to find a suggestion by removing leading or trailing non-alphanumeric character

r342668 - Add testcases for r342667.

2018-09-20 Thread Eric Christopher via cfe-commits
Author: echristo Date: Thu Sep 20 10:22:43 2018 New Revision: 342668 URL: http://llvm.org/viewvc/llvm-project?rev=342668&view=rev Log: Add testcases for r342667. Added: cfe/trunk/test/Preprocessor/include-leading-nonalpha-no-suggest.c cfe/trunk/test/Preprocessor/include-leading-nonalpha-s

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

2018-09-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. This looks questionable to me. I don't disagree with the reasons stated about llvm types. But is that *always* true? I would personally be very surprized, and consider this a false-positive. This should at least be optional. Not sure about the default, but setting the

Re: r229575 - clang-cl: Disable frame pointer elimination at -O0

2018-09-20 Thread Reid Kleckner via cfe-commits
It looks like we don't do anything special if you run clang-cl -O0 or /O0, but it's not an error. I don't have my computer and can't run a test, but from the outside, it looks like clang-cl -O0 does generate unoptimized code without warning about an unrecognized flag, but it doesn't disable FP elim

[PATCH] D46140: [coroutines] std::task type (WIP)

2018-09-20 Thread Lewis Baker via Phabricator via cfe-commits
lewissbaker added inline comments. Comment at: test/std/experimental/task/sync_wait.hpp:36-37 + __isSet_ = true; +} +__cv_.notify_all(); + } The call to `notify_all()` needs to be inside the lock. Otherwise, it's possible the waiting thread may see

[PATCH] D52267: [AST] Various optimizations + refactoring in DeclarationName(Table)

2018-09-20 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 166324. riccibruno marked 9 inline comments as done. riccibruno added a comment. Address rjmccall comments: 1. Renamed `CXXSpecialName` to `CXXSpecialNameExtra` 2. Introduced a constant `IdentifierInfoAlignment` for `alignas(IdentifierInfoAlignment)` 3. U

[PATCH] D52267: [AST] Various optimizations + refactoring in DeclarationName(Table)

2018-09-20 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Addressed some inline comments. Comment at: include/clang/AST/DeclarationName.h:46 -/// DeclarationName - The name of a declaration. In the common case, -/// this just stores an IdentifierInfo pointer to a normal -/// name. However, it also provide

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

2018-09-20 Thread Felix Berger via Phabricator via cfe-commits
flx added inline comments. Comment at: clang-tidy/utils/TypeTraits.cpp:49 + if (Context.getTypeSize(Type) <= Context.getTypeSize(Context.VoidPtrTy)) +return false; + This early return now ignores the fact that the type has non-trivial copy constructors, vir

[PATCH] D52266: [clang-cl] Provide separate flags for all the /O variants

2018-09-20 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: include/clang/Driver/CLCompatOptions.td:121 +def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>, HelpText<"Disable function inlining">; +def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>, HelpText<"Only inline functions which

r342672 - [Sema] Retain __restrict qualifiers when substituting a reference type.

2018-09-20 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Thu Sep 20 11:12:24 2018 New Revision: 342672 URL: http://llvm.org/viewvc/llvm-project?rev=342672&view=rev Log: [Sema] Retain __restrict qualifiers when substituting a reference type. Fixes rdar://43760099 Differential revision: https://reviews.llvm.org/D52271 Added: cfe

[PATCH] D52271: [Sema] Ensure that we retain __restrict qualifiers when substituting a reference type.

2018-09-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342672: [Sema] Retain __restrict qualifiers when substituting a reference type. (authored by epilk, committed by ). Changed prior to commit: https://reviews.llvm.org/D52271?vs=166224&id=166334#toc Repo

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

2018-09-20 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Do you/what's your particular use case for this scenario? I guess this looks a bit like Apple's format (where debug info stays in the object file and isn't linked into the final binary), but don't expect they'd be moving to this any time soon. https://reviews.llvm.or

[PATCH] D52253: Fix an assert in the implementation of -Wquoted-include-in-framework-header

2018-09-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM with one more small change. Comment at: clang/test/Modules/double-quotes.m:35 +// rdar://43692300 +#import "NotAFramework/Headers/Headers/Thing1.h" Plea

[PATCH] D52267: [AST] Various optimizations + refactoring in DeclarationName(Table)

2018-09-20 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added inline comments. This revision is now accepted and ready to land. Comment at: include/clang/AST/DeclarationName.h:46 -/// DeclarationName - The name of a declaration. In the common case, -/// this just stores an IdentifierInfo poi

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-09-20 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. https://reviews.llvm.org/D50539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r342679 - Fix an assert in -Wquoted-include-in-framework-header

2018-09-20 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Thu Sep 20 12:00:03 2018 New Revision: 342679 URL: http://llvm.org/viewvc/llvm-project?rev=342679&view=rev Log: Fix an assert in -Wquoted-include-in-framework-header Fixes rdar://43692300 Differential revision: https://reviews.llvm.org/D52253 Added: cfe/trunk/test/Module

[PATCH] D52253: Fix an assert in the implementation of -Wquoted-include-in-framework-header

2018-09-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342679: Fix an assert in -Wquoted-include-in-framework-header (authored by epilk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52253?vs=166

[PATCH] D52313: [clang-doc] Avoid parsing undefined base classes

2018-09-20 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. If it **no longer** crashes, i guess you can test for that? Other than that, SG. https://reviews.llvm.org/D52313 ___ cfe-commits mailing

[PATCH] D52320: AMDGPU: add __builtin_amdgcn_update_dpp

2018-09-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: kzhuravl, b-sumner, arsenm. Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely. https://reviews.llvm.org/D52320 Files: include/clang/Basic/BuiltinsAMDGPU.def lib/CodeGen/CGBuiltin.cpp test/CodeGenOpenCL/builtins-amd

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166352. nickdesaulniers added a comment. - git-clang-format HEAD~ Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89.c Index: test/Sema/gnu89.c =

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. lgtm. But someone more familiar with these code paths should approve. Repository: rC Clang https://reviews.llvm.org/D52248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/Sema/gnu89.c:1-2 -// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only -verify +// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-PEDANTIC %s +// RUN: %clang_cc1 %s -std=gnu89 -fsy

[PATCH] D52193: RFC: [clang] Multithreaded compilation support

2018-09-20 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea marked an inline comment as done. aganea added a comment. It seems Reid's change has done good: `cmake` is not as significant as before in the build process. See below the improved timings: The tests consist in a full cleanup (delete build folder), cmake to regenerate, then a full rebuil

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166355. nickdesaulniers added a comment. - move test to new file, use check-prefix for both cases Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/gnu89-const.c =

[PATCH] D52268: [AST] Squeeze some bits in LinkageComputer

2018-09-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. `LinkageComputer` isn't actually persisted anywhere, right? And there's maybe one computer active at once? So this compression is theoretically saving one pointer of stack space but forcing a bunch of bit-manipulation every time these fields are accessed. Repositor

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-09-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Volodymyr, Thanks for working on this, really nice work with the tests! Comments below. > - No support for 'fallthrough' in crash reproducer. That'd be nice to have at some point to make sure we never escape into the real fs. > - Current way of working with modules i

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166357. nickdesaulniers added a comment. - add line numbers to match specific warning lines Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/gnu89-const.c ===

[PATCH] D52193: RFC: [clang] Multithreaded compilation support

2018-09-20 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. The process stuff looks cool and useful independently of `/MP`. Would it be possible to break that into a separate patch, and add a unit test for the behavior of the `WaitAll` flag? Repository: rC Clang https://reviews.llvm.org/D52193 ___

[PATCH] D50214: Add inherited attributes before parsed attributes.

2018-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D50214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Stephen Hines via Phabricator via cfe-commits
srhines added inline comments. Comment at: lib/Sema/SemaType.cpp:1682 // or via one or more typedefs." -if (!S.getLangOpts().C99 && !S.getLangOpts().CPlusPlus -&& TypeQuals & Result.getCVRQualifiers()) { This is broken for C11 and C17 (even befor

[PATCH] D51866: [analyzer][UninitializedObjectChecker][WIP] New flag to ignore guarded uninitialized fields

2018-09-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. You can retrieve any node from the `ASTMatcher` by `.bind()`ing sub-matchers to string keys and later retrieving them from the `MatchResult` dictionary by those keys. It's like a regex capturing groups (and, well, `ASTMatchers` also support backreferences to such groups, i.

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:52 +const NamespaceContextVec &Namespaces) { + std::ostringstream Result; + bool First = true; Can this be rewritten with `llvm::for_each()` and a `Twine`

[PATCH] D52193: RFC: [clang] Multithreaded compilation support

2018-09-20 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. In https://reviews.llvm.org/D52193#1241056, @zturner wrote: > The process stuff looks cool and useful independently of `/MP`. Would it be > possible to break that into a separate patch, and add a unit test for the > behavior of the `WaitAll` flag? Of course, will do.

[PATCH] D52323: Add necessary support for storing code-model to module IR.

2018-09-20 Thread Caroline Tice via Phabricator via cfe-commits
cmtice created this revision. cmtice added reviewers: tejohnson, pcc. Herald added subscribers: cfe-commits, dexonsmith, mehdi_amini. Currently the code-model does not get saved in the module IR, so if a code model is specified when compiling with LTO, it gets lost and is not propagated properly

RE: r342668 - Add testcases for r342667.

2018-09-20 Thread via cfe-commits
Hi Eric, The test that you added in this commit is failing on the PS4 Windows bot. Can you please take a look? http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/20052 FAIL: Clang :: Preprocessor/include-leading-nonalpha-suggest.c (10765 of 43992)

Re: r342668 - Add testcases for r342667.

2018-09-20 Thread Eric Christopher via cfe-commits
Adding Jorge... On Thu, Sep 20, 2018 at 2:36 PM wrote: > Hi Eric, > > The test that you added in this commit is failing on the PS4 Windows bot. > Can you please take a look? > > > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/20052 > > FAIL: Clang :: P

Re: r342668 - Add testcases for r342667.

2018-09-20 Thread Eric Christopher via cfe-commits
FWIW we're trying to reproduce here real fast and then will revert or fix real fast. Thanks! -eric On Thu, Sep 20, 2018 at 2:46 PM Eric Christopher wrote: > Adding Jorge... > > On Thu, Sep 20, 2018 at 2:36 PM wrote: > >> Hi Eric, >> >> The test that you added in this commit is failing on the

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/gnu89.c:1-2 -// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only -verify +// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-PEDANTIC %s +// RUN: %clang_cc1 %s -std=gnu89

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/gnu89.c:1-2 -// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only -verify +// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-PEDANTIC %s +// RUN: %clang_cc1 %s -std=gnu89

Re: r342668 - Add testcases for r342667.

2018-09-20 Thread Jorge Gorbe Moya via cfe-commits
Zach and I were able to find the cause. Clang on Windows manages to find "file.h" when you #include "/file.h" and that makes the expected diagnostic not appear. MSVC inteprets an #include with a leading slash as an absolute path so I think we have accidentally hit a different bug in Clang :) One

r342693 - Remove failing test.

2018-09-20 Thread Zachary Turner via cfe-commits
Author: zturner Date: Thu Sep 20 15:32:51 2018 New Revision: 342693 URL: http://llvm.org/viewvc/llvm-project?rev=342693&view=rev Log: Remove failing test. Removing on behalf of Jorge Moya. This test is broken on Windows due to it actually being able to resolve the path. There is an actual Windo

Re: r342668 - Add testcases for r342667.

2018-09-20 Thread Zachary Turner via cfe-commits
Test removed in r342693. On Thu, Sep 20, 2018 at 3:30 PM Jorge Gorbe Moya wrote: > Zach and I were able to find the cause. > > Clang on Windows manages to find "file.h" when you #include "/file.h" and > that makes the expected diagnostic not appear. MSVC inteprets an #include > with a leading sl

  1   2   >