[PATCH] D55131: [CTU] Add more lit tests and better error handling

2018-12-07 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348605: [CTU] Add more lit tests and better error handling (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55131?vs=1771

r348609 - [CTU] test/Analysis/ctu-main.cpp Attempt to fix failing windows bot

2018-12-07 Thread Gabor Marton via cfe-commits
Author: martong Date: Fri Dec 7 08:27:31 2018 New Revision: 348609 URL: http://llvm.org/viewvc/llvm-project?rev=348609&view=rev Log: [CTU] test/Analysis/ctu-main.cpp Attempt to fix failing windows bot Modified: cfe/trunk/test/Analysis/ctu-main.cpp Modified: cfe/trunk/test/Analysis/ctu-main.

r348610 - [CTU] Add triple/lang mismatch handling

2018-12-07 Thread Gabor Marton via cfe-commits
Author: martong Date: Fri Dec 7 08:32:43 2018 New Revision: 348610 URL: http://llvm.org/viewvc/llvm-project?rev=348610&view=rev Log: [CTU] Add triple/lang mismatch handling Summary: We introduce a strict policy for C++ CTU. It can work across TUs only if the C++ dialects are the same. We neither

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-12-07 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348610: [CTU] Add triple/lang mismatch handling (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55134?vs=176687&id=17722

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-12-07 Thread Louis Dionne via Phabricator via cfe-commits
ldionne requested changes to this revision. ldionne added a comment. This revision now requires changes to proceed. Herald added a subscriber: jkorous. I believe this patch fixes an important QOI bug: see http://llvm.org/PR37574. I wholeheartedly agree with Eric that allocators-over-const are an

r348612 - Make testcase more robust for completely-out-of-tree builds.

2018-12-07 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Fri Dec 7 09:04:26 2018 New Revision: 348612 URL: http://llvm.org/viewvc/llvm-project?rev=348612&view=rev Log: Make testcase more robust for completely-out-of-tree builds. Thats to Dave Zarzycki for reprorting this! Modified: cfe/trunk/test/CodeGen/debug-info-abspath.c

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-12-07 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. Thanks, should be fixed in r348610! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55085/new/ https://reviews.llvm.org/D55085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

r348613 - Adding an AST dump test for statement expressions; NFC.

2018-12-07 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Dec 7 09:06:40 2018 New Revision: 348613 URL: http://llvm.org/viewvc/llvm-project?rev=348613&view=rev Log: Adding an AST dump test for statement expressions; NFC. Modified: cfe/trunk/test/AST/ast-dump-stmt.c Modified: cfe/trunk/test/AST/ast-dump-stmt.c URL: h

[PATCH] D55441: [lld] [test] Fix reproduce-blackslash.s test with NetBSD tar

2018-12-07 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: krytarowski, bkramer, ruiu, davide. mgorny added a project: lld. Herald added subscribers: llvm-commits, MaskRay, arichardson, emaste. Herald added a reviewer: espindola. Unlike GNU tar and libarchive bsdtar, NetBSD 'tar -t' output does not use

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-07 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: krytarowski, ikudrin, pcc, zturner. mgorny added a project: lld. Herald added subscribers: llvm-commits, MaskRay. Capture the stderr from 'tar --version' call as otherwise error messages spill onto user's terminal unnecessarily (e.g. on NetBSD

[PATCH] D55428: [Docs] Expand -fstack-protector and -fstack-protector-all info

2018-12-07 Thread Carey Williams via Phabricator via cfe-commits
carwil updated this revision to Diff 177239. carwil added a comment. Edited Options.td directly, rather than the generated docs file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55428/new/ https://reviews.llvm.org/D55428 Files: include/clang/Driver/Options.td Index: include/clang

r348614 - [CTU] test/Analysis/ctu-main.cpp Attempt to fix failing windows bot

2018-12-07 Thread Gabor Marton via cfe-commits
Author: martong Date: Fri Dec 7 09:36:44 2018 New Revision: 348614 URL: http://llvm.org/viewvc/llvm-project?rev=348614&view=rev Log: [CTU] test/Analysis/ctu-main.cpp Attempt to fix failing windows bot Modified: cfe/trunk/test/Analysis/ctu-main.cpp Modified: cfe/trunk/test/Analysis/ctu-main.

[PATCH] D55387: [analyzer] MoveChecker Pt.7: NFC: Misc refactoring.

2018-12-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Woohoo! Thanks! Comment at: lib/StaticAnalyzer/Checkers/MoveChecker.cpp:515-516 // class in which the encountered method defined. while (const auto *BR = dyn_cast

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: test/lit.cfg.py:99 +stdout=subprocess.PIPE, +stderr=subprocess.PIPE, +env={'LANG': 'C'}) If you don't need stderr, remove `stderr=subprocess.PIPE,` `subprocess.Popen followed by communicate()` ca

r348618 - Make testcase more robust for bots actually building in /var

2018-12-07 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Fri Dec 7 09:57:44 2018 New Revision: 348618 URL: http://llvm.org/viewvc/llvm-project?rev=348618&view=rev Log: Make testcase more robust for bots actually building in /var Modified: cfe/trunk/test/CodeGen/debug-prefix-map.c Modified: cfe/trunk/test/CodeGen/debug-prefix-

[PATCH] D55349: Convert some ObjC alloc msgSends to runtime calls

2018-12-07 Thread Pete Cooper via Phabricator via cfe-commits
pete updated this revision to Diff 177246. pete added a comment. Thanks for the review. Have fixed the comments as suggested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55349/new/ https://reviews.llvm.org/D55349 Files: include/clang/Basic/ObjCRuntime.h include/clang/Driver/Opti

[PATCH] D55349: Convert some ObjC alloc msgSends to runtime calls

2018-12-07 Thread Pete Cooper via Phabricator via cfe-commits
pete marked 5 inline comments as done. pete added inline comments. Comment at: include/clang/Basic/ObjCRuntime.h:200 +case WatchOS: + return true; + rjmccall wrote: > Did we really add this so long ago? Wow. Yeah! I was thinking that too! CHANGES SIN

[PATCH] D55429: [analyzer] Add CheckerManager::getChecker, make sure that a registry function registers no more than 1 checker

2018-12-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 177245. Szelethus retitled this revision from "[analyzer] Add CheckerManager::getChecker that asserts on non-registered checkers, assert on registering already registered checkers" to "[analyzer] Add CheckerManager::getChecker, make sure that a registry fu

[PATCH] D34796: upporting -f(no)-reorder-functions flag, clang side change

2018-12-07 Thread Stephen Hines via Phabricator via cfe-commits
srhines added inline comments. Comment at: test/Driver/function-sections.c:77 // RUN: | FileCheck --check-prefix=CHECK-NOUS %s + +// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1\ There should ideally be a test for the default behavior

[PATCH] D55441: [lld] [test] Fix reproduce-blackslash.s test with NetBSD tar

2018-12-07 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In my opinion it's better to set UNSUPPORTED and align the NetBSD tar to GNU tar and libarchive. Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55441/new/ https://reviews.llvm.org/D55441

[PATCH] D55441: [lld] [test] Fix reproduce-blackslash.s test with NetBSD tar

2018-12-07 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. I thought NetBSD's tar is bsdtar because it's BSD... Anyways, I think I'm fine with this change, as the new test (which matches both `foo\\.o` and `foo\.o`) does not match a string that we don't want it to match. Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION

[PATCH] D54438: [analyzer] Reimplement dependencies between checkers

2018-12-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D54438#1315953 , @Szelethus wrote: > - ❌ Move `CheckerManager::registerChecker` out of the registry functions. > - ❌ Since `shouldRegister##CHECKERNAME` is a thing, we can move everything > to the checker's constructor, sup

[PATCH] D55441: [lld] [test] Fix reproduce-blackslash.s test with NetBSD tar

2018-12-07 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu accepted this revision. ruiu added a comment. This revision is now accepted and ready to land. LGTM We might be able to change NetBSD's tar but I guess that takes very long time. This test is not very important in the sense that this tests just test a corner case. So I think we should just

[PATCH] D34796: upporting -f(no)-reorder-functions flag, clang side change

2018-12-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: docs/ClangCommandLineReference.rst:1953 +.. option:: -freorder-functions, -fno-reorder-functions + Isn't this autogenerated from `include/clang/Driver/Options.td`? Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55441: [lld] [test] Fix reproduce-blackslash.s test with NetBSD tar

2018-12-07 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. bsdtar is libarchive (by BSD people too) We can align our native tar later and land this as is. Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55441/new/ https://reviews.llvm.org/D55441 _

[PATCH] D55410: [clang-tidy] check for flagging using declarations in headers

2018-12-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:73 + + Flags using declarations in header files, and suggests that + these aliases be removed Please highlight using with ``. Comment at: docs/clang-tidy/checks/abseil-al

[PATCH] D55410: [clang-tidy] check for flagging using declarations in headers

2018-12-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-alias-free-headers.rst:13 +The style guide http://google.github.io/styleguide/cppguide.html#Aliases discusses this +issue in more detail Missing link to guidelines, Repository:

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-07 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 177250. mgorny marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55443/new/ https://reviews.llvm.org/D55443 Files: test/lit.cfg.py Index: test/lit.cfg.py ===

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:21 +namespace modernize { +namespace { + Please use static instead anonymous namespace for functions. See LLVM code style guidelines. Comment at: clan

[PATCH] D55441: [lld] [test] Fix reproduce-blackslash.s test with NetBSD tar

2018-12-07 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348628: [test] Fix reproduce-blackslash.s test with NetBSD tar (authored by mgorny, committed by ). Changed prior to commit: https://reviews.llvm.org/D55441?vs=177232&id=177251#toc Repository: rL LLV

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D55433#1323145 , @MyDeveloperDay wrote: > In D55433#1323106 , @lebedev.ri > wrote: > > > Have you evaluated this on some major C++ projects yet? > > I suspect this may have pretty l

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-07 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added inline comments. Comment at: test/lit.cfg.py:99 +stdout=subprocess.PIPE, +stderr=subprocess.PIPE, +env={'LANG': 'C'}) MaskRay wrote: > If you don't need stderr, remove `stderr=subprocess.PIPE,` > > `subprocess.Popen followed by

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-07 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Sorry, it seems that my reply didn't go through. Comment at: test/lit.cfg.py:99 +stdout=subprocess.PIPE, +stderr=subprocess.PIPE, +env={'LANG': 'C'}) MaskRay wrote: > If you don't need stderr, remove `stderr=subpr

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-07 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added inline comments. Comment at: test/lit.cfg.py:99 +stdout=subprocess.PIPE, +stderr=subprocess.PIPE, +env={'LANG': 'C'}) ruiu wrote: > mgorny wrote: > > MaskRay wrote: > > > If you don't need stderr, remove `stderr=subprocess.PIPE,

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: test/lit.cfg.py:101 +env={'LANG': 'C'}) +sout, serr = tar_version.communicate() +if 'GNU tar' in sout.decode(): LG, but `serr` can be replaced by `_` if it is not used. CHANGES SINCE LAST ACTION https

[PATCH] D55447: [Sema] Fix Modified Type in address_space AttributedType

2018-12-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: rsmith, aaron.ballman. leonardchan added a project: clang. This is a fix for https://reviews.llvm.org/D51229 where we pass the address_space qualified type as the modified type of an AttributedType. This change now instead wraps the

[PATCH] D54604: Automatic variable initialization

2018-12-07 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 177262. jfb marked 10 inline comments as done. jfb added a comment. - Make sure uninit-variables.c doesn't break. - Address Peter's comments, improve tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54604/new/ https://reviews

[PATCH] D54604: Automatic variable initialization

2018-12-07 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I've addressed @pcc's comments. I'll now update the patch to mandate a `-Xclang` option for zero-init (otherwise it'll warn and pattern-init instead), and remove documentation for zero-init. I'm also thinking of changing float init to negative NaN with infinite scream paylo

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-12-07 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the feedback. Answered one simple question, the rest needs more time. Comment at: libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp:186 + std::vector v(array, array + 3); + assert(std::fabs(v[0] - 0.0f) <

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-07 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 177265. mgorny marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55443/new/ https://reviews.llvm.org/D55443 Files: test/lit.cfg.py Index: test/lit.cfg.py ===

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-07 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 177266. hwright marked 8 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55245/new/ https://reviews.llvm.org/D55245 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/Duration

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-07 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: clang-tidy/abseil/DurationRewriter.cpp:35 +getInverseForScale(DurationScale Scale) { + static const std::unordered_map> lebedev.ri wrote: > https://llvm.org/docs/ProgrammersManual.html#other-map-like-container-options >

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-12-07 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. If you use some of my suggestions, please make sure it compiles in C++03 mode. I might be using some C++11 features (not sure whether default argument for template parameters is C++03). Comment at: libcxx/test/std/containers/sequences/vector/vector.c

[PATCH] D49754: Add -m(no-)spe, and e500 CPU definitions and support to clang

2018-12-07 Thread vit9696 via Phabricator via cfe-commits
vit9696 added a comment. In D49754#1321078 , @glaubitz wrote: > I have applied this patch to the llvm-toolchain-7 package in Debian and did > not see any regressions on x86_64 or 32-Bit PowerPC. Additionally, I have > included the patches from https://re

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-12-07 Thread Steve Canon via Phabricator via cfe-commits
scanon added inline comments. Comment at: libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp:187 + assert(std::fabs(v[0] - 0.0f) < FLT_EPSILON); + assert(std::fabs(v[1] - 1.0f) < FLT_EPSILON); + assert(std::fabs(v[2] - 2.0f) < FLT_EPSILON); -

[clang-tools-extra] r348633 - [clang-tidy]: Abseil: new check 'abseil-upgrade-duration-conversions'

2018-12-07 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Dec 7 12:03:03 2018 New Revision: 348633 URL: http://llvm.org/viewvc/llvm-project?rev=348633&view=rev Log: [clang-tidy]: Abseil: new check 'abseil-upgrade-duration-conversions' Patch by Alex Strelnikov. Reviewed as D53830 Introduce a new check to upgrade user code based

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/abseil/DurationRewriter.cpp:35 +getInverseForScale(DurationScale Scale) { + static const std::unordered_map> hwright wrote: > lebedev.ri wrote: > > https://llvm.org/docs/ProgrammersManual.html#other-map-li

[PATCH] D53830: [clang-tidy]: Abseil: new check 'abseil-upgrade-duration-conversions'

2018-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF closed this revision. EricWF added a comment. Committed as r348633. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53830/new/ https://reviews.llvm.org/D53830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I recently had trouble with ignoring the return type, I would certainly appreciate a tool like this. Can you test it on LLVM+Clang? Maybe some methods in the AST library could also benefit from `LLVM_NODISCARD` (containers with factories is my no1 thought), and it's a

r348637 - [analyzer] RetainCountChecker: remove untested, unused, incorrect option IncludeAllocationLine

2018-12-07 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Dec 7 12:21:37 2018 New Revision: 348637 URL: http://llvm.org/viewvc/llvm-project?rev=348637&view=rev Log: [analyzer] RetainCountChecker: remove untested, unused, incorrect option IncludeAllocationLine The option has no tests, is not used anywhere, and is actu

r348638 - [analyzer] Move out tracking retain count for OSObjects into a separate checker

2018-12-07 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Dec 7 12:21:51 2018 New Revision: 348638 URL: http://llvm.org/viewvc/llvm-project?rev=348638&view=rev Log: [analyzer] Move out tracking retain count for OSObjects into a separate checker Allow enabling and disabling tracking of ObjC/CF objects separately from t

[PATCH] D55400: [analyzer] Move out tracking retain count for OSObjects into a separate checker

2018-12-07 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348638: [analyzer] Move out tracking retain count for OSObjects into a separate checker (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: ht

[PATCH] D55385: [analyzer] RetainCountChecker: remove untested, unused, incorrect option IncludeAllocationLine

2018-12-07 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348637: [analyzer] RetainCountChecker: remove untested, unused, incorrect option… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://

r348641 - [Preprocessor] Don't avoid entering included files after hitting a fatal error.

2018-12-07 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Fri Dec 7 12:29:54 2018 New Revision: 348641 URL: http://llvm.org/viewvc/llvm-project?rev=348641&view=rev Log: [Preprocessor] Don't avoid entering included files after hitting a fatal error. Change in r337953 violated the contract for `CXTranslationUnit_KeepGoing`: > Do no

[PATCH] D55451: [tests] Fix the FileManagerTest getVirtualFile test on Windows

2018-12-07 Thread Stella Stamenova via Phabricator via cfe-commits
stella.stamenova created this revision. stella.stamenova added reviewers: kadircet, asmith. Herald added a subscriber: cfe-commits. The test passes on Windows only when it is executed on the C: drive. If the build and tests run on a different drive, the test is currently failing. Repository:

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:28-30 +bool isOperator(const FunctionDecl *D) { + return D->getNameAsString().find("operator") != std::string::npos; +} Can't you use `isOverloadedOperator()`? No way going

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-07 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added inline comments. Comment at: test/lit.cfg.py:100 config.available_features.add('gnutar') -tar_version.wait() Maybe a silly question, but is this OK to remove this line? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55443/new/ ht

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I'm trying to generate an example of the modernize-use-nodiscard checker on something open source...as I developed this checker on Windows I struggled a little getting cmake to build me the json file to run clang-tidy over everything and a lot of projects aren't

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-07 Thread Michał Górny via Phabricator via cfe-commits
mgorny marked an inline comment as done. mgorny added inline comments. Comment at: test/lit.cfg.py:100 config.available_features.add('gnutar') -tar_version.wait() ruiu wrote: > Maybe a silly question, but is this OK to remove this line? Yes. [[ http

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D55433#1323757 , @MyDeveloperDay wrote: > a lot of projects aren't setup for c++17 yet which is needed for > [[nodiscard]] to be allowed, You can use `[[clang::warn_unused_result]]` for this evaluation, that does not req

[PATCH] D55455: Remove stat cache chaining as it's no longer needed after PTH support has been removed

2018-12-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: erichkeane, dexonsmith, vsapsai, Bigcheese, ilya-biryukov. Herald added a subscriber: jkorous. Stat cache chaining was implemented for a StatListener in the PTH writer so that it could write out the stat information to PTH. r348266 remove

[PATCH] D55456: [CUDA] added missing 'inline' for the functions defined in the header.

2018-12-07 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: jlebar. Herald added subscribers: bixia, sanjoy. https://reviews.llvm.org/D55456 Files: clang/lib/Headers/cuda_wrappers/new Index: clang/lib/Headers/cuda_wrappers/new === --- clang

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 177295. MyDeveloperDay added a comment. Address some (not all yet) review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55433/new/ https://reviews.llvm.org/D55433 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/M

[PATCH] D55455: Remove stat cache chaining as it's no longer needed after PTH support has been removed

2018-12-07 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. This patch LGTM, but before committing I suggest sending an RFC to cfe-dev and waiting a few days. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55455/new/ https://reviews.llvm.org/D55455 ___

[PATCH] D55455: Remove stat cache chaining as it's no longer needed after PTH support has been removed

2018-12-07 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I've no problem with this, but I don't consider myself 'expert' on this stuff enough to mark 'Approve' without giving others time to take a look. I'd say give this until this time tuesday for the others to take a look, then you can consider this an 'approve'. I won

[PATCH] D55349: Convert some ObjC alloc msgSends to runtime calls

2018-12-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjC.cpp:385 +// prefix are identified as OMF_alloc but we only want to call the +// runtime for this version. +if (Sel.isUnarySelector() && Sel.getNameForSlot(0) == "alloc") Actual

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:40 +void UseNodiscardCheck::registerMatchers(MatchFinder *Finder) { + + // if we are using C++17 attributes we are going to need c++17 Unnecessary empty line.

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 12 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:28-30 +bool isOperator(const FunctionDecl *D) { + return D->getNameAsString().find("operator") != std::string::npos; +}

[PATCH] D55458: [analyzer] ObjCContainers: Track index values.

2018-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, george.karpenkov. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, arphaman, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. This is a checker for CF (well, not really ObjC) arrays that checks array

[PATCH] D55458: [analyzer] ObjCContainers: Track index values.

2018-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked 2 inline comments as done. NoQ added inline comments. Comment at: test/Analysis/CFContainers.mm:178 void TestGetCount(CFArrayRef A, CFIndex sIndex) { - CFIndex sCount = CFArrayGetCount(A); - if (sCount > sIndex) + CFIndex sCount = CFArrayGetCount(A); // expected-no

[PATCH] D55387: [analyzer] MoveChecker Pt.7: NFC: Misc refactoring.

2018-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 177306. NoQ marked 2 inline comments as done. NoQ added a comment. Fxd. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55387/new/ https://reviews.llvm.org/D55387 Files: lib/StaticAnalyzer/Checkers/MoveChecker.cpp Index: lib/StaticAnalyzer/Checkers/Mo

[PATCH] D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move.

2018-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 177307. NoQ marked an inline comment as done. NoQ added a comment. Fxd! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55388/new/ https://reviews.llvm.org/D55388 Files: lib/StaticAnalyzer/Checkers/MoveChecker.cpp test/Analysis/use-after-move.cpp In

[PATCH] D55349: Convert some ObjC alloc msgSends to runtime calls

2018-12-07 Thread Pete Cooper via Phabricator via cfe-commits
pete updated this revision to Diff 177308. pete marked an inline comment as done. pete added a comment. Added test for integer argument and updated code to only accept pointer types to allocWithZone. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55349/new/ https://reviews.llvm.org/D553

Re: [PATCH] D55456: [CUDA] added missing 'inline' for the functions defined in the header.

2018-12-07 Thread Justin Lebar via cfe-commits
Lgtm On Fri, Dec 7, 2018, 1:12 PM Artem Belevich via Phabricator < revi...@reviews.llvm.org> wrote: > tra created this revision. > tra added a reviewer: jlebar. > Herald added subscribers: bixia, sanjoy. > > https://reviews.llvm.org/D55456 > > Files: > clang/lib/Headers/cuda_wrappers/new > > >

[PATCH] D55349: Convert some ObjC alloc msgSends to runtime calls

2018-12-07 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55349/new/ https://reviews.llvm.org/D55349 ___ cfe-commits mailing list cfe-comm

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 177311. MyDeveloperDay marked 3 inline comments as done. MyDeveloperDay added a comment. Move more of the conditional checks into the matchers CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55433/new/ https://reviews.llvm.org/D55433 Files:

[PATCH] D55425: [analyzer] Split unix.API up to UnixAPIMisuseChecker and UnixAPIPortabilityChecker

2018-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Nice! Comment at: test/Analysis/Inputs/expected-plists/unix-fns.c.plist:3018 - /clang/test/Analysis/unix-fns.c + /home/szelethus/Documents/analyzer_opts/clang/test/Analysis/u

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 177312. MyDeveloperDay added a comment. Move the conditional checks into matchers CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55433/new/ https://reviews.llvm.org/D55433 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/Mo

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 177313. MyDeveloperDay added a comment. Move the conditional statements into AST_MATCHERS CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55433/new/ https://reviews.llvm.org/D55433 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/mode

[PATCH] D55425: [analyzer] Split unix.API up to UnixAPIMisuseChecker and UnixAPIPortabilityChecker

2018-12-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: test/Analysis/Inputs/expected-plists/unix-fns.c.plist:3018 - /clang/test/Analysis/unix-fns.c + /home/szelethus/Documents/analyzer_opts/clang/test/Analysis/unix-fns.c

[PATCH] D55425: [analyzer] Split unix.API up to UnixAPIMisuseChecker and UnixAPIPortabilityChecker

2018-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/Inputs/expected-plists/unix-fns.c.plist:3018 - /clang/test/Analysis/unix-fns.c + /home/szelethus/Documents/analyzer_opts/clang/test/Analysis/unix-fns.c Szelethus wrote: > NoQ wrote: > > Does this actua

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:173 + + This check adds ``[[nodiscard]]`` attributes (introduced in C++17) to member + functions to highlight at compile time where the return value of a function Please omit this check. Sa

r348662 - [CUDA] Added missing 'inline' for functions defined in a header.

2018-12-07 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Dec 7 14:20:53 2018 New Revision: 348662 URL: http://llvm.org/viewvc/llvm-project?rev=348662&view=rev Log: [CUDA] Added missing 'inline' for functions defined in a header. Modified: cfe/trunk/lib/Headers/cuda_wrappers/new Modified: cfe/trunk/lib/Headers/cuda_wrappers/n

[PATCH] D55424: [analyzer] Supply all checkers with a shouldRegister function

2018-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Yeah, this part looks easy :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55424/new/ https://reviews.llvm.org/D55424 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D52117: Generate llvm.loop.parallel_accesses instead of llvm.mem.parallel_loop_access metadata.

2018-12-07 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur updated this revision to Diff 177320. Meinersbur marked an inline comment as done. Meinersbur added a comment. - Allow multiple access groups per instructions, i.e. an instruction can be in multiple access groups. This allows a simple 'union' operation that occurs when inlining into a

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-07 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: clang-tidy/abseil/DurationRewriter.cpp:35 +getInverseForScale(DurationScale Scale) { + static const std::unordered_map> lebedev.ri wrote: > hwright wrote: > > lebedev.ri wrote: > > > https://llvm.org/docs/ProgrammersMan

[PATCH] D52117: Generate llvm.loop.parallel_accesses instead of llvm.mem.parallel_loop_access metadata.

2018-12-07 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur updated this revision to Diff 177324. Meinersbur added a comment. - Fix wrong patch upload - Simplify access group emission ... .. possible due to the added possibility for instructions to belong to multiple access groups in D52116 . However, the numbe

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-07 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 177325. hwright marked 7 inline comments as done. hwright added a comment. Use an `IndexedMap` instead of an `std::unordered_map` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55245/new/ https://reviews.llvm.org/D55245 Files: clang-tidy/abseil/Ab

[PATCH] D55429: [analyzer] Add CheckerManager::getChecker, make sure that a registry function registers no more than 1 checker

2018-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Aha, ok, so what's the final procedure now to register a checker that's artificially split in two? Something like this, right? def CommonModel : Checker<"Common">, HelpText<"Doesn't emit warni

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 177327. MyDeveloperDay added a comment. - Move the final conditional statements into AST_MATCHERS - Add additional IgnoreInternalFunctions option to allow adding of ``[[nodiscard]]`` to functions starting with _ (e.g. _Foo()) CHANGES SINCE LAST ACTIO

[PATCH] D54604: Automatic variable initialization

2018-12-07 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 177328. jfb added a comment. - Add an ugly option to enable zero init Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54604/new/ https://reviews.llvm.org/D54604 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.t

[PATCH] D54438: [analyzer] Reimplement dependencies between checkers

2018-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. I'm seeing no problems with this patch and i'm happy that we're replacing hacks with well-defined patterns :) In D54438#1322970 , @Szelethus wrote: > - Regi

[PATCH] D54604: Automatic variable initialization

2018-12-07 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I added an option that's required when using `clang` directly (*not* `-cc1`!) If you use `-ftrivial-auto-var-init=zero` without `-enable-trivial-auto-var-init-zero-knowning-it-will-be-removed-from-clang` in `clang` it'll generate a warning and change initialization to patte

[PATCH] D54438: [analyzer] Reimplement dependencies between checkers

2018-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Generally, because the primary user of checker names is clang-tidy, the correct name to display is the name of the specific checker that the user needs to disable in order to get rid of the warning. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54438/new/ https://

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 177330. MyDeveloperDay added a comment. Minor alterations to Release notes and Documentation to address review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55433/new/ https://reviews.llvm.org/D55433 Files: clang-tidy/modernize/CM

[PATCH] D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move.

2018-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 177332. NoQ added a comment. Fix typo. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55388/new/ https://reviews.llvm.org/D55388 Files: lib/StaticAnalyzer/Checkers/MoveChecker.cpp test/Analysis/use-after-move.cpp Index: test/Analysis/use-after-move

[PATCH] D54604: Automatic variable initialization

2018-12-07 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 177331. jfb added a comment. - Update warning-flags.c Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54604/new/ https://reviews.llvm.org/D54604 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clan

[PATCH] D54438: [analyzer] Reimplement dependencies between checkers

2018-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Also you might need to rebase on top of D55400 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54438/new/ https://reviews.llvm.org/D54438 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D55429: [analyzer] Add CheckerManager::getChecker, make sure that a registry function registers no more than 1 checker

2018-12-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D55429#1324035 , @NoQ wrote: > Aha, ok, so what's the final procedure In D55429#1324035 , @NoQ wrote: > Aha, ok, so what's the final procedure now to register a checker that's > a

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-12-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 177335. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51329/new/ https://reviews.llvm.org/D51329 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/RecursiveASTVisitor.h clang/include/clang/AST/Type.

<    1   2   3   >