[PATCH] D60995: [clangd] Make sure include path does not contain any backslashes on Windows

2019-04-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. kadircet added a child revision: D60873: [clang][HeaderSuggestion] Handle the case of dotdot with an absolute path

[PATCH] D60873: [clang][HeaderSuggestion] Handle the case of dotdot with an absolute path

2019-04-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Sent out D60995 , hopefully it should fix the issue. Will wait until that lands. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60873/new/ https://reviews.llvm.org/D60873 ___

[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.

2019-04-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.cpp:12 +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include + This looks wrong Comment at: clang-tools-extra/clang-tidy/linuxkernel/M

r358951 - [Analyzer] Instead of recording comparisons in interator checkers do an eager state split

2019-04-23 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Tue Apr 23 00:15:55 2019 New Revision: 358951 URL: http://llvm.org/viewvc/llvm-project?rev=358951&view=rev Log: [Analyzer] Instead of recording comparisons in interator checkers do an eager state split Currently iterator checkers record comparison of iterator pos

[PATCH] D60995: [clangd] Make sure include path does not contain any backslashes on Windows

2019-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This looks like a bug rather than a feature of HeaderSearch, shouldn't the slash conversion go there? (It seems unlikely that diagnostics should suggest one thing but we insert another) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D53701: [Analyzer] Instead of recording comparisons in interator checkers do an eager state split

2019-04-23 Thread Balogh, Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC358951: [Analyzer] Instead of recording comparisons in interator checkers do an eager… (authored by baloghadamsoftware, committed by ). Changed prior to commit: https://reviews.llvm.org/D53701?vs=192593

[PATCH] D60990: [Driver] Support priority for multilibs

2019-04-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Can this have test coverage? Comment at: clang/lib/Driver/Multilib.cpp:22 #include +#include #include Doesn't seem to be used? Comment at: clang/lib/Driver/Multilib.cpp:271 + // Sort multilibs by priority and

[PATCH] D60996: [clang-format] Fix bug in reflow of block comments containing CR/LF

2019-04-23 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: klimek, krasimir, sammccall, MyDeveloperDay, djasper. owenpan added a project: clang. Herald added a subscriber: cfe-commits. This patch fixes PR 36119 . Repository: rC Clang https://reviews.l

[PATCH] D60995: [clangd] Make sure include path does not contain any backslashes on Windows

2019-04-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. I had just looked at the method name and thought it was the right place( `suggestPathToFileForDiagnostics` since it says "path to file".) But looking at the comments, /// Suggest a path by which the specified file could be found, for /// use in diagnostics to sugge

r358953 - [PowerPC] Fix test with -fno-discard-value-names after rC358949

2019-04-23 Thread Fangrui Song via cfe-commits
Author: maskray Date: Tue Apr 23 00:39:23 2019 New Revision: 358953 URL: http://llvm.org/viewvc/llvm-project?rev=358953&view=rev Log: [PowerPC] Fix test with -fno-discard-value-names after rC358949 For the clang driver, -DLLVM_ENABLE_ASSERTIONS=off builds default to discard value names. Modifie

r358955 - [Analyzer] Fix for previous commit

2019-04-23 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Tue Apr 23 00:45:10 2019 New Revision: 358955 URL: http://llvm.org/viewvc/llvm-project?rev=358955&view=rev Log: [Analyzer] Fix for previous commit A compilation warning was in my previous commit which broke the buildbot because it is using `-Werror` for compilatio

[PATCH] D59924: [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power

2019-04-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. You use `%clang` (clang driver) because the test needs `-internal-isystem $resource_dir/include/ppc_wrappers`. A default release build of llvm sets `LLVM_ENABLE_ASSERTIONS` to off, the clang driver defaults to `-fdiscard-value-names`. This caused the test to break. I ha

[PATCH] D60997: Fix unquoted spaces in args in clang --verbose output

2019-04-23 Thread Brad Moody via Phabricator via cfe-commits
bmoody created this revision. bmoody added a reviewer: hans. Herald added a project: clang. Herald added a subscriber: cfe-commits. The behaviour of not quoting spaces appears to have been introduced by mistake in revision b212b34f19472469c1d20ada3161c3523268d5be

[PATCH] D60995: [clang][HeaderSearch] Make sure there are no backslashes in suggestedPath

2019-04-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 196192. kadircet added a comment. - Fix bug in HeaderSearch instead of clangd Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60995/new/ https://reviews.llvm.org/D60995 Files: clang/lib/Lex/HeaderSearch.cpp

[PATCH] D60996: [clang-format] Fix bug in reflow of block comments containing CR/LF

2019-04-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. This looks logical to me, seems to fit with what ``WhitespaceManager::appendNewlineText`` is doing LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D60552: [X86] Enable intrinsics of AVX512_BF16, which are supported for BFLOAT16 in Cooper Lake

2019-04-23 Thread Tianle Liu via Phabricator via cfe-commits
liutianle updated this revision to Diff 196195. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60552/new/ https://reviews.llvm.org/D60552 Files: docs/ClangCommandLineReference.rst include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/B

[PATCH] D60552: [X86] Enable intrinsics of AVX512_BF16, which are supported for BFLOAT16 in Cooper Lake

2019-04-23 Thread Tianle Liu via Phabricator via cfe-commits
liutianle added a comment. @RKSimon I add doxygen based descriptions in header files and return type check in test files. Please review again. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60552/new/ https://reviews.llvm.org/D60552 ___ cfe

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

2019-04-23 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. friendly ping Repository: rG LLVM Github Monorepo 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.

[PATCH] D60996: [clang-format] Fix bug in reflow of block comments containing CR/LF

2019-04-23 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 196197. owenpan added a comment. Removes a no longer needed hack that worked around this bug when computing `StartOfLine` in the `BreakableBlockComment::adjustWhitespace` function. Also updates the test case. Repository: rC Clang CHANGES SINCE LAST ACTI

[PATCH] D53701: [Analyzer] Instead of recording comparisons in interator checkers do an eager state split

2019-04-23 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:825 + // not then create a new symbol for the offset. + SymbolRef Sym; + if (!LPos || !RPos) { This is an uninitialized version of `Sym` that will be used on line 835 and

[PATCH] D60997: Fix unquoted spaces in args in clang --verbose output

2019-04-23 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. Thanks for fixing! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60997/new/ https://reviews.llvm.org/D60997 ___ cfe-

[PATCH] D59605: [clangd] Introduce background-indexer

2019-04-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Leaving a summary of the offline discussion here. @sammccall has pointed out maintaining and shipping more tools is work and we should probably avoid adding them upstream without careful design. We ended up deciding to **not** land this particular upstream just yet

[PATCH] D59977: [Lexer] Fix an off-by-one bug in Lexer::getAsCharRange() - NFC.

2019-04-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with a comment. Comment at: clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp:110-111 + Lexer::getSourceText(TextRange, Sources, getLangOpts()) +

r358968 - [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2019-04-23 Thread Rafael Stahl via cfe-commits
Author: r.stahl Date: Tue Apr 23 04:04:41 2019 New Revision: 358968 URL: http://llvm.org/viewvc/llvm-project?rev=358968&view=rev Log: [analyzer][CrossTU] Extend CTU to VarDecls with initializer Summary: The existing CTU mechanism imports `FunctionDecl`s where the definition is available in anoth

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

2019-04-23 Thread Rafael Stahl via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC358968: [analyzer][CrossTU] Extend CTU to VarDecls with initializer (authored by r.stahl, committed by ). Changed prior to commit: https://reviews.llvm.org/D46421?vs=196075&id=196207#toc Repository:

r358971 - [Analyzer] Second fix for last commit for IteratorChecker

2019-04-23 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Tue Apr 23 04:18:50 2019 New Revision: 358971 URL: http://llvm.org/viewvc/llvm-project?rev=358971&view=rev Log: [Analyzer] Second fix for last commit for IteratorChecker A variable was redeclared instead of assigned in an internal block, leaving the original unini

Re: r358665 - [clang][CIndex] Use llvm::set_thread_priority

2019-04-23 Thread Kadir Çetinkaya via cfe-commits
Thanks for the fix Nico! On Sun, Apr 21, 2019 at 9:17 PM Nico Weber wrote: > r358858 might help with this. > > On Sat, Apr 20, 2019 at 7:15 PM Nico Weber wrote: > >> This breaks building with LLVM_ENABLE_THREADS=OFF. The call probably >> needs to be behind a `#if LLVM_ENABLE_THREADS`. >> >> FAI

Re: [PATCH] D60990: [Driver] Support priority for multilibs

2019-04-23 Thread Jon Roelofs via cfe-commits
LGTM On Mon, Apr 22, 2019 at 8:34 PM Petr Hosek via Phabricator < revi...@reviews.llvm.org> wrote: > phosek created this revision. > phosek added reviewers: jroelofs, bkramer. > Herald added subscribers: cfe-commits, mgrang. > Herald added a project: clang. > > When more than one multilib flag ma

r358949 - [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power

2019-04-23 Thread Qiu Chaofan via cfe-commits
Author: chaofan Date: Mon Apr 22 22:50:24 2019 New Revision: 358949 URL: http://llvm.org/viewvc/llvm-project?rev=358949&view=rev Log: [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power Port mmintrin.h which include x86 MMX intrinsics implementation to PowerPC platform (using Alt

r358973 - Fix "-Wimplicit-fallthrough" warning. NFCI.

2019-04-23 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Tue Apr 23 04:45:28 2019 New Revision: 358973 URL: http://llvm.org/viewvc/llvm-project?rev=358973&view=rev Log: Fix "-Wimplicit-fallthrough" warning. NFCI. Modified: cfe/trunk/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp Modified: cfe/trunk/tools/clang-extdef-mappin

[PATCH] D58033: Add option for emitting dbg info for call site parameters

2019-04-23 Thread Djordje Todorovic via Phabricator via cfe-commits
djtodoro added a comment. > Is there some kind of testcase? @aprantl Usage of the option is tested within following patches from the stack. I am not sure if we need some additional test here? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58033/new/ https://reviews.llvm.org/D58033 _

[PATCH] D61001: [clang-format][tests] Explicitly specify style in some tests

2019-04-23 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl created this revision. r.stahl added reviewers: djasper, klimek. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixes broken tests when doing an out-of-source build that picks up a random .clang-format on the file system due to the default "file" style. Repo

[PATCH] D61002: <[analyzer][CrossTU][NFC] Fix sanitizer test failure

2019-04-23 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl created this revision. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware. Herald added a project: clang. Missing break/fallthrough Repository: rC Clang https://reviews.llvm.org/D61002 Files: tools

[PATCH] D61002: <[analyzer][CrossTU][NFC] Fix sanitizer test failure

2019-04-23 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl abandoned this revision. r.stahl added a comment. Was already done: https://github.com/llvm-mirror/clang/commit/bacdda22396c39181aa0e641182e01a0b3cf43ea Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61002/new/ https://reviews.llvm.org/D61002 _

[PATCH] D61002: <[analyzer][CrossTU][NFC] Fix sanitizer test failure

2019-04-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. Feel free to commit such trivial fixes without reviews. Alternatively, you could use LLVM_FALLTHROUGH, but I have no strong preference in this case.

[PATCH] D61002: <[analyzer][CrossTU][NFC] Fix sanitizer test failure

2019-04-23 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. @xazax.hun Yes, I planned to just commit. Set you as Subscriber not Reviewer in Arc. Was just a bit confused why it fails at first :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61002/new/ https://reviews.llvm.org/D61002 ___

[PATCH] D59924: [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power

2019-04-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. May I ask why the mmintrin.h emulation layer must be added to the clang resource directory? Why can't it be provided as a standalone library like https://github.com/intel/ARM_NEON_2_x86_SSE ? Will you add SSE/AVX/AVX512 emulation layer to the clang resource directory as

[PATCH] D61005: [LibTooling] Fix unneeded use of unique_ptr where shared_ptr is expected.

2019-04-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: sbenza. Herald added a project: clang. This fixes a few places in the Stencil implementation where a unique_ptr is created at a callsite that expects shared_ptr. Since the former implicitly converts to the latter, the code compiles and run

[PATCH] D59924: [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power

2019-04-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lib/Headers/ppc_wrappers/mmintrin.h:3 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal This is not Ap

[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.

2019-04-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.cpp:39 + if (MatchedCallExpr && + MatchedCallExpr->hasUnusedResultAttr(*Result.Context)) { +diag(MatchedCallExpr->getExprLoc(), "Unused result from error functio

[PATCH] D61015: [LibTooing] Change Transformer's TextGenerator to a partial function.

2019-04-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. Herald added a project: clang. Changes the signature of the std::function to return an Expected instead of std::string to allow for (non-fatal) failures. Previously, we expected that any failures would be expressed with asser

[PATCH] D56571: [RFC prototype] Implementation of asm-goto support in clang

2019-04-23 Thread Gabor Marton via Phabricator via cfe-commits
martong resigned from this revision. martong added a comment. The changes in `ASTImporter.cpp` looks good to me! And I have no competence about the rest of the change, thus I resign as a reviewer. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571

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

2019-04-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:3126 +auto Imp = +importSeq(FromConstructor->getExplicitSpecifier().getPointer()); +if (!Imp) Why is it needed to import the explicit specifier here again? You al

[PATCH] D43357: [Concepts] Function trailing requires clauses

2019-04-23 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. From the `ASTImporter` point of view it looks good, thanks for the changes! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43357/new/ https://reviews.llvm.org

[PATCH] D59924: [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power

2019-04-23 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. In D59924#1475363 , @MaskRay wrote: > May I ask why the mmintrin.h emulation layer must be added to the clang > resource directory? Why can't it be provided as a standalone library like > https://github.com/intel/ARM_NEON_2_x86_SSE

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp:34-36 + const auto HasNoSelfCheck = cxxMethodDecl(unless(hasDescendant( + binaryOperator(anyOf(hasOperato

[PATCH] D41910: [Concepts] Constrained partial specializations and function overloads.

2019-04-23 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. From the `ASTImporter` point of view it looks good to me, thanks for the changes! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D41910/new/ https://reviews.l

[PATCH] D59802: [clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals

2019-04-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D59802#1474300 , @hintonda wrote: > @aaron.ballman, I just ran it over llvm/lib, including all in-tree headers, > and it seems to work fine. However, it did miss this one: > > - if (V && isa(V) && (EntInst = cast(V)) &&

[PATCH] D59802: [clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals

2019-04-23 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D59802#1475596 , @aaron.ballman wrote: > In D59802#1474300 , @hintonda wrote: > > > @aaron.ballman, I just ran it over llvm/lib, including all in-tree headers, > > and it seems to work

[PATCH] D59924: [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power

2019-04-23 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. Thanks @MaskRay for help fixing and review! Comment at: lib/Headers/ppc_wrappers/mmintrin.h:3 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to

[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.

2019-04-23 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/linuxkernel-must-use-errs.rst:10 +functions are marked with ``__attribute__((warn_unused_result))``, but +the compiler warning for this attribute is not always enabled. + IIRC

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-23 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas marked 4 inline comments as done. ztamas added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp:34-36 + const auto HasNoSelfCheck = cxxMethodDecl(unless(hasDescendant( + binaryOperator(anyOf(hasOperatorName("=="), h

[PATCH] D61022: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM

2019-04-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added a reviewer: xur. Herald added subscribers: dexonsmith, steven_wu, hiraditya, eraman, inglorion, mehdi_amini. Herald added projects: clang, LLVM. The opt level was not being passed down to the ThinLTO backend when invoked via clang (for distributed

[PATCH] D61023: Fix crash on switch conditions of non-integer types in templates

2019-04-23 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews created this revision. eandrews added reviewers: rnk, erichkeane. Clang currently crashes for switch statements inside a template when the condition is non-integer and instantiation dependent. This is because contextual implicit conversion is skipped while acting on switch condition but

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

2019-04-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 196264. riccibruno added a comment. - Added a test (see `N_shadow)` for the behavior of `Wshadow`. This test showed that I forgot to change `CheckShadow(New, PrevDecl, R);` to `CheckShadow(New, PrevDecl->getUnderlyingDecl(), R);` to match change in the co

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

2019-04-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added inline comments. Comment at: lib/Sema/SemaDecl.cpp:16607 + // Check for other kinds of shadowing not already handled. + if (PrevDecl && isa(PrevDecl->getUnderlyingDecl()) && + !TheEnumDecl->isScoped()) -

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

2019-04-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. > Added a test which exposes a new problem that this patch incidentally solves > (see `N_conflicting_namespace_alias`). Because of the using directive `using > namespace M;`, the namespace alias `i` for the namespace `Q` is found in the > redeclaration lookup. Before

[PATCH] D61022: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM

2019-04-23 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: llvm/test/tools/gold/X86/opt-level.ll:53 + ; CHECK-O1-OLDPM: select + ; The new PM does not do as many optimizations at O1 + ; CHECK-O1-NEWPM: phi This is intended? I'm surprised the two PMs don't have the same li

[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.

2019-04-23 Thread Tom Roeder via Phabricator via cfe-commits
tmroeder marked 5 inline comments as done. tmroeder added a comment. Thanks to everyone for the comments. I've answered them as best I can, and I'm definitely open to changes or to scrapping this entirely. I should have prefixed this patch with a discussion on the main list, perhaps. My main us

[PATCH] D61022: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM

2019-04-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: llvm/test/tools/gold/X86/opt-level.ll:53 + ; CHECK-O1-OLDPM: select + ; The new PM does not do as many optimizations at O1 + ; CHECK-O1-NEWPM: phi mehdi_amini wrote: > Thi

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

2019-04-23 Thread Richard Townsend (Arm) via Phabricator via cfe-commits
richard.townsend.arm added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:5908 +// The checks below ensure that thare no user provided constructors. +// For AArch64, we use the C++14 definition of an aggregate, so we also +// check for: I think

[PATCH] D60778: Make precompiled headers reproducible by switching OpenCL extension to std::map

2019-04-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno commandeered this revision. riccibruno edited reviewers, added: Anastasia; removed: riccibruno. riccibruno added a comment. Closing this since the issue was fixed in r358674. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60778/new/ https://reviews.llvm.org/D60778 _

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-04-23 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews created this revision. eandrews added reviewers: rnk, riccibruno, erichkeane. Clang currently crashes for switch statements inside a template when the condition is non-integer and instantiation dependent. This is because contextual implicit conversion is skipped while acting on switch c

r359009 - MS ABI: Support mangling op<=> now that MSVC 2019 has a mangling

2019-04-23 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Apr 23 09:37:42 2019 New Revision: 359009 URL: http://llvm.org/viewvc/llvm-project?rev=359009&view=rev Log: MS ABI: Support mangling op<=> now that MSVC 2019 has a mangling Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp cfe/trunk/test/CodeGenCXX/cxx2a-three-way-com

[PATCH] D60996: [clang-format] Fix bug in reflow of block comments containing CR/LF

2019-04-23 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 196261. owenpan added a comment. Removes a redundant test case. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60996/new/ https://reviews.llvm.org/D60996 Files: clang/lib/Format/BreakableToken.cpp clang/lib/Format/Breakab

[PATCH] D61022: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM

2019-04-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: llvm/test/tools/gold/X86/opt-level.ll:53 + ; CHECK-O1-OLDPM: select + ; The new PM does not do as many optimizations at O1 + ; CHECK-O1-NEWPM: phi tejohnson wrote: > mehdi

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-04-23 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. I apologize for the confusion. I was working on an incorrect branch earlier, and so abandoned that patch and uploaded a new revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61027/new/ https://reviews.llvm.org/D61027 __

[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.

2019-04-23 Thread Tom Roeder via Phabricator via cfe-commits
tmroeder updated this revision to Diff 196273. tmroeder added a comment. Remove an unnecessary header and fix the error text. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59963/new/ https://reviews.llvm.org/D59963 Files: clang-tools-extra/clang

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-23 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas marked an inline comment as done. ztamas added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-unhandled-self-assignment.cpp:351 + int *p; +}; aaron.ballman wrote: > ztamas wrote: > > aaron.ballman wrote: > > > ztamas wrote: > > >

[PATCH] D59712: [APSInt][OpenMP] Fix isNegative, etc. for unsigned types

2019-04-23 Thread Joel E. Denny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC359012: [APSInt][OpenMP] Fix isNegative, etc. for unsigned types (authored by jdenny, committed by ). Changed prior to commit: https://reviews.llvm.org/D59712?vs=195626&id=196274#toc Repository: rC C

[PATCH] D61022: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM

2019-04-23 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: llvm/test/tools/gold/X86/opt-level.ll:53 + ; CHECK-O1-OLDPM: select + ; The new PM does not do as many optimizations at O1 + ; CHECK-O1-NEWPM: phi tejohnson wrote: > tejohnson wrote: > > mehdi_amini wrote: > > > Thi

[PATCH] D58537: lib/Header: Simplify CMakeLists.txt

2019-04-23 Thread Vyacheslav Zakharin via Phabricator via cfe-commits
vzakhari added inline comments. Comment at: cfe/trunk/lib/Headers/CMakeLists.txt:168 install( - FILES ${cuda_wrapper_files} - COMPONENT clang-headers - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ - DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/inc

[PATCH] D61029: clang-cl: List valid values for /std: in /? output

2019-04-23 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: hans. https://reviews.llvm.org/D61029 Files: clang/include/clang/Driver/CLCompatOptions.td Index: clang/include/clang/Driver/CLCompatOptions.td === --- clang/include/clang/Dr

[PATCH] D61022: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM

2019-04-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked an inline comment as done. tejohnson added inline comments. Comment at: llvm/test/tools/gold/X86/opt-level.ll:53 + ; CHECK-O1-OLDPM: select + ; The new PM does not do as many optimizations at O1 + ; CHECK-O1-NEWPM: phi chandlerc wrote: > tejoh

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-23 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas updated this revision to Diff 196279. ztamas added a comment. Added missing fullstop Added a new test cases making sure that HasNoSelfCheck works correctly Added template instantiation to tests Remove the alias from cert module and add the CERT link as a see also Repository: rG LLVM Git

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-23 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas marked 5 inline comments as done. ztamas added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp:34-36 + const auto HasNoSelfCheck = cxxMethodDecl(unless(hasDescendant( + binaryOperator(anyOf(hasOperatorName("=="), h

[PATCH] D61022: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM

2019-04-23 Thread Rong Xu via Phabricator via cfe-commits
xur accepted this revision. xur added a comment. This revision is now accepted and ready to land. LGTM. We need to Initialize the OptLevel no matter what. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61022/new/ https://reviews.llvm.org/D61022

[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

2019-04-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added inline comments. Comment at: test/CXX/dcl.dcl/dcl.enum/p11-enumerator_scope.cpp:107 enum { typedef_type };// expected-error {{redefinition of 'typedef_type'}} }; Note also that t

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-23 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas added a comment. Ok, so I removed the alias from cert module and added CERT rule link as a "see also". So I think we solved the problem that things do not conform with the CERT requirements and can focus on the actual problem. Summary, templates are still ignored. If there is any idea ho

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp:54 + recordType(hasDeclaration(classTemplateSpecializationDecl( + hasAnyName("std::shared_ptr", "std::unique_ptr", "std::weak_ptr", +

[PATCH] D61022: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM

2019-04-23 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: llvm/test/tools/gold/X86/opt-level.ll:53 + ; CHECK-O1-OLDPM: select + ; The new PM does not do as many optimizations at O1 + ; CHECK-O1-NEWPM: phi tejohnson wrote: > chandlerc wrote: > > tejohnson wrote: > > > tej

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-23 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas marked 3 inline comments as done. ztamas added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp:62-64 + const auto ThisHasSuspiciousField = cxxMethodDecl(ofClass(cxxRecordDecl( + has(fieldDecl(anyOf(hasType(pointerT

[PATCH] D60967: Move setTargetAttributes after setGVProperties in SetFunctionAttributes

2019-04-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. It seems reasonable to me for target hooks to run after global hooks, but can I ask why AMDGPU specifically relies on this? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60967/new/ https://reviews.llvm.org/D60967

[PATCH] D61032: [clang] Avoid defining duplicate header search paths for libc++ on Darwin

2019-04-23 Thread Louis Dionne via Phabricator via cfe-commits
ldionne created this revision. ldionne added a reviewer: jfb. Herald added a reviewer: EricWF. Herald added subscribers: cfe-commits, dexonsmith, jkorous. Herald added a project: clang. Before this patch, we would add both /usr/include/c++/v1 and /usr/include/c++/v1 to the header search paths for

[PATCH] D61032: [clang] Avoid defining duplicate header search paths for libc++ on Darwin

2019-04-23 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. I will build a significant codebase with the change and report on the results, since we lack good tests for the removal of `/usr/include/c++/v1`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61032/new/ https://reviews.llv

[PATCH] D60974: Clang IFSO driver action.

2019-04-23 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 196291. plotfi added a comment. Herald added a subscriber: mgrang. I've added an output format. The YAML coming out of -emit-ifso can now run through yaml2obj to produce a striped .o file. Those .o files can be handled by an existing linker. Repository: r

[PATCH] D60974: Clang IFSO driver action.

2019-04-23 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1474994 , @compnerd wrote: > Note that I am not advocating that this change go in as is - I think that > this is far from something which would be useful, and until it can produce > something meaningful, this shouldn't r

[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.

2019-04-23 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/linuxkernel-must-use-errs.rst:10 +functions are marked with ``__attribute__((warn_unused_result))``, but +the compiler warning for this attribute is not always enabled. + tmroe

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-23 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas updated this revision to Diff 196295. ztamas added a comment. Make the check to work with templates too Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60507/new/ https://reviews.llvm.org/D60507 Files: clang-tools-extra/clang-tidy/bugprone/

[PATCH] D60974: Clang IFSO driver action.

2019-04-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. BTW, to clarify how this is intended to be used: the collection of the public interfaces defines the *public* interfaces of the module. This information can be used to generate a **minimally** viable ELF module that the linker can use to link against - no `.text` segm

[PATCH] D60974: Clang IFSO driver action.

2019-04-23 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1474777 , @jakehehrlich wrote: > In D60974#1474751 , @plotfi wrote: > > > There are a few that I have in mind. > > > > 1. -emit-ifso could be added to a build to produce .so files

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-23 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas added a comment. I also reformatted the code with clang-format. So now the templates are handled, however, it's still not fit with the cert rule because we not catch all classes, but only those who have suspicious fields. I think this one can be added in a follow-up patch and then this c

[PATCH] D60974: Clang IFSO driver action.

2019-04-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/lib/Frontend/FrontendActions.cpp:326 +(*OS) << " - Name:.text\n"; +(*OS) << "Type:STT_SECTION\n"; +(*OS) << "Section: .text\n"; This is wrong, this marks the ty

[PATCH] D61022: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM

2019-04-23 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL359025: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM (authored by tejohnson, committed by ). Changed prior to commit: https://reviews.llvm.org/D61022?vs=196263&id=196296#toc

r359025 - [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM

2019-04-23 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Tue Apr 23 11:56:19 2019 New Revision: 359025 URL: http://llvm.org/viewvc/llvm-project?rev=359025&view=rev Log: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM Summary: The opt level was not being passed down to the ThinLTO backend when invoked vi

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-23 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas marked 8 inline comments as done. ztamas added a comment. Mark some comments Done, which were handled some way. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60507/new/ https://reviews.llvm.org/D60507 _

[PATCH] D60985: Fix compatability for cuda sm_75

2019-04-23 Thread Chuan Qiu via Phabricator via cfe-commits
eagleonhill added a comment. That's great! will it be cherry-picked for clang8.1 if there's one? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60985/new/ https://reviews.llvm.org/D60985 ___ cfe-commits mailing list c

[PATCH] D60967: Move setTargetAttributes after setGVProperties in SetFunctionAttributes

2019-04-23 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. In D60967#1475925 , @rjmccall wrote: > It seems reasonable to me for target hooks to run after global hooks, but can > I ask why AMDGPU specifically relies on this? We want to ensure certain symbols have a meaningful visibi

[PATCH] D60485: [AArch64] Add support for MTE intrinsics

2019-04-23 Thread Javed Absar via Phabricator via cfe-commits
javed.absar updated this revision to Diff 196297. javed.absar marked an inline comment as done. javed.absar added a comment. Hi Tim: Have made the changes as suggested. Please have a look. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60485/new/ https://reviews.llvm.org/D60485 Files:

[PATCH] D60967: Move setTargetAttributes after setGVProperties in SetFunctionAttributes

2019-04-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Shouldn't it be an error if the user tries to give it hidden visibility? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60967/new/ https://reviews.llvm.org/D60967 ___ cfe-commits mailing list

  1   2   >