[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-08-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Thanks, works now! Apart from the minor comment on the hanging header file in the tests, this looks good and i have no further nits :) //*summons @dcoughlin to have a look at English in the warning messages*// Comment at: test/Analysis/virtualcall.cpp:15-

[PATCH] D36989: [clang-diff] Refactor stop-after command-line flag

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes accepted this revision. johannes added a comment. This revision is now accepted and ready to land. Looks good, thanks! You can remove StopAfterTopDown from the ComparisonOptions struct definition I have a second option stop-after option coming up but I will use another boolean for it, i

[PATCH] D36989: [clang-diff] Refactor stop-after command-line flag

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes requested changes to this revision. johannes added a comment. This revision now requires changes to proceed. Oh wait I get linker errors with BUILD_SHARED_LIBS=1 `undefined reference to ClangDiffCategory` in ASTDiff https://reviews.llvm.org/D36989 ___

r311433 - [clang-diff] Use the relative name for NamedDecl

2017-08-22 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Tue Aug 22 01:56:26 2017 New Revision: 311433 URL: http://llvm.org/viewvc/llvm-project?rev=311433&view=rev Log: [clang-diff] Use the relative name for NamedDecl Summary: If a node referring to a name is within a class or namespace, do not use the full qualified name, but st

r311434 - [clang-diff] Fix getRelativeName

2017-08-22 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Tue Aug 22 01:59:13 2017 New Revision: 311434 URL: http://llvm.org/viewvc/llvm-project?rev=311434&view=rev Log: [clang-diff] Fix getRelativeName Handle the case when DeclContext is null. Modified: cfe/trunk/lib/Tooling/ASTDiff/ASTDiff.cpp Modified: cfe/trunk/lib/Tooli

[PATCH] D36685: [clang-diff] HTML diff navigation

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 112126. johannes added a comment. some refactoring https://reviews.llvm.org/D36685 Files: tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp === --- tools/clang-diff/Clan

[PATCH] D36686: [clang-diff] Add option to compare files across git revisions

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 112127. johannes added a comment. casing https://reviews.llvm.org/D36686 Files: tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp === --- tools/clang-diff/ClangDiff.cpp +

[PATCH] D36997: [clang-diff] Honor macros

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. Nodes that are expanded from some macro are given a special "Macro" kind instead of an ASTNodeKind. They are compared by their textual value including arguments, before expansion. https://reviews.llvm.org/D36997 Files: include

[PATCH] D36998: [AST] Make TraverseTemplateParameterListHelper public

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. This is useful for clients that want to create a visitor that visits template parameters before visiting the declaration that uses them. https://reviews.llvm.org/D36998 Files: include/clang/AST/RecursiveASTVisitor.h Index: include/clang/AST/RecursiveASTVisito

[PATCH] D36999: [AST] Add DeclDataCollectors.inc

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. This adds some macros for collecting data from Decl nodes. However, it is incomplete as its not always clear which data should be collected, plus there are missing nodes. So this probably needs some tuning if it is useful enough to get merged. https://reviews.llv

[PATCH] D37000: [clang-diff] Remove NodeCountVisitor, NFC

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D37000 Files: lib/Tooling/ASTDiff/ASTDiff.cpp Index: lib/Tooling/ASTDiff/ASTDiff.cpp === --- lib/Tooling/ASTDiff/ASTDiff.cpp +++ lib/Tool

[PATCH] D37001: [clang-diff] Use data collectors for node comparison

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D37001 Files: lib/Tooling/ASTDiff/ASTDiff.cpp Index: lib/Tooling/ASTDiff/ASTDiff.cpp === --- lib/Tooling/ASTDiff/ASTDiff.cpp +++ lib/Tooli

[PATCH] D37002: [clang-diff] Treat CXXCtorInitializer as a node

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D37002 Files: lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/clang-diff-ast.cpp Index: test/Tooling/clang-diff-ast.cpp === --- test/Toolin

[PATCH] D37003: [clang-diff] Support templates

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. TemplateName and TemplateArgument are recognised. https://reviews.llvm.org/D37003 Files: lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/Inputs/clang-diff-basic-src.cpp test/Tooling/clang-diff-ast.cpp test/Tooling/clang-dif

[PATCH] D37004: [clang-diff] Fix the html output for CXXOperatorCallExpr

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added subscribers: mgorny, klimek. The operator is always the first child of such an expression. If it is an infix operator, we want to print the LHS first. https://reviews.llvm.org/D37004 Files: test/Tooling/clang-diff-ast.cpp tools/clang-diff/CMakeLi

[clang-tools-extra] r311436 - [clangd] Updated ClangdServer comments. NFC.

2017-08-22 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue Aug 22 02:16:46 2017 New Revision: 311436 URL: http://llvm.org/viewvc/llvm-project?rev=311436&view=rev Log: [clangd] Updated ClangdServer comments. NFC. Modified: clang-tools-extra/trunk/clangd/ClangdServer.h Modified: clang-tools-extra/trunk/clangd/ClangdServer.h

[PATCH] D37005: Add include/clang/Tooling/ASTDiff/ASTPatch.h

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added subscribers: mgorny, klimek. This adds a functions to remove AST nodes. It works for Decl, and for Stmt nodes that are children of a CompoundStmt. Sometimes it is not possible to remove a Decl from its context despite DeclContext.containsDecl() returni

[PATCH] D36876: [IRGen] Evaluate constant static variables referenced through member expressions

2017-08-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:1323 + if (result.HasSideEffects && !AllowSideEffects) { +assert(!isa(E) && "declrefs should not have side effects"); return ConstantEmission(); rjmccall wrote: > The side effects here a

[PATCH] D34030: Fix the postorder visting of the ClassTemplateSpecializationDecl nodes in the RecursiveASTVisitor.

2017-08-22 Thread Peter Siket via Phabricator via cfe-commits
MontyKutyi added a comment. Any further request on this? https://reviews.llvm.org/D34030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36954: [Sema] Update release notes with details of implicit scalar to vector conversions

2017-08-22 Thread Simon Dardis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311441: [Sema] Update release notes with details of implicit scalar to vector… (authored by sdardis). Repository: rL LLVM https://reviews.llvm.org/D36954 Files: cfe/branches/release_50/docs/ReleaseN

[PATCH] D36954: [Sema] Update release notes with details of implicit scalar to vector conversions

2017-08-22 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. Thanks, Simon Repository: rL LLVM https://reviews.llvm.org/D36954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r311442 - Fix templated type alias completion when using global completion cache

2017-08-22 Thread Erik Verbruggen via cfe-commits
Author: erikjv Date: Tue Aug 22 03:25:48 2017 New Revision: 311442 URL: http://llvm.org/viewvc/llvm-project?rev=311442&view=rev Log: Fix templated type alias completion when using global completion cache When we have enabled cache for global completions we did not have diagnostics for Bar and cou

[PATCH] D35355: Fix templated type alias completion when using global completion cache

2017-08-22 Thread Erik Verbruggen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311442: Fix templated type alias completion when using global completion cache (authored by erikjv). Changed prior to commit: https://reviews.llvm.org/D35355?vs=109968&id=112144#toc Repository: rL LL

r311443 - [ObjC] Check written attributes only when synthesizing ambiguous property

2017-08-22 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Aug 22 03:38:07 2017 New Revision: 311443 URL: http://llvm.org/viewvc/llvm-project?rev=311443&view=rev Log: [ObjC] Check written attributes only when synthesizing ambiguous property This commit fixes a bug introduced in r307903. The attribute ambiguity checker that was

[PATCH] D35271: Fix printing policy for AST context loaded from file

2017-08-22 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn updated this revision to Diff 112139. jklaehn added a reviewer: akyrtzi. jklaehn added a comment. Herald added a subscriber: mgorny. Added regression test. https://reviews.llvm.org/D35271 Files: lib/Frontend/ASTUnit.cpp unittests/Frontend/ASTUnitTest.cpp unittests/Frontend/CMakeLi

Re: r311443 - [ObjC] Check written attributes only when synthesizing ambiguous property

2017-08-22 Thread Alex L via cfe-commits
Hi Hans, Can you please merge this into LLVM 5? It fixes a rather serious Objective-C bug that I introduced just a couple of weeks before the branch. Cheers, Alex On 22 August 2017 at 11:38, Alex Lorenz via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: arphaman > Date: Tue Aug 22 0

r311445 - Revert r311442 (Fix templated type alias completion when using global completion cache)

2017-08-22 Thread Erik Verbruggen via cfe-commits
Author: erikjv Date: Tue Aug 22 03:54:40 2017 New Revision: 311445 URL: http://llvm.org/viewvc/llvm-project?rev=311445&view=rev Log: Revert r311442 (Fix templated type alias completion when using global completion cache) Failing Tests (2): Clang :: CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp

[PATCH] D36956: [clang-format] Emit absolute splits before lines for comments

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 112147. krasimir marked 3 inline comments as done. krasimir added a comment. - Address review comments https://reviews.llvm.org/D36956 Files: lib/Format/BreakableToken.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestComm

[PATCH] D36824: [mips] Rename getSupportedNanEncoding() to getIEEE754Standard() (NFC)

2017-08-22 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji updated this revision to Diff 112150. abeserminji added a comment. Herald added a subscriber: arichardson. Comment resolved. Repository: rL LLVM https://reviews.llvm.org/D36824 Files: lib/Basic/Targets/Mips.h lib/Driver/ToolChains/Arch/Mips.cpp lib/Driver/ToolChains/Arch/Mi

[PATCH] D36876: [IRGen] Evaluate constant static variables referenced through member expressions

2017-08-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 112149. arphaman added a comment. Revert most of the changes and use temporary DREs as suggested by John. Repository: rL LLVM https://reviews.llvm.org/D36876 Files: lib/CodeGen/CGExprComplex.cpp lib/CodeGen/CGExprScalar.cpp test/CodeGenCXX/member-

[PATCH] D36969: [Basic] Add a DiagnosticOr type

2017-08-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D36969#847803, @vsk wrote: > Would it be more convenient to extend ErrorInfo instead of creating a new > diagnostic wrapper? E.g one benefit of passing around Expected's is that > there's some assurance the diagnostics will be reported. Po

[PATCH] D36969: [Basic] Add a DiagnosticOr type

2017-08-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D36969#848518, @arphaman wrote: > In https://reviews.llvm.org/D36969#847803, @vsk wrote: > > > Would it be more convenient to extend ErrorInfo instead of creating a new > > diagnostic wrapper? E.g one benefit of passing around Expected's is t

[PATCH] D36614: [clang-format] Refine trailing comment detection

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir marked an inline comment as done. krasimir added inline comments. Comment at: lib/Format/FormatToken.h:397 + (!Previous || + Previous->isOneOf(tok::comma, tok::equal, tok::l_brace) || + Next->is(tok::r_brace; dja

[PATCH] D33672: [analyzer] INT50-CPP. Do not cast to an out-of-range enumeration checker

2017-08-22 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 112154. gamesh411 added a comment. I have implemented the std::transform. The previous version used std::for_each because the iterator for enum declarations was not a random access iterator, but it turned out that I can solve this problem via std::distance

[PATCH] D33672: [analyzer] INT50-CPP. Do not cast to an out-of-range enumeration checker

2017-08-22 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 112156. https://reviews.llvm.org/D33672 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp test/Analysis/enum-cast-out-of-range.cpp Index: te

[PATCH] D33932: [clang-format] Add support for case-insensitive header matching and use it to improve support for LLVM-style include sorting.

2017-08-22 Thread Teodor MICU via Phabricator via cfe-commits
mteodor added a comment. In https://reviews.llvm.org/D33932#793994, @djasper wrote: > Just make clang-format always do this. I don't think anyone is relying on the > current behavior. Well, someone did rely on **case sensitive** match. I thought //case insensitive// by default was just a Wind

[PATCH] D36712: Emit section information for extern variables

2017-08-22 Thread Simon Dardis via Phabricator via cfe-commits
sdardis accepted this revision. sdardis added a comment. This revision is now accepted and ready to land. I agree with @kparzysz here. If there is a mis-match between the declaration and definition, there are cases where undesirable behaviour (as such) will not occur depending on how the mismatc

[PATCH] D36712: Emit section information for extern variables

2017-08-22 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. > One suggestion inline for the wording inline, the important part is making > explicit The important part is making explicit that section information for a variable can be explicit or inferred. https://reviews.llvm.org/D36712 __

[PATCH] D37011: [clang-format] Fix lines regression in clang-format.py

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. This patch fixes a regression after https://reviews.llvm.org/rL305665, which updates the structure of the `lines` variable. https://reviews.llvm.org/D37011 Files: tools/clang-format/clang-format.py Index: tools/clang-format/clang-format.py ===

r311454 - [mips] Rename getSupportedNanEncoding() to getIEEE754Standard()

2017-08-22 Thread Petar Jovanovic via cfe-commits
Author: petarj Date: Tue Aug 22 06:35:27 2017 New Revision: 311454 URL: http://llvm.org/viewvc/llvm-project?rev=311454&view=rev Log: [mips] Rename getSupportedNanEncoding() to getIEEE754Standard() Rename the function getSupportedNanEncoding() to getIEEE754Standard(), since this function will be u

[PATCH] D36824: [mips] Rename getSupportedNanEncoding() to getIEEE754Standard() (NFC)

2017-08-22 Thread Petar Jovanovic via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311454: [mips] Rename getSupportedNanEncoding() to getIEEE754Standard() (authored by petarj). Changed prior to commit: https://reviews.llvm.org/D36824?vs=112150&id=112166#toc Repository: rL LLVM htt

[PATCH] D36969: [Basic] Add a DiagnosticError llvm::ErrorInfo subclass

2017-08-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 112169. arphaman retitled this revision from "[Basic] Add a DiagnosticOr type" to "[Basic] Add a DiagnosticError llvm::ErrorInfo subclass". arphaman edited the summary of this revision. arphaman added a comment. Use `ErrorInfo` subclass as suggested by Vedan

[PATCH] D37011: [clang-format] Fix lines regression in clang-format.py

2017-08-22 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Thank you https://reviews.llvm.org/D37011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D36782: [Bash-autocompletion] Add support for static analyzer flags

2017-08-22 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor accepted this revision. teemperor added a comment. This revision is now accepted and ready to land. Found one more minor comment typo. And could you do your changes to `OptParserEmitter.cpp` all in this patch? Because Rui/Me pointed out those things on this review, so this patch should

r311456 - [clang-format] Fix lines regression in clang-format.py

2017-08-22 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Tue Aug 22 07:28:01 2017 New Revision: 311456 URL: http://llvm.org/viewvc/llvm-project?rev=311456&view=rev Log: [clang-format] Fix lines regression in clang-format.py Summary: This patch fixes a regression after https://reviews.llvm.org/rL305665, which updates the structure

[PATCH] D37011: [clang-format] Fix lines regression in clang-format.py

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311456: [clang-format] Fix lines regression in clang-format.py (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D37011 Files: cfe/trunk/tools/clang-format/clang-format.py Index

[PATCH] D36712: Emit section information for extern variables

2017-08-22 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews updated this revision to Diff 112172. eandrews added a comment. Updated the documentation to explicitly state that section information for a variable can be explicit or inferred. https://reviews.llvm.org/D36712 Files: docs/LangRef.rst Index: docs/LangRef.rst ==

[PATCH] D37007: [clang-format] Break non-trailing block comments

2017-08-22 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. If no tests break with this, lets just go for it. We can follow up and fix individual cases if we find undesired behavior. https://reviews.llvm.org/D37007 ___

r311457 - [clang-format] Break non-trailing block comments

2017-08-22 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Tue Aug 22 07:40:05 2017 New Revision: 311457 URL: http://llvm.org/viewvc/llvm-project?rev=311457&view=rev Log: [clang-format] Break non-trailing block comments Summary: This patch is an alternative to https://reviews.llvm.org/D36614, by resolving a non-idempotency issue by

[PATCH] D37007: [clang-format] Break non-trailing block comments

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311457: [clang-format] Break non-trailing block comments (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D37007 Files: cfe/trunk/lib/Format/ContinuationIndenter.cpp cfe/trunk/

[PATCH] D36614: [clang-format] Refine trailing comment detection

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir abandoned this revision. krasimir marked an inline comment as done. krasimir added a comment. This was superseded by https://reviews.llvm.org/D37007. https://reviews.llvm.org/D36614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D36951: [OpenCL][5.0.0 Release] Release notes for OpenCL in Clang

2017-08-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 112175. Anastasia added a comment. Removed description of reverted fuctionality. https://reviews.llvm.org/D36951 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst === --- docs/Rel

[PATCH] D36707: [CodeGen]Refactor CpuSupports/CPUIs Builtin Code Gen to better work with "target" implementation

2017-08-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane planned changes to this revision. erichkeane added a comment. I actually updated it a bit since then, so I'll hold off on committing until my replacement version is perfect, I'd prefer to stop churning. Thanks for the review though Craig! https://reviews.llvm.org/D36707

[PATCH] D36712: Emit section information for extern variables

2017-08-22 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311459: Emit section information for extern variables (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D36712?vs=112172&id=112180#toc Repository: rL LLVM https://reviews.l

[PATCH] D36487: Emit section information for extern variables.

2017-08-22 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. LangRef has been updated and accepted. You can find it here - https://reviews.llvm.org/rL311459 https://reviews.llvm.org/D36487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-22 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon added a comment. Some more precisions I kept out of the revision body for clarity: The checker contains a configuration option to set the maximum line length for the fixed return statement, so that we make sure this checker always contributes to improving readability and not the contra

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-22 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon created this revision. Herald added subscribers: xazax.hun, JDevlieghere, mgorny. This patch adds a checker to detect patterns of the following form: auto IntermediateVar = foo(); return (IntermediateVar == 1); and suggests to turn them into: return (foo() == 1); The reasoning b

Re: r311443 - [ObjC] Check written attributes only when synthesizing ambiguous property

2017-08-22 Thread Hans Wennborg via cfe-commits
Merged in r311464. Thanks! On Tue, Aug 22, 2017 at 3:42 AM, Alex L wrote: > Hi Hans, > > Can you please merge this into LLVM 5? It fixes a rather serious Objective-C > bug that I introduced just a couple of weeks before the branch. > > Cheers, > Alex > > > On 22 August 2017 at 11:38, Alex Lorenz

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-22 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hi :) I added my thoughts for the check. Many variables in your code could be `const`, i didn't mention all cases. Comment at: clang-tidy/readability/UselessIntermediateVarCheck.cpp:24 + + auto directDeclRefExprLHS1 = +// We match a direct decl

[PATCH] D36848: [CodeGen] Use reentrant methods to time IR gen

2017-08-22 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 112187. modocache retitled this revision from "[CodeGen] Use RefCntTimer to time IR generation" to "[CodeGen] Use reentrant methods to time IR gen". modocache edited the summary of this revision. modocache added a comment. Use `startReentrantTimer` and `sto

[PATCH] D36989: [clang-diff] Refactor stop-after command-line flag

2017-08-22 Thread Jacob Gravelle via Phabricator via cfe-commits
jgravelle-google added a comment. If you have more stop-after options it'd probably be simpler to leave it as one field. I'll just rename it to "stop-diff-after" to avoid the name collision. https://reviews.llvm.org/D36989 ___ cfe-commits mailing l

[PATCH] D36989: [clang-diff] Refactor stop-after command-line flag

2017-08-22 Thread Jacob Gravelle via Phabricator via cfe-commits
jgravelle-google updated this revision to Diff 112193. jgravelle-google added a comment. - Undo refactor, just change name https://reviews.llvm.org/D36989 Files: test/Tooling/clang-diff-topdown.cpp tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp ==

[PATCH] D36989: [clang-diff] Refactor stop-after command-line flag

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added a comment. In https://reviews.llvm.org/D36989#848835, @jgravelle-google wrote: > If you have more stop-after options it'd probably be simpler to leave it as > one field. I'll just rename it to "stop-diff-after" to avoid the name > collision. Ok, you can go ahead. Or, if I shoul

[PATCH] D16808: [MCU] PR26438: Fix assertion failure on function returning an empty struct or union

2017-08-22 Thread Alexander Kyte via Phabricator via cfe-commits
alexanderkyte added a comment. This change is causing mono's native interop with C code compiled from clang to break. After some investigation, we're tracked bitcode differences between tests that fail versus not. When we upgrade the compiler to Xcode 8.3, we see that code generated to call fun

[PATCH] D36075: [refactor] Initial support for refactoring action rules

2017-08-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Tooling/Refactoring/RefactoringOperationController.h:19 + +/// Encapsulates all of the possible state that an individual refactoring +/// operation might have. Controls the process of initiation of refactoring ---

[PATCH] D36075: [refactor] Initial support for refactoring action rules

2017-08-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 112195. arphaman marked 7 inline comments as done. arphaman added a comment. - Split the header - Remove DiagnosticOr in favour of Expected that will use a DiagnosticError that was proposed in the other patch. - Address the other review comments Repository

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-08-22 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 112196. wangxindsb added a comment. - Highlight pure virtual even in non-pure-only mode; - Add change to the header. https://reviews.llvm.org/D34275 Files: lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp test/Analysis/virtualcall.cpp test/Analys

[PATCH] D35955: clang-format: Add preprocessor directive indentation

2017-08-22 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Krasimir: Can you actually give this a round of review? I will also try to do so tomorrow. https://reviews.llvm.org/D35955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

r311474 - Test commit access.

2017-08-22 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Tue Aug 22 10:39:25 2017 New Revision: 311474 URL: http://llvm.org/viewvc/llvm-project?rev=311474&view=rev Log: Test commit access. Modified: cfe/trunk/include/clang/Analysis/CloneDetection.h Modified: cfe/trunk/include/clang/Analysis/CloneDetection.h URL: http://llvm.

[PATCH] D36969: [Basic] Add a DiagnosticError llvm::ErrorInfo subclass

2017-08-22 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Nice! I'd like to get your thoughts on two candidate ergonomic changes: Comment at: unittests/Basic/DiagnosticTest.cpp:81 + llvm::Expected> Value = + llvm::make_error(PartialDiagnosticAt( + SourceLocation(), PartialDiagnostic(diag::err_cannot

r311476 - [clang-diff] Refactor stop-after command-line flag

2017-08-22 Thread Jacob Gravelle via cfe-commits
Author: jgravelle Date: Tue Aug 22 10:42:44 2017 New Revision: 311476 URL: http://llvm.org/viewvc/llvm-project?rev=311476&view=rev Log: [clang-diff] Refactor stop-after command-line flag Summary: Rename stop-after to stop-diff-after. When building LLVM with -DLLVM_BUILD_LLVM_DYLIB=ON, stop-after

[PATCH] D36989: [clang-diff] Refactor stop-after command-line flag

2017-08-22 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311476: [clang-diff] Refactor stop-after command-line flag (authored by jgravelle). Repository: rL LLVM https://reviews.llvm.org/D36989 Files: cfe/trunk/test/Tooling/clang-diff-topdown.cpp cfe/tru

Re: r309226 - Headers: improve ARM EHABI coverage of unwind.h

2017-08-22 Thread Evgenii Stepanov via cfe-commits
As I understand, using compiler-rt as libgcc replacement on ARM is currently broken because of this change, but I have not looked since my last message. On Mon, Aug 21, 2017 at 4:56 PM, Hans Wennborg wrote: > Is there something we need for 5.0.0 here? > > On Sat, Aug 12, 2017 at 9:58 PM, Saleem A

r311479 - [OPENMP] Fix for PR34014: OpenMP 4.5: Target construct in static method

2017-08-22 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Aug 22 10:54:52 2017 New Revision: 311479 URL: http://llvm.org/viewvc/llvm-project?rev=311479&view=rev Log: [OPENMP] Fix for PR34014: OpenMP 4.5: Target construct in static method of class fails to map class static variable. If the global variable is captured and it has

r311480 - [Parser] Correct initalizer typos before lambda capture type is deduced.

2017-08-22 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Tue Aug 22 10:55:19 2017 New Revision: 311480 URL: http://llvm.org/viewvc/llvm-project?rev=311480&view=rev Log: [Parser] Correct initalizer typos before lambda capture type is deduced. This is the same assertion as in https://reviews.llvm.org/D25206 that is triggered when Re

[PATCH] D36853: [Parser] Correct initalizer typos before lambda capture type is deduced.

2017-08-22 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311480: [Parser] Correct initalizer typos before lambda capture type is deduced. (authored by vsapsai). Changed prior to commit: https://reviews.llvm.org/D36853?vs=111716&id=112201#toc Repository: rL

Re: r309226 - Headers: improve ARM EHABI coverage of unwind.h

2017-08-22 Thread Hans Wennborg via cfe-commits
Is there a bug filed? Since this was merged to 5.0.0, I'd like to know if we broke something and if that is something that needs to be fixed. On Tue, Aug 22, 2017 at 10:46 AM, Evgenii Stepanov wrote: > As I understand, using compiler-rt as libgcc replacement on ARM is > currently broken because o

[PATCH] D36678: [OpenCL] Do not use vararg in emitted functions for enqueue_kernel

2017-08-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/cl20-device-side-enqueue.cl:116 + // B32: store i32 4, i32* %[[TMP3]], align 4 + // B32: call i32 @__enqueue_kernel_vaargs(%opencl.queue_t{{.*}}* [[DEF_Q]], i32 [[FLAGS]], %struct.ndrange_t* [[NDR]]{{(.[0-9]+)?}},

[PATCH] D35271: Fix printing policy for AST context loaded from file

2017-08-22 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Thanks for adding the test! This is looking good. Comment at: unittests/Frontend/ASTUnitTest.cpp:32 +llvm::SmallString<256> Dir; +ASSERT_FALSE(llvm::sys::fs::createUniqueDirectory("astunit-test", Dir)); +TestDir = Dir.str(); If

[PATCH] D35955: clang-format: Add preprocessor directive indentation

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:383 + State.Line->Type == LT_ImportStatement) && + Current.Previous->is(tok::hash) && State.FirstIndent > 0) { +Spaces += State.FirstIndent; You can replace `Current.Pr

[PATCH] D35385: [Driver] Darwin: Link in the profile runtime archive first

2017-08-22 Thread Juergen Ributzka via Phabricator via cfe-commits
ributzka accepted this revision. ributzka added a comment. This revision is now accepted and ready to land. Nice cleanup with the RuntimeLinkOptions enum. LGTM https://reviews.llvm.org/D35385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

Re: r311397 - [Driver][Darwin] Do not pass -munwind-table if -fno-excpetions is

2017-08-22 Thread Akira Hatanaka via cfe-commits
Hans, can this be merged to 5.0 too? This is a follow-up to r310006. Thanks. > On Aug 21, 2017, at 3:46 PM, Akira Hatanaka via cfe-commits > wrote: > > Author: ahatanak > Date: Mon Aug 21 15:46:46 2017 > New Revision: 311397 > > URL: http://llvm.org/viewvc/llvm-project?rev=311397&view=rev > L

[PATCH] D36503: [libcxx] [test] Update for C++17 feature removals.

2017-08-22 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. It's been two weeks - if there are no objections, I'd like to commit this soon. Thanks! https://reviews.llvm.org/D36503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D36951: [OpenCL][5.0.0 Release] Release notes for OpenCL in Clang

2017-08-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed to release_50@311485 https://reviews.llvm.org/D36951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36492: [time-report] Add preprocessor timer

2017-08-22 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added inline comments. Comment at: lib/Lex/Preprocessor.cpp:746 void Preprocessor::Lex(Token &Result) { + llvm::TimeRegion(PPOpts->getTimer()); + modocache wrote: > erik.pilkington wrote: > > Doesn't this just start a timer and immediately end the timer?

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `readability-useless-intermediate-var + `_ check Please place new checks in alphabetica

[PATCH] D37023: [analyzer] Fix bugreporter::getDerefExpr() again.

2017-08-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. This patch continues work that was started in https://reviews.llvm.org/D32291. Our `bugreporter::getDerefExpr()` API tries to find out what has been dereferenced. For example, if we have an lvalue expression `x->y.z` which causes a null dereference when dereferenced,

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Please add the following test: (and make sure that it does the right thing :)) bool f_with_preproc_condition() { auto test = 42; assert(test == 42); return test; } I.e. if `-DNDEBUG` is present, variable is not needed, but if `-DNDEBUG` is *NOT* prese

[PATCH] D37024: [libcxx] [test] Cleanup nullopt_t tests

2017-08-22 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. - Update specification text from N4387 - Delete `not_brace_initializable.fail.cpp`: it's redundant with `nullopt_t.fail.cpp` - `is_empty` implies `is_class` - `is_literal` is deprecated; directly verify that we can create a `nullopt_t` in a `constexpr` conte

r311487 - Revert "Revert "Revert "Revert "Fix LLVMgold plugin name/path for non-Linux.""""

2017-08-22 Thread Dan Albert via cfe-commits
Author: danalbert Date: Tue Aug 22 14:05:01 2017 New Revision: 311487 URL: http://llvm.org/viewvc/llvm-project?rev=311487&view=rev Log: Revert "Revert "Revert "Revert "Fix LLVMgold plugin name/path for non-Linux. With tests fixed for Windows style paths now that they are going through path ca

[PATCH] D37025: [analyzer] Support more pointer arithmetic in bugreporter::getDerefExpr().

2017-08-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. Herald added a subscriber: eraman. This patch adds support for a few more pointer arithmetic cases. For instance, when `p` is a null pointer, it would be possible to track that expressions like `*(++p) = 5` and `*(p + 2) = 5` are null pointer dereferences that are base

[PATCH] D37025: [analyzer] Support more pointer arithmetic in bugreporter::getDerefExpr().

2017-08-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/nullptr.cpp:54 void zoo1() { - char **p = 0; + char **p = 0; // expected-note{{'p' initialized to a null pointer value}} delete *(p + 0); // expected-warning{{Dereference of null pointer}} This note has b

[PATCH] D37024: [libcxx] [test] Cleanup nullopt_t tests

2017-08-22 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. Otherwise, looks cromulent to me. Comment at: test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp:38 -static_assert(test(nullopt) == 3, ""); +static_assert(std::is_same_v); +static_assert(test()); You're sayin

[PATCH] D37024: [libcxx] [test] Cleanup nullopt_t tests

2017-08-22 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter updated this revision to Diff 112224. CaseyCarter added a comment. Don't unnecessarily fully qualify `std::nullopt`. https://reviews.llvm.org/D37024 Files: test/std/utilities/optional/optional.nullopt/not_brace_initializable.fail.cpp test/std/utilities/optional/optional.nullopt/

r311488 - Degeneralize more tests.

2017-08-22 Thread Dan Albert via cfe-commits
Author: danalbert Date: Tue Aug 22 14:16:22 2017 New Revision: 311488 URL: http://llvm.org/viewvc/llvm-project?rev=311488&view=rev Log: Degeneralize more tests. As before, not every platform supports LTO. Make sure the platform we're targeting is one that supports it (regardless of the *host* pla

Re: [PATCH] D36914: Implement CFG construction for __try / __except / __leave.

2017-08-22 Thread Nico Weber via cfe-commits
rnk: ping :-) On Mon, Aug 21, 2017 at 1:43 PM, Nico Weber via Phabricator via cfe-commits wrote: > thakis added inline comments. > > > > Comment at: lib/Analysis/CFG.cpp:448 > +BuildOpts(buildOpts), switchExclusivelyCovered(false), > +switchCond(nullptr), cachedE

Re: r309226 - Headers: improve ARM EHABI coverage of unwind.h

2017-08-22 Thread Evgenii Stepanov via cfe-commits
No. I don't have a easy way of reproducing this. On Tue, Aug 22, 2017 at 11:10 AM, Hans Wennborg wrote: > Is there a bug filed? Since this was merged to 5.0.0, I'd like to know > if we broke something and if that is something that needs to be fixed. > > On Tue, Aug 22, 2017 at 10:46 AM, Evgenii S

[PATCH] D36914: Implement CFG construction for __try / __except / __leave.

2017-08-22 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Looks functionally correct Comment at: test/Sema/warn-unreachable-ms.c:42 + } +} Can we add a test to exercise that this builds the right CFG? ``` __try { __try { f(); } __except(1) { __leave; // should exit outer try } __l

Re: r311391 - [Driver] Recognize DevDiv internal builds of MSVC, with a different directory structure.

2017-08-22 Thread Hans Wennborg via cfe-commits
Merged to 5.0 in r311500. On Mon, Aug 21, 2017 at 3:19 PM, Stephan T. Lavavej via cfe-commits wrote: > Author: stl_msft > Date: Mon Aug 21 15:19:33 2017 > New Revision: 311391 > > URL: http://llvm.org/viewvc/llvm-project?rev=311391&view=rev > Log: > [Driver] Recognize DevDiv internal builds of MS

[PATCH] D35955: clang-format: Add preprocessor directive indentation

2017-08-22 Thread Erik Uhlmann via Phabricator via cfe-commits
euhlmann added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:387 +// hash. This causes second-level indents onward to have an extra space +// after the tabs. We set the state to column 0 to avoid this misalignment. +if (Style.UseTab != FormatStyle::

  1   2   >