[PATCH] D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO

2019-05-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Did this get reviewed? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60760/new/ https://reviews.llvm.org/D60760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

r359761 - Fix typo in test case.

2019-05-02 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu May 2 00:38:07 2019 New Revision: 359761 URL: http://llvm.org/viewvc/llvm-project?rev=359761&view=rev Log: Fix typo in test case. Modified: cfe/trunk/test/CodeGenObjC/protocols.m Modified: cfe/trunk/test/CodeGenObjC/protocols.m URL: http://llvm.org/viewvc/llvm-pr

[PATCH] D61316: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-05-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/include-mapping/gen_std.py:90 +# Decl may not be for the symbol name we're looking for. +if not re.search("\\b%s\\b" % symbol_name, text): + continue does this also work with functions? F

[clang-tools-extra] r359763 - [clangd] Restore conventional names for lit configs, and .in/.py split. Fix build_mode indirection.

2019-05-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu May 2 01:00:39 2019 New Revision: 359763 URL: http://llvm.org/viewvc/llvm-project?rev=359763&view=rev Log: [clangd] Restore conventional names for lit configs, and .in/.py split. Fix build_mode indirection. Added: clang-tools-extra/trunk/clangd/test/lit.cfg.py

[PATCH] D61316: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-05-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/include-mapping/gen_std.py:60 + +def ParseSymbolPage(symbol_page_html, symbol_name): """Parse symbol page and retrieve the include header defined in this page. I think this requires some corresponding changes

[PATCH] D61316: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-05-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/include-mapping/gen_std.py:95 +if was_decl: + current_headers = [] +was_decl = False kadircet wrote: > why not perform clean-up unconditionally? ok I see the reason for that one, https:/

[PATCH] D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO

2019-05-02 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. In D60760#1487342 , @lebedev.ri wrote: > Did this get reviewed? I didn't get any responses at all, so decided to push it anyway. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60760/new/ https://rev

[PATCH] D61276: [clang-format] Fix bug in block comment reflow that joins * and /

2019-05-02 Thread Owen Pan via Phabricator via cfe-commits
owenpan planned changes to this revision. owenpan added a comment. There are some corner cases this patch doesn't cover. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61276/new/ https://reviews.llvm.org/D61276 ___ cf

[PATCH] D61422: [clang-tidy] Extend bugprone-sizeof-expression check to detect sizeof misuse in pointer arithmetic

2019-05-02 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: alexfh, aaron.ballman, lebedev.ri. baloghadamsoftware added a project: clang-tools-extra. Herald added subscribers: gamesh411, Szelethus, rnkovacs. Herald added a project: clang. Some programmers tend to forget that subt

[PATCH] D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO

2019-05-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D60760#1487387 , @sberg wrote: > In D60760#1487342 , @lebedev.ri > wrote: > > > Did this get reviewed? > > > I didn't get any responses at all, so decided to push it anyway. That is

[PATCH] D61239: [libclang] Allow field offset lookups in types with incomplete arrays.

2019-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D61239#1486692 , @JornVernee wrote: > In D61239#1486634 , @aaron.ballman > wrote: > > > LGTM, thank you! That's strange that clang-format would remove the newline > > from the end

[PATCH] D61316: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 197717. sammccall added a comment. rebase Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61316/new/ https://reviews.llvm.org/D61316 Files: clangd/StdSymbolMap.inc clangd/include-mapping/gen_std.py clangd

[PATCH] D61316: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/include-mapping/gen_std.py:90 +# Decl may not be for the symbol name we're looking for. +if not re.search("\\b%s\\b" % symbol_name, text): + continue kadircet wrote: > does this also wor

[PATCH] D61316: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 197716. sammccall added a comment. Add explanatory comment about headers reset. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61316/new/ https://reviews.llvm.org/D61316 Files: clangd/CodeComplete.cpp clan

[PATCH] D61316: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 197715. sammccall marked 2 inline comments as done. sammccall added a comment. Herald added a subscriber: mgorny. Update tests. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61316/new/ https://reviews.llvm.org

[PATCH] D61269: [CommandLine] Change help output to prefix long options with `--` instead of `-`. NFC . Part 3 of 5

2019-05-02 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre accepted this revision. thopre added a comment. This revision is now accepted and ready to land. That's much better thank you. I like the stream shift operator overload, nice touch. LGTM but give it a day for other to give feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D61349: [clangd] Standard library mapping: prefer "primary" versions of functions over variants.

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 197719. sammccall added a comment. Add note about skipping variants, and mention the weird begin/end case. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61349/new/ https://reviews.llvm.org/D61349 Files: cla

[PATCH] D60937: [clangd] Fix code completion of macros defined in the preamble region of the main file.

2019-05-02 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. I suggest considering a more direct way to solve the same problem: we could collect symbols for the main-file macros when building the preamble and store them in `Preamble

[PATCH] D61276: [clang-format] Fix bug in block comment reflow that joins * and /

2019-05-02 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 197720. owenpan added a comment. Updated the patch to cover all scenarios in which the bug might be triggered. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61276/new/ https://reviews.llvm.org/D61276 Files: clang/lib/Forma

[PATCH] D60934: [clang] adding explicit(bool) from c++2a

2019-05-02 Thread Tyker via Phabricator via cfe-commits
Tyker added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:9361 // Only consider converting constructors. -if (GD->isExplicit()) +if (!GD->isMaybeNotExplicit()) continue; rsmith wrote: > Tyker wrote: > > rsmith wrote:

[PATCH] D61316: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-05-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. Thanks! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61316/new/ https://reviews.llvm.org/D61316 _

[PATCH] D61349: [clangd] Standard library mapping: prefer "primary" versions of functions over variants.

2019-05-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LG Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61349/new/ https://reviews.llvm.org/D61349 __

[clang-tools-extra] r359770 - [clangd] Standard library mapping: prefer "primary" versions of functions over variants.

2019-05-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu May 2 02:31:24 2019 New Revision: 359770 URL: http://llvm.org/viewvc/llvm-project?rev=359770&view=rev Log: [clangd] Standard library mapping: prefer "primary" versions of functions over variants. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arph

[PATCH] D61349: [clangd] Standard library mapping: prefer "primary" versions of functions over variants.

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE359770: [clangd] Standard library mapping: prefer "primary" versions of functions over… (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D61349?vs=197719&id=1

[clang-tools-extra] r359771 - [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-05-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu May 2 02:34:30 2019 New Revision: 359771 URL: http://llvm.org/viewvc/llvm-project?rev=359771&view=rev Log: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages. Summary: Previously we were just jumping from the symbol index to th

[PATCH] D61316: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE359771: [clangd] Improvements to header mapping: more precise parsing of cppreference… (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D61316?vs=197717&id=197

[PATCH] D59692: [ASTImporter] Fix name conflict handling

2019-05-02 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59692/new/ https://reviews.llvm.org/D59692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D61126: [clangd] Also perform merging for symbol definitions

2019-05-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 197725. kadircet added a comment. - Update diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61126/new/ https://reviews.llvm.org/D61126 Files: clang-tools-extra/clangd/XRefs.cpp clang-tools-extra/clangd/

[PATCH] D59798: [analyzer] Add analyzer option to limit the number of imported TUs

2019-05-02 Thread Gabor Marton via Phabricator via cfe-commits
martong added a reviewer: xazax.hun. martong added a comment. @xazax.hun Could you please take a look? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59798/new/ https://reviews.llvm.org/D59798 ___ cfe-commits mailing

[PATCH] D61424: [ASTImporter] Fix inequivalence of unresolved exception spec

2019-05-02 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, shafik. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a project: clang. Structural equivalence of methods can falsely report false when the exception

[PATCH] D61239: [libclang] Allow field offset lookups in types with incomplete arrays.

2019-05-02 Thread Jorn Vernee via Phabricator via cfe-commits
JornVernee added a comment. In D61239#1487406 , @aaron.ballman wrote: > In D61239#1486692 , @JornVernee > wrote: > > > Also, I don't have committer access. Would you mind committing this? > > > Happy to do so -- I

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCLCXX/addrspace-of-this.cl:94 // Test the address space of 'this' when invoking a method that is declared in the file contex. -// COMMON: %call1 = call i32 @_ZNU3AS41C7outsideEv(%class.C addrspace(4)* addrspacecast (

[PATCH] D61140: Copy Argument Passing Restrictions setting when importing a CXXRecordDecl definition

2019-05-02 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor closed this revision. teemperor added a comment. This has been landed as rC359338 but somehow Phabricator didn't close this. Closing this manually. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61140/new/ https://reviews.llvm.org/D61140

[PATCH] D60937: [clangd] Fix code completion of macros defined in the preamble region of the main file.

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 197734. sammccall added a comment. Herald added a subscriber: mgrang. Record macro names while building preamble instead of lexing it later. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60937/new/ https://rev

[PATCH] D60937: [clangd] Fix code completion of macros defined in the preamble region of the main file.

2019-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. LGTM. Neat! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60937/new/ https://reviews.llvm.org/D60937 ___ cfe-commits mailing list cfe

[clang-tools-extra] r359778 - [clangd] Fix code completion of macros defined in the preamble region of the main file.

2019-05-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu May 2 04:06:44 2019 New Revision: 359778 URL: http://llvm.org/viewvc/llvm-project?rev=359778&view=rev Log: [clangd] Fix code completion of macros defined in the preamble region of the main file. Summary: This is a tricky case (we baked the assumption that symbols com

[PATCH] D60937: [clangd] Fix code completion of macros defined in the preamble region of the main file.

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE359778: [clangd] Fix code completion of macros defined in the preamble region of the… (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D60937?vs=197734&id=1977

[PATCH] D59885: [Lex] Allow to consume tokens while preprocessing

2019-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. In D59885#1485159 , @rsmith wrote: > I'd like to understand more about the intended use cases of this > functionality. What information do clients want? We are aiming to coll

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. Most of these are pre-existing issues with the tests but I agree they're worth fixing. I'll update the tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319 __

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 Thread Kévin Petit via Phabricator via cfe-commits
kpet updated this revision to Diff 197749. kpet added a comment. Clean up the tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319 Files: clang/lib/Sema/SemaOverload.cpp clang/test/CodeGenOpenCLCXX/addrspace-of-this

[PATCH] D61386: [clang-tidy] Add support writing a check as a Transformer rewrite rule.

2019-05-02 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I like the new framework! Comment at: clang-tools-extra/clang-tidy/utils/TransformerTidy.cpp:43 + if (Rule.Explanation) { +if (Expected Explanation = Rule.Explanation(Result)) { + Message = *Explanation; these if-else are si

[PATCH] D61438: [ASTImporter] Use llvm::Expected and Error in the importer API

2019-05-02 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: shafik, teemperor, aprantl, a_sidorin, balazske. Herald added subscribers: lldb-commits, cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added projects: clang, LLDB. This is the final phase of

[PATCH] D61274: [Sema][AST] Explicit visibility for OpenCL/CUDA kernels/variables

2019-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/Decl.cpp:738 + (isa(D) && D->hasAttr()) || + (isa(D) && D->hasAttr())) { +Visibility Vis = LV.getVisibility(); yaxunl wrote: > we also need this for `__constant__` variables. And what about `__glo

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2019-05-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I actually managed to reproduce the crash. extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:200: clang::DiagnosticBuilder clang::tidy::ClangTidyContext::diag(llvm::StringRef, clang::SourceLocation, llvm::StringRef, DiagnosticIDs::Level): Assertion `Loc.isValid()' f

[PATCH] D61422: [clang-tidy] Extend bugprone-sizeof-expression check to detect sizeof misuse in pointer arithmetic

2019-05-02 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 197768. baloghadamsoftware added a comment. Type `int` in tests replaced by `struct S` because it has more "sugar". Check also fixed to handle this case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61422/new/ https://reviews.llvm.org/D

[PATCH] D61318: [Sema] Prevent binding references with mismatching address spaces to temporaries

2019-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 197769. Anastasia added a comment. Added extra overload for `isAddressSpaceSupersetOf`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61318/new/ https://reviews.llvm.org/D61318 Files: include/clang/AST/Type.h include/clang/Basic/DiagnosticIDs

[PATCH] D59885: [Lex] Allow to consume tokens while preprocessing

2019-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added inline comments. Comment at: clang/lib/Lex/Preprocessor.cpp:956-957 --LexLevel; + if (OnToken) +OnToken(Result, Source); } rsmith wrote: > This seems like it's going to be extremely hard

RE: [PATCH] D42642: [CUDA] Detect installation in PATH

2019-05-02 Thread Alexandre Ganea via cfe-commits
Thanks Michael, it makes sense. I'm still with the old SVN setup on Windows. WSL uses the NTFS partition through drvfs (your case 2.) I'll switch to the git monorepo, it looks like the latest git supports [1] symlinks on Windows (with the restrictions you've mentioned) and they should be mapped

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-02 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. @rsmith do you have the chance to review this simple fix? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 ___ cfe-commits mailing list cf

r359789 - [OpenCL] Deduce static data members to __global addr space.

2019-05-02 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Thu May 2 07:40:40 2019 New Revision: 359789 URL: http://llvm.org/viewvc/llvm-project?rev=359789&view=rev Log: [OpenCL] Deduce static data members to __global addr space. Similarly to static variables in OpenCL, static class data members should be deduced to __global addr s

[PATCH] D59885: [Lex] Allow to consume tokens while preprocessing

2019-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 197778. ilya-biryukov added a comment. - Simplify the interface, get only the expanded token stream - An attempt to not report tokens from delayed parsing twice, almost works Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D61442: [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, mgrang, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Both of these attempt to check whether a header guard exists while parsing the file. However the file is

[PATCH] D61304: [OpenCL][PR41609] Deduce static data members to __global addr space

2019-05-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL359789: [OpenCL] Deduce static data members to __global addr space. (authored by stulova, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D60454: [OpenCL] Prevent mangling kernel functions

2019-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 197791. Anastasia added a comment. Extended `FunctionDecl` exten C logic to take kernel function into account. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60454/new/ https://reviews.llvm.org/D60454 Files: include/clang/Basic/DiagnosticSemaKin

[PATCH] D59885: [Lex] Allow to consume tokens while preprocessing

2019-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as not done. ilya-biryukov added inline comments. Comment at: clang/lib/Lex/Preprocessor.cpp:956-957 --LexLevel; + if (OnToken) +OnToken(Result, Source); } ilya-biryukov wrote: > rsmith wrote: > > This seems like it

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61319/new/ https://reviews.llvm.org/D61319 ___

[PATCH] D61444: Do not warn on switches over enums that do not use [[maybe_unused]] enumerators

2019-05-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie created this revision. dblaikie added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. PR36231, [dcl.attr.unused]p3 Repository: rC Clang https://reviews.llvm.org/D61444 Files: lib/Sema/SemaStmt.cpp test/CXX/dcl.dcl/dcl.attr/dcl.at

Re: [PATCH] D42642: [CUDA] Detect installation in PATH

2019-05-02 Thread Michael Kruse via cfe-commits
An update: I just re-tried creating a symbolic link from inside wsl on drvfs (case 2). It now created a symlink just as "mklink" does. What might have changed is that I updated to a newer insider preview or that I enabled developer mode when I tried the first time. [1] seems to apply for case 1.

[clang-tools-extra] r359796 - Revert rL359778 : [clangd] Fix code completion of macros defined in the preamble region of the main file.

2019-05-02 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Thu May 2 08:47:33 2019 New Revision: 359796 URL: http://llvm.org/viewvc/llvm-project?rev=359796&view=rev Log: Revert rL359778 : [clangd] Fix code completion of macros defined in the preamble region of the main file. Summary: This is a tricky case (we baked the assumption

[PATCH] D61408: Use primary template parameter names for variable template debug info

2019-05-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D61408#1487030 , @dblaikie wrote: > Seems totally reasonable to me & it's what we do for other templates > (function and class), it seems. > > Might want to check alias templates too? Ah, nevermind - alias templates can't be

[PATCH] D60937: [clangd] Fix code completion of macros defined in the preamble region of the main file.

2019-05-02 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. @sammccall I'm sorry but I had to revert this to fix the buildbots: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/47684/ Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60937/new/ https:/

[PATCH] D60937: [clangd] Fix code completion of macros defined in the preamble region of the main file.

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D60937#1487976 , @RKSimon wrote: > @sammccall I'm sorry but I had to revert this to fix the buildbots: > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/47684/ No worries, thanks for reve

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-02 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 197798. gtbercea added a comment. - Clean-up. Add header. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61399/new/ https://reviews.llvm.org/D61399 Files: lib/Driver/ToolChains/Clang.cpp lib/Headers/CMakeLists.txt lib/

r359798 - [OpenCL] Fix initialisation of this via pointer.

2019-05-02 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Thu May 2 09:10:50 2019 New Revision: 359798 URL: http://llvm.org/viewvc/llvm-project?rev=359798&view=rev Log: [OpenCL] Fix initialisation of this via pointer. When the expression used to initialise 'this' has a pointer type, check the address space of the pointee type inst

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-05-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC359798: [OpenCL] Fix initialisation of this via pointer. (authored by stulova, committed by ). Changed prior to commit: https://reviews.llvm.org/D61319?vs=197749&id=197800#toc Repository: rC Clang C

[clang-tools-extra] r359799 - Reapply r359778: [clangd] Fix code completion of macros defined in the preamble region of the main file.

2019-05-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu May 2 09:12:36 2019 New Revision: 359799 URL: http://llvm.org/viewvc/llvm-project?rev=359799&view=rev Log: Reapply r359778: [clangd] Fix code completion of macros defined in the preamble region of the main file. The bad assert has been removed, and updateOutOfDateIde

[PATCH] D61281: [clang-format] Fixed self assignment

2019-05-02 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a reviewer: RKSimon. RKSimon added a comment. In D61281#1485833 , @MyDeveloperDay wrote: > Did this cause some issue? Does this fix something if so can we add a test, > because maybe the line isn't needed > > I would think we'd want to keep

[PATCH] D60605: [clangd] Revamp textDocument/onTypeFormatting.

2019-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D60605#1485375 , @sammccall wrote: > I'm not able to reproduce this, can you give a complete example? After adding a newline here: int test(bool x) { if (x) return 10; // All spelled tokens are accounted for

[PATCH] D61126: [clangd] Also perform merging for symbol definitions

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/XRefs.cpp:350 if (R.Definition) { // from AST +// In case of generated files we prefer to omit the definition in

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 197803. ilya-biryukov added a comment. - Get only expanded stream from the preprocessor, recompute mappings and spelled stream separately Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59887/new/ https://

[PATCH] D61444: Do not warn on switches over enums that do not use [[maybe_unused]] enumerators

2019-05-02 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61444/new/ https://reviews.llvm.org/D61444 ___

r359800 - Do not warn on switches over enums that do not use [[maybe_unused]] enumerators

2019-05-02 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Thu May 2 09:30:49 2019 New Revision: 359800 URL: http://llvm.org/viewvc/llvm-project?rev=359800&view=rev Log: Do not warn on switches over enums that do not use [[maybe_unused]] enumerators PR36231, [dcl.attr.unused]p3 Reviewers: aaron.ballman Differential Revision: htt

[PATCH] D61444: Do not warn on switches over enums that do not use [[maybe_unused]] enumerators

2019-05-02 Thread David Blaikie via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC359800: Do not warn on switches over enums that do not use [[maybe_unused]] enumerators (authored by dblaikie, committed by ). Changed prior to commit: https://reviews.llvm.org/D61444?vs=197794&id=19780

[PATCH] D61422: [clang-tidy] Extend bugprone-sizeof-expression check to detect sizeof misuse in pointer arithmetic

2019-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Out of curiosity, have you run this over any large code bases to see what the false positive and true positive rate is? Comment at: clang-tidy/bugprone/SizeofExpressionCheck.cpp:217 + // Detect sizeof in pointer aritmetic like: N * sizeof(S) ==

[clang-tools-extra] r359801 - Fixed: Duck-typing in readability-redundant-smartptr-get didn't catch MSVC STL smart pointers.

2019-05-02 Thread Florian Gross via cfe-commits
Author: fgross Date: Thu May 2 09:41:28 2019 New Revision: 359801 URL: http://llvm.org/viewvc/llvm-project?rev=359801&view=rev Log: Fixed: Duck-typing in readability-redundant-smartptr-get didn't catch MSVC STL smart pointers. Differential Revision: https://reviews.llvm.org/D61209 Added:

[PATCH] D61209: [clang-tidy] Fix readability-redundant-smartptr-get for MSVC STL

2019-05-02 Thread Florian Gross via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE359801: Fixed: Duck-typing in readability-redundant-smartptr-get didn't catch MSVC STL… (authored by fgross, committed by ). Changed prior to commit: https://reviews.llvm.org/D61209?vs=196960&id=1978

[PATCH] D59885: [Lex] Allow to consume tokens while preprocessing

2019-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as not done. ilya-biryukov added inline comments. Comment at: clang/lib/Lex/Preprocessor.cpp:956-957 --LexLevel; + if (OnToken) +OnToken(Result, Source); } ilya-biryukov wrote: > ilya-biryukov wrote: > > rsmith wrot

[PATCH] D61452: [WebAssembly] Always include /lib in library path

2019-05-02 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: cfe-commits, sunfish, aheejin, jgravelle-google, dschuff. Herald added a project: clang. Even though the toolchain supports multiarch, we still want to be able to support single-arch sysroots. This also helps for the case where libraries do

[PATCH] D60974: Clang IFSO driver action.

2019-05-02 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked an inline comment as done. plotfi added a comment. In D60974#1486631 , @jakehehrlich wrote: > In D60974#1486384 , @compnerd wrote: > > > @jakehehrlich - unfortunately, removing the attributes on the s

[libunwind] r359804 - [gn] Support for building libunwind

2019-05-02 Thread Petr Hosek via cfe-commits
Author: phosek Date: Thu May 2 10:29:37 2019 New Revision: 359804 URL: http://llvm.org/viewvc/llvm-project?rev=359804&view=rev Log: [gn] Support for building libunwind This change introduces support for building libuwind. The library build should be complete, but not all CMake options have been

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-02 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel accepted this revision. hfinkel added inline comments. This revision is now accepted and ready to land. Comment at: lib/Driver/ToolChains/Clang.cpp:1163 + llvm::sys::path::append(P, "openmp_wrappers"); + CmdArgs.push_back("-internal-isystem"); + CmdArgs.pus

[PATCH] D51329: [Attribute/Diagnostics] Print macro if definition is an attribute declaration

2019-05-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51329/new/ https://reviews.llvm.org/D51329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D61408: Use primary template parameter names for variable template debug info

2019-05-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D61408#1487978 , @dblaikie wrote: > Ah, nevermind - alias templates can't be partially specialized. No worries > then :) That, and I think alias templates can only be created for types? So I don't think we can get to this codepa

[PATCH] D61452: [WebAssembly] Always include /lib in library path

2019-05-02 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 197821. sbc100 added a comment. Herald added a subscriber: ormris. tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61452/new/ https://reviews.llvm.org/D61452 Files: clang/lib/Driver/ToolChains/WebAssembly

[PATCH] D61335: [LibTooling] Add support to Transformer for composing rules as an ordered choice.

2019-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. - Could you provide a few real-world motivating examples? Especially interested in cases that were complicated before and are easy to do now? - Do we expect most the rules to be written using the new API or is this something that's gonna be used in `5-10%` of the

[PATCH] D61452: [WebAssembly] Always include /lib in library path

2019-05-02 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 197823. sbc100 added a comment. - update comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61452/new/ https://reviews.llvm.org/D61452 Files: clang/lib/Driver/ToolChains/WebAssembly.cpp clang/test/Driver

r359809 - Use primary template parameter names for variable template debug info

2019-05-02 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu May 2 10:45:54 2019 New Revision: 359809 URL: http://llvm.org/viewvc/llvm-project?rev=359809&view=rev Log: Use primary template parameter names for variable template debug info Summary: Fixes PR41677 Consider: template constexpr bool is_same_v = false; template const

[PATCH] D61408: Use primary template parameter names for variable template debug info

2019-05-02 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL359809: Use primary template parameter names for variable template debug info (authored by rnk, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to comm

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. I don't like this implementation. Seems to me, it breaks one of the OpenMP standard requirements: the program can be compiled without openmp support. I assume, that with this includes the program won't be able to be compiled without OpenMP support anymore because it may

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Moreover, I think this will cause troubles even in simple cases. Assume we have `target if(cond)` construct. In this case we will need to compile the target region for both, the device and the host. If the target region uses some device-specific math functions, it will

[PATCH] D61455: Change the metadata for heapallocsite calls when the type is cast.

2019-05-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. akhuang abandoned this revision. akhuang added a comment. accidentally created a new revision Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D61455 Files: clang/lib/CodeGen/C

[PATCH] D61438: [ASTImporter] Use llvm::Expected and Error in the importer API

2019-05-02 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. I think the best way to handle these errors in LLDB is to just log and then return some default value. That should make the current command print an error, which is better than terminating LLDB. Otherwise the LLDB part of this patch LGTM. Repository: rG LLVM Githu

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, vsk. ahatanak added a project: clang. Herald added subscribers: dexonsmith, jkorous. This change is a continuation of https://reviews.llvm.org/D59234 and makes the symbols within __DATA visible. rdar://problem/48887111 Reposit

[PATCH] D61455: Change the metadata for heapallocsite calls when the type is cast.

2019-05-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang abandoned this revision. akhuang added a comment. accidentally created a new revision Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61455/new/ https://reviews.llvm.org/D61455 ___ cfe-commits ma

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-02 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In D61399#1488262 , @ABataev wrote: > I don't like this implementation. Seems to me, it breaks one of the OpenMP > standard requirements: the program can be compiled without openmp support. I > assume, that with this includes the

[PATCH] D61407: [MS] Change the metadata for heapallocsite calls when the function return type is cast.

2019-05-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 197830. akhuang marked an inline comment as done. akhuang added a comment. - Add test case for multiple casts - Remove unrelated changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61407/new/ https://reviews.

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-05-02 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 197831. mgrang edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/C

[PATCH] D61407: [MS] Change the metadata for heapallocsite calls when the function return type is cast.

2019-05-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked 2 inline comments as done. akhuang added a comment. Reverted `getCompleteTypeIndex` change, to be fixed elsewhere Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61407/new/ https://reviews.llvm.org/D61407 ___

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61399#1488299 , @hfinkel wrote: > In D61399#1488262 , @ABataev wrote: > > > I don't like this implementation. Seems to me, it breaks one of the OpenMP > > standard requirements: the pro

[PATCH] D61407: [MS] Change the metadata for heapallocsite calls when the function return type is cast.

2019-05-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm, with a minor tweak Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2068 +if (llvm::CallInst *CI = dyn_cast(Src)) + if (CI->getMetadata("heapallocsite") && dyn_cast(CE

  1   2   >