[PATCH] D50250: [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part

2018-09-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. It might help if you're more specific about whose review you're asking for. Repository: rC Clang https://reviews.llvm.org/D50250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D51990: [DebugInfo] Fix emitting of bit offset for ObjC

2018-09-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:2369 + ? CGM.getObjCRuntime().ComputeBitfieldBitOffset(CGM, ID, Field) + : 0; } else { JDevlieghere wrote: > aprantl wrote: > > JDevlieghere wrote: > > >

[PATCH] D52160: [Driver] Support XRay on Fuchsia

2018-09-16 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris accepted this revision. dberris added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D52160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D45719: [clang-Format] Fix indentation of member call after block

2018-09-16 Thread Anders Karlsson via Phabricator via cfe-commits
ank added a comment. ping @klimek Repository: rC Clang https://reviews.llvm.org/D45719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52153: scan-build: Add support of the option --exclude like in scan-build-py

2018-09-16 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342359: scan-build: Add support of the option --exclude like in scan-build-py (authored by sylvestre, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.o

r342359 - scan-build: Add support of the option --exclude like in scan-build-py

2018-09-16 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Sun Sep 16 23:31:46 2018 New Revision: 342359 URL: http://llvm.org/viewvc/llvm-project?rev=342359&view=rev Log: scan-build: Add support of the option --exclude like in scan-build-py Summary: To exclude thirdparty code. To test: With /tmp/foo.c ``` void test() { int

[PATCH] D52137: Added warning for unary minus used with unsigned type

2018-09-16 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. "High bits are zeros" and "result is always non negative" are good candidatates to be catched here. Thanks for detailed review, Richard. Now I will look on it. https://reviews.llvm.org/D52137 ___ cfe-commits mailing list c

[PATCH] D52159: [Lexer] Add xray_instrument feature

2018-09-16 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342358: [Lexer] Add xray_instrument feature (authored by phosek, committed by ). Changed prior to commit: https://reviews.llvm.org/D52159?vs=165705&id=165712#toc Repository: rC Clang https://reviews

r342358 - [Lexer] Add xray_instrument feature

2018-09-16 Thread Petr Hosek via cfe-commits
Author: phosek Date: Sun Sep 16 22:25:47 2018 New Revision: 342358 URL: http://llvm.org/viewvc/llvm-project?rev=342358&view=rev Log: [Lexer] Add xray_instrument feature This can be used to detect whether the code is being built with XRay instrumentation using the __has_feature(xray_instrument) pr

[PATCH] D52160: [Driver] Support XRay on Fuchsia

2018-09-16 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: mcgrathr, dberris. Herald added a reviewer: javed.absar. Herald added a subscriber: cfe-commits. This enables support for XRay in Fuchsia Clang driver. Repository: rC Clang https://reviews.llvm.org/D52160 Files: clang/lib/Driver/ToolCha

[PATCH] D52159: [Lexer] Add xray_instrument feature

2018-09-16 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 165705. phosek edited the summary of this revision. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D52159 Files: clang/include/clang/Basic/Features.def clang/test/Lexer/has_feature_xray_instrument.cpp Index: clan

[PATCH] D52158: [clang-tidy] Remove duplicated logic in UnnecessaryValueParamCheck and use FunctionParmMutationAnalyzer instead.

2018-09-16 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang created this revision. shuaiwang added reviewers: alexfh, JonasToth. Herald added subscribers: cfe-commits, Szelethus, a.sidorin, chrib, kristof.beyls, xazax.hun. Herald added a reviewer: george.karpenkov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52158 Files: c

[PATCH] D51633: [ASTImporter] Added error handling for AST import.

2018-09-16 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Gabor, To make the review proces faster, you can split the review on separate parts for Stmts, Decls, Types, etc. Otherwise, the review can last for too long. Comment at: lib/AST/ASTImporter.cpp:162 +return llvm::make_error(); +return

[PATCH] D52157: [ASTMatchers] Let isArrow also support UnresolvedMemberExpr, CXXDependentScopeMemberExpr

2018-09-16 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang created this revision. shuaiwang added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D52157 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h unittests/ASTMatchers/ASTMatchersNarro

[PATCH] D52150: [clang-format] BeforeHash added to IndentPPDirectives

2018-09-16 Thread Tolga Mizrak via Phabricator via cfe-commits
to-miz updated this revision to Diff 165700. to-miz added a comment. PPBranchLevel can be negative, while Line->Level is unsigned. Added check to ensure that PPBranchLevel is positive before adding to Line->Level. https://reviews.llvm.org/D52150 Files: docs/ClangFormatStyleOptions.rst incl

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-16 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml updated this revision to Diff 165698. wgml added a comment. One last typo. https://reviews.llvm.org/D52136 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp clang-tidy/modernize/ConcatNestedNamespacesCheck.h clang-tidy/modernize/Moderni

r342353 - [NFC] Minor refactoring to setup the stage for supporting pointers in ExprMutationAnalyzer

2018-09-16 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Sun Sep 16 14:09:50 2018 New Revision: 342353 URL: http://llvm.org/viewvc/llvm-project?rev=342353&view=rev Log: [NFC] Minor refactoring to setup the stage for supporting pointers in ExprMutationAnalyzer Modified: cfe/trunk/include/clang/Analysis/Analyses/ExprMutationA

[PATCH] D52137: Added warning for unary minus used with unsigned type

2018-09-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D52137#1236065, @Quuxplusone wrote: > In https://reviews.llvm.org/D52137#1236053, @rsmith wrote: > > > I think we can and should do better about false positives here. If you move > > this check to SemaChecking, you can produce the warning in a

[PATCH] D52151: Also manages clang-X as tool for scan-build

2018-09-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. `$triple-clang`, also Repository: rC Clang https://reviews.llvm.org/D52151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52151: Also manages clang-X as tool for scan-build

2018-09-16 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. Just a minor suggestion, I think it would make it more clear as before LLVM 7, Clang did not have a version number with the main executable. GCC is slightly less consistent with their formats as they usually ship as host compilers with various suffixes, but with Clang

Re: [PATCH] D52151: Also manages clang-X as tool for scan-build

2018-09-16 Thread Jon Roelofs via cfe-commits
lgtm On Sun, Sep 16, 2018 at 12:47 PM Sylvestre Ledru via Phabricator < revi...@reviews.llvm.org> wrote: > sylvestre.ledru created this revision. > sylvestre.ledru added a reviewer: jroelofs. > > This will make > scan-build-7 clang-7 -c foo.c &> /dev/null > > > Repository: > rC Clang > > https:

[PATCH] D52153: scan-build: Add support of the option --exclude like in scan-build-py

2018-09-16 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D52153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D52151: Also manages clang-X as tool for scan-build

2018-09-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. @kristina sorry, I missed your comment. I just followed what we are doing with gcc. Do you want me to update it? Repository: rC Clang https://reviews.llvm.org/D52151 ___ cfe-commits mailing list cfe-commits@lists

r342351 - scan-build: remove trailing whitespaces

2018-09-16 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Sun Sep 16 12:51:16 2018 New Revision: 342351 URL: http://llvm.org/viewvc/llvm-project?rev=342351&view=rev Log: scan-build: remove trailing whitespaces Modified: cfe/trunk/tools/scan-build/bin/scan-build Modified: cfe/trunk/tools/scan-build/bin/scan-build URL: http:/

[PATCH] D52153: scan-build: Add support of the option --exclude like in scan-build-py

2018-09-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 165691. sylvestre.ledru added a comment. Fix the indentation Repository: rC Clang https://reviews.llvm.org/D52153 Files: tools/scan-build/bin/scan-build Index: tools/scan-build/bin/scan-build ==

[PATCH] D52153: scan-build: Add support of the option --exclude like in scan-build-py

2018-09-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. sylvestre.ledru added a reviewer: jroelofs. Herald added a subscriber: whisperity. sylvestre.ledru edited the summary of this revision. To exclude thirdparty code. To test: With /tmp/foo.c void test() { int x; x = 1; // warn } $ scan-

[PATCH] D52151: Also manages clang-X as tool for scan-build

2018-09-16 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC342350: Also manages clang-X as tool for scan-build (authored by sylvestre, committed by ). Changed prior to commit: ht

r342350 - Also manages clang-X as tool for scan-build

2018-09-16 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Sun Sep 16 12:36:59 2018 New Revision: 342350 URL: http://llvm.org/viewvc/llvm-project?rev=342350&view=rev Log: Also manages clang-X as tool for scan-build Summary: This will make scan-build-7 clang-7 -c foo.c &> /dev/null Reviewers: jroelofs Subscribers: kristina, cfe-c

[PATCH] D45741: Python bindings: Fix handling of file bodies with multi-byte characters

2018-09-16 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. Would you mind re-uploading these patches with full context (with `diff -U9`). 3 lines of context around changes makes this very difficult to review. Also I would suggest testing for Python version and using appropriate semantics (using `encode` in case of Python3)

[PATCH] D52151: Also manages clang-X as tool for scan-build

2018-09-16 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. Nitpick: This regex is far too broad to cover the rare use case where you'd be invoking clang as `clang-N`. I think something like `clang(?:\-[789])?` would be more suitable? Repository: rC Clang https://reviews.llvm.org/D52151 __

[PATCH] D52151: Also manages clang-X as tool for scan-build

2018-09-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. sylvestre.ledru added a reviewer: jroelofs. This will make scan-build-7 clang-7 -c foo.c &> /dev/null Repository: rC Clang https://reviews.llvm.org/D52151 Files: tools/scan-build/bin/scan-build Index: tools/scan-build/bin/scan-build

[PATCH] D52137: Added warning for unary minus used with unsigned type

2018-09-16 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. MSVC warns for every case in the test file I uploaded here. https://godbolt.org/z/jiMFp6 https://reviews.llvm.org/D52137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D52137: Added warning for unary minus used with unsigned type

2018-09-16 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. I find this warning confusing. I find a4 to be perfectly expected. IMO this warning should be applied only, if the effective value of the expression is not the same as in the modulo-n arithmetic. This means that if (-x) is explicitly or implicitly cast to a less wide unsi

[PATCH] D52150: [clang-format] BeforeHash added to IndentPPDirectives

2018-09-16 Thread Tolga Mizrak via Phabricator via cfe-commits
to-miz created this revision. to-miz added reviewers: djasper, klimek, krasimir, sammccall, mprobst, Nicola. Herald added a subscriber: cfe-commits. The option BeforeHash added to IndentPPDirectives. Fixes Bug 36019. Repository: rC Clang https://reviews.llvm.org/D52150 Files: docs/ClangFor

[PATCH] D52120: [analyzer] Treat std::{move, forward} as casts in ExprMutationAnalyzer.

2018-09-16 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 165684. shuaiwang marked an inline comment as done. shuaiwang added a comment. Added more test cases around std::move Repository: rC Clang https://reviews.llvm.org/D52120 Files: lib/Analysis/ExprMutationAnalyzer.cpp unittests/Analysis/ExprMutationA

[PATCH] D52120: [analyzer] Treat std::{move, forward} as casts in ExprMutationAnalyzer.

2018-09-16 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang marked 2 inline comments as done. shuaiwang added inline comments. Comment at: unittests/Analysis/ExprMutationAnalyzerTest.cpp:387 match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); - EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("std::

[PATCH] D52135: [Clang-Tidy: modernize] Fix for modernize-redundant-void-arg: complains about variable cast to void

2018-09-16 Thread Idriss via Phabricator via cfe-commits
IdrissRio updated this revision to Diff 165683. IdrissRio edited the summary of this revision. IdrissRio added a comment. Thank you @JonasToth. I have update the patch and i have added two cases. The first an instantiation of a non-templated function. The second is the instantiation of a templatic

[PATCH] D52135: [Clang-Tidy: modernize] Fix for modernize-redundant-void-arg: complains about variable cast to void

2018-09-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Could you please add a test, to show that non-templated function are still diagnosed correctly? The `isInstantiated` would only apply to templated functions. Why is the cast to void diagnosed anyway? It is not an argument nor is it used in a function context. Do you h

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-16 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml updated this revision to Diff 165677. wgml added a comment. Fixed typo in documentation. Refactored a bit of check code to make it more readable. https://reviews.llvm.org/D52136 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp clang-tidy