[PATCH] D56581: [ASTImporter] Set the described template if not set

2019-01-11 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: shafik, a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. During the addition of an injected class type to a record it may happen that a CXXRecordDecl in the redecl c

[clang-tools-extra] r350922 - [clang-tidy] new check 'readability-redundant-preprocessor'

2019-01-11 Thread Miklos Vajna via cfe-commits
Author: vmiklos Date: Thu Jan 10 23:59:47 2019 New Revision: 350922 URL: http://llvm.org/viewvc/llvm-project?rev=350922&view=rev Log: [clang-tidy] new check 'readability-redundant-preprocessor' Finds potentially redundant preprocessor directives. Reviewed By: aaron.ballman Differential Revision

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-preprocessor'

2019-01-11 Thread Miklos Vajna via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350922: [clang-tidy] new check 'readability-redundant-preprocessor' (authored by vmiklos, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D543

[PATCH] D56554: [ELF] Add '-z nognustack' opt to suppress emitting PT_GNU_STACK

2019-01-11 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Actually, I've just researched a bit and default stack permissions depend on arch in glibc, so assuming it's RWX by default is wrong. Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56554/new/ https://reviews.llvm.org/D56554

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2019-01-11 Thread Marina Kalashina via Phabricator via cfe-commits
MarinaKalashina updated this revision to Diff 181216. MarinaKalashina added a comment. integrations.rst - end of file new line CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54945/new/ https://reviews.llvm.org/D54945 Files: docs/clang-tidy/integrations.rst Index: docs/clang-tidy/int

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2019-01-11 Thread Marina Kalashina via Phabricator via cfe-commits
MarinaKalashina updated this revision to Diff 181217. MarinaKalashina added a comment. restoring full content CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54945/new/ https://reviews.llvm.org/D54945 Files: docs/clang-tidy/contribution.rst docs/clang-tidy/index.rst docs/clang-tidy

[PATCH] D56563: [clang-tidy] add options documentation to readability-identifier-naming checker

2019-01-11 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 181224. MyDeveloperDay added a comment. Address review comments - clang-format the code examples - replace "ensure" with "check" CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56563/new/ https://reviews.llvm.org/D56563 Files: docs/clang-ti

[PATCH] D56563: [clang-tidy] add options documentation to readability-identifier-naming checker

2019-01-11 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 5 inline comments as done. MyDeveloperDay added a comment. > I think will be good idea to create generic Case/Prefix/Suffix description to > reduce size of documentation. I'm generating this documentation via a script, using the following template, (which is why its quite

[PATCH] D56585: [clang-tidy] Treat references to smart pointers correctly in use-after-move.

2019-01-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: cfe-commits, xazax.hun. Previously, we weren't recognizing these as smart pointers and thus weren't allowing non-dereference accesses as we should -- see new test cases which fail without the fix. Repository: rCTE Clang Tools Extra http

[PATCH] D56585: [clang-tidy] Treat references to smart pointers correctly in use-after-move.

2019-01-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 181228. mboehme added a comment. Removing experimental code that shouldn't have been added. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56585/new/ https://reviews.llvm.org/D56585 Files: clang-tidy/bugprone/

[PATCH] D55256: [clangd] Support clang-tidy configuration in clangd.

2019-01-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 181232. hokein added a comment. Rebase Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55256/new/ https://reviews.llvm.org/D55256 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServe

[PATCH] D55256: [clangd] Support clang-tidy configuration in clangd.

2019-01-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I think this patch is ready for review now. ClangTidy configurations are complicated, and we aim to support only a small subset of them (most are about controlling which checks are going to run in clangd). I'd like to get some initial feedbacks before making further chan

[PATCH] D56592: [clangd] Do not override contents of the shards without modification

2019-01-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric. We were writing shards with empty symbol and ref slabs whenever there were no change in the file. Just skip the shards that has up-to-date content.

[PATCH] D54071: [Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.py

2019-01-11 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54071/new/ https://reviews.llvm.org/D54071 ___

Re: r350776 - [Sema] Mark target of __attribute__((alias("target"))) used for C

2019-01-11 Thread Joerg Sonnenberger via cfe-commits
On Thu, Jan 10, 2019 at 09:58:39AM -0800, Nick Desaulniers via cfe-commits wrote: > On Thu, Jan 10, 2019 at 7:26 AM Nico Weber wrote: > > > > Aren't C names sometimes slightly mangled too? For example, on macOS > > they're prefixed by a _, doesn't that have to be undone there? > > Sure, but sho

[PATCH] D55492: Implement Attr dumping in terms of visitors

2019-01-11 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! Comment at: lib/AST/ASTDumper.cpp:89 // Utilities -void dumpType(QualType T) { NodeDumper.dumpType(T); } void dumpTypeAsChild(QualType T); -

[PATCH] D54071: [Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.py

2019-01-11 Thread Romain Geissler via Phabricator via cfe-commits
Romain-Geissler-1A added a comment. Thank you ! Since I have no write access to the repository, can anyone of you commit this patch ? Cheers, Romain Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54071/new/ https://reviews.llvm.org/D54071 ___

[PATCH] D56555: Add Attribute to define nonlazy objc classes

2019-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. The patch is missing SemaObjC tests that ensure the attribute only appertains to the expected subjects, accepts no args, etc. Comment at: clang/inclu

[PATCH] D56066: [OpenCL] Address space for default class members

2019-01-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 181256. Anastasia added a comment. - Set correctly value kind of address space conversion after materializing the temporary - Removed changes in various places including CodeGen for address space conversion that became unnecessary after the AST is generate

[PATCH] D56066: [OpenCL] Address space for default class members

2019-01-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 6 inline comments as done. Anastasia added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:813 + case CK_AddressSpaceConversion: { +Visit(E->getSubExpr()); +break; rjmccall wrote: > If there's a `Dest`, you might need to reverse-c

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-11 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added inline comments. Comment at: ELF/Driver.cpp:779 +// TODO: verify the triple somehow? +Config->TargetTriple = llvm::Triple(Prefix); + } mgorny wrote: > joerg wrote: > > See ToolChain::getTargetAndModeFromProgramName in clang. > Yes, I've based

Re: r350768 - [ObjC] Allow the use of implemented unavailable methods from within

2019-01-11 Thread Nico Weber via cfe-commits
Here's some user feedback on this new feature. It looks like the warning is only suppressed if `init` has a definition in the @interface block. In the 4 cases where we saw this warning fire after r349841, it still fires after this change because in all 4 cases a class marked init as unavailable in

[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2019-01-11 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. In D49466#1353437 , @alxu wrote: > FYI, according to my comment on D49652 , > assuming I checked it correctly, gcc applies the maps in reverse order of > command line specification, not sorted order

[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2019-01-11 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. That's the other reason why I find the GCC specification as string prefix confusing. I still say we should just go with mapping of path names and then the order question mostly goes away. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466

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

2019-01-11 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added inline comments. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:120 +} +template static bool hasDefinition(const T *D) { + const T *Unused; martong wrote: > `hasDefinitionOrInit` ? I simply made it `hasBodyOrInit` now to be as clear as possible

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

2019-01-11 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl updated this revision to Diff 181263. r.stahl marked 12 inline comments as done. r.stahl added a comment. Strip name changes (see D56441 ); addressed review comments In my old version I seemed to get away with the tests, but they failed after rebasing. I

[PATCH] D56597: [clangd] Add Limit parameter for xref.

2019-01-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D56597 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/Cl

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2019-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1204 + VariadicUnsignedArgument<"PayloadIndices">]; + let Subjects = SubjectList<[Function]>; + let Documentation = [Undocumented]; jdoerfert wrote: > jdoerfert wrote: > >

[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2019-01-11 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn added a comment. It would be nice to have this for Clang 8.0, the branch date is within 5 days :) Comment at: lib/Driver/ToolChains/Clang.cpp:617 if (Map.find('=') == StringRef::npos) - D.Diag(diag::err_drv_invalid_argument_to_fdebug_prefix_map) << Map; +

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-11 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 181268. mgorny added a comment. Implemented checking the triple against target registry. Also made `--version` output the detected target. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56215/new/ https://reviews.llvm.org/D56215 Files: ELF/Config.

[PATCH] D53072: [clang-format] Introduce the flag which allows not to shrink lines

2019-01-11 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 181274. yvvan added a comment. The tests are improved - now they actually act differently with and without the introduced flag. Also few more cases are covered (see the second added test). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53072/new/ http

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return check

2019-01-11 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber updated this revision to Diff 181276. bernhardmgruber added a comment. Skipping the check for functions which do not have a valid location. This occurred when I run the check on the LLVM code base. It looked like the matcher matched something like a built in operator. CHANGES S

[PATCH] D53072: [clang-format] Introduce the flag which allows not to shrink lines

2019-01-11 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Ok, but this behavior is still intended. You are setting clang-format to a format where it is breaking after binary operators and then added a break before a binary operator. clang-format assumes that this is not intended and that you will want this cleaned up. E.g.:

[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2019-01-11 Thread Dan McGregor via Phabricator via cfe-commits
dankm marked 2 inline comments as done. dankm added a comment. In D49466#1354238 , @Lekensteyn wrote: > It would be nice to have this for Clang 8.0, the branch date is within 5 days > :) Yup, that's why I'm ignoring a new baby for this :) ===

[PATCH] D56326: [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive

2019-01-11 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 11 inline comments as done. lildmh added a comment. Hi Alexey, Thanks a lot for the review! For 3 places I have doubt. Please see the comments inline. I tried to fix the rest of your comments. Comment at: lib/AST/DeclOpenMP.cpp:164 + if (NumClauses) { +Clau

[PATCH] D56326: [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive

2019-01-11 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 181289. lildmh marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56326/new/ https://reviews.llvm.org/D56326 Files: include/clang/AST/DeclBase.h include/clang/AST/DeclCXX.h include/clang/AST/DeclOpenMP.h include/cl

r350933 - Silence -Wsign-compare in unittests

2019-01-11 Thread Bjorn Pettersson via cfe-commits
Author: bjope Date: Fri Jan 11 08:53:45 2019 New Revision: 350933 URL: http://llvm.org/viewvc/llvm-project?rev=350933&view=rev Log: Silence -Wsign-compare in unittests Modified: cfe/trunk/unittests/Lex/PPCallbacksTest.cpp Modified: cfe/trunk/unittests/Lex/PPCallbacksTest.cpp URL: http://llv

[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2019-01-11 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 181293. dankm added a comment. Made diagnostics for file-prefix-map display the actual option name. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://reviews.llvm.org/D49466 Files: include/clang/Basic/Diagnost

r350934 - Implementation Feature Test Macros for P0722R3

2019-01-11 Thread Chris Kennelly via cfe-commits
Author: ckennelly Date: Fri Jan 11 09:09:22 2019 New Revision: 350934 URL: http://llvm.org/viewvc/llvm-project?rev=350934&view=rev Log: Implementation Feature Test Macros for P0722R3 Summary: P1353R0, adopted in San Diego, specified an implementation feature test macro for destroying delete (P07

[PATCH] D55741: Implementation Feature Test Macros for P0722R3

2019-01-11 Thread Chris Kennelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350934: Implementation Feature Test Macros for P0722R3 (authored by ckennelly, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55741/new/ https://reviews.llv

[PATCH] D56326: [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive

2019-01-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/DeclOpenMP.cpp:164 + if (NumClauses) { +Clauses = (OMPClause **)C.Allocate(sizeof(OMPClause *) * NumClauses); +setClauses(CL); lildmh wrote: > ABataev wrote: > > No, bad idea. Use tail allocation for the

[PATCH] D56607: [clang] [NetBSD] Enable additional sanitizer types

2019-01-11 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added a reviewer: krytarowski. Repository: rC Clang https://reviews.llvm.org/D56607 Files: lib/Driver/ToolChains/NetBSD.cpp Index: lib/Driver/ToolChains/NetBSD.cpp === --- lib/Driver/ToolCh

[PATCH] D56608: [Darwin][Driver] Don't pass a file as object_path_lto during ThinLTO

2019-01-11 Thread Steven Wu via Phabricator via cfe-commits
steven_wu created this revision. steven_wu added reviewers: arphaman, dexonsmith. Herald added subscribers: jkorous, inglorion, mehdi_amini. After r327851, Driver::GetTemporaryPath will create the file rather than just create a potientially unqine filename. If clang driver pass the file as paramet

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-11 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson requested changes to this revision. arichardson added inline comments. This revision now requires changes to proceed. Comment at: ELF/Driver.cpp:770 + // Start with a default initial triple + Config->TargetTriple = llvm::Triple(getDefaultTargetTriple()); + -

[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2019-01-11 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn added a comment. Could you add more tests to check the error message for bad options (missing `=`): -fdebug-prefix-map=bad -fmacro-prefix-map=bad -ffile-prefix-map=bad FWIW, GCC emits two errors for `-ffile-prefix-map=bad`. Another edge case is `-ffile-prefix-map==foo/`, GCC c

[PATCH] D53699: [ASTImporter] Fix inequality of functions with different attributes

2019-01-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. This revision is now accepted and ready to land. LGTM Thank you for adding the additional test. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53699/new/ https://reviews.llvm.org/D53699 ___

r350941 - Fix a pair of Wfallthrough warnings in ScanfFormatString.

2019-01-11 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri Jan 11 10:01:40 2019 New Revision: 350941 URL: http://llvm.org/viewvc/llvm-project?rev=350941&view=rev Log: Fix a pair of Wfallthrough warnings in ScanfFormatString. Change-Id: Ia73a34fdd93fc974224583505f9e6432493cb0da Modified: cfe/trunk/lib/AST/ScanfFormatStrin

r350942 - [attributes] Extend os_returns_(not_?)_retained attributes to parameters

2019-01-11 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Jan 11 10:02:08 2019 New Revision: 350942 URL: http://llvm.org/viewvc/llvm-project?rev=350942&view=rev Log: [attributes] Extend os_returns_(not_?)_retained attributes to parameters When applied to out-parameters, the attributes specify the expected lifetime of

[PATCH] D56581: [ASTImporter] Set the described template if not set

2019-01-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Can you add a test? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56581/new/ https://reviews.llvm.org/D56581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D56326: [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive

2019-01-11 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/AST/DeclOpenMP.cpp:164 + if (NumClauses) { +Clauses = (OMPClause **)C.Allocate(sizeof(OMPClause *) * NumClauses); +setClauses(CL); ABataev wrote: > lildmh wrote: > > A

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-11 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added inline comments. Comment at: ELF/Driver.cpp:770 + // Start with a default initial triple + Config->TargetTriple = llvm::Triple(getDefaultTargetTriple()); + arichardson wrote: > arichardson wrote: > > If I invoke an unprefixed ld.lld on NetBSD

[PATCH] D56608: [Darwin][Driver] Don't pass a file as object_path_lto during ThinLTO

2019-01-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. The code looks good. Can you add a test too? Might need to require “shell”. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56608/new/ https://reviews.llvm.org/D56608 ___ cfe-commits maili

[PATCH] D56267: [clangd] Interfaces for writing code actions

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 181309. ilya-biryukov added a comment. - Put more AST-centric information into ActionInputs - Restructure and refactor the code Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56267/new/ https://reviews.llvm

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, mgorny. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D56610 Files: clangd/CMakeLists.txt clangd/refactor/actions/QualifyNam

[PATCH] D56607: [clang] [NetBSD] Enable additional sanitizer types

2019-01-11 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. Please check these options in regression test-suite. There are also some missing entries and please add them too. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56607/new/ https://reviews.llvm.org/D56607 ___

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 181311. ilya-biryukov added a comment. - Add the code to actually instantiate a code action Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 Files: clangd/CMakeLi

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 181312. ilya-biryukov added a comment. - Add some forgotten helpers Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 Files: clangd/CMakeLists.txt clangd/CodeAct

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This is a somewhat simple action to illustrate the use of code action APIs. Still missing tests and trying to figure out what information we want to expose in order to avoid walking over ASTs in each of the actions, so this is not final. Should be a good reference

[PATCH] D56611: [clangd] A code action to swap branches of an if statement

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, mgorny. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D56611 Files: clangd/CMakeLists.txt clangd/CodeActions.cpp clangd/re

Re: r350768 - [ObjC] Allow the use of implemented unavailable methods from within

2019-01-11 Thread Alex L via cfe-commits
Thanks, we might have similar cases in our code base as well. We'll see if we can fix that too. On Fri, 11 Jan 2019 at 06:13, Nico Weber wrote: > Here's some user feedback on this new feature. > > It looks like the warning is only suppressed if `init` has a definition in > the @interface block.

[PATCH] D56563: [clang-tidy] add options documentation to readability-identifier-naming checker

2019-01-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/readability-identifier-naming.rst:34 + +When defined, the checker will ensure abstract class names conform to the +selected casing. MyDeveloperDay wrote: > Eugene.Zelenko wrote: > >

[PATCH] D56611: [clangd] A code action to swap branches of an if statement

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. A deliberately simple syntactic transformation. Missing tests, but should work very reliably. To serve as an reference point for writing similar actions. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56611/new/ https:

[PATCH] D56463: [SEH] Pass the frame pointer from SEH finally to finally functions

2019-01-11 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: lib/CodeGen/CGException.cpp:1635 +else { + llvm::Value *LocalAddrFn = CGM.getIntrinsic(llvm::Intrinsic::localaddress); + FP = CGF.Builder.CreateCall(LocalAddrFn); 80 char limit. Repository: rC Clang CH

[PATCH] D56612: [clangd] A code action to remove 'using namespace'

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: kadircet, jfb, arphaman, mgrang, jkorous, MaskRay, ioeric, mgorny. Only available in the source files to fit into the model of single-file actions. Doing the same in headers would require mor

[PATCH] D53891: [LTO] Add option to enable LTOUnit splitting, and disable unless needed

2019-01-11 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 181317. tejohnson marked 4 inline comments as done. tejohnson added a comment. Address comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53891/new/ https://reviews.llvm.org/D53891 Files: include/clang/Basic/CodeGen

[PATCH] D56612: [clangd] A code action to remove 'using namespace'

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov planned changes to this revision. ilya-biryukov added a comment. The most complicated of the sample actions, requires considerable work and thorough testing before it can be landed. Serves the purpose of illustrating how to write the two-stage actions. Repository: rCTE Clang Too

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

2019-01-11 Thread Nick Desaulniers via cfe-commits
On Thu, Jan 10, 2019 at 6:11 PM Yu, Jennifer wrote: > > Syntax for asm goto: > Syntax: > asm [volatile] goto ( AssemblerTemplate > : > : InputOperands > : Clobbers > : GotoLabels) > > Only input is allowed.

r350949 - [LTO] Add option to enable LTOUnit splitting, and disable unless needed

2019-01-11 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Fri Jan 11 10:32:07 2019 New Revision: 350949 URL: http://llvm.org/viewvc/llvm-project?rev=350949&view=rev Log: [LTO] Add option to enable LTOUnit splitting, and disable unless needed Summary: Adds a new -f[no]split-lto-unit flag that is disabled by default to control modu

[PATCH] D53891: [LTO] Add option to enable LTOUnit splitting, and disable unless needed

2019-01-11 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350949: [LTO] Add option to enable LTOUnit splitting, and disable unless needed (authored by tejohnson, committed by ). Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53891/n

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-11 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added inline comments. Comment at: ELF/Driver.cpp:770 + // Start with a default initial triple + Config->TargetTriple = llvm::Triple(getDefaultTargetTriple()); + krytarowski wrote: > arichardson wrote: > > arichardson wrote: > > > If I invoke an unp

[PATCH] D56267: [clangd] Interfaces for writing code actions

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 181321. ilya-biryukov added a comment. - Remove 'using namespace llvm' Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56267/new/ https://reviews.llvm.org/D56267 Files: clangd/CMakeLists.txt clangd/Clan

[PATCH] D56267: [clangd] Interfaces for writing code actions

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I've added a few sample actions, please take a look. The major thing that's missing from the design is how we can define an interface for actions to get the nodes they interested in from the AST without doing an AST traversal in each of the actions separately. I h

[PATCH] D56554: [ELF] Add '-z nognustack' opt to suppress emitting PT_GNU_STACK

2019-01-11 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. @ruiu actually if we can get D56215 merged we will be able to tune it specifically for NetBSD (with `if (Config->TargetTriple.isOSNetBSD()) {`) and retain intact the current Linux-biased logic for everybody who deserves to use it.

r350952 - [MergeFunc] Update clang test for r350939

2019-01-11 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Jan 11 10:51:02 2019 New Revision: 350952 URL: http://llvm.org/viewvc/llvm-project?rev=350952&view=rev Log: [MergeFunc] Update clang test for r350939 In r350939, the MergeFunc pass learned to erase duplicate functions which are discardable if unused. Modified: cfe/t

[PATCH] D56608: [Darwin][Driver] Don't pass a file as object_path_lto during ThinLTO

2019-01-11 Thread Steven Wu via Phabricator via cfe-commits
steven_wu updated this revision to Diff 181324. steven_wu added a comment. I was planning to add a test but I am not sure how to check the file type of temporary files. I add a test to check for temp file names because I do create file and directory with different prefix. Repository: rC Cla

[PATCH] D56608: [Darwin][Driver] Don't pass a file as object_path_lto during ThinLTO

2019-01-11 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Driver/Driver.h:508 + /// GetTemporaryPath - Return the pathname of a temporary directory to use + /// as part of compilation; the directory will have the given prefix. Old function name in the comment

r350954 - [test] Update support for Exynos M4 (NFC)

2019-01-11 Thread Evandro Menezes via cfe-commits
Author: evandro Date: Fri Jan 11 10:54:41 2019 New Revision: 350954 URL: http://llvm.org/viewvc/llvm-project?rev=350954&view=rev Log: [test] Update support for Exynos M4 (NFC) Update test cases for Exynos M4. Modified: cfe/trunk/test/CodeGen/arm-target-features.c cfe/trunk/test/Driver/aa

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-11 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. @mgorny could you check if we can get crossbuilding functional for: - to !NetBSD from NetBSD - from !NetBSD to NetBSD. - from NetBSD/amd64 to NetBSD/aarch64 I wonder whether it can work if we will keep using 'ld' file name for a linker. Comment at

r350955 - [Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.py

2019-01-11 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Fri Jan 11 11:04:48 2019 New Revision: 350955 URL: http://llvm.org/viewvc/llvm-project?rev=350955&view=rev Log: [Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.py Current clang fail to bootstrap in PGO mode when only python3 is available,

[PATCH] D56608: [Darwin][Driver] Don't pass a file as object_path_lto during ThinLTO

2019-01-11 Thread Steven Wu via Phabricator via cfe-commits
steven_wu updated this revision to Diff 181325. steven_wu added a comment. Fix the comment Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56608/new/ https://reviews.llvm.org/D56608 Files: include/clang/Driver/Driver.h lib/Driver/Driver.cpp lib/Driver/ToolCh

[PATCH] D56318: [HIP] Fix size_t for MSVC environment

2019-01-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 181326. yaxunl added a comment. Herald added a subscriber: jfb. Copy type information from AuxTarget. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56318/new/ https://reviews.llvm.org/D56318 Files: include/clang/Basic/TargetInfo.h lib/Basic/Targ

[PATCH] D54071: [Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.py

2019-01-11 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350955: [Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.py (authored by serge_sans_paille, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: ht

r350957 - [ASTDump] Add utility for dumping a label with child nodes

2019-01-11 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Fri Jan 11 11:11:17 2019 New Revision: 350957 URL: http://llvm.org/viewvc/llvm-project?rev=350957&view=rev Log: [ASTDump] Add utility for dumping a label with child nodes Summary: Use it to add optional label nodes to Stmt dumps. This preserves behavior of InitExprList dum

[PATCH] D55488: Add utility for dumping a label with child nodes

2019-01-11 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350957: [ASTDump] Add utility for dumping a label with child nodes (authored by steveire, committed by ). Changed prior to commit: https://reviews.llvm.org/D55488?vs=180935&id=181331#toc Repository:

[PATCH] D56326: [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive

2019-01-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/DeclOpenMP.cpp:164 + if (NumClauses) { +Clauses = (OMPClause **)C.Allocate(sizeof(OMPClause *) * NumClauses); +setClauses(CL); lildmh wrote: > ABataev wrote: > > lildmh wrote: > > > ABataev wrote: > > >

r350958 - Implement Attr dumping in terms of visitors

2019-01-11 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Fri Jan 11 11:16:01 2019 New Revision: 350958 URL: http://llvm.org/viewvc/llvm-project?rev=350958&view=rev Log: Implement Attr dumping in terms of visitors Remove now-vestigial dumpType and dumpBareDeclRef methods. The old tablegen generated code used to expect them to be p

[PATCH] D55492: Implement Attr dumping in terms of visitors

2019-01-11 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350958: Implement Attr dumping in terms of visitors (authored by steveire, committed by ). Changed prior to commit: https://reviews.llvm.org/D55492?vs=181182&id=181334#toc Repository: rC Clang CHANG

[PATCH] D53541: [COFF, ARM64] Do not emit x86_seh_recoverfp intrinsic

2019-01-11 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 181333. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53541/new/ https://reviews.llvm.org/D53541 Files: lib/CodeGen/CGException.cpp test/CodeGen/exceptions-seh.c Index: test/CodeGen/exceptions-seh.c ==

[PATCH] D56608: [Darwin][Driver] Don't pass a file as object_path_lto during ThinLTO

2019-01-11 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56608/new/ https://reviews.llvm.org/D56608 ___ cfe-commit

[PATCH] D56463: [SEH] Pass the frame pointer from SEH finally to finally functions

2019-01-11 Thread Sanjin Sijaric via Phabricator via cfe-commits
ssijaric updated this revision to Diff 181337. ssijaric added a comment. Address formatting comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56463/new/ https://reviews.llvm.org/D56463 Files: lib/CodeGen/CGException.cpp test/CodeGen/exceptions-seh-nest

[PATCH] D56326: [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive

2019-01-11 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/AST/DeclOpenMP.cpp:164 + if (NumClauses) { +Clauses = (OMPClause **)C.Allocate(sizeof(OMPClause *) * NumClauses); +setClauses(CL); ABataev wrote: > lildmh wrote: > > A

[PATCH] D56326: [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive

2019-01-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/DeclOpenMP.cpp:164 + if (NumClauses) { +Clauses = (OMPClause **)C.Allocate(sizeof(OMPClause *) * NumClauses); +setClauses(CL); lildmh wrote: > ABataev wrote: > > lildmh wrote: > > > ABataev wrote: > > >

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

2019-01-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 181342. jyu2 added a comment. 1> I add code for CFG.cpp and a test for that, as efriedman request. 2> changes are respond the comments I received CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 Files:

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

2019-01-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 7 inline comments as done. jyu2 added inline comments. Comment at: lib/CodeGen/CGStmt.cpp:2182 +} + } + nickdesaulniers wrote: > If this new block was moved closer to the new one on L2227, I assume they > could be combined and possibly `IsGCCAsm

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

2019-01-11 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/Sema/SemaStmtAsm.cpp:470 +if (NS->isGCCAsmGoto() && +Exprs[ConstraintIdx]->getStmtClass() == Stmt::AddrLabelExprClass) + break; jyu2 wrote: > efriedma wrote: > > This looks suspicious; an AddrLabelE

[PATCH] D56607: [clang] [NetBSD] Enable additional sanitizer types

2019-01-11 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 181356. mgorny added a comment. Herald added a subscriber: cryptoad. Updated the tests to account for most of the known sanitizer types. Notes/TODO: 1. I wasn't able to get a sane match for `-fsanitize=undefined`, so I just check if it enables anything. 2. `

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

2019-01-11 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Parse/ParseStmtAsm.cpp:830-858 + if (AteExtraColon || Tok.is(tok::colon)) { +if (AteExtraColon) + AteExtraColon = false; +else + ConsumeToken(); + +if (!AteExtraColon && Tok.isNot(tok::identifier)) { --

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-11 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In D56215#1354603 , @krytarowski wrote: > @mgorny could you check if we can get crossbuilding functional for: > > - to !NetBSD from NetBSD > - from !NetBSD to NetBSD. > - from NetBSD/amd64 to NetBSD/aarch64 > > I wonder wheth

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-11 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added inline comments. Comment at: ELF/Driver.cpp:375 +switch (Config->EMachine) { + case EM_386: +Config->SearchPaths.push_back("=/usr/lib/i386"); As we have TargetTriple now, I would use it here instead of `Config->EMachine`, it wi

r350970 - [Darwin][Driver] Don't pass a file as object_path_lto during ThinLTO

2019-01-11 Thread Steven Wu via cfe-commits
Author: steven_wu Date: Fri Jan 11 13:16:04 2019 New Revision: 350970 URL: http://llvm.org/viewvc/llvm-project?rev=350970&view=rev Log: [Darwin][Driver] Don't pass a file as object_path_lto during ThinLTO Summary: After r327851, Driver::GetTemporaryPath will create the file rather than just creat

  1   2   >