[PATCH] D43510: [clangd] don't insert new includes if either original header or canonical header is already included.

2018-02-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 135857. ioeric marked an inline comment as done. ioeric added a comment. - Merge with origin/master - Use llvm::StringSet Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43510 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp cl

[clang-tools-extra] r326070 - [clangd] don't insert new includes if either original header or canonical header is already included.

2018-02-26 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Feb 26 00:32:13 2018 New Revision: 326070 URL: http://llvm.org/viewvc/llvm-project?rev=326070&view=rev Log: [clangd] don't insert new includes if either original header or canonical header is already included. Summary: Changes: o Store both the original header and the ca

[PATCH] D43510: [clangd] don't insert new includes if either original header or canonical header is already included.

2018-02-26 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326070: [clangd] don't insert new includes if either original header or canonical… (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-26 Thread Igor Kudrin via Phabricator via cfe-commits
ikudrin added a comment. Not all toolchains call `ToolChain::GetLinkerPath`. For example, MSVC toolchain uses its own code: void visualstudio::Linker::ConstructJob(...) { ... StringRef Linker = Args.getLastArgValue(options::OPT_fuse_ld_EQ, "link"); if (Linker.equals_lower("lld"))

[PATCH] D43162: [Parser] (C++) Make -Wextra-semi slightly more useful

2018-02-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ping. Repository: rC Clang https://reviews.llvm.org/D43162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r326081 - [Support] Replace HashString with djbHash.

2018-02-26 Thread Jonas Devlieghere via cfe-commits
Author: jdevlieghere Date: Mon Feb 26 03:30:13 2018 New Revision: 326081 URL: http://llvm.org/viewvc/llvm-project?rev=326081&view=rev Log: [Support] Replace HashString with djbHash. This removes the HashString function from StringExtraces and replaces its uses with calls to djbHash from DJB.h Th

r326082 - Revert "[Support] Replace HashString with djbHash."

2018-02-26 Thread Jonas Devlieghere via cfe-commits
Author: jdevlieghere Date: Mon Feb 26 04:05:18 2018 New Revision: 326082 URL: http://llvm.org/viewvc/llvm-project?rev=326082&view=rev Log: Revert "[Support] Replace HashString with djbHash." It looks like some of our tests depend on the ordering of hashed values. I'm reverting my changes while I

r326083 - Explicitly initialize ForceEnableInt128 to avoid UB

2018-02-26 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Feb 26 04:06:05 2018 New Revision: 326083 URL: http://llvm.org/viewvc/llvm-project?rev=326083&view=rev Log: Explicitly initialize ForceEnableInt128 to avoid UB This fixes an uninitialized value read found by msan. Modified: cfe/trunk/include/clang/Basic/TargetOpti

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-26 Thread Igor Kudrin via Phabricator via cfe-commits
ikudrin updated this revision to Diff 135888. ikudrin added a comment. - Add a test. https://reviews.llvm.org/D43621 Files: lib/Driver/ToolChain.cpp test/Driver/Inputs/fuse_ld_windows/ld.foo.exe test/Driver/fuse-ld-windows.c Index: test/Driver/fuse-ld-windows.c =

[PATCH] D43732: Resolve build bot problems in unittests/Format/FormatTest.cpp

2018-02-26 Thread Bjorn Pettersson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326086: Resolve build bot problems in unittests/Format/FormatTest.cpp (authored by bjope, committed by ). Changed prior to commit: https://reviews.llvm.org/D43732?vs=135794&id=135891#toc Repository:

[PATCH] D43500: [clang-tidy]: modernize-use-default-member-init: Remove trailing comma and colon.

2018-02-26 Thread Jeremy Demeule via Phabricator via cfe-commits
jdemeule updated this revision to Diff 135895. jdemeule added a comment. As discuss, I have removed the modifications but keep the tests. To have tests with meaning, I have also add a way to format code on 'runCheckOnCode'. https://reviews.llvm.org/D43500 Files: unittests/clang-tidy/CMakeLis

[PATCH] D42644: [asan] Intercept std::rethrow_exception indirectly.

2018-02-26 Thread Robert Schneider via Phabricator via cfe-commits
robot added inline comments. Comment at: test/asan/TestCases/intercept-rethrow-exception.cc:48 + // memcpy is intercepted by asan which performs checks on src and dst + using T = int[1000]; + T x {}; vitalybuka wrote: > You can include #include > and use __as

r326089 - Re-commit r324991 "Fix for PR32992. Static const classes not exported."

2018-02-26 Thread Hans Wennborg via cfe-commits
Author: hans Date: Mon Feb 26 07:03:59 2018 New Revision: 326089 URL: http://llvm.org/viewvc/llvm-project?rev=326089&view=rev Log: Re-commit r324991 "Fix for PR32992. Static const classes not exported." Fix for PR32992. Static const classes not exported. Patch by zahiraam! (This re-lands the co

[PATCH] D43763: libclang: Visit class template instantiations

2018-02-26 Thread Florian Jung via Phabricator via cfe-commits
Windfisch created this revision. Windfisch added a project: clang-c. Herald added a subscriber: cfe-commits. Changes `clang_visitChildren()`'s behaviour to also **visit** all explicit and implicit **class template instantiations** upon visiting a `ClassTemplateDecl`. In analogy to clang++'s `-du

r326091 - Re-land: "[Support] Replace HashString with djbHash."

2018-02-26 Thread Jonas Devlieghere via cfe-commits
Author: jdevlieghere Date: Mon Feb 26 07:16:42 2018 New Revision: 326091 URL: http://llvm.org/viewvc/llvm-project?rev=326091&view=rev Log: Re-land: "[Support] Replace HashString with djbHash." This patch removes the HashString function from StringExtraces and replaces its uses with calls to djbHa

[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

2018-02-26 Thread Daniil Fukalov via Phabricator via cfe-commits
dfukalov added a comment. In https://reviews.llvm.org/D43281#1018657, @arsenm wrote: > Can’t you just change the description to be the LangAS value? I also thought > these happened to be the same already Am I right that you mean to change the semantic of the addrspace number in a description

[PATCH] D43648: [clangd] Debounce streams of updates.

2018-02-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/TUScheduler.h:56 + std::chrono::steady_clock::duration UpdateDebounce = + std::chrono::milliseconds(500)); ~TUScheduler(); Maybe we could remove this default argument now tha

[PATCH] D43764: [clang-apply-replacements] Convert tooling::Replacements to tooling::AtomicChange for conflict resolving of changes, code cleanup, and code formatting.

2018-02-26 Thread Jeremy Demeule via Phabricator via cfe-commits
jdemeule created this revision. jdemeule added reviewers: klimek, ioeric. Herald added subscribers: cfe-commits, mgorny. By converting Replacements by AtomicChange, clang-apply-replacements is able like clang-tidy to automatically cleanup and format changes. This should permits to close this tick

[PATCH] D43585: [libunwind] Permit additional compiler flags to be passed to tests.

2018-02-26 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. In https://reviews.llvm.org/D43585#1017957, @bsdjhb wrote: > My only question is if this should be named LIBUNWIND_TEST_COMPILER_FLAGS to > match the name used in libc++? I would say yes f

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-02-26 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. Herald added a subscriber: christof. LGTM after https://reviews.llvm.org/D43585 lands. Repository: rUNW libunwind https://reviews.llvm.org/D39074 _

[PATCH] D41880: Adding nocf_check attribute for cf-protection fine tuning

2018-02-26 Thread Oren Ben Simhon via Phabricator via cfe-commits
oren_ben_simhon marked 7 inline comments as done. oren_ben_simhon added inline comments. Comment at: include/clang/CodeGen/CGFunctionInfo.h:519 + /// Whether this function has nocf_check attribute. + unsigned NoCfCheck : 1; + aaron.ballman wrote: > This is unfo

[PATCH] D41880: Adding nocf_check attribute for cf-protection fine tuning

2018-02-26 Thread Oren Ben Simhon via Phabricator via cfe-commits
oren_ben_simhon updated this revision to Diff 135908. oren_ben_simhon added a comment. Implemented comments posted until 02/26 (Thanks Aaron) Repository: rL LLVM https://reviews.llvm.org/D41880 Files: include/clang/AST/Type.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

[PATCH] D42766: [DebugInfo] Support DWARFv5 source code embedding extension

2018-02-26 Thread Scott Linder via Phabricator via cfe-commits
scott.linder updated this revision to Diff 135909. scott.linder added a comment. New diff addresses feedback. I committed the refactoring as NFC and rebased, then clarified the extension comment. https://reviews.llvm.org/D42766 Files: docs/ClangCommandLineReference.rst include/clang/Driver

r326086 - Resolve build bot problems in unittests/Format/FormatTest.cpp

2018-02-26 Thread Bjorn Pettersson via cfe-commits
Author: bjope Date: Mon Feb 26 06:14:11 2018 New Revision: 326086 URL: http://llvm.org/viewvc/llvm-project?rev=326086&view=rev Log: Resolve build bot problems in unittests/Format/FormatTest.cpp Summary: Make the new GetStyleWithEmptyFileName test case independent of the file system used when runn

r326099 - [CodeGen][DebugInfo] Refactor duplicated code, NFC

2018-02-26 Thread Scott Linder via cfe-commits
Author: scott.linder Date: Mon Feb 26 08:31:08 2018 New Revision: 326099 URL: http://llvm.org/viewvc/llvm-project?rev=326099&view=rev Log: [CodeGen][DebugInfo] Refactor duplicated code, NFC Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp URL:

[PATCH] D42766: [DebugInfo] Support DWARFv5 source code embedding extension

2018-02-26 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D42766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-02-26 Thread Frederic Tingaud via Phabricator via cfe-commits
ftingaud created this revision. ftingaud added reviewers: hokein, Prazek. ftingaud added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. For a c++11 code, the clang-tidy rule "modernize-make-unique" should return immediately, as std::make_unique is not supported.

[PATCH] D43749: [Attr] Fix alloc_size's diags to report arg idx not value

2018-02-26 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In https://reviews.llvm.org/D43749#1018846, @aaron.ballman wrote: > Committed (with whitespace fix for the test case) in r326058, thanks for the > patch! Sure. Thanks for committing. By the way the commit log you added isn't quite right. The issue isn't base 0 versus

[PATCH] D43749: [Attr] Fix alloc_size's diags to report arg idx not value

2018-02-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D43749#1019359, @jdenny wrote: > In https://reviews.llvm.org/D43749#1018846, @aaron.ballman wrote: > > > Committed (with whitespace fix for the test case) in r326058, thanks for > > the patch! > > > Sure. Thanks for committing. > > By t

[PATCH] D43500: [clang-tidy]: modernize-use-default-member-init: Remove trailing comma and colon.

2018-02-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: unittests/clang-tidy/ClangTidyTest.h:145 + + // Options. + if (Options.FormatStyle) { Extraneous whitespace. Comment at: unittests/clang-tidy/ClangTidyTest.h:147 + if (Options.FormatStyle) {

[PATCH] D43749: [Attr] Fix alloc_size's diags to report arg idx not value

2018-02-26 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In https://reviews.llvm.org/D43749#1019377, @aaron.ballman wrote: > Oh, yeah, I did muck up that commit log message a bit. Sorry about that! No problem. :-) I'll get to your comments in the other patches hopefully soon. Thanks again. https://reviews.llvm.org/D43749

[PATCH] D42766: [DebugInfo] Support DWARFv5 source code embedding extension

2018-02-26 Thread Scott Linder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326102: [DebugInfo] Support DWARF v5 source code embedding extension (authored by scott.linder, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org

r326102 - [DebugInfo] Support DWARF v5 source code embedding extension

2018-02-26 Thread Scott Linder via cfe-commits
Author: scott.linder Date: Mon Feb 26 09:32:31 2018 New Revision: 326102 URL: http://llvm.org/viewvc/llvm-project?rev=326102&view=rev Log: [DebugInfo] Support DWARF v5 source code embedding extension In DWARF v5 the Line Number Program Header is extensible, allowing values with new content types.

[PATCH] D43312: [clang-format] fix handling of consecutive unary operators

2018-02-26 Thread Kevin Lee via Phabricator via cfe-commits
kevinl added a comment. @krasimir ping? would appreciate you committing this for me. thanks! Repository: rC Clang https://reviews.llvm.org/D43312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D42644: [asan] Intercept std::rethrow_exception indirectly.

2018-02-26 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: test/asan/TestCases/intercept-rethrow-exception.cc:48 + // memcpy is intercepted by asan which performs checks on src and dst + using T = int[1000]; + T x {}; robot wrote: > vitalybuka wrote: > > You can include #i

r326108 - [Driver] Forward opt-remark hotness threshold to LTO

2018-02-26 Thread Adam Nemet via cfe-commits
Author: anemet Date: Mon Feb 26 10:38:11 2018 New Revision: 326108 URL: http://llvm.org/viewvc/llvm-project?rev=326108&view=rev Log: [Driver] Forward opt-remark hotness threshold to LTO Modified: cfe/trunk/lib/Driver/ToolChains/Darwin.cpp cfe/trunk/test/Driver/darwin-ld.c Modified: cfe/t

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-02-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This fix is missing test coverage, can you add a C++11 and C++14 test to demonstrate the behavior differences? Comment at: clang-tidy/modernize/MakeSharedCheck.cpp:30 +bool MakeSharedCheck::isVersionSupported(const clang::LangOptions &LangOpts)

[PATCH] D43700: Emit proper CodeView even when not using the cl driver.

2018-02-26 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. Thanks for fixing this @zturner. I simply want to back-up what @probinson says above - most of the games we do at Ubisoft are currently using a different compilation toolchains for each platform (we ship at least 4-5 platforms for each top game). It can be clang or it ca

[PATCH] D43700: Emit proper CodeView even when not using the cl driver.

2018-02-26 Thread Colden Cullen via Phabricator via cfe-commits
colden added a comment. In https://reviews.llvm.org/D43700#1019505, @aganea wrote: > Thanks for fixing this @zturner. I simply want to back-up what @probinson > says above - most of the games we do at Ubisoft are currently using a > different compilation toolchains for each platform (we ship at

[PATCH] D43700: Emit proper CodeView even when not using the cl driver.

2018-02-26 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. @rnk by "in an MSVC environment" do you mean "when -fms-compatibility is present"? https://reviews.llvm.org/D43700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D43547: [Indexing] Fixing inconsistencies between FUNCDNAME and generated code by improving ASTContext's API for MangleContext

2018-02-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Code looks good, but we should test it. Can you add a CodeGenCXX test that shows the issue with FUNCDNAME? I see the issue with this program: #include int main() { const char *s1 = ([]() { return __FUNCDNAME__; })(); const char *s2 = ([]() { return __FUNCDNAME__

[PATCH] D43700: Emit proper CodeView even when not using the cl driver.

2018-02-26 Thread Colden Cullen via Phabricator via cfe-commits
colden added a comment. In https://reviews.llvm.org/D43700#1019506, @zturner wrote: > @rnk by "in an MSVC environment" do you mean "when -fms-compatibility is > present"? It looks like other places in this file are using `Triple.isWindowsMSVCEnvironment()`, which I think would make sense to u

[PATCH] D43700: Emit proper CodeView even when not using the cl driver.

2018-02-26 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. The `-g` meaning `-gcodeview` for MSVC environments change should be a separate diff though, right? https://reviews.llvm.org/D43700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D43700: Emit proper CodeView even when not using the cl driver.

2018-02-26 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. In https://reviews.llvm.org/D43700#1019533, @smeenai wrote: > The `-g` meaning `-gcodeview` for MSVC environments change should be a > separate diff though, right? Yes I'm not doing that in this patch. Just wanted to clarify what he meant. I'm writing a test for thi

r326113 - Emit proper CodeView when -gcodeview is passed without the cl driver.

2018-02-26 Thread Zachary Turner via cfe-commits
Author: zturner Date: Mon Feb 26 11:25:39 2018 New Revision: 326113 URL: http://llvm.org/viewvc/llvm-project?rev=326113&view=rev Log: Emit proper CodeView when -gcodeview is passed without the cl driver. Windows debuggers don't work properly when column info is emitted with lines. We handled thi

[PATCH] D43700: Emit proper CodeView even when not using the cl driver.

2018-02-26 Thread Zachary Turner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326113: Emit proper CodeView when -gcodeview is passed without the cl driver. (authored by zturner, committed by ). Changed prior to commit: https://reviews.llvm.org/D43700?vs=135723&id=135932#toc Repo

[PATCH] D43773: Implement the container bits of P0805R1

2018-02-26 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added a reviewer: EricWF. P0805R1 is about comparing heterogenous containers. This is the implementation for `array`, `vector`, `deque`, `list` and `forward_list`. The `tuple` b

[PATCH] D43773: Implement the container bits of P0805R1

2018-02-26 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 135941. mclow.lists added a comment. forgot to include the changes for `` in the diff. https://reviews.llvm.org/D43773 Files: include/array include/deque include/forward_list include/list include/vector test/std/containers/sequences/array/co

r326116 - Revert "Emit proper CodeView when -gcodeview is passed without the cl driver."

2018-02-26 Thread Zachary Turner via cfe-commits
Author: zturner Date: Mon Feb 26 11:51:29 2018 New Revision: 326116 URL: http://llvm.org/viewvc/llvm-project?rev=326116&view=rev Log: Revert "Emit proper CodeView when -gcodeview is passed without the cl driver." This reverts commit e17911006548518634fad66bb8648bcad49a1d64. This is failing on AS

[PATCH] D43700: Emit proper CodeView even when not using the cl driver.

2018-02-26 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. I had to revert this for now. It breaks the asan bots which expect column info. That fix is easy, but it also breaks a random linux bots which I don't have the ability to debug at the moment because my linux machine is not working. Hopefully I can get that resolved s

[PATCH] D43734: [RecordLayout] Don't align to non-power-of-2 sizes when using -mms-bitfields

2018-02-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. If its easy enough to wire that through to the frontend as a proper diagnostic, that would be better with a test. Otherwise, this is good to continue to make progress. https://reviews.l

[PATCH] D43775: add UUID to the acronyms list of objc property name checks

2018-02-26 Thread Yan Zhang via Phabricator via cfe-commits
Wizard created this revision. Herald added subscribers: cfe-commits, klimek. Wizard added reviewers: benhamilton, hokein. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43775 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp Index: clang-tidy/objc/PropertyDeclarationCheck.c

[clang-tools-extra] r326118 - Fix for LLVM r326109

2018-02-26 Thread David Zarzycki via cfe-commits
Author: davezarzycki Date: Mon Feb 26 12:21:30 2018 New Revision: 326118 URL: http://llvm.org/viewvc/llvm-project?rev=326118&view=rev Log: Fix for LLVM r326109 Modified: clang-tools-extra/trunk/clang-query/QueryParser.cpp clang-tools-extra/trunk/clang-query/QueryParser.h Modified: clang-

[PATCH] D43392: [clang-tidy] Add Fuchsia checker for visibility attributes

2018-02-26 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 135944. juliehockett marked 6 inline comments as done. juliehockett added a comment. After discussion, the goal of this checker slightly changed to target definitions in header files, rather than declarations. As a result, the check now adds the attribu

[PATCH] D43392: [clang-tidy] Add Fuchsia checker for visibility attributes

2018-02-26 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-tidy/fuchsia/AddVisibilityCheck.cpp:52-53 + Finder->addMatcher( + functionDecl(allOf(hasAnyName(SmallVector(Names.begin(), + Names.end())), +

[PATCH] D43778: [clang-tidy] Adding RestrictIncludes check to Fuchsia module

2018-02-26 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: aaron.ballman, hokein, ilya-biryukov. juliehockett added a project: clang-tools-extra. Herald added subscribers: xazax.hun, mgorny. Adding a check to restrict specific includes. Given a list of includes that should not be used, the

[PATCH] D43780: [Tooling] [1/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>

2018-02-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: klimek, bkramer, alexfh, pcc. lebedev.ri added projects: clang, clang-tools-extra. Herald added subscribers: jkorous-apple, ioeric. I'm not sure whether there are any principal reasons why it returns raw owning pointer, or it is just a

[PATCH] D43779: [Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>

2018-02-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: klimek, bkramer, alexfh, pcc. lebedev.ri added a project: clang. Noticed during review of https://reviews.llvm.org/D41102. I'm not sure whether there are any principal reasons why it returns raw owning pointer, or it is just a old cod

[libcxx] r326120 - [libcxx] [test] Fix MSVC warnings and errors.

2018-02-26 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Mon Feb 26 12:47:46 2018 New Revision: 326120 URL: http://llvm.org/viewvc/llvm-project?rev=326120&view=rev Log: [libcxx] [test] Fix MSVC warnings and errors. test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp test/std/numerics/numeric.ops/exclusive.scan/ex

[PATCH] D43392: [clang-tidy] Add Fuchsia checker for visibility attributes

2018-02-26 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added inline comments. Comment at: clang-tidy/fuchsia/AddVisibilityCheck.cpp:26 + +// AST_MATCHER(FunctionDecl, isInHeaderFile) { +// return Node.getExplicitVisibility(NamedDecl::VisibilityForType); What are these comments doing here? ===

[PATCH] D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency

2018-02-26 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. @rtrieu please take a look? Repository: rC Clang https://reviews.llvm.org/D43322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-26 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In https://reviews.llvm.org/D43576#1016588, @rsmith wrote: > In https://reviews.llvm.org/D43576#1016561, @majnemer wrote: > > > Here's my thinking: the `__uuidof` expression literally declares a variable > > called `_GUID_ddb47a6a_0f23_11d5_9109_00e0296b75d3` of type `_

r326122 - [analyzer] Quickfix: do not overflow in calculating offset in RegionManager

2018-02-26 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Feb 26 13:03:06 2018 New Revision: 326122 URL: http://llvm.org/viewvc/llvm-project?rev=326122&view=rev Log: [analyzer] Quickfix: do not overflow in calculating offset in RegionManager Addresses https://bugs.llvm.org/show_bug.cgi?id=36206 rdar://37159026 A prop

[PATCH] D43218: [analyzer] Quickfix: do not overflow in calculating offset in RegionManager

2018-02-26 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326122: [analyzer] Quickfix: do not overflow in calculating offset in RegionManager (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://r

[PATCH] D43773: Implement the container bits of P0805R1

2018-02-26 Thread Tim Song via Phabricator via cfe-commits
tcanens added a comment. Hmm, for `vector` and `deque`, we define a temporary variable, check that sizes match and then use range-and-a-half `equal`: const typename vector<_Tp1, _Allocator1>::size_type __sz = __x.size(); return __sz == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-26 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. This change looks good to me, but I think we shouldn't check in an executable binary file. Can you create `ld.foo.exe` in the test? Since you don't actually run ld.foo.exe, creating that executable should be very easy. https://reviews.llvm.org/D43621 __

[PATCH] D43783: [OpenCL] Remove block invoke function from emitted block literal struct

2018-02-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: b-sumner, Anastasia, bader. Herald added a subscriber: nhaehnle. OpenCL runtime tracks the invoke function emitted for any block expression. Due to restrictions on blocks in OpenCL (v2.0 s6.12.5), it is always possible to know the block invoke

r326131 - Revert "[analyzer] Quickfix: do not overflow in calculating offset in RegionManager"

2018-02-26 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Feb 26 13:32:57 2018 New Revision: 326131 URL: http://llvm.org/viewvc/llvm-project?rev=326131&view=rev Log: Revert "[analyzer] Quickfix: do not overflow in calculating offset in RegionManager" This reverts commit df306c4c5ab4a6b8d3c47432346d1f9b90c328b4. Rever

[PATCH] D43392: [clang-tidy] Add Fuchsia checker for visibility attributes

2018-02-26 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. Can you add a test for when #pragma GCC visibility push(hidden) is used and the visibility attribute is hidden? https://reviews.llvm.org/D43392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D42644: [asan] Intercept std::rethrow_exception indirectly.

2018-02-26 Thread Vitaly Buka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCRT326132: [asan] Intercept std::rethrow_exception indirectly (authored by vitalybuka, committed by ). Changed prior to commit: https://reviews.llvm.org/D42644?vs=132990&id=135965#toc Repository: rCRT

[PATCH] D43500: [clang-tidy]: modernize-use-default-member-init: Remove trailing comma and colon.

2018-02-26 Thread Jeremy Demeule via Phabricator via cfe-commits
jdemeule added inline comments. Comment at: unittests/clang-tidy/ClangTidyTest.h:159-160 + CleannedReplacements = std::move(FormattedReplacements); + if (!CleannedReplacements) +llvm_unreachable("!CleannedReplacements"); +} else { aaron.ball

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D43621#1019724, @ruiu wrote: > This change looks good to me, but I think we shouldn't check in an executable > binary file. Can you create `ld.foo.exe` in the test? Since you don't > actually run ld.foo.exe, creating that executable should be ver

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-26 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 https://reviews.llvm.org/D43621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r326136 - [analyzer] Exploration strategy prioritizing unexplored nodes first

2018-02-26 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Feb 26 14:14:18 2018 New Revision: 326136 URL: http://llvm.org/viewvc/llvm-project?rev=326136&view=rev Log: [analyzer] Exploration strategy prioritizing unexplored nodes first See D42775 for discussion. Turns out, just exploring nodes which weren't explored fir

r326135 - [analyzer] Do not analyze bison-generated files

2018-02-26 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Feb 26 14:14:16 2018 New Revision: 326135 URL: http://llvm.org/viewvc/llvm-project?rev=326135&view=rev Log: [analyzer] Do not analyze bison-generated files Bison/YACC generated files result in a very large number of (presumably) false positives from the analyzer

[PATCH] D43354: [analyzer] Exploration strategy prioritizing unexplored nodes first

2018-02-26 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326136: [analyzer] Exploration strategy prioritizing unexplored nodes first (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.l

[PATCH] D43421: [analyzer] Do not analyze bison-generated files

2018-02-26 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326135: [analyzer] Do not analyze bison-generated files (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D43421 File

[PATCH] D41880: Adding nocf_check attribute for cf-protection fine tuning

2018-02-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/CodeGen/CGFunctionInfo.h:519 + /// Whether this function has nocf_check attribute. + unsigned NoCfCheck : 1; + oren_ben_simhon wrote: > aaron.ballman wrote: > > This is unfortunate -- it bumps the b

[PATCH] D43787: Fix which Darwin versions have ObjC runtime with full subscripting support.

2018-02-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: vsk, kubamracek. Herald added a subscriber: jkorous-apple. Update min deployment target in some tests so that they don't try to link against libarclite and don't fail when it's not available. rdar://problem/29253617 https://reviews.llvm.or

[PATCH] D43734: [RecordLayout] Don't align to non-power-of-2 sizes when using -mms-bitfields

2018-02-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. Thanks! https://reviews.llvm.org/D43734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43787: Fix which Darwin versions have ObjC runtime with full subscripting support.

2018-02-26 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. Thanks for digging into and addressing this! https://reviews.llvm.org/D43787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D43787: Fix which Darwin versions have ObjC runtime with full subscripting support.

2018-02-26 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek added a comment. Great! So the versions in `ObjCRuntime.h` didn't really match what the iOS and macOS supported? https://reviews.llvm.org/D43787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D41880: Adding nocf_check attribute for cf-protection fine tuning

2018-02-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/CodeGen/CGFunctionInfo.h:519 + /// Whether this function has nocf_check attribute. + unsigned NoCfCheck : 1; + aaron.ballman wrote: > oren_ben_simhon wrote: > > aaron.ballman wrote: > > > This is unfor

[PATCH] D43787: Fix which Darwin versions have ObjC runtime with full subscripting support.

2018-02-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D43787#1019886, @kubamracek wrote: > Great! So the versions in `ObjCRuntime.h` didn't really match what the iOS > and macOS supported? Yes, support for assigning nil for a key for NSMutableDictionary was added in macOS 10.11, iOS 9. Earlier

r326141 - Re-land "Emit proper CodeView when -gcodeview is passed without the cl driver."

2018-02-26 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Feb 26 14:55:33 2018 New Revision: 326141 URL: http://llvm.org/viewvc/llvm-project?rev=326141&view=rev Log: Re-land "Emit proper CodeView when -gcodeview is passed without the cl driver." Reverts r326116 and re-lands r326113 with a fix to ASan so that it enables column info

[PATCH] D43666: [analyzer] When constructing a temporary without construction context, track it for destruction anyway.

2018-02-26 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:2262 + assert(DidCacheOutOnCleanup || + areInitializedTemporariesClear(Pred->getState(), Pred->getLocationContext(), dcoughlin wrote: >

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D43576#1019703, @zahiraam wrote: > Currently this declaration: > struct > __declspec(uuid("{DDB47A6A-0F23-11D5-9109-00E0296B75D3}")) > S1; > > a CXXRecordDecl type is generated with attributes (the uuid being an > attribute). Are you proposin

[PATCH] D43666: [analyzer] When constructing a temporary without construction context, track it for destruction anyway.

2018-02-26 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 135994. NoQ marked 3 inline comments as done. NoQ added a comment. Fix cleanup node generation logic. https://reviews.llvm.org/D43666 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h lib/StaticAnalyzer/Core/ExprEngine.cpp test/Analysis/

[PATCH] D43748: [Attr] Fix paren, comma, and omitted arg printing in some cases

2018-02-26 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 135982. jdenny added a comment. Aaron: Because the last two arguments for objc_bridge_related must be delimited with commas, this revision takes the view that they are not optional but are permitted to be the empty string. The test suite behaves as expected.

[PATCH] D43787: Fix which Darwin versions have ObjC runtime with full subscripting support.

2018-02-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326143: Fix which Darwin versions have ObjC runtime with full subscripting support. (authored by vsapsai, committed by ). Herald added subscribers: llvm-commits, delcypher. Changed prior to commit: http

r326144 - Fix codeview-column-info.c test with a triple

2018-02-26 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Feb 26 15:06:40 2018 New Revision: 326144 URL: http://llvm.org/viewvc/llvm-project?rev=326144&view=rev Log: Fix codeview-column-info.c test with a triple Modified: cfe/trunk/test/Driver/codeview-column-info.c Modified: cfe/trunk/test/Driver/codeview-column-info.c URL:

r326145 - Fix which Darwin versions have ObjC runtime with full subscripting support.

2018-02-26 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Mon Feb 26 15:10:23 2018 New Revision: 326145 URL: http://llvm.org/viewvc/llvm-project?rev=326145&view=rev Log: Fix which Darwin versions have ObjC runtime with full subscripting support. Update min deployment target in some tests so that they don't try to link against libar

r326146 - [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-02-26 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Mon Feb 26 15:15:52 2018 New Revision: 326146 URL: http://llvm.org/viewvc/llvm-project?rev=326146&view=rev Log: [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). Modified: cfe/trunk/include/clang/StaticAnaly

[PATCH] D43791: [analyzer] Suppress MallocChecker positives in destructors with atomics.

2018-02-26 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. This patch is a targeted suppression heuristic for false positives `MallocChecker` produces when a shared / reference-counting pointer is cop

[PATCH] D43606: [Driver] Add SafeStack to a map of incompatible sanitizers

2018-02-26 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 136002. phosek marked an inline comment as done. Herald added subscribers: Sanitizers, llvm-commits. Repository: rCRT Compiler Runtime https://reviews.llvm.org/D43606 Files: clang/lib/Driver/SanitizerArgs.cpp clang/test/Driver/fsanitize.c Index: clang

r326151 - [Driver] Add SafeStack to a map of incompatible sanitizers

2018-02-26 Thread Petr Hosek via cfe-commits
Author: phosek Date: Mon Feb 26 16:01:26 2018 New Revision: 326151 URL: http://llvm.org/viewvc/llvm-project?rev=326151&view=rev Log: [Driver] Add SafeStack to a map of incompatible sanitizers This allows reporting an error when user tries to use SafeStack with incompatible sanitizers. Differenti

[PATCH] D43606: [Driver] Add SafeStack to a map of incompatible sanitizers

2018-02-26 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326151: [Driver] Add SafeStack to a map of incompatible sanitizers (authored by phosek, committed by ). Changed prior to commit: https://reviews.llvm.org/D43606?vs=136002&id=136004#toc Repository: rL

r326152 - Revert "Revert "[analyzer] Quickfix: do not overflow in calculating offset in RegionManager""

2018-02-26 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Feb 26 16:05:04 2018 New Revision: 326152 URL: http://llvm.org/viewvc/llvm-project?rev=326152&view=rev Log: Revert "Revert "[analyzer] Quickfix: do not overflow in calculating offset in RegionManager"" This reverts commit c4cc41166d93178a3ddd4b2b5a685cf74a45924

[PATCH] D43778: [clang-tidy] Adding RestrictIncludes check to Fuchsia module

2018-02-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fuchsia/CMakeLists.txt:8 OverloadedOperatorCheck.cpp + RestrictIncludesCheck.cpp StaticallyConstructedObjectsCheck.cpp Will be good idea to be have consistent name and documentation terminology:

[PATCH] D43791: [analyzer] Suppress MallocChecker positives in destructors with atomics.

2018-02-26 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:527 private: +bool shouldSuppressOnAtomicReferenceCountingPointers( +const Stmt *S, const LocationContext *CurrentLC); Docstring. C

  1   2   >