r363230 - clang-format extension: Widen the supported versions range

2019-06-13 Thread Hans Wennborg via cfe-commits
Author: hans Date: Thu Jun 13 00:07:24 2019 New Revision: 363230 URL: http://llvm.org/viewvc/llvm-project?rev=363230&view=rev Log: clang-format extension: Widen the supported versions range So that it covers also the latest VS 2019 version. By Antonio Maiorano! Modified: cfe/trunk/tools/cla

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204437. jvikstrom marked an inline comment as done. jvikstrom added a comment. - Added default to switch for language modes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D6

[PATCH] D63227: [analyzer] Better timers.

2019-06-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. Looks good :) More diagnostics are always welcome. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63227/new/ https://reviews.llvm.org/D63227 __

[PATCH] D63227: [analyzer] Better timers.

2019-06-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:228 -ExprEngine::~ExprEngine() { - BR.FlushReports(); Hmm. Maybe add an assert that all the bug reports are flushed at this point? Just to make sure we never need this :

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204442. jvikstrom added a comment. - Updated outdated docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149 Files: clang/docs/LibASTMatchersReference.html clang/in

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204443. jvikstrom marked an inline comment as done. jvikstrom added a comment. - Removed dependency on unordered map Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149 F

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. looks most good to me, a few nits. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6488 + } + return InnerMatcher.matches(*CtorExpr, Finder, Builder); +} This `return` statement is not needed. C

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204447. jvikstrom marked 3 inline comments as done. jvikstrom added a comment. - Removed unnecessary return Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149 Files: c

[PATCH] D63245: clang-scan-deps: Fix -DBUILD_SHARED_LIBS=ON build

2019-06-13 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: cfe-commits, tschuett, aheejin, mgorny. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63245 Files: clang/tools/clang-scan-deps/CMakeLists.txt Index: clang/tools/clang-scan-deps/CMakeLists

[PATCH] D63222: [Clangd] Fixed clangd diagnostics priority

2019-06-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Mostly LG, just a few re-orderings to make code more readable and get rid of redundant Lexer calls. Comment at: clang-tools-extra/clangd/Diagnostics.cpp:108 + // Otherwise use zero width insertion range auto R = Lexer::makeFileCharRange(CharSource

[PATCH] D62839: [clangd] Index API and implementations for relations

2019-06-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/Index.h:77 +struct RelationsRequest { + SymbolID Subject; + index::SymbolRole Predicate; nridge wrote: > kadircet wrote: > > sorry for missing it in previous iteration. but this should a

[clang-tools-extra] r363237 - [clangd] Treat lambdas as functions when preparing hover response

2019-06-13 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Thu Jun 13 01:51:44 2019 New Revision: 363237 URL: http://llvm.org/viewvc/llvm-project?rev=363237&view=rev Log: [clangd] Treat lambdas as functions when preparing hover response Reviewers: sammccall, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, cfe-commits Tags:

[PATCH] D62814: [clangd] Treat lambdas as functions when preparing hover response

2019-06-13 Thread Kadir Cetinkaya 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 rL363237: [clangd] Treat lambdas as functions when preparing hover response (authored by kadircet, committed by ). Herald ad

r363238 - [clang-scan-deps] Fix -DBUILD_SHARED_LIBS=ON build

2019-06-13 Thread Sam Clegg via cfe-commits
Author: sbc Date: Thu Jun 13 01:58:46 2019 New Revision: 363238 URL: http://llvm.org/viewvc/llvm-project?rev=363238&view=rev Log: [clang-scan-deps] Fix -DBUILD_SHARED_LIBS=ON build The -DBUILD_SHARED_LIBS=ON build was broken in rL363204 Differential Revision: https://reviews.llvm.org/D63245 Mod

[PATCH] D63245: clang-scan-deps: Fix -DBUILD_SHARED_LIBS=ON build

2019-06-13 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 rL363238: [clang-scan-deps] Fix -DBUILD_SHARED_LIBS=ON build (authored by sbc, committed by ). Herald added a project: LLVM.

[PATCH] D62944: [Driver] Fix wchar_t and wint_t definitions on Solaris

2019-06-13 Thread Rainer Orth via Phabricator via cfe-commits
ro added a comment. Ping? This has been a week, too. According to gcc/config headers, there are quite a number of targets with long int for wchar_t/wint_t, so there should be some generic way to handle the Clang :: Sema/format-strings.c failure. Suggestions? Repository: rC Clang CHANGES

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. thanks, looks good to me. I'll commit for you. @gribozavr do you want to take another look on the patch? Comment at: clang/unittests/ASTMatchers/ASTMatchersTest.h:153 + cas

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTest.h:153 + case LanguageMode::Cxx2aOrLater: +LangModes = {LanguageMode::Cxx2a}; + } hokein wrote: > nit: add a llvm_unreachable

[PATCH] D63030: [WebAssembly] Modernize include path handling

2019-06-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363241: [WebAssembly] Modernize include path handling (authored by sbc, committed by ). Herald added subscribers: llvm-commits, ormris. Herald added a project: LLVM. Changed prior to commit: https://rev

r363241 - [WebAssembly] Modernize include path handling

2019-06-13 Thread Sam Clegg via cfe-commits
Author: sbc Date: Thu Jun 13 02:42:43 2019 New Revision: 363241 URL: http://llvm.org/viewvc/llvm-project?rev=363241&view=rev Log: [WebAssembly] Modernize include path handling Move include path construction from InitHeaderSearch::AddDefaultIncludePaths in the Driver which appears to be the more m

r363242 - [OpenCL] Move OpenCLBuiltins.td and remove unused include

2019-06-13 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Thu Jun 13 02:54:22 2019 New Revision: 363242 URL: http://llvm.org/viewvc/llvm-project?rev=363242&view=rev Log: [OpenCL] Move OpenCLBuiltins.td and remove unused include Patch by Pierre Gondois. Differential revision: https://reviews.llvm.org/D62849 Added: cfe/trunk/lib

[PATCH] D63222: [Clangd] Fixed clangd diagnostics priority

2019-06-13 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 204467. SureYeaah added a comment. Refactored code as pointed out by @kadircet Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63222/new/ https://reviews.llvm.org/D63222 Files: clang-tools-extra/clangd/Diagno

[PATCH] D63222: [Clangd] Fixed clangd diagnostics priority

2019-06-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Also please make sure you've clang-formatted the code before you land this. Comment at: clang-tools-extra/clangd/Diagnostics.cpp:94 } llvm::Optional

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:36 Cmd.CommandLine = ArgsAdjuster(Cmd.CommandLine, Cmd.Filename); + tooling::addTargetAndModeForProgramName(Cmd.CommandLine, Cmd.CommandLine[0]); // Inject the resource dir.

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 204484. kadircet marked an inline comment as done. kadircet added a comment. - Move target name deduction into Driver Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63194/new/ https://reviews.llvm.org/D63194 F

[PATCH] D61637: [Syntax] Introduce syntax trees

2019-06-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 204488. ilya-biryukov marked 7 inline comments as done. ilya-biryukov added a comment. - A leaf node stores a single token - Restructure code to avoid special-casing leaf nodes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D63222: [Clangd] Fixed clangd diagnostics priority

2019-06-13 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 204489. SureYeaah marked 4 inline comments as done. SureYeaah added a comment. Simplified logic for diagnostics range. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63222/new/ https://reviews.llvm.org/D63222

[PATCH] D61637: [Syntax] Introduce syntax trees

2019-06-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This is not 100% ready yet, but wanted to send it out anyway, as I'll be on vacation until Tuesday. I've addressed most major comments. In particular, `TreeBuilder` now looks simpler (and more structured) to my taste. One thing that's missing is adding children i

[PATCH] D63222: [Clangd] Fixed clangd diagnostics priority

2019-06-13 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 204494. SureYeaah marked 2 inline comments as done. SureYeaah added a comment. Formatted code Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63222/new/ https://reviews.llvm.org/D63222 Files: clang-tools-extr

[PATCH] D63253: [clang-tidy] Made abseil-faster-strsplit-delimiter tests pass on C++17

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added a reviewer: hokein. Herald added a subscriber: xazax.hun. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63253 Files: clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp clang-to

[PATCH] D63253: [clang-tidy] Made abseil-faster-strsplit-delimiter tests pass on C++17

2019-06-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. looks good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63253/new/ https://reviews.llvm.org/D63253

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. Nice, thanks! The clangd parts obviously LGTM, but let's be more conservative with the driver bits (see the relevant comment) Comment at: clang-tools-extra/clangd/test/target_info.test:28 +} +# Make

[clang-tools-extra] r363253 - [Clangd] Fixed clangd diagnostics priority

2019-06-13 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Thu Jun 13 05:31:36 2019 New Revision: 363253 URL: http://llvm.org/viewvc/llvm-project?rev=363253&view=rev Log: [Clangd] Fixed clangd diagnostics priority Summary: - Fixed diagnostics where zero width inserted ranges were being used instead of the whole token - Added unit

[PATCH] D63222: [Clangd] Fixed clangd diagnostics priority

2019-06-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363253: [Clangd] Fixed clangd diagnostics priority (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-13 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: asavonic. Herald added subscribers: cfe-commits, jfb, yaxunl, mgorny. Herald added a project: clang. Using the -fdeclare-opencl-builtins option will require a way to predefine types and macros such as `int4`, `CLK_GLOBAL_MEM_FENCE`, etc. Move

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. xbolva00 added reviewers: aaron.ballman, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D63260 Files: include/clang/Basic/Attr.td lib/Parse/ParseStmt.cpp lib/Sema/AnalysisBasedWa

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: test/Sema/block-literal.c:44 takeblock(^{ x = 4; }); // expected-error {{variable is not assignable (missing __block type specifier)}} - __block y = 7;// expected-warning {{type speci

[PATCH] D63261: [clang-tidy] Fixed abseil-time-subtraction to work on C++17

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, gribozavr. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Fixed abseil-time-subtraction to work on C++17 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63261 Files: clang-to

[PATCH] D63262: [clang-tidy] Made abseil-upgrade-duration-conversions tests pass on c++17

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, gribozavr. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Made abseil-upgrade-duration-conversions tests pass on c++17 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63262 Fil

[PATCH] D63263: [clang-tidy] Fixed abseil-duration-unnecessary-conversion tests for c++17

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, gribozavr. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Fixed abseil-duration-unnecessary-conversion tests for c++17 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63263 Fil

[PATCH] D63127: [clang-tidy] Fixed checker for abseil to work in C++17 mode

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom abandoned this revision. jvikstrom added a comment. Resubmitted as 4 different CLs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63127/new/ https://reviews.llvm.org/D63127 ___ cfe-commits mai

[PATCH] D63261: [clang-tidy] Fixed abseil-time-subtraction to work on C++17

2019-06-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp:45 + match(callExpr(hasParent(varDecl())).bind("e"), + *Node, *Result.Context)) != nullptr; }

r363262 - Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Thu Jun 13 06:48:24 2019 New Revision: 363262 URL: http://llvm.org/viewvc/llvm-project?rev=363262&view=rev Log: Added AST matcher for ignoring elidable constructors Summary: Added AST matcher for ignoring elidable move constructors Reviewers: hokein, gribozavr Reviewed B

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363262: Added AST matcher for ignoring elidable constructors (authored by gribozavr, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https

[clang-tools-extra] r363263 - [clang-tidy] Fixed abseil-duration-unnecessary-conversion tests for c++17

2019-06-13 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Thu Jun 13 06:52:45 2019 New Revision: 363263 URL: http://llvm.org/viewvc/llvm-project?rev=363263&view=rev Log: [clang-tidy] Fixed abseil-duration-unnecessary-conversion tests for c++17 Summary: Fixed abseil-duration-unnecessary-conversion tests for c++17 Reviewers: hokei

[PATCH] D63263: [clang-tidy] Fixed abseil-duration-unnecessary-conversion tests for c++17

2019-06-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363263: [clang-tidy] Fixed abseil-duration-unnecessary-conversion tests for c++17 (authored by gribozavr, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed pr

[PATCH] D63264: [clang][Driver] Deduce target triplet from clang executable name

2019-06-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added a project: clang. Herald added a subscriber: cfe-commits. kadircet added a child revision: D63194: [clangd] Link in target infos and pass target and mode while invoking driver. Herald added a subscriber: ormris.

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 3 inline comments as done. kadircet added inline comments. Comment at: clang/lib/Driver/Driver.cpp:1055 + else if (ClangNameParts.TargetIsValid) +TargetTriple = ClangNameParts.TargetPrefix; + ilya-biryukov wrote: > I strongly think the driver

[clang-tools-extra] r363270 - [clang-tidy] Made abseil-upgrade-duration-conversions tests pass on c++17

2019-06-13 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Thu Jun 13 07:27:54 2019 New Revision: 363270 URL: http://llvm.org/viewvc/llvm-project?rev=363270&view=rev Log: [clang-tidy] Made abseil-upgrade-duration-conversions tests pass on c++17 Summary: Made abseil-upgrade-duration-conversions tests pass on c++17 Reviewers: hokei

[PATCH] D63262: [clang-tidy] Made abseil-upgrade-duration-conversions tests pass on c++17

2019-06-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363270: [clang-tidy] Made abseil-upgrade-duration-conversions tests pass on c++17 (authored by gribozavr, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed pr

[PATCH] D63261: [clang-tidy] Fixed abseil-time-subtraction to work on C++17

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204538. jvikstrom marked an inline comment as done. jvikstrom added a comment. Using anyOf instead of multiple selectFirsts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63261/new/ https://reviews.llvm.org/D6

[PATCH] D63270: [clangd] Add include-mapping for C symbols.

2019-06-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: jfb, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This resolves the issue of introducing c++-style includes for C files. - refactor the gen_std.py, make it reusable for parsing

[clang-tools-extra] r363272 - [clang-tidy] Fixed abseil-time-subtraction to work on C++17

2019-06-13 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Thu Jun 13 08:11:02 2019 New Revision: 363272 URL: http://llvm.org/viewvc/llvm-project?rev=363272&view=rev Log: [clang-tidy] Fixed abseil-time-subtraction to work on C++17 Summary: Fixed abseil-time-subtraction to work on C++17 Reviewers: hokein, gribozavr Subscribers: x

[PATCH] D63261: [clang-tidy] Fixed abseil-time-subtraction to work on C++17

2019-06-13 Thread Dmitri Gribenko 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 rL363272: [clang-tidy] Fixed abseil-time-subtraction to work on C++17 (authored by gribozavr, committed by ). Herald added a

[clang-tools-extra] r363273 - [clang-tidy] Made abseil-faster-strsplit-delimiter tests pass on C++17

2019-06-13 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Thu Jun 13 08:16:44 2019 New Revision: 363273 URL: http://llvm.org/viewvc/llvm-project?rev=363273&view=rev Log: [clang-tidy] Made abseil-faster-strsplit-delimiter tests pass on C++17 Reviewers: hokein, gribozavr Reviewed By: hokein, gribozavr Subscribers: xazax.hun, cfe-

[PATCH] D63253: [clang-tidy] Made abseil-faster-strsplit-delimiter tests pass on C++17

2019-06-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363273: [clang-tidy] Made abseil-faster-strsplit-delimiter tests pass on C++17 (authored by gribozavr, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D63276: [AST] Add FunctionDecl::getParametersSourceRange()

2019-06-13 Thread Nicolas Manichon via Phabricator via cfe-commits
nicolas created this revision. nicolas added reviewers: rsmith, steveire. Herald added a project: clang. Herald added a subscriber: cfe-commits. This source range covers the list of parameters of the function declaration. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63276 Fi

[PATCH] D63277: Don't set "comdat" attribute for CUDA device stub functions.

2019-06-13 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov created this revision. kpyzhov added a reviewer: rjmccall. kpyzhov added projects: clang, AMDGPU. Herald added a subscriber: cfe-commits. When compiling the HOST part of CUDA programs, clang replaces device kernels with so-called "stub" functions that contains a few calls to the Runtime A

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 204554. Szelethus added a comment. - Resolved some reviewer comments - Added a `BugReport` level set to avoid tracking the same condition (which would result in an almost infinite loop) Aaaand I have some results to show: http://cc.elte.hu:15001/Default/#

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 6 inline comments as done. Szelethus added inline comments. Comment at: clang/test/Analysis/track-control-dependency-conditions.cpp:34 + + foo(); // TODO: Add nodes here about flag's value being invalidated. + if (flag) // expected-note {{Taking false branch}

[PATCH] D63279: [Analyzer] Unroll for-loops where the upper boundary is a variable with know value

2019-06-13 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: NoQ, szepet, Szelethus. baloghadamsoftware added a project: clang. Herald added subscribers: Charusso, gamesh411, donat.nagy, mikhail.ramalho, dmgreen, a.sidorin, zzheng, rnkovacs, xazax.hun, whisperity. For-loops with

[PATCH] D63153: [clang][NewPM] Fix broken -O0 test from the AlwaysInliner

2019-06-13 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363277: [clang][NewPM] Fix broken -O0 test from the AlwaysInliner (authored by leonardchan, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r363277 - [clang][NewPM] Fix broken -O0 test from the AlwaysInliner

2019-06-13 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Thu Jun 13 09:45:29 2019 New Revision: 363277 URL: http://llvm.org/viewvc/llvm-project?rev=363277&view=rev Log: [clang][NewPM] Fix broken -O0 test from the AlwaysInliner This contains the part of D62225 which prevents insertion of lifetime intrinsics when creating the Al

[PATCH] D63153: [clang][NewPM] Fix broken -O0 test from the AlwaysInliner

2019-06-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D63153#1540920 , @chandlerc wrote: > Code change LGTM. Can you update at least one of the tests to explicitly run > both PMs so that we'll notice if this breaks in some weird way? Feel free to > submit with that change.

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thanks for the patch, I look forward to this feature! I think the changes in `test/SemaCXX/warn-unused-label-error.cpp`, `test/Sema/block-literal.c`, and `test/Sema/address_spaces.c` should not be committed (2 look like unrelated cleanups?).

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I marked reports, confusingly, "Confirmed" if the extra notes were meaningful, "Intentional" if they were meaningless, and "False positive" if it's in between. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62883/new/ https://reviews.llvm.org/D62883 ___

[PATCH] D63283: PR42182: Allow thread-local to use __cxa_thread_atexit when -fno-use-cxx-atexit is used

2019-06-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: jyu2, rnk, ahatanak, rjmccall, jyknight. Herald added a subscriber: dexonsmith. Herald added a project: clang. This matches the GCC behavior, __cxa_thread_atexit should be permissible even though cxa_atexit is disabled. Repository:

r363278 - [clang][NewPM] Fix broken profile test

2019-06-13 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Thu Jun 13 10:25:36 2019 New Revision: 363278 URL: http://llvm.org/viewvc/llvm-project?rev=363278&view=rev Log: [clang][NewPM] Fix broken profile test This contains the part of D62225 which fixes Profile/gcc-flag-compatibility.c by adding the pass that allows default pro

[PATCH] D63155: [clang][NewPM] Fix broken profile test

2019-06-13 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363278: [clang][NewPM] Fix broken profile test (authored by leonardchan, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked 5 inline comments as done. xbolva00 added inline comments. Comment at: lib/Parse/ParseStmt.cpp:110-111 assert((Attrs.empty() || Res.isInvalid() || Res.isUsable()) && "attributes on empty statement"); nickdesaulniers wrote: > Would

[PATCH] D63287: [clang-tidy] Make ClangTidyCheck::OptionsView public.

2019-06-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a subscriber: xazax.hun. Herald added a project: clang. The `OptionsView` class is currently protected. This constraint prevents tidies from passing the OptionsView to, for example, a helper function. Similarly, Tra

r363281 - [clang][NewPM] Fix split debug test

2019-06-13 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Thu Jun 13 10:40:03 2019 New Revision: 363281 URL: http://llvm.org/viewvc/llvm-project?rev=363281&view=rev Log: [clang][NewPM] Fix split debug test This contains the part of D62225 which fixes CodeGen/split-debug-single-file.c by not placing .dwo sections when using -ena

[PATCH] D63168: [clang][NewPM] Fix split debug test

2019-06-13 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363281: [clang][NewPM] Fix split debug test (authored by leonardchan, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

[PATCH] D63288: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a subscriber: xazax.hun. Herald added a project: clang. ymandel added a parent revision: D63287: [clang-tidy] Make ClangTidyCheck::OptionsView public.. Tidy check behavior often depends on language and/or clang-tidy

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. __block y = 7; if (Tok.is(tok::kw___attribute)) printf("__attr\n"); Output: __attr Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 ___ cfe-commi

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: test/Sema/block-literal.c:44 takeblock(^{ x = 4; }); // expected-error {{variable is not assignable (missing __block type specifier)}} - __block y = 7;// expected-warning {{type speci

[PATCH] D63288: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp:33 +StringRef Name, ClangTidyContext *Context) +: ClangTidyCheck(Name, Context)

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 204583. xbolva00 added a comment. Addressed some review notes. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 Files: include/clang/Basic/Attr.td lib/Parse/ParseStmt.cpp lib/Sema/AnalysisBased

[PATCH] D63270: [clangd] Add include-mapping for C symbols.

2019-06-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/include-mapping/cppreference_parser.py:1 -#!/usr/bin/env python -#===- gen_std.py - --*- python -*--===# could we add a similar License and header comme

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 204584. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 Files: include/clang/Basic/Attr.td lib/Parse/ParseStmt.cpp lib/Sema/AnalysisBasedWarnings.cpp test/Sema/address_spaces.c test/Sema/block-liter

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked 2 inline comments as done. xbolva00 added inline comments. Comment at: test/Sema/address_spaces.c:12 { - _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}} + _AS2 *x;// expected-error {{use of undeclared identifier 'x'}} _AS1 float * _

[PATCH] D62944: [Driver] Fix wchar_t and wint_t definitions on Solaris

2019-06-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. For format-strings.c, I'm not really happy suggesting `#if defined(__sun) && !defined(__LP64__)`, but I don't think the alternative is better. We could restrict the test so it doesn't run using a Solaris target triple, but we actually want coverage here: the differenc

[PATCH] D63283: PR42182: Allow thread-local to use __cxa_thread_atexit when -fno-use-cxx-atexit is used

2019-06-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2370 + if (CGM.getCodeGenOpts().CXAAtExit || D.getTLSKind()) return emitGlobalDtorWithCXAAtExit(CGF, dtor, addr, D.getTLSKind()); It's fine to match the GCC behavior, and it's

[PATCH] D63288: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added a comment. Thanks for the review! Comment at: clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp:33 +StringRef Name, ClangTidyContext *Context) +: ClangTidyCheck(Name, Context), Rule(MakeRule(getLangO

[PATCH] D62914: [Sema] Fix diagnostic for addr spaces in reference binding

2019-06-13 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. I like this wording of the diagnostic better in general. Could you make the diagnostic change in a separate patch and then fix the address-space problem? Both patches are approved. CHA

[PATCH] D63283: PR42182: Allow thread-local to use __cxa_thread_atexit when -fno-use-cxx-atexit is used

2019-06-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 204587. erichkeane marked an inline comment as done. erichkeane added a comment. Update the comment as requested by @rjmccall CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63283/new/ https://reviews.llvm.org/D63283 Files: clang/lib/CodeGen/Ita

[PATCH] D62825: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast

2019-06-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In what sense is the bit-pattern of a null pointer indeterminate? It's implementation-specified, but the compiler is certainly required to be able to produce that value during the constant initialization phase. If the language committee wants to make this non-constan

r363287 - [clang][NewPM] Fix broken -O0 test from missing assumptions

2019-06-13 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Thu Jun 13 11:18:40 2019 New Revision: 363287 URL: http://llvm.org/viewvc/llvm-project?rev=363287&view=rev Log: [clang][NewPM] Fix broken -O0 test from missing assumptions Add an AssumptionCache callback to the InlineFuntionInfo used for the AlwaysInlinerPass to match co

[PATCH] D63283: PR42182: Allow thread-local to use __cxa_thread_atexit when -fno-use-cxx-atexit is used

2019-06-13 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63283/new/ https://reviews.llvm.org/D63283 ___ cfe-commits mailing list cfe-co

r363288 - PR42182: Allow thread-local to use __cxa_thread_atexit when

2019-06-13 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Thu Jun 13 11:20:19 2019 New Revision: 363288 URL: http://llvm.org/viewvc/llvm-project?rev=363288&view=rev Log: PR42182: Allow thread-local to use __cxa_thread_atexit when -fno-use-cxx-atexit is used This matches the GCC behavior, __cxa_thread_atexit should be permissible

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:1279 continue; - if (S.getLangOpts().CPlusPlus11) { + if (S.getLangOpts().CPlusPlus11 || S.getLangOpts().C99) { const Stmt *Term = B->getTerminatorStmt(); ---

[PATCH] D63157: C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression.

2019-06-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 204589. rsmith marked 2 inline comments as done. rsmith added a comment. Updated comment, fixed typo, added use of `[[clang::lifetimebound]]`. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63157/new/ https://reviews.llvm.org/D

[PATCH] D63170: [clang][NewPM] Fix broken -O0 test from missing assumptions

2019-06-13 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363287: [clang][NewPM] Fix broken -O0 test from missing assumptions (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D63170?vs=204174&id=204590#toc Repository

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. > but as part of this commit but *not* as part of this commit CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: test/Sema/address_spaces.c:12 { - _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}} + _AS2 *x;// expected-error {{use of undeclared identifier 'x'}} _AS1 float * _AS2 *B; xbolva00 wrote: >

[PATCH] D63157: C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression.

2019-06-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:1429 +/// for instance if a block or lambda or a member of a local class uses a +/// const int variable or constexpr variable from an enclosing function. CodeGenFunction::ConstantEmission rjmccall

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/address_spaces.c:12 { - _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}} + _AS2 *x;// expected-error {{use of undeclared identifier 'x'}} _AS1 float * _AS2 *B; efriedma wr

[PATCH] D63290: Unify DependencyFileGenerator class and DependencyCollector interface

2019-06-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: Bigcheese, vsapsai, bruno, aganea. Herald added subscribers: dexonsmith, jkorous. Herald added a project: clang. This NFCI patch makes DependencyFileGenerator a DependencyCollector as it was intended when DependencyCollector was introduced

[PATCH] D62825: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast

2019-06-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D62825#1542247 , @rjmccall wrote: > In what sense is the bit-pattern of a null pointer indeterminate? The problem is not null pointers, it's `nullptr_t`, which is required to have the same size and alignment as `void*` but whi

[PATCH] D63157: C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression.

2019-06-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Minor comment request, then LGTM. Comment at: lib/CodeGen/CGDecl.cpp:1102 + // Form a simple per-variable LRU cache of these values in case we find we + // want to reuse them. + llvm::GlobalVariable *&CacheEntry = InitializerConstants[&D]; -

  1   2   >