r328404 - [ODRHash] Support pointer and reference types.

2018-03-23 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Mar 23 17:52:44 2018 New Revision: 328404 URL: http://llvm.org/viewvc/llvm-project?rev=328404=rev Log: [ODRHash] Support pointer and reference types. Modified: cfe/trunk/lib/AST/ODRHash.cpp cfe/trunk/test/Modules/odr_hash.cpp Modified:

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-23 Thread Teodor Petrov via Phabricator via cfe-commits
obfuscated updated this revision to Diff 139686. obfuscated added a comment. Added an option Repository: rC Clang https://reviews.llvm.org/D44765 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/FormatTokenLexer.cpp unittests/Format/FormatTest.cpp Index:

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-23 Thread Teodor Petrov via Phabricator via cfe-commits
obfuscated updated this revision to Diff 139687. obfuscated added a comment. Attached both commits in a single diff... Repository: rC Clang https://reviews.llvm.org/D44765 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp

[PATCH] D43696: Reduce hash collisions for reference and pointer types

2018-03-23 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu added a comment. r328404 has been committed to support references and pointers. Repository: rC Clang https://reviews.llvm.org/D43696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r328406 - [analyzer] Do not crash in CallEvent.getReturnType()

2018-03-23 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Mar 23 18:53:12 2018 New Revision: 328406 URL: http://llvm.org/viewvc/llvm-project?rev=328406=rev Log: [analyzer] Do not crash in CallEvent.getReturnType() When the call expression is not available. Added:

[clang-tools-extra] r328302 - [clangd] Remove 'static' from a function inside anonymous ns. NFC

2018-03-23 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Mar 23 03:39:15 2018 New Revision: 328302 URL: http://llvm.org/viewvc/llvm-project?rev=328302=rev Log: [clangd] Remove 'static' from a function inside anonymous ns. NFC Modified: clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp Modified:

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-23 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 139567. martong marked 3 inline comments as done. martong added a comment. - Add some minor changes based on xazax's comments Repository: rC Clang https://reviews.llvm.org/D43967 Files: unittests/AST/ASTImporterTest.cpp unittests/AST/DeclMatcher.h

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:276 +// This will not create the file more than once. +createVirtualFile(ToAST.get(), It->FileName, It->Code); + xazax.hun wrote: > Maybe an IfNeeded suffix or something like

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-03-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Escaping exception is certainly a bug, so it should go into `bugprone` then. https://reviews.llvm.org/D33537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44823: [libcxx] Improving std::vector and std::deque perfomance

2018-03-23 Thread Danila Kutenin via Phabricator via cfe-commits
danlark created this revision. danlark added reviewers: EricWF, mclow.lists. Herald added subscribers: cfe-commits, christof. Consider the following code. #include #include class TestClass { public: TestClass(size_t size) : Data(size) { } private:

[PATCH] D44272: [clangd] Support incremental document syncing

2018-03-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks again. This generally looks LGTM, just a last drop of small nits. Will approve as soon as they land. Comment at: clangd/DraftStore.cpp:75 + return llvm::make_error( + llvm::formatv("Range's end position (line={0},

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please also mention new warning in Release Notes and documentation. Will this warning be part of -Wall or -Wextra? Repository: rC Clang https://reviews.llvm.org/D44826 ___ cfe-commits mailing list

[PATCH] D44837: [CUDA] Fixed false error reporting in case of calling H->G->HD->D.

2018-03-23 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: jlebar. Herald added a subscriber: sanjoy. Launching a kernel from the host code does not generate code for the kernel itself. This fixes an issue with clang erroneously reporting an error for a HD->D call from within the kernel.

[PATCH] D44842: Add Parameters to DW_AT_name Attribute of Template Variables

2018-03-23 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. CC'ing LLDB developers because I'm not sure if this could break symbol lookup. Repository: rC Clang https://reviews.llvm.org/D44842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r328362 - [CUDA] Fixed false error reporting in case of calling H->G->HD->D.

2018-03-23 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Mar 23 12:49:03 2018 New Revision: 328362 URL: http://llvm.org/viewvc/llvm-project?rev=328362=rev Log: [CUDA] Fixed false error reporting in case of calling H->G->HD->D. Launching a kernel from the host code does not generate code for the kernel itself. This fixes an issue

[PATCH] D44778: [clang-format] Wildcard expansion on Windows.

2018-03-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: tools/clang-format/ClangFormat.cpp:348 + if (EC) { +llvm::errs() << "error: couldn'g get arguments: " << EC.message() << '\n'; + }

[PATCH] D44652: [vfs] Don't bail out after a missing -ivfsoverlay file

2018-03-23 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir closed this revision. benlangmuir marked an inline comment as done. benlangmuir added a comment. r328337 Repository: rC Clang https://reviews.llvm.org/D44652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. This duplicates Clang-tidy misc-unused-using-decls . If Clang will provide same or better functionality, it should be removed. Repository: rC Clang https://reviews.llvm.org/D44826

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a subscriber: CarlosAlbertoEnciso. dblaikie added a comment. While implementing the warning is great (wonder if there's any codebase that isn't -Wunused-using clean, that we could use to compare Clang and GCC's behavior broadly - make sure it's catching the same cases (or

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-23 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added subscribers: lebedev.ri, kimgr. kimgr added a comment. I have to say I disagree that either the nested struct/function or macros (in any form) should count toward a function's total variable count. Both are valid forms of abstraction, and they both remove complexity from the

Re: [PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-23 Thread Kim Gräsman via cfe-commits
I have to say I disagree that either the nested struct/function or macros (in any form) should count toward a function's total variable count. Both are valid forms of abstraction, and they both remove complexity from the containing function since they factor details *out of the function's

[PATCH] D44842: Add Parameters to DW_AT_name Attribute of Template Variables

2018-03-23 Thread Matthew Voss via Phabricator via cfe-commits
ormris created this revision. ormris added reviewers: dblaikie, aprantl, probinson, JDevlieghere. This patch adds the associated template parameters to the DWARF name attribute of all template variable specializations, mirroring how they are referenced in the source code. Repository: rC Clang

[PATCH] D44533: [AMDGPU] Fix codegen for inline assembly

2018-03-23 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328359: [AMDGPU] Fix codegen for inline assembly (authored by yaxunl, committed by ). Repository: rC Clang https://reviews.llvm.org/D44533 Files: lib/Basic/Targets/AMDGPU.h lib/CodeGen/CGStmt.cpp

[PATCH] D44745: [HWASan] Port HWASan to Linux x86-64 (clang)

2018-03-23 Thread Aleksey Shlyapnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328361: [HWASan] Port HWASan to Linux x86-64 (clang) (authored by alekseyshl, committed by ). Changed prior to commit: https://reviews.llvm.org/D44745?vs=139513=139640#toc Repository: rC Clang

r328361 - [HWASan] Port HWASan to Linux x86-64 (clang)

2018-03-23 Thread Alex Shlyapnikov via cfe-commits
Author: alekseyshl Date: Fri Mar 23 12:47:45 2018 New Revision: 328361 URL: http://llvm.org/viewvc/llvm-project?rev=328361=rev Log: [HWASan] Port HWASan to Linux x86-64 (clang) Summary: Porting HWASan to Linux x86-64, the third of the three patches, clang part. Reviewers: eugenis Subscribers:

Re: [PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-23 Thread David Blaikie via cfe-commits
While implementing the warning is great (wonder if there's any codebase that isn't -Wunused-using clean, that we could use to compare Clang and GCC's behavior broadly - make sure it's catching the same cases (or justify/investigate differences)) - and using it to motivate the debug info is an

[clang-tools-extra] r328354 - Fix misuse of llvm::YAML in clangd test.

2018-03-23 Thread Jordan Rose via cfe-commits
Author: jrose Date: Fri Mar 23 12:16:07 2018 New Revision: 328354 URL: http://llvm.org/viewvc/llvm-project?rev=328354=rev Log: Fix misuse of llvm::YAML in clangd test. Caught by LLVM r328345! Modified: clang-tools-extra/trunk/unittests/clangd/TraceTests.cpp Modified:

r328359 - [AMDGPU] Fix codegen for inline assembly

2018-03-23 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Mar 23 12:43:42 2018 New Revision: 328359 URL: http://llvm.org/viewvc/llvm-project?rev=328359=rev Log: [AMDGPU] Fix codegen for inline assembly Need to override convertConstraint to recognise amdgpu specific register names. Differential Revision:

[PATCH] D44774: [Driver] Allow use of -fsyntax-only together with -MJ

2018-03-23 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. IMO we should explicitly error out. That combination is nonsense to me. Creating useless JSON database fragments is not an improvement. Repository: rC Clang https://reviews.llvm.org/D44774 ___ cfe-commits mailing list

[PATCH] D44747: Set calling convention for CUDA kernel

2018-03-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 139625. yaxunl retitled this revision from "[AMDGPU] Set calling convention for CUDA kernel" to "Set calling convention for CUDA kernel". yaxunl edited the summary of this revision. yaxunl added a comment. Revised by John's comments. Introduce CC_CUDAKernel

[PATCH] D44837: [CUDA] Fixed false error reporting in case of calling H->G->HD->D.

2018-03-23 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328362: [CUDA] Fixed false error reporting in case of calling H-G-HD-D. (authored by tra, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D44846: [MS] Fix late-parsed template infinite loop in eager instantiation

2018-03-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: rsmith, thakis, hans. This fixes PR33561 and PR34185. Don't store pending template instantiations for late-parsed templates in the normal PendingInstantiations queue. Instead, use a separate list that will only be parsed and instantiated at end of

[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 139650. vsapsai added a comment. Address review comments: - update comments for tryParseObjCMethodName, use isValidIdentifier. - make MultiSourceLocation more lightweight. I have rebased my patch, so diff between changes can be noisy.

[PATCH] D44231: [clang-tidy] Check for sizeof that call functions

2018-03-23 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 updated this revision to Diff 139649. https://reviews.llvm.org/D44231 Files: clang-tidy/misc/SizeofExpressionCheck.cpp clang-tidy/misc/SizeofExpressionCheck.h docs/clang-tidy/checks/misc-sizeof-expression.rst test/clang-tidy/misc-sizeof-expression.cpp Index:

[PATCH] D44846: [MS] Fix late-parsed template infinite loop in eager instantiation

2018-03-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/Sema.cpp:855 // instantiations. PCH files do not. if (TUKind != TU_Prefix) { DiagnoseUseOfUnimplementedSelectors(); In the TUPrefix case, we'll need to write these instantiations to the PCH

r328347 - [AMDGPU] Remove use of OpenCL triple environment and replace with function attribute for AMDGPU (CLANG)

2018-03-23 Thread Tony Tye via cfe-commits
Author: t-tye Date: Fri Mar 23 11:43:15 2018 New Revision: 328347 URL: http://llvm.org/viewvc/llvm-project?rev=328347=rev Log: [AMDGPU] Remove use of OpenCL triple environment and replace with function attribute for AMDGPU (CLANG) - Remove use of the opencl and amdopencl environment member of

r328350 - [AMDGPU] Update OpenCL to use 48 bytes of implicit arguments for AMDGPU (CLANG)

2018-03-23 Thread Tony Tye via cfe-commits
Author: t-tye Date: Fri Mar 23 11:51:45 2018 New Revision: 328350 URL: http://llvm.org/viewvc/llvm-project?rev=328350=rev Log: [AMDGPU] Update OpenCL to use 48 bytes of implicit arguments for AMDGPU (CLANG) Add two additional implicit arguments for OpenCL for the AMDGPU target using the AMDHSA

[PATCH] D44844: [PR36880] Avoid -Wunused-lambda-capture false positive for explicit this capture used in an unresolved member in a generic lambda

2018-03-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: malcolm.parsons, ahatanak, vsapsai. Herald added a subscriber: jkorous-apple. Clang emits an incorrect -Wunused-lambda-capture for 'this' capture in a generic lambda in a template where 'this' is used implicitly in an unresolved member

[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked 2 inline comments as done. vsapsai added inline comments. Comment at: clang/include/clang/Basic/SourceLocation.h:202 +/// Can be used transparently in places where SourceLocation is expected. +class MultiSourceLocation { + bool IsSingleLoc;

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-23 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 139646. zinovy.nis added a comment. - Rebased. - Added 1 more test for namespaced base clases - Fixed minor issues. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44295 Files: clang-tidy/bugprone/BugproneTidyModule.cpp

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri planned changes to this revision. lebedev.ri added a comment. Ok then :) Let's only count the variables in the function itself, not in macros/nested functions/nested lambdas/nested classes/... Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44602

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-03-23 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 139644. juliehockett added a comment. Rebasing and updating. https://reviews.llvm.org/D43341 Files: clang-doc/BitcodeReader.cpp clang-doc/BitcodeReader.h clang-doc/BitcodeWriter.cpp clang-doc/BitcodeWriter.h clang-doc/CMakeLists.txt

[PATCH] D44844: [PR36880] Avoid -Wunused-lambda-capture false positive for explicit this capture used in an unresolved member in a generic lambda

2018-03-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/Sema/TreeTransform.h:11269 +// 'this' capture is marked as 'used'. +if (Old->isImplicitCXXThisAccess()) + getSema().CheckCXXThisCapture(Old->getMemberNameInfo().getLoc(), This doesn't make sense; in

[PATCH] D44801: Add the -fsanitize=shadow-call-stack flag

2018-03-23 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 139652. vlad.tsyrklevich marked 6 inline comments as done. vlad.tsyrklevich added a comment. - Address Kostya's documentation feedback Repository: rC Clang https://reviews.llvm.org/D44801 Files: docs/ShadowCallStack.rst docs/index.rst

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. My opinion matters less than @rsmith or @dblaikie on the review, but it seems to me that Typedef and Using are SO similar that the implementations should just be combined. You'd likely have to change a couple of types along the way to be more generic, but the

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:68 +- New :doc:`bugprone-exception-escape + ` check + Please fix link. See other checks as example.

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-03-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 139583. baloghadamsoftware added a comment. Moved to bugprone. https://reviews.llvm.org/D33537 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/ExceptionEscapeCheck.cpp

[PATCH] D44790: [clang-format] Fix ObjC style guesser to also iterate over child lines

2018-03-23 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: cfe/trunk/lib/Format/Format.cpp:1544 +return true; + for (auto ChildLine : Line->Children) { +if (LineContainsObjCCode(*ChildLine)) Sorry that I missed this in the original review. But doesn't this

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-03-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/checks/misc-exception-escape.rst:1 +.. title:: clang-tidy - bugprone-exception-escape + This file should be renamed as well. https://reviews.llvm.org/D33537

[PATCH] D33440: clang-format: better handle statement macros

2018-03-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: lib/Format/Format.cpp:647-648 LLVMStyle.SortUsingDeclarations = true; + LLVMStyle.StatementMacros.push_back("Q_UNUSED"); + LLVMStyle.StatementMacros.push_back("QT_REQUIRE_VERSION"); What's the reason to have these

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-23 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso created this revision. CarlosAlbertoEnciso added reviewers: rsmith, erichkeane, probinson, dblaikie. CarlosAlbertoEnciso added a project: clang. Herald added subscribers: cfe-commits, JDevlieghere, aprantl. Add -Wunused-using, a warning that finds unused using declarations.

[PATCH] D44790: [clang-format] Fix ObjC style guesser to also iterate over child lines

2018-03-23 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: cfe/trunk/lib/Format/Format.cpp:1544 +return true; + for (auto ChildLine : Line->Children) { +if (LineContainsObjCCode(*ChildLine)) djasper wrote: > Sorry that I missed this in the original

[PATCH] D44272: [clangd] Support incremental document syncing

2018-03-23 Thread Simon Marchi via Phabricator via cfe-commits
simark marked 10 inline comments as done. simark added inline comments. Comment at: clangd/DraftStore.cpp:75 + return llvm::make_error( + llvm::formatv("Range's end position (line={0}, character={1}) is " +"before start position (line={2},

[PATCH] D44778: [clang-format] Wildcard expansion on Windows.

2018-03-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. I've not tested this on Windows, but I hope llvm::sys::Process::GetArgumentVector should have been tested by someone already. Repository: rC Clang https://reviews.llvm.org/D44778 ___ cfe-commits mailing list

[PATCH] D44272: [clangd] Support incremental document syncing

2018-03-23 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 139596. simark marked 2 inline comments as done. simark added a comment. Address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44272 Files: clangd/ClangdLSPServer.cpp clangd/DraftStore.cpp clangd/DraftStore.h

[PATCH] D44203: [clang-format] Improve Incomplete detection for (text) protos

2018-03-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I'm not familiar with clang-format internals, sorry if questions are dumb. My first inclination is that doing something reasonable for incomplete inputs makes sense, but it doesn't seem to be worth spending complexity on things that are actually intended to not be

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-03-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/bugprone/ExceptionEscapeCheck.cpp:24-25 + +const TypeVec _throws(const FunctionDecl *Func); +const TypeVec _throws(const Stmt *St, const

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/checks/bugprone-parent-virtual-call.rst:26 + int foo() override {... A::foo()...} + warning: qualified name A::foo refers to a +member which

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

2018-03-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/readability/UnnecessaryIntermediateVarCheck.cpp:28 + auto File = Context->getCurrentFile(); + auto Style =

[PATCH] D44831: [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-23 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139601. benhamilton added a comment. Update from correct base revision Repository: rC Clang https://reviews.llvm.org/D44831 Files: lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp

[PATCH] D44533: [AMDGPU] Fix codegen for inline assembly

2018-03-23 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm accepted this revision. arsenm added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D44533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44778: [clang-format] Wildcard expansion on Windows.

2018-03-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 139593. alexfh added a comment. - Use llvm::sys::Process::GetArgumentVector. Repository: rC Clang https://reviews.llvm.org/D44778 Files: tools/clang-format/ClangFormat.cpp Index: tools/clang-format/ClangFormat.cpp

[PATCH] D44764: [clangd] Move GTest printers to separate file

2018-03-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 139598. malaperle added a comment. Use a header for common inclusions for tests Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44764 Files: unittests/clangd/ClangdTesting.h unittests/clangd/ClangdTests.cpp

[PATCH] D44764: [clangd] Use a header for common inclusions for tests

2018-03-23 Thread Simon Marchi via Phabricator via cfe-commits
simark accepted this revision. simark added inline comments. Comment at: unittests/clangd/Printers.h:12 +// objects on failure. Otherwise, it is possible that there will be two +// different instantiations of the printer template for a given type and some +// tests could end up

[PATCH] D44764: [clangd] Use a header for common inclusions for tests

2018-03-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D44764#1045992, @malaperle wrote: > In https://reviews.llvm.org/D44764#1045682, @ilya-biryukov wrote: > > > In https://reviews.llvm.org/D44764#1045648, @simark wrote: > > > > > We could create a file `ClangdTesting.h" which includes

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

2018-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:62 - New `bugprone-throw-keyword-missing `_ check Please rebase from trunk and use //:doc:// for

[PATCH] D44831: [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-23 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added a reviewer: djasper. Herald added subscribers: cfe-commits, klimek. This fixes an issue brought up by djasper@ in his review of https://reviews.llvm.org/D44790. We handled top-level child lines, but if those child lines themselves had child

[PATCH] D44790: [clang-format] Fix ObjC style guesser to also iterate over child lines

2018-03-23 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked an inline comment as done. benhamilton added inline comments. Comment at: cfe/trunk/lib/Format/Format.cpp:1544 +return true; + for (auto ChildLine : Line->Children) { +if (LineContainsObjCCode(*ChildLine)) benhamilton

[PATCH] D41240: [Solaris] __float128 is supported on Solaris/x86

2018-03-23 Thread Fedor Sergeev via Phabricator via cfe-commits
fedor.sergeev accepted this revision. fedor.sergeev added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang https://reviews.llvm.org/D41240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44854: [analyzer] Be more careful about C++17 copy elision.

2018-03-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. Just wanted to play safer in a couple of places. In https://reviews.llvm.org/D44597 i said: > If the object has trivial destructor then

[PATCH] D44130: Driver: Add gcc search path for RHEL devtoolset-7

2018-03-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D44130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D42608: Driver: Prefer vendor supplied gcc toolchain

2018-03-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. The change seems fine. Perhaps add tests to make sure this won't cause problems in the future? Something along the lines of test/Driver/linux-ld.c? Repository: rC Clang https://reviews.llvm.org/D42608 ___ cfe-commits

[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

2018-03-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: test/CXX/except/except.spec/libc-empty-except.cpp:3 +// RUN: not %clang_cc1 -std=c++11 -I %S/libc-empty-except-sys -fexceptions -fcxx-exceptions -fsyntax-only -verify %s + +// expected-no-diagnostics Since this is

[PATCH] D34848: Driver: Don't mix system tools with devtoolset tools on RHEL

2018-03-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Is there a way to test this? Comment at: lib/Driver/ToolChains/Linux.cpp:220 + "/../bin").str()); + } + You can remove the curly braces here. https://reviews.llvm.org/D34848

[PATCH] D44846: [MS] Fix late-parsed template infinite loop in eager instantiation

2018-03-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Sema/Sema.cpp:855 // instantiations. PCH files do not. if (TUKind != TU_Prefix) { DiagnoseUseOfUnimplementedSelectors();

[PATCH] D44842: Add Parameters to DW_AT_name Attribute of Template Variables

2018-03-23 Thread Matthew Voss via Phabricator via cfe-commits
ormris added a project: debug-info. ormris added a comment. Adding debug-info project tag. Repository: rC Clang https://reviews.llvm.org/D44842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r328380 - Change for an LLVM header file move

2018-03-23 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Fri Mar 23 15:16:59 2018 New Revision: 328380 URL: http://llvm.org/viewvc/llvm-project?rev=328380=rev Log: Change for an LLVM header file move Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp URL:

[PATCH] D44844: [PR36880] Avoid -Wunused-lambda-capture false positive for explicit this capture used in an unresolved member in a generic lambda

2018-03-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/TreeTransform.h:11269 +// 'this' capture is marked as 'used'. +if (Old->isImplicitCXXThisAccess()) + getSema().CheckCXXThisCapture(Old->getMemberNameInfo().getLoc(), efriedma wrote: > This doesn't

[PATCH] D44852: [CodeGen] Mark fma as const for Android

2018-03-23 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama created this revision. pirama added reviewers: spatel, efriedma, srhines, chh, enh. Herald added a subscriber: cfe-commits. r318093 sets fma, fmaf, fmal as const for Gnu and MSVC. Android also does not set errno for these functions. So mark these const for Android. Repository: rC

[PATCH] D37302: [Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBL

2018-03-23 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama updated this revision to Diff 139667. pirama added a comment. - [CodeGen] Mark fma as const for Android Repository: rC Clang https://reviews.llvm.org/D37302 Files: lib/Headers/float.h lib/Sema/SemaDecl.cpp test/CodeGen/math-builtins.c test/Headers/float.c Index:

[PATCH] D37302: [Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBL

2018-03-23 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama updated this revision to Diff 139670. pirama added a comment. Remove unexpected change from another patch. Repository: rC Clang https://reviews.llvm.org/D37302 Files: lib/Headers/float.h test/Headers/float.c Index: test/Headers/float.c

[PATCH] D44798: [libFuzzer] Use OptForFuzzing attribute with -fsanitize=fuzzer.

2018-03-23 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 139673. morehouse added a comment. - Remove new substitutions. Use -O0 to avoid optimization. https://reviews.llvm.org/D44798 Files: clang/lib/CodeGen/CodeGenFunction.cpp compiler-rt/test/fuzzer/SimpleCmpTest.cpp

[PATCH] D44846: [MS] Fix late-parsed template infinite loop in eager instantiation

2018-03-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 139663. rnk added a comment. - make late-parsed templates pending at end of TU prefix https://reviews.llvm.org/D44846 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

[PATCH] D44846: [MS] Fix late-parsed template infinite loop in eager instantiation

2018-03-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/Sema/Sema.cpp:855 // instantiations. PCH files do not. if (TUKind != TU_Prefix) { DiagnoseUseOfUnimplementedSelectors(); rsmith wrote: > In the TUPrefix case, we'll need to write these instantiations to

r328384 - [libFuzzer] Use OptForFuzzing attribute with -fsanitize=fuzzer.

2018-03-23 Thread Matt Morehouse via cfe-commits
Author: morehouse Date: Fri Mar 23 16:35:28 2018 New Revision: 328384 URL: http://llvm.org/viewvc/llvm-project?rev=328384=rev Log: [libFuzzer] Use OptForFuzzing attribute with -fsanitize=fuzzer. Summary: Disables certain CMP optimizations to improve fuzzing signal under -O1 and -O2. Switches

[PATCH] D37302: [Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBL

2018-03-23 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama updated this revision to Diff 139666. pirama added a comment. - [CodeGen] Mark fma as const for Android Repository: rC Clang https://reviews.llvm.org/D37302 Files: lib/Headers/float.h lib/Sema/SemaDecl.cpp test/CodeGen/math-builtins.c test/Headers/float.c Index:

[PATCH] D44798: [libFuzzer] Use OptForFuzzing attribute with -fsanitize=fuzzer.

2018-03-23 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328384: [libFuzzer] Use OptForFuzzing attribute with -fsanitize=fuzzer. (authored by morehouse, committed by ). Changed prior to commit: https://reviews.llvm.org/D44798?vs=139673=139675#toc

[libcxx] r328388 - Partially Revert "Workaround GCC bug PR78489 - SFINAE order is not respected."

2018-03-23 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Mar 23 16:42:30 2018 New Revision: 328388 URL: http://llvm.org/viewvc/llvm-project?rev=328388=rev Log: Partially Revert "Workaround GCC bug PR78489 - SFINAE order is not respected." This partially reverts commit r328261. The GCC bug has been fixed in trunk and has never

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-23 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D44826#1046671, @erichkeane wrote: > My opinion matters less than @rsmith or @dblaikie on the review, but it seems > to me that Typedef and Using are SO similar that the implementations should > just be combined. You'd likely

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D44765#1045789, @obfuscated wrote: > In https://reviews.llvm.org/D44765#1045373, @alexfh wrote: > > > We can't just treat `anything("")` like the _T macro. There should be a > > whitelist configurable with an option. By default only _T

[PATCH] D44753: [Preprocessor] Rename __is_{target -> host}_* function-like builtin macros

2018-03-23 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 added a comment. Bummer, I didn't realize this had already shipped. I'm happy to discuss on the mailing list. Indeed I responded there first but it would appear nobody saw my message. Should I reply to my own message

[PATCH] D41456: [clang-tidy] readability-else-after-return: also diagnose noreturn function calls.

2018-03-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. The problem with this proposed functionality is that it's not always obvious at the call site whether a function is noreturn. exit() may be an easy case, but there may be much less

Re: A proposal for adding OpenCL C++ support (Spec v2.2)

2018-03-23 Thread Anastasia Stulova via cfe-commits
There were no objections to this so far. I assume it means nobody is opposing this new feature. Just to give a bit more info and a chance for the last feedback. We don't plan to contribute the whole patch but only around 3K lines + tests. The overall changes will be smaller than OpenCL 2.0.

[PATCH] D44646: Sema: in msvc compatibility mode, don't allow forceinline on variadics

2018-03-23 Thread Dustin L. Howett via Phabricator via cfe-commits
DHowett-MSFT marked 5 inline comments as done. DHowett-MSFT added a comment. @compnerd CL warns for `__forceinline` variadics in C code as well: test.c(1): warning C4714: function 'void hello(int,...)' marked as __forceinline not inlined Repository: rC Clang

r328337 - [vfs] Don't bail out after a missing -ivfsoverlay file

2018-03-23 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Fri Mar 23 10:37:27 2018 New Revision: 328337 URL: http://llvm.org/viewvc/llvm-project?rev=328337=rev Log: [vfs] Don't bail out after a missing -ivfsoverlay file This make -ivfsoverlay behave more like other fatal errors (e.g. missing -include file) by skipping the

r328409 - [C++17] Fix class template argument deduction for default constructors without an initializer

2018-03-23 Thread Zhihao Yuan via cfe-commits
Author: lichray Date: Fri Mar 23 21:32:11 2018 New Revision: 328409 URL: http://llvm.org/viewvc/llvm-project?rev=328409=rev Log: [C++17] Fix class template argument deduction for default constructors without an initializer Summary: As the title says, this makes following code compile: ```

[PATCH] D38216: [C++17] Fix class template argument deduction for default constructors without an initializer

2018-03-23 Thread Zhihao Yuan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328409: [C++17] Fix class template argument deduction for default constructors without… (authored by lichray, committed by ). Repository: rC Clang https://reviews.llvm.org/D38216 Files:

[PATCH] D44747: Set calling convention for CUDA kernel

2018-03-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/Type.cpp:2762 + case CC_CUDAKernel: +return "cuda_kernel"; } For consistency with the rest of this switch, please put the return on the same line as its case. Comment at: