[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 === ---

[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

[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/

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=rev Log: Implementation Feature Test Macros for P0722R3 Summary: P1353R0, adopted in San Diego, specified an implementation feature test macro for destroying delete

[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:

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=rev Log: Silence -Wsign-compare in unittests Modified: cfe/trunk/unittests/Lex/PPCallbacksTest.cpp Modified: cfe/trunk/unittests/Lex/PPCallbacksTest.cpp URL:

[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

[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) { +

[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] 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] 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

[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/

[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:

[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] 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] 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

[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.

[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] 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

[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

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

[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

[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

[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

[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:

[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] 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);

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

[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

[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] 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

[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

[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:

[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

[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] 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:

[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

[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:

[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] 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:

[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=rev Log: [clang-tidy] new check 'readability-redundant-preprocessor' Finds potentially redundant preprocessor directives. Reviewed By: aaron.ballman Differential Revision:

[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

<    1   2