[PATCH] D47607: [libcxx] Almost fix some UB in and

2018-06-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I should have asked, have we actually seen a midcompile caused by this? Is there a reproducer? Or is this purerly speculative? Repository: rCXX libc++ https://reviews.llvm.org/D47607 ___ cfe-commits mailing list cfe-commi

[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

2018-06-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/Basic/TargetInfo.cpp:45 + AccumWidth = AccumAlign = 32; + LongAccumWidth = LongAccumAlign = 64; SuitableAlign = 64; rsmith wrote: > leonardchan wrote: > > leonardchan wrote: > > > ebevhan wrote: > > > > leonardc

[PATCH] D46911: [Fixed Point Arithmetic] Addition of the remaining fixed point types and their saturated equivalents

2018-06-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: include/clang/AST/ASTContext.h:2882 + + QualType getCorrespondingSaturatedType(const QualType &Ty) const; }; This probably belongs up near the other predicates. Also I think it's more common to simply pass `QualType`

[PATCH] D47620: Remove llvm::Triple argument from get***Personality() functions

2018-06-01 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin created this revision. aheejin added a reviewer: sbc100. Herald added a subscriber: cfe-commits. Because `llvm::Triple` can be derived from `TargetInfo`, it is simpler to take only `TargetInfo` argument. Repository: rC Clang https://reviews.llvm.org/D47620 Files: lib/CodeGen/CGExce

[PATCH] D47614: [WebAssembly] Hide new Wasm EH behind its feature flag

2018-06-01 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin marked an inline comment as done. aheejin added inline comments. Comment at: lib/CodeGen/CGException.cpp:322 const EHPersonality &CXX = - getCXXPersonality(getTarget().getTriple(), LangOpts); + getCXXPersonality(getTarget().getTriple(), LangOpts, getTarget())

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm with just a few more nits. Comment at: clang-doc/BitcodeWriter.cpp:484 #undef EMITINFO Nit: `EMITINFO` is a bit confusing with `writeInfo`. Are the

[PATCH] D41168: [X86] Lowering X86 avx512 sqrt intrinsics to IR

2018-06-01 Thread Tomasz Krupa via Phabricator via cfe-commits
tkrupa added a comment. Mask scalar case is closed and doesn't have any effects on this revision. Besides, I resolved issues connected to lowering scalar sqrt intrinsics without rounding (that is, if https://reviews.llvm.org/D47621 is accepted). Should I add them here to have everything sqrt in

[PATCH] D47417: [analyzer] Add missing state transition in IteratorChecker

2018-06-01 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Did the tests execute? I am not sure. First problem is the the container may become dead before the iterator, so its `Begin` and `End` symbols may be inaccessible. This is easy to solve by marking the container of the iterator as live. However, there is a sec

[PATCH] D47445: [ASTImporter] Corrected diagnostic client handling in tests.

2018-06-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 149412. balazske added a comment. - Added comment, renamed beginSourceFile, removed check for PP. Check for PP is removed because it is allowed to be nullptr. Repository: rC Clang https://reviews.llvm.org/D47445 Files: include/clang/Frontend/ASTUnit.

[PATCH] D47445: [ASTImporter] Corrected diagnostic client handling in tests.

2018-06-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. From API point of view if there is a `enableSourceFileDiagnostics` there should be a `disableSourceFileDiagnostics` too (that calls the `EndSourceFile`). But I am not sure how and if to use it at all. In the unit tests it is not needed, the ASTUnit contains a single en

[PATCH] D47537: [clang-tools-extra] Cleanup documentation routine

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/docs/index.rst:27 pp-trace - clang-rename clangd It seems that the clang-rename tool is still in the extra repository. I think we should probably "advertise" `clang-rename` as part of clang-re

[PATCH] D47592: [AArch64] Corrected FP16 Intrinsic range checks in Clang + added Sema tests

2018-06-01 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: test/Sema/aarch64-neon-fp16-ranges.c:1 +// RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon -fallow-half-arguments-and-returns -target-feature +fullfp16 -ffreestanding -fsyntax-only -verify %s +// RUN: %clang_cc1 -tri

[PATCH] D47592: [AArch64] Corrected FP16 Intrinsic range checks in Clang + added Sema tests

2018-06-01 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: lib/Sema/SemaChecking.cpp:1409 - switch (BuiltinID) { -#define GET_NEON_OVERLOAD_CHECK -#include "clang/Basic/arm_neon.inc" Why do we need to remove this? Comment at: lib/Sema/SemaChecking.cpp:14

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm Comment at: clangd/index/Index.h:158 unsigned References = 0; - + /// Whether or not this is symbol is meant to be used for the global + /// completion. ---

[PATCH] D46944: [analyzer] Use sufficiently large types for index/size calculation.

2018-06-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 149415. ebevhan edited the summary of this revision. ebevhan added a comment. Changed ArrayIndexTy back to LongLongTy and reverted the test change. https://reviews.llvm.org/D46944 Files: lib/StaticAnalyzer/Core/ProgramState.cpp lib/StaticAnalyzer/Core/R

[PATCH] D41168: [X86] Lowering X86 avx512 sqrt intrinsics to IR

2018-06-01 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon requested changes to this revision. RKSimon added a comment. This revision now requires changes to proceed. In https://reviews.llvm.org/D41168#1118624, @tkrupa wrote: > Mask scalar case is closed and doesn't have any effects on this revision. > Besides, I resolved issues connected to low

[PATCH] D47460: [Frontend] Honor UserFilesAreVolatile flag getting file buffer in ASTUnit

2018-06-01 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. Is it plausible to add a unit-test for this? https://reviews.llvm.org/D47460 ___ cfe-commits mailing list cfe-commits@lists.l

r333734 - [X86] Remove leftover semicolons at end of macros

2018-06-01 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Fri Jun 1 02:40:50 2018 New Revision: 333734 URL: http://llvm.org/viewvc/llvm-project?rev=333734&view=rev Log: [X86] Remove leftover semicolons at end of macros This was missed in a few places in SVN r333613, causing compilation errors if these macros are used e.g. as para

[PATCH] D46892: [X86] Lowering adds/addus/subs/subus intrinsics to native IR (Clang part)

2018-06-01 Thread Tomasz Krupa via Phabricator via cfe-commits
tkrupa updated this revision to Diff 149417. tkrupa added a comment. Added missing scalar intrinsics without rounding. Repository: rC Clang https://reviews.llvm.org/D46892 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/avx-builtins.c test/CodeGen/avx512f-builtins.c test/CodeGen/avx512

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, jkorous, MaskRay, ilya-biryukov, klimek. These decls are sometime used as the canonical declarations (e.g. for go-to-def), which seems to be bad. Repository: rCTE Clang Tools Extra https:

[PATCH] D41168: [X86] Lowering X86 avx512 sqrt intrinsics to IR

2018-06-01 Thread Tomasz Krupa via Phabricator via cfe-commits
tkrupa updated this revision to Diff 149419. tkrupa added a comment. Added missing scalar intrinsics without rounding. Repository: rC Clang https://reviews.llvm.org/D41168 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/avx-builtins.c test/CodeGen/avx512f-builtins.c test/CodeGen/avx512

r333735 - [CodeComplete] Add a few extra tests for r333538. NFC

2018-06-01 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Jun 1 02:49:53 2018 New Revision: 333735 URL: http://llvm.org/viewvc/llvm-project?rev=333735&view=rev Log: [CodeComplete] Add a few extra tests for r333538. NFC From a follow-up discussion in D44480. New tests check that function bodies are not skipped: - In presence

[PATCH] D46892: [X86] Lowering adds/addus/subs/subus intrinsics to native IR (Clang part)

2018-06-01 Thread Tomasz Krupa via Phabricator via cfe-commits
tkrupa added a comment. Whoops, that's a wrong revision. I'll revert it shortly. Repository: rC Clang https://reviews.llvm.org/D46892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D46892: [X86] Lowering adds/addus/subs/subus intrinsics to native IR (Clang part)

2018-06-01 Thread Tomasz Krupa via Phabricator via cfe-commits
tkrupa updated this revision to Diff 149420. Repository: rC Clang https://reviews.llvm.org/D46892 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/avx2-builtins.c test/CodeGen/avx512bw-builtins.c test/CodeGen/avx512vlbw-builtins.c test/CodeGen/sse2-builtins.c Index: test/CodeGen/sse2-b

[PATCH] D44480: [Sema] Don't skip function bodies with 'auto' without trailing return type

2018-06-01 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D44480#1117230, @nik wrote: > In https://reviews.llvm.org/D44480#1117147, @cpplearner wrote: > > > Does `getAs()` work correctly with function returning `auto&`? > > > the "getAs()" version will skip the function body and generate an > e

[clang-tools-extra] r333737 - [clangd] Keep only a limited number of idle ASTs in memory

2018-06-01 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Jun 1 03:08:43 2018 New Revision: 333737 URL: http://llvm.org/viewvc/llvm-project?rev=333737&view=rev Log: [clangd] Keep only a limited number of idle ASTs in memory Summary: After this commit, clangd will only keep the last 3 accessed ASTs in memory. Preambles for ea

[PATCH] D47063: [clangd] Keep only a limited number of idle ASTs in memory

2018-06-01 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/TUScheduler.h:66 + std::chrono::steady_clock::duration UpdateDebounce, + ASTRetentionPolicy RetentionPolicy = {}); ~TUScheduler(); sammccall wrote: > ilya-biryukov wrote: > > sam

[PATCH] D47063: [clangd] Keep only a limited number of idle ASTs in memory

2018-06-01 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333737: [clangd] Keep only a limited number of idle ASTs in memory (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47063

[PATCH] D47460: [Frontend] Honor UserFilesAreVolatile flag getting file buffer in ASTUnit

2018-06-01 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. In https://reviews.llvm.org/D47460#1118694, @ilya-biryukov wrote: > Is it plausible to add a unit-test for this? i think I can add a unit-test for it since we have the 'getBufferKind' method in MemoryBuffer. https://reviews.llvm.org/D47460 __

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-06-01 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added inline comments. Comment at: docs/ReleaseNotes.rst:139 + used in conjunction with ``-Werror`` and as a result, the new warnings + are turned into new errors. + thakis wrote: > nit: I'd omit this paragraph -- this is true for all warnin

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-06-01 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso updated this revision to Diff 149425. CarlosAlbertoEnciso marked 3 inline comments as done. CarlosAlbertoEnciso added a comment. Address feedback from @thakis in relation to the Release Notes. https://reviews.llvm.org/D44826 Files: docs/ReleaseNotes.rst include/clang/Bas

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-06-01 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. Thanks to all reviewers for your comments and suggestions. https://reviews.llvm.org/D44826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-06-01 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:282-290 +def warn_unused_using_declaration : Warning< + "unused using declaration %0">, + InGroup, DefaultIgnore; +def warn_unused_using_directive : Warning< + "unused using directive %0">

Re: [PATCH] D45517: [analyzer] False positive refutation with Z3

2018-06-01 Thread Mikhail Ramalho via cfe-commits
Hi, > Just a bit of context and to have some expectation management regarding > this patch. The main purpose of this implementation was to back a thesis. > It was made under a very serious time pressure and the main goal was to be > able to measure on real world projects as soon as possible and i

[clang-tools-extra] r333742 - [clangd] Attempt the fix the buildbots after r333737

2018-06-01 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Jun 1 05:03:16 2018 New Revision: 333742 URL: http://llvm.org/viewvc/llvm-project?rev=333742&view=rev Log: [clangd] Attempt the fix the buildbots after r333737 Modified: clang-tools-extra/trunk/clangd/TUScheduler.cpp Modified: clang-tools-extra/trunk/clangd/TUSch

Re: [clang-tools-extra] r333737 - [clangd] Keep only a limited number of idle ASTs in memory

2018-06-01 Thread Ilya Biryukov via cfe-commits
This broke buildbots. Sorry about that. r333742 should fix them. On Fri, Jun 1, 2018 at 12:12 PM Ilya Biryukov via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ibiryukov > Date: Fri Jun 1 03:08:43 2018 > New Revision: 333737 > > URL: http://llvm.org/viewvc/llvm-project?rev=333737&

[PATCH] D47460: [Frontend] Honor UserFilesAreVolatile flag getting file buffer in ASTUnit

2018-06-01 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D47460#1118782, @yvvan wrote: > i think I can add a unit-test for it since we have the 'getBufferKind' method > in MemoryBuffer. That sounds good. Having a regression test that fails with descriptive messages in case anyone changes th

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-06-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. Thanks, LG! Comment at: clangd/CodeComplete.h:86 +// For index-based completion, we only want: +// * symbols in namespaces or translation unit scopes (e.g. no class nit: want -> consider? ==

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/index/SymbolCollector.cpp:293 assert(CompletionAllocator && CompletionTUInfo); + // A declaration created for a friend declaration should not be used as the + // canonical declaration in the index. Mayb

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Do I understand the intent of this change correctly? - friend decls that are not definitions should be ignored for indexing purposes - this means they should never be selected as canonical decl - if the friend decl is the only decl, then the symbol should not be indexed

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:293 assert(CompletionAllocator && CompletionTUInfo); + // A declaration created for a friend declaration should not be used as the + // canonical declaration in the index. ilya-biryuk

[PATCH] D47627: [ASTContext] Make getAddrSpaceQualType replace address spaces.

2018-06-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: rjmccall, arichardson. Herald added a subscriber: cfe-commits. The documentation for getAddrSpaceQualType says: "If T already has an address space specifier, it is silently replaced." The function did not do this; it asserted instead. Fix it

[PATCH] D47628: Detect an incompatible VLA pointer assignment

2018-06-01 Thread Jeremy Morse via Phabricator via cfe-commits
jmorse created this revision. jmorse added reviewers: eli.friedman, majnemer. Herald added a subscriber: cfe-commits. For pointer assignments of VLA types, Clang currently detects when array dimensions _lower_ than a variable dimension differ, and reports a warning. However it does not do the same

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-06-01 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC333746: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file (authored by erichkeane, committed by ). Changed prior to commit: https://reviews.llvm.org/D46667?vs=147538&id=149441#toc Repository:

r333746 - [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-06-01 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri Jun 1 06:04:26 2018 New Revision: 333746 URL: http://llvm.org/viewvc/llvm-project?rev=333746&view=rev Log: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file Compiler crashes when omp simd is used in an OpenCL file: clang -c -fopenmp omp_simd.cl __kernel vo

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 149446. ioeric marked an inline comment as done. ioeric edited the summary of this revision. ioeric added a comment. - Addressed review comment. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47623 Files: clangd/index/SymbolCollector.cpp

[PATCH] D47630: [Sema] Allow creating types with multiple of the same addrspace.

2018-06-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added a reviewer: Anastasia. Herald added a subscriber: cfe-commits. The comment with the OpenCL clause about this clearly says: "No type shall be qualified by qualifiers for two or more different address spaces." This must mean that two or more qualifiers f

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:297 +// If OrigD is an object of a friend declaration, skip it. +if (ASTNode.OrigD->getFriendObjectKind() != +Decl::FriendObjectKind::FOK_None) sammccall wrote: > this seem

[PATCH] D47607: [libcxx] Almost fix some UB in and

2018-06-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 149449. erik.pilkington marked 10 inline comments as done. erik.pilkington added a comment. Address review comments. Thanks! https://reviews.llvm.org/D47607 Files: libcxx/include/__hash_table libcxx/include/__tree libcxx/include/map libcxx/i

[PATCH] D47607: [libcxx] Almost fix some UB in and

2018-06-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In https://reviews.llvm.org/D47607#1118547, @EricWF wrote: > I should have asked, have we actually seen a midcompile caused by this? Is > there a reproducer? Or is this purerly speculative? Nope, pure speculation. I still think we should still fix this though.

[PATCH] D47632: [ASTImporter] Refactor Decl creation

2018-06-01 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a.sidorin, balazske, xazax.hun, r.stahl. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. Generalize the creation of Decl nodes during Import. With this patch we do the same things after and before a new AST node is created (::Create

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D47623#1118810, @sammccall wrote: > - friend decls that are not definitions should be ignored for indexing > purposes This is not generally true IIUC. A friend declaration can be a reference, a declaration or a definition. int foo(

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/index/SymbolCollector.cpp:297 +// If OrigD is an object of a friend declaration, skip it. +if (ASTNode.OrigD->getFriendObjectKind() != +Decl::FriendObjectKind::FOK_None) ioeric wrote: > sammccall

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:293 assert(CompletionAllocator && CompletionTUInfo); + // A declaration created for a friend declaration should not be used as the + // canonical declaration in the index. ilya-biryuk

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-06-01 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. > I disagree in this context because this patch currently means that static > archives will only work with NVPTX and there is no clear path how to "fix" > things for other offloading targets. I'll try to work on my proposal over the > next few days (sorry, very busy

[PATCH] D47480: clang-cl: Expose -no-canonical-prefixes

2018-06-01 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta accepted this revision. takuto.ikuta added a comment. I confirmed this CL and https://reviews.llvm.org/D47578 remove absolute path from /showIncludes when include paths are given in relative. https://reviews.llvm.org/D47480 ___ cfe-com

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-06-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: libcxx/include/__hash_table:2261 +_NodeHandle +__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_extract_unique( +key_type const& __key) EricWF wrote: > If I'm not mistaken, `__node_handle_extract_uniqu

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-06-01 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D47394#1118957, @gtbercea wrote: > I'm surprised you now disagree with this technique, when I first introduced > you to this in an e-mail off list you agreed with it. My words were `I agree this is the best solution for NVPTX.` In the sam

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-06-01 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:282-290 +def warn_unused_using_declaration : Warning< + "unused using declaration %0">, + InGroup, DefaultIgnore; +def warn_unused_using_directive : Warning< + "unused using direc

r333752 - Fix unused variable warning from r333718

2018-06-01 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri Jun 1 07:16:18 2018 New Revision: 333752 URL: http://llvm.org/viewvc/llvm-project?rev=333752&view=rev Log: Fix unused variable warning from r333718 Modified: cfe/trunk/lib/Lex/ModuleMap.cpp Modified: cfe/trunk/lib/Lex/ModuleMap.cpp URL: http://llvm.org/viewvc/

[PATCH] D47630: [Sema] Allow creating types with multiple of the same addrspace.

2018-06-01 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/Sema/address_spaces.c:17 int *_AS1 _AS2 *Z; // expected-error {{multiple address spaces specified for type}} + int *_AS1 _AS1 *M; I think it might be valuable to give a warning or remark to user. Using the sa

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 149465. ioeric added a comment. - Clarify. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47623 Files: clangd/index/SymbolCollector.cpp unittests/clangd/SymbolCollectorTests.cpp Index: unittests/clangd/SymbolCollectorTests.cpp

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:297 +// If OrigD is an object of a friend declaration, skip it. +if (ASTNode.OrigD->getFriendObjectKind() != +Decl::FriendObjectKind::FOK_None) sammccall wrote: > ioeric wr

r333757 - [OpenMP] Fix typo in NVPTX linker, NFC.

2018-06-01 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Fri Jun 1 07:43:48 2018 New Revision: 333757 URL: http://llvm.org/viewvc/llvm-project?rev=333757&view=rev Log: [OpenMP] Fix typo in NVPTX linker, NFC. Clang calls "nvlink" for linking multiple object files with OpenMP target functions, so correct this information when prin

[clang-tools-extra] r333758 - [clangd] Compute better estimates for memory usage of the AST

2018-06-01 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Jun 1 07:44:57 2018 New Revision: 333758 URL: http://llvm.org/viewvc/llvm-project?rev=333758&view=rev Log: [clangd] Compute better estimates for memory usage of the AST Also fix the return value of IdleASTs::getUsedBytes(). It was 'bool' instead of 'size_t' *facepalm*

r333761 - clang-cl: Expose -no-canonical-prefixes

2018-06-01 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Jun 1 07:59:57 2018 New Revision: 333761 URL: http://llvm.org/viewvc/llvm-project?rev=333761&view=rev Log: clang-cl: Expose -no-canonical-prefixes -no-canonical-prefixes is a weird flag: In gcc, it controls whether realpath() is called on the path of the driver binary. It'

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-06-01 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Hmm, maybe the scope is much larger: I just tried linking an executable that references a `declare target` function in a shared library. My assumption was that this already works, given that `libomptarget`'s registration functions can be called multiple times. Am I doi

[PATCH] D47480: clang-cl: Expose -no-canonical-prefixes

2018-06-01 Thread Nico Weber via Phabricator via cfe-commits
thakis closed this revision. thakis added a comment. r333761, thanks! https://reviews.llvm.org/D47480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r333762 - Remove redundant -fno-coverage-mapping added in r333761 (already added in r333423)

2018-06-01 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Jun 1 08:02:43 2018 New Revision: 333762 URL: http://llvm.org/viewvc/llvm-project?rev=333762&view=rev Log: Remove redundant -fno-coverage-mapping added in r333761 (already added in r333423) Modified: cfe/trunk/test/Driver/cl-options.c Modified: cfe/trunk/test/Driver/

[PATCH] D47480: clang-cl: Expose -no-canonical-prefixes

2018-06-01 Thread Nico Weber via Phabricator via cfe-commits
thakis marked 2 inline comments as done. thakis added inline comments. Comment at: test/Driver/cl-options.c:595 +// RUN: -no-canonical-prefixes \ +// RUN: -fno-coverage-mapping \ // RUN: --version \ rnk wrote: > takuto.ikuta wrote: > > Is this relate

[PATCH] D47630: [Sema] Allow creating types with multiple of the same addrspace.

2018-06-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: test/Sema/address_spaces.c:17 int *_AS1 _AS2 *Z; // expected-error {{multiple address spaces specified for type}} + int *_AS1 _AS1 *M; bader wrote: > I think it might be valuable to give a warning or remark to us

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2018-06-01 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Sorry for the limited activity. Unfortunately, I have very little time reviewing patches lately. I think we need to answer the following questions: - Does this change affect the analysis of the constructors of global objects? If so, how? - Do we want to import non-con

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-06-01 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:223-225 + ExplodedNode *Node = Context.generateNonFatalErrorNode(Context.getState()); + if (!Node) +return; Szelethus wrote: > NoQ wrote: > > Szelethus w

[PATCH] D47628: Detect an incompatible VLA pointer assignment

2018-06-01 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/AST/ASTContext.cpp:8588 + Expr *E = VAT->getSizeExpr(); + if (E && VAT->getSizeExpr()->isIntegerConstantExpr(TheInt, *this)) +return std::make_pair(true, TheInt); `E && E->isIntegerCons

[PATCH] D45202: [X86] Replacing X86-specific floor and ceil vector intrinsics with generic LLVM intrinsics

2018-06-01 Thread Mikhail Dvoretckii via Phabricator via cfe-commits
mike.dvoretsky updated this revision to Diff 149484. mike.dvoretsky added a comment. Changed the scalar intrinsic lowering to work via extract-insert. https://reviews.llvm.org/D45203 contains tests for folding the resulting IR patterns. https://reviews.llvm.org/D45202 Files: clang/lib/CodeG

[PATCH] D47643: Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream.

2018-06-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: malaperle, ilya-biryukov. Herald added subscribers: cfe-commits, jkorous, ioeric, klimek. The EINTR loop around getline was added to fix an issue with mac gdb, but seems to loop infinitely in rare cases on linux where the parent editor ex

[PATCH] D47643: Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream.

2018-06-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. @malaperle: would you mind patching this in and checking whether attaching a debugger still works on Mac (this was the reason for the EINTR loop, right?) I want to preserve this but now people other than me are complaining about old clangds hanging around and eating a

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-06-01 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 149500. juliehockett marked 8 inline comments as done. https://reviews.llvm.org/D43341 Files: clang-doc/BitcodeReader.cpp clang-doc/BitcodeReader.h clang-doc/BitcodeWriter.cpp clang-doc/BitcodeWriter.h clang-doc/CMakeLists.txt clang-doc/Repre

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. This looks OK, the asymmetry still seems a little odd to me and could be reduced a little. (Please also resolve Ilya's question about references with him, I don't have a strong opinion)

[PATCH] D47267: [UnrollAndJam] Add unroll_and_jam pragma handling

2018-06-01 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. The RFC: https://lists.llvm.org/pipermail/cfe-dev/2018-May/058141.html https://reviews.llvm.org/D47267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r333775 - [Coverage] Remove a test dependency on the itanium ABI

2018-06-01 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Jun 1 10:11:18 2018 New Revision: 333775 URL: http://llvm.org/viewvc/llvm-project?rev=333775&view=rev Log: [Coverage] Remove a test dependency on the itanium ABI This should address a bot failure: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/

[PATCH] D47578: Do not enforce absolute path argv0 in windows

2018-06-01 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. It seems like you are trying a bit too hard to keep the original code which is not always a good idea to keep the clarity of the code. So, IIUC, you this function: - returns a full filename of the current executable. That can be written using GetModuleFileName and GetLong

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-06-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. IIUIC, nv_weak is a synonym for weak (why, oh why did they need it?) You may need to hunt down and change few other places that deal with the weak attribute. E.g.: https://github.com/llvm-project/llvm-project-20170507/blob/master/clang/lib/AST/Decl.cpp#L4267 https://github.

[PATCH] D47070: [CUDA] Upgrade linked bitcode to enable inlining

2018-06-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. IMO overriding TargetTransformInfo::areInlineCompatible to always return true on NVPTX is what we want to do instead of upgrading everything else. AFAICT, on NVPTX there's no reason to prevent inlining due to those attributes -- we'll never generate code, nor will we ever ex

[PATCH] D47617: [Analyzer] Fix Z3ConstraintManager crash (PR37646)

2018-06-01 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. LGTM with a nit on a test name. Comment at: test/Analysis/pr37646.c:1 +// REQUIRES: z3 +// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin9

[PATCH] D47617: [Analyzer] Fix Z3ConstraintManager crash (PR37646)

2018-06-01 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. Thanks! Repository: rC Clang https://reviews.llvm.org/D47617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

2018-06-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D47201#1119249, @tra wrote: > IIUIC, nv_weak is a synonym for weak (why, oh why did they need > it?) > You may need to hunt down and change few other places that deal with the > weak attribute. > E.g.: > https://github.com/llvm-proje

[PATCH] D47617: [Analyzer] Fix Z3ConstraintManager crash (PR37646)

2018-06-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. We might as well make a directory for z3-specific tests. Eg., `z3/bool-bit-width.c`. Also does this test need to be z3-specific? We would also not like to crash here without z3. Repository: rC Clang https://reviews.llvm.org/D47617 ___

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-06-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D45015#1105388, @rsmith wrote: > In https://reviews.llvm.org/D45015#1105372, @vsapsai wrote: > > > What when compiler has `__builtin_operator_new`, > > `__builtin_operator_delete`? If I build libc++ tests with recent Clang > > which has thes

[PATCH] D47616: [CFG] [analyzer] Explain copy elision through construction contexts.

2018-06-01 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. There's quite a lot of code duplication here, I think we could do better with that. Great job modeling semantics though! Comment at: lib/Analys

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-06-01 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @mikhail.ramalho I assume you know it, but just in case, you can mark dependencies in phabricator by adding "parent" revisions. https://reviews.llvm.org/D45517 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D47445: [ASTImporter] Corrected diagnostic client handling in tests.

2018-06-01 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. We could leave `disableSourceFileDiagnostics` off until someone finds a use case for it. Repository: rC Clang https://reviews.llvm.org/D47445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[libcxx] r333776 - Mark __c11_atomic_load as const

2018-06-01 Thread JF Bastien via cfe-commits
Author: jfb Date: Fri Jun 1 11:02:53 2018 New Revision: 333776 URL: http://llvm.org/viewvc/llvm-project?rev=333776&view=rev Log: Mark __c11_atomic_load as const Summary: C++11 onwards specs the non-member functions atomic_load and atomic_load_explicit as taking the atomic by const (potentially

[PATCH] D47613: Mark __c11_atomic_load as const

2018-06-01 Thread JF Bastien via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333776: Mark __c11_atomic_load as const (authored by jfb, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47613 Files: libcxx/trunk/include/ato

r333778 - [X86] Rewrite avx512vbmi unmasked and maskz macro intrinsics to be wrappers around their __builtin function with appropriate arguments rather than just passing arguments to the masked intrin

2018-06-01 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri Jun 1 11:26:35 2018 New Revision: 333778 URL: http://llvm.org/viewvc/llvm-project?rev=333778&view=rev Log: [X86] Rewrite avx512vbmi unmasked and maskz macro intrinsics to be wrappers around their __builtin function with appropriate arguments rather than just passing ar

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 149526. ioeric added a comment. - Make canonical decls determinstic. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47623 Files: clangd/index/SymbolCollector.cpp clangd/index/SymbolCollector.h unittests/clangd/SymbolCollectorTests.cpp

[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

2018-06-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi all, I'll be attempting to commit this patch around 6pm PT today unless anyone has any more comments on this specific patch. Any other suggestions regarding potential design changes can be discussed in future patches since this is only the first of many. Reposi

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 149528. ioeric added a comment. - Remove debug message. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47623 Files: clangd/index/SymbolCollector.cpp clangd/index/SymbolCollector.h unittests/clangd/SymbolCollectorTests.cpp Index: unit

[PATCH] D45517: [analyzer] False positive refutation with Z3

2018-06-01 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho updated this revision to Diff 149524. mikhail.ramalho added a comment. - Simplified the API even further by constructing a Z3ConstraintManager object directly. - Update isModelFeasible to return a isModelFeasible - Update code with the fix for 1-bit long integer https://reviews.

[PATCH] D47623: [clangd] Avoid indexing decls associated with friend decls.

2018-06-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D47623#1118951, @ilya-biryukov wrote: > In https://reviews.llvm.org/D47623#1118810, @sammccall wrote: > > > - friend decls that are not definitions should be ignored for indexing > > purposes > > > This is not generally true IIUC. A friend decl

  1   2   >