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

2017-12-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/ClangdUnit.cpp:941 createInvocationFromCommandLine(ArgStrs, CommandLineDiagsEngine, VFS); + CI->LangOpts->CommentOpts.ParseAllComments = true; // createInvocationFromCommandLine sets DisableFree.

r321060 - Teach clang/NetBSD about additional dependencies for sanitizers

2017-12-18 Thread Kamil Rytarowski via cfe-commits
Author: kamil Date: Mon Dec 18 23:10:33 2017 New Revision: 321060 URL: http://llvm.org/viewvc/llvm-project?rev=321060=rev Log: Teach clang/NetBSD about additional dependencies for sanitizers Summary: Sanitizers on NetBSD require additional linkage: - libutil for forkpty(3) - libexecinfo for

[PATCH] D41054: Teach clang/NetBSD about additional dependencies for sanitizers

2017-12-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321060: Teach clang/NetBSD about additional dependencies for sanitizers (authored by kamil, committed by ). Repository: rC Clang https://reviews.llvm.org/D41054 Files:

[PATCH] D41237: [Frontend] Handle skipped bodies in template instantiations

2017-12-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12184 Decl *Sema::ActOnSkippedFunctionBody(Decl *Decl) { - if (FunctionDecl *FD = dyn_cast_or_null(Decl)) + if (FunctionDecl *FD = Decl->getAsFunction()) FD->setHasSkippedBody(); In the

[PATCH] D41367: [clangd] Support filtering by fixing scopes in fuzzyFind.

2017-12-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Nice, thanks! Some suggestions for further tightening the semantics, I'm happy to do these as a followup if you think it's too invasive here. Comment at: clangd/index/Index.h:127 /// \brief A query string for the fuzzy find. This is matched

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

2017-12-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1421 +destroyer = CodeGenFunction::destroyNonTrivialCStruct; +cleanupKind = getARCCleanupKind(); +break; ahatanak wrote: > rjmccall wrote: > > This can only be getARCCleanupKind() if

[PATCH] D41372: [libcxx] Fix transform_reduce mishandling move-only types, and nonstandard macro use in tests.

2017-12-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. The rest of this LGTM. Comment at: test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init.pass.cpp:61 +inline MoveOnly

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

2017-12-18 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov abandoned this revision. george.karpenkov added a comment. Abandoned in favor of https://reviews.llvm.org/D41378 https://reviews.llvm.org/D40809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40513: [libcxx] Support the use of compiler-rt in lit tests

2017-12-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. ping? Repository: rL LLVM https://reviews.llvm.org/D40513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2017-12-18 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127458. timshen added a comment. Fix return type of reference::opreator--. https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/utility

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

2017-12-18 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 127456. ahatanak marked 5 inline comments as done. ahatanak added a comment. Update patch. https://reviews.llvm.org/D41228 Files: docs/LanguageExtensions.rst include/clang/AST/Decl.h include/clang/AST/Type.h

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

2017-12-18 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 9 inline comments as done. ahatanak added a comment. Address review comments. Comment at: lib/CodeGen/CGDecl.cpp:1421 +destroyer = CodeGenFunction::destroyNonTrivialCStruct; +cleanupKind = getARCCleanupKind(); +break; rjmccall

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2017-12-18 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127455. timshen added a comment. Fix reference's access control. https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/utility

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2017-12-18 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127453. timshen added a comment. Update description. https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/utility

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2017-12-18 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. This patch added a new macro _LIBCPP_HAS_VECTOR_EXTENSION for detecting whether a vector extension (__attribute__((vector_size(num_bytes is available. This patch also backports

[PATCH] D41372: [libcxx] Fix transform_reduce mishandling move-only types, and nonstandard macro use in tests.

2017-12-18 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal added inline comments. Comment at: include/numeric:245 for (; __first1 != __last1; ++__first1, (void) ++__first2) __init = __b1(__init, __b2(*__first1, *__first2)); return __init; It's arguable that this should be

[PATCH] D41374: [Coverage] Fix use-after free in coverage emission

2017-12-18 Thread Eli Friedman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321052: [Coverage] Fix use-after free in coverage emission (authored by efriedma, committed by ). Changed prior to commit: https://reviews.llvm.org/D41374?vs=127440=127451#toc Repository: rL LLVM

r321052 - [Coverage] Fix use-after free in coverage emission

2017-12-18 Thread Eli Friedman via cfe-commits
Author: efriedma Date: Mon Dec 18 17:54:09 2017 New Revision: 321052 URL: http://llvm.org/viewvc/llvm-project?rev=321052=rev Log: [Coverage] Fix use-after free in coverage emission Fixes regression from r320533. This fixes the undefined behavior, but I'm not sure it's really right... I think we

[PATCH] D41374: [Coverage] Fix use-after free in coverage emission

2017-12-18 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. Thanks, this lgtm as a stopgap. As I mentioned offline, I think the goal should be to have non-modules and modules-enabled builds of a project produce identical coverage reports. I'll look into

[PATCH] D41374: [Coverage] Fix use-after free in coverage emission

2017-12-18 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: vsk, davidxl. efriedma added a project: clang. Fixes regression from r320533. This fixes the undefined behavior, but I'm not sure it's really right... I think we end up with missing coverage for code in modules. Repository: rC Clang

[PATCH] D41372: [libcxx] Fix transform_reduce mishandling move-only types, and nonstandard macro use in tests.

2017-12-18 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal added inline comments. Comment at: test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init.pass.cpp:61 +inline MoveOnly operator+(const MoveOnly& lhs, const MoveOnly& rhs) +{ Should these go in MoveOnly.h ? Repository:

[PATCH] D41372: [libcxx] Fix transform_reduce mishandling move-only types, and nonstandard macro use in tests.

2017-12-18 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal created this revision. BillyONeal added reviewers: mclow.lists, EricWF. - Remove _VSTD use and remove C++03-isms in C++17 tests for transform_reduce. - Add tests for all the transform_reduce overloads that pass in a move-only type. - Repair missing move in libc++ product code.

[PATCH] D40560: [analyzer] Get construction into `operator new` running in simple cases.

2017-12-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked 2 inline comments as done. NoQ added a comment. Sorry for the spam. https://reviews.llvm.org/D40560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40560: [analyzer] Get construction into `operator new` running in simple cases.

2017-12-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 127437. NoQ added a comment. - Fix more `for(:)` whitespace. https://reviews.llvm.org/D40560 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h lib/StaticAnalyzer/Core/ExprEngine.cpp lib/StaticAnalyzer/Core/ExprEngineCXX.cpp

[PATCH] D40560: [analyzer] Get construction into `operator new` running in simple cases.

2017-12-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 127436. NoQ added a comment. - Actually fix the comment about why we need to act on null or undefined values. - Fix `for(:)` whitespace. https://reviews.llvm.org/D40560 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h

[PATCH] D40698: [ubsan] Diagnose noreturn functions which return

2017-12-18 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 127426. vsk added a comment. - Tighten the IR test case. https://reviews.llvm.org/D40698 Files: docs/UndefinedBehaviorSanitizer.rst lib/CodeGen/CGBuiltin.cpp lib/CodeGen/CGCall.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CGExprCXX.cpp

[PATCH] D40560: [analyzer] Get construction into `operator new` running in simple cases.

2017-12-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I think this commit starts to make sense, so i removed the "WIP" marker. I guess it's better to leave todos 2 and 4 to follow-up commits, and 1 and 3 are already addressed. https://reviews.llvm.org/D40560 ___ cfe-commits

[PATCH] D40560: [analyzer] WIP: Get construction into `operator new` running in simple cases.

2017-12-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:522 +symVal = peekCXXNewAllocatorValue(State); + State = popCXXNewAllocatorValue(State); + a.sidorin wrote: > Should this be under 'if' as well? Whops!! Thanks!

[PATCH] D40560: [analyzer] WIP: Get construction into `operator new` running in simple cases.

2017-12-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 127420. NoQ added a comment. - Fix pop from empty stack. - Add recursive operator new tests. - Disable argument invalidation when the allocator was inlined (needed for those tests to work) In https://reviews.llvm.org/D40560#957653, @xazax.hun wrote: > I

[PATCH] D40698: [ubsan] Diagnose noreturn functions which return

2017-12-18 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 127424. vsk added a comment. - Make the patch cleaner by introducing an overload of EmitCall() which doesn't require a SourceLocation argument. https://reviews.llvm.org/D40698 Files: docs/UndefinedBehaviorSanitizer.rst lib/CodeGen/CGBuiltin.cpp

[PATCH] D41368: [libc++] Ignore bogus tautologic comparison warnings

2017-12-18 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. It would be better if we could just fix the code. If another compiler comes along and implements this same warning, we're going to have to fix it again. The only difference between any of this function is which cstdlib function is called. Why not just wrap all of

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-12-18 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. I put up https://reviews.llvm.org/D41368 to just suppress the warnings instead. https://reviews.llvm.org/D39149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41368: [libc++] Ignore bogus tautologic comparison warnings

2017-12-18 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai updated this revision to Diff 127416. smeenai added a comment. Remove stray comment Repository: rCXX libc++ https://reviews.llvm.org/D41368 Files: include/istream src/string.cpp Index: src/string.cpp === ---

[PATCH] D41368: [libc++] Ignore bogus tautologic comparison warnings

2017-12-18 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. smeenai added reviewers: EricWF, mclow.lists. Herald added a subscriber: cfe-commits. clang 6 has a new diagnostic -Wtautological-constant-compare, which fires for the code in question when int and long have the same size (for example, when compiling for a 32-bit

[PATCH] D39050: Add index-while-building support to Clang

2017-12-18 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes updated this revision to Diff 127412. nathawes marked an inline comment as done. nathawes added a comment. I've refactored the indexing/dependency data collection out from the writing with the new IndexUnitDataConsumer class, and made other smaller changes to address the feedback from

[PATCH] D41077: [analyser] different.CallArgsOrder checker implementation

2017-12-18 Thread Peter Szecsi via Phabricator via cfe-commits
szepet added subscribers: alexfh, szepet. szepet requested changes to this revision. szepet edited reviewers, added: xazax.hun, szepet; removed: dergachev.a. szepet added a comment. Herald added a subscriber: rnkovacs. Hi Alexey! Thank you for working on this! Some general comments on the

Re: [PATCH] D41318: Start setting dso_local in clang

2017-12-18 Thread Rafael Avila de Espindola via cfe-commits
Reid Kleckner via Phabricator writes: > rnk added inline comments. > > > > Comment at: lib/CodeGen/CodeGenModule.cpp:690-692 > + // Only handle ELF for now. > + if (!CGM.getTriple().isOSBinFormatELF()) > +return false; > >

[PATCH] D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option

2017-12-18 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Alex, Thanks for improving this. - Instead of adding `-cc1gen-reproducer`, why can't you run that through `-cc1` and have a flag similar to `-###`, which just prints the reproducer line? - I didn't understand how you can use the final output information, can you

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

2017-12-18 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127413. Nebiroth marked 3 inline comments as done. Nebiroth added a comment. findHover properly returns an error Removed many cases of bad merging Separated getHover in two functions Minor indenting and NIT fixes Repository: rCTE Clang Tools

[PATCH] D41318: Start setting dso_local in clang

2017-12-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:690-692 + // Only handle ELF for now. + if (!CGM.getTriple().isOSBinFormatELF()) +return false; Handling COFF here is probably trivial. Everything is dso_local unless it's dllimport.

[PATCH] D39050: Add index-while-building support to Clang

2017-12-18 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes marked 45 inline comments as done. nathawes added inline comments. Comment at: lib/Index/FileIndexRecord.h:51 +public: + FileIndexRecord(FileID FID, bool isSystem) : FID(FID), IsSystem(isSystem) {} + ioeric wrote: > s/isSystem/IsSystem/ > > Also, I

[PATCH] D41367: [clangd] Support filtering by fixing scopes in fuzzyFind.

2017-12-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127409. ioeric added a comment. - minor cleanup. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41367 Files: clangd/index/Index.h clangd/index/MemIndex.cpp unittests/clangd/IndexTests.cpp Index: unittests/clangd/IndexTests.cpp

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

2017-12-18 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 21 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdServer.h:306 + /// Run formatting for \p Rng inside \p File. + std::vector formatRange(PathRef File, Range Rng); + /// Run formatting for the whole \p File.

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

2017-12-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the review! Comment at: clangd/CodeComplete.cpp:847 + if (Opts.Index && SCInfo.SSInfo) { +// FIXME: log warning with logger if sema code completion have collected +// results. ilya-biryukov wrote: > NIT:

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

2017-12-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127406. ioeric marked 21 inline comments as done. ioeric added a comment. - Address comments in CodeComplete.cpp - Split index changes into a separate patch. - Merged with patch https://reviews.llvm.org/D41351. - Remove Position.* files. Repository: rCTE

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-12-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D39149#958378, @bcain wrote: > Let's resurrect these changes since https://reviews.llvm.org/D39462 was not > the right short-term approach. Let's not. IMHO, these changes are: - a bad idea in principle - clang should not be warning

[PATCH] D41367: [clangd] Support filtering by fixing scopes in fuzzyFind.

2017-12-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, ilya-biryukov, klimek. When scopes are specified, only match symbols from scopes. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41367 Files: clangd/index/Index.h

r321027 - [hwasan] update the design doc

2017-12-18 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Mon Dec 18 13:40:07 2017 New Revision: 321027 URL: http://llvm.org/viewvc/llvm-project?rev=321027=rev Log: [hwasan] update the design doc Modified: cfe/trunk/docs/HardwareAssistedAddressSanitizerDesign.rst Modified: cfe/trunk/docs/HardwareAssistedAddressSanitizerDesign.rst

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D40720#958697, @sberg wrote: > In https://reviews.llvm.org/D40720#958677, @vsk wrote: > > > Please add a test. > > > Note that the bot upon the first closing of this review changed the shown > diff from the combined cfe+compiler-rt diff to just

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Would it be possible to fix this by stripping the noexcept specifiers from both the function type used in the check and the one that is embedded in the prefix data? The downside is that we won't catch the case where the caller has a noexcept specifier and the callee

[PATCH] D40478: Added control flow architecture protection Flag

2017-12-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/CodeGen/CGCall.cpp:1737 llvm::toStringRef(CodeGenOpts.NoSignedZeros)); +FuncAttrs.addAttribute("shstk-compatible", + llvm::toStringRef(CodeGenOpts.ShstkCompatible));

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. In https://reviews.llvm.org/D40720#958677, @vsk wrote: > Please add a test. Note that the bot upon the first closing of this review changed the shown diff from the combined cfe+compiler-rt diff to just the cfe part. See https://reviews.llvm.org/rL320977 for the

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:141 + + Warns if an operator is overloaded, except for the copy and move operators. + assignment operators? Comment at:

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Copying my comment from the diffusion thread to keep things in one place: > You could make FunctionTypeMismatch an 'AlwaysRecoverable' check, just like > the Vptr check, and remove the _abort handlers from the ubsan runtimes. Repository: rC Clang

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Please add a test. Repository: rC Clang https://reviews.llvm.org/D40720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r321016 - Fix more inconsistent line endings. NFC.

2017-12-18 Thread Dimitry Andric via cfe-commits
Author: dim Date: Mon Dec 18 11:46:56 2017 New Revision: 321016 URL: http://llvm.org/viewvc/llvm-project?rev=321016=rev Log: Fix more inconsistent line endings. NFC. Modified: cfe/trunk/include/clang/AST/OperationKinds.def cfe/trunk/lib/Parse/ParseTemplate.cpp

[clang-tools-extra] r321016 - Fix more inconsistent line endings. NFC.

2017-12-18 Thread Dimitry Andric via cfe-commits
Author: dim Date: Mon Dec 18 11:46:56 2017 New Revision: 321016 URL: http://llvm.org/viewvc/llvm-project?rev=321016=rev Log: Fix more inconsistent line endings. NFC. Modified: clang-tools-extra/trunk/docs/modularize.rst clang-tools-extra/trunk/docs/pp-trace.rst Modified:

[PATCH] D41148: [libcxx] implement declarations based on P0214R7.

2017-12-18 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127399. timshen added a comment. Formatted the files. https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/test/std/experimental/simd/nothing_to_do.pass.cpp

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. What happens if the operator is overloaded outside a class? Is that allowed/disallowed and could you please mention the guideline on that in the docs + tests. Comment at: clang-tidy/fuchsia/OverloadedOperatorCheck.cpp:18 +

[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-18 Thread William Enright via Phabricator via cfe-commits
Nebiroth created this revision. Nebiroth added reviewers: malaperle, ilya-biryukov. Adds BeforeExecute method to PrecompiledPreamble to be called before Execute(). This method can be overriden. Repository: rC Clang https://reviews.llvm.org/D41365 Files:

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-18 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: aaron.ballman, alexfh, hokein. juliehockett added a project: clang-tools-extra. Herald added subscribers: xazax.hun, mgorny. Adds a check to the Fuchsia module to warn if an operator is overloaded, except move and copy operators.

Re: r320971 - [X86] Use {{.*}} instead of hardcoded %1 in knot test.

2017-12-18 Thread Craig Topper via cfe-commits
Thanks! ~Craig On Mon, Dec 18, 2017 at 3:29 AM, Martin Bohme via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: mboehme > Date: Mon Dec 18 03:29:21 2017 > New Revision: 320971 > > URL: http://llvm.org/viewvc/llvm-project?rev=320971=rev > Log: > [X86] Use {{.*}} instead of hardcoded

[PATCH] D40939: [analyzer] Avoid element regions of void type.

2017-12-18 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Looks good to me, although I have a super nit about wording in a comment. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:2181 + // One of the forbidden LValue

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

2017-12-18 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127386. Nebiroth marked 14 inline comments as done. Nebiroth added a comment. Herald added a subscriber: mgrang. CppFilePreambleCallbacks no longer extends PPCallbacks CppFilePreambleCallbacks no longer needs SourceManager parameter Removed temporary

Re: [clang-tools-extra] r320591 - [clangd] Fix bool conversion operator of UniqueFunction

2017-12-18 Thread David Blaikie via cfe-commits
This operator bool should probably be explicit (as most/all of them should be - and most of them in LLVM are) - to avoid undue implicit conversion to other int types. On Wed, Dec 13, 2017 at 7:43 AM Ilya Biryukov via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ibiryukov > Date:

[PATCH] D6550: ASTImporter: Fix missing SourceLoc imports

2017-12-18 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin updated this revision to Diff 127375. a.sidorin added reviewers: xazax.hun, szepet. a.sidorin added a comment. Herald added a subscriber: rnkovacs. Removed already fixed stuff, added a test for remaining. Repository: rC Clang https://reviews.llvm.org/D6550 Files:

[PATCH] D41357: WIP: Fix Diagnostic layering, moving diagnostics out of Basic

2017-12-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie created this revision. dblaikie added a reviewer: rsmith. Herald added subscribers: cfe-commits, klimek. This goes part-way down the path of moving the actual diagnostics out of Clang's Basic library into the respective libraries that use those diagnostics. The end goal would be that a

r320994 - Fix the reference to the now renamed member of TBAAStructField

2017-12-18 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Mon Dec 18 08:50:11 2017 New Revision: 320994 URL: http://llvm.org/viewvc/llvm-project?rev=320994=rev Log: Fix the reference to the now renamed member of TBAAStructField See https://reviews.llvm.org/D39956 for details. Modified: cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp

[PATCH] D40560: [analyzer] WIP: Get construction into `operator new` running in simple cases.

2017-12-18 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Artem. This patch looks OK, just stylish issues. Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:112 + // It means that we cannot handle construction into null or garbage pointers. + // Such cosntructors need to be handled by checkers to

[PATCH] D40903: [Sanitizers] Basic Solaris sanitizer support (PR 33274)

2017-12-18 Thread Aleksey Shlyapnikov via Phabricator via cfe-commits
alekseyshl accepted this revision. alekseyshl added inline comments. This revision is now accepted and ready to land. Comment at: lib/Driver/ToolChains/CommonArgs.cpp:528 StringRef Sanitizer) { + // Solaris ld doesn't need this. Inhibit use

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-12-18 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. In https://reviews.llvm.org/D39149#912260, @smeenai wrote: > I confirmed that these warnings go away with https://reviews.llvm.org/D39462 > applied, and they reappear if I manually specify > `-Wmaybe-tautological-constant-compare`. Thank you! Let's resurrect these

Re: r320982 - Revert r320978 "No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17"

2017-12-18 Thread Stephan Bergmann via cfe-commits
On 12/18/2017 03:05 PM, Richard Smith wrote: Can we just strip the noexcept from the function type before emitting the fsan type info? As is apparently already done when emitting the (not noexcept-annotated) __cxxabiv1::__function_type_info referenced from a noexcept-annotated

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

2017-12-18 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320988: [clangd] Update documentation page with new features, instructions (authored by malaperle, committed by ). Repository: rL LLVM https://reviews.llvm.org/D41306 Files:

[clang-tools-extra] r320988 - [clangd] Update documentation page with new features, instructions

2017-12-18 Thread Marc-Andre Laperle via cfe-commits
Author: malaperle Date: Mon Dec 18 06:59:01 2017 New Revision: 320988 URL: http://llvm.org/viewvc/llvm-project?rev=320988=rev Log: [clangd] Update documentation page with new features, instructions Summary: - Some features were implemented so mark them as such. - Add installation instructions

[PATCH] D40903: [Sanitizers] Basic Solaris sanitizer support (PR 33274)

2017-12-18 Thread Rainer Orth via Phabricator via cfe-commits
ro added inline comments. Comment at: lib/Driver/ToolChains/CommonArgs.cpp:528 StringRef Sanitizer) { + // Solaris ld doesn't need this. Inhibit use of non-existant + // --export-dynamic. alekseyshl wrote: > Can you

[PATCH] D41151: [analyzer] Adding LoopContext and improve loop modeling

2017-12-18 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. This thing is very similar to https://reviews.llvm.org/D19979. Do we really need to create a separate LoopContext or we can reuse ScopeContext instead? https://reviews.llvm.org/D41151 ___ cfe-commits mailing list

[PATCH] D19979: [analyzer] ScopeContext - initial implementation

2017-12-18 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. This patch still depends on scope implementation in CFG. There is no final implementation; after initial implementation is done, I'll update the patch. https://reviews.llvm.org/D19979 ___ cfe-commits mailing list

[PATCH] D41240: [Solaris] __float128 is supported on Solaris/x86

2017-12-18 Thread Rainer Orth via Phabricator via cfe-commits
ro updated this revision to Diff 127348. ro added a comment. Enables test/CodeGenCXX/float128-declarations.cpp on Solaris/x86, too. Repository: rC Clang https://reviews.llvm.org/D41240 Files: lib/Basic/Targets/OSTargets.h test/CodeGenCXX/float128-declarations.cpp Index:

[PATCH] D41240: [Solaris] __float128 is supported on Solaris/x86

2017-12-18 Thread Rainer Orth via Phabricator via cfe-commits
ro added a comment. In https://reviews.llvm.org/D41240#955391, @rsmith wrote: > Mechanically, the code change looks fine, but I can't comment on whether this > is a correct change for Solaris, or whether the type provided by `__float128` > would use the right floating-point representation. You

[PATCH] D40673: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2-26

2017-12-18 Thread James Greenhalgh via Phabricator via cfe-commits
jgreenhalgh added a comment. If this patch unconditionally defines _Float128, then I think it will conflict with the typedef for _Float128 for IEEE754 128-bit long double systems in glibc: /* The type _Float128 exists only since GCC 7.0. */ # if !__GNUC_PREREQ (7, 0) || defined

Re: r320982 - Revert r320978 "No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17"

2017-12-18 Thread Richard Smith via cfe-commits
Can we just strip the noexcept from the function type before emitting the fsan type info? On 18 Dec 2017 13:52, "Stephan Bergmann via cfe-commits" < cfe-commits@lists.llvm.org> wrote: Author: sberg Date: Mon Dec 18 05:51:48 2017 New Revision: 320982 URL:

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg reopened this revision. sberg added a comment. Had to revert r320977/r320978 again with r320981/r320982: "At least http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/6013/steps/annotate/logs/stdio complains about ubsan::ubsan_handle_function_type_mismatch_abort

[PATCH] D41351: [clangd] Expose offset <-> LSP position functions, and fix bugs

2017-12-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, ilya-biryukov, mgorny, klimek. - Moved these functions to SourceCode.h - added unit tests - fix off by one in positionToOffset: Offset - 1 in final calculation was wrong - fixed

r320982 - Revert r320978 "No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17"

2017-12-18 Thread Stephan Bergmann via cfe-commits
Author: sberg Date: Mon Dec 18 05:51:48 2017 New Revision: 320982 URL: http://llvm.org/viewvc/llvm-project?rev=320982=rev Log: Revert r320978 "No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17" At least

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Stephan Bergmann via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC320978: No -fsanitize=function warning when calling noexcept function through non… (authored by sberg, committed by ).

r320978 - No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-18 Thread Stephan Bergmann via cfe-commits
Author: sberg Date: Mon Dec 18 05:05:42 2017 New Revision: 320978 URL: http://llvm.org/viewvc/llvm-project?rev=320978=rev Log: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17 As discussed in the mail thread

[PATCH] D37813: clang-format: better handle namespace macros

2017-12-18 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D37813#958116, @Typz wrote: > OK. > > So you mean a solution like the one discussed earlier would be the way to go? > > > I mean that we can configure macros in the format style, like "define A(X) > > class X {". I'm not 100% sure whether we

[PATCH] D41347: [libc++] Lift std::errc into a separated header

2017-12-18 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray created this revision. lichray added reviewers: mclow.lists, EricWF. This is needed to implement ``. Repository: rCXX libc++ https://reviews.llvm.org/D41347 Files: include/__errc include/system_error Index: include/system_error

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

2017-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.cpp:284 +void ClangdLSPServer::onCodeHover(Ctx C, TextDocumentPositionParams ) { + + auto H = Server.findHover(C, NIT: remove empty line Comment at:

[PATCH] D40705: [Parser] Diagnose storage classes in template parameter declarations

2017-12-18 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added a comment. I don't have commit access. Please commit the patch on my behalf. https://reviews.llvm.org/D40705 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40705: [Parser] Diagnose storage classes in template parameter declarations

2017-12-18 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki updated this revision to Diff 127324. miyuki added a comment. Merged two diagnostics into one https://reviews.llvm.org/D40705 Files: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseTemplate.cpp test/CXX/temp/temp.param/p2-cpp11.cpp test/CXX/temp/temp.param/p2.cpp

[PATCH] D41345: [clangd] Add more symbol information for code completion.

2017-12-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: hokein, sammccall. Herald added subscribers: cfe-commits, ilya-biryukov, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41345 Files: clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/index/FileIndex.cpp

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

2017-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Here are a few more comments. Comment at: clangd/CodeComplete.cpp:847 + if (Opts.Index && SCInfo.SSInfo) { +// FIXME: log warning with logger if sema code completion have collected +// results. NIT: FIXME(ioeric)? Also,

[PATCH] D41343: [clangd] in VSCode client, filter extensions properly and only accept file: URIs

2017-12-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 127320. sammccall added a comment. Fix quotes Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41343 Files: clangd/clients/clangd-vscode/src/extension.ts Index: clangd/clients/clangd-vscode/src/extension.ts

[PATCH] D41343: [clangd] in VSCode client, filter extensions properly and only accept file: URIs

2017-12-18 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320972: [clangd] in VSCode client, filter extensions properly and only accept file: URIs (authored by sammccall, committed by ). Repository: rL LLVM https://reviews.llvm.org/D41343 Files:

[clang-tools-extra] r320972 - [clangd] in VSCode client, filter extensions properly and only accept file: URIs

2017-12-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Dec 18 03:29:45 2017 New Revision: 320972 URL: http://llvm.org/viewvc/llvm-project?rev=320972=rev Log: [clangd] in VSCode client, filter extensions properly and only accept file: URIs Summary: The filtering wasn't previously working as intended - the string list is

r320971 - [X86] Use {{.*}} instead of hardcoded %1 in knot test.

2017-12-18 Thread Martin Bohme via cfe-commits
Author: mboehme Date: Mon Dec 18 03:29:21 2017 New Revision: 320971 URL: http://llvm.org/viewvc/llvm-project?rev=320971=rev Log: [X86] Use {{.*}} instead of hardcoded %1 in knot test. This makes the test more resilient and consistent with the other tests introduced in r320919. Modified:

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

2017-12-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Hope you don't mind me piling on... let me know! Mostly readability, but i'd also like to reduce the scope w.r.t namespace completion. Comment at: clangd/CodeComplete.cpp:90 +CompletionItemKind getKindOfSymbol(index::SymbolKind Kind) { + using SK

[PATCH] D37813: clang-format: better handle namespace macros

2017-12-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. OK. So you mean a solution like the one discussed earlier would be the way to go? > I mean that we can configure macros in the format style, like "define A(X) > class X {". I'm not 100% sure whether we would just try to use the > Preprocessor for this, or whether we'd

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

2017-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov requested changes to this revision. ilya-biryukov added inline comments. This revision now requires changes to proceed. Comment at: clangd/ClangdServer.cpp:446 std::vector Result; - Resources->getAST().get()->runUnderLock([Pos, , this](ParsedAST *AST) { +

  1   2   >