r305665 - clang-format: Add capability to format the diff on save in vim.

2017-06-19 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Jun 19 02:30:04 2017 New Revision: 305665 URL: http://llvm.org/viewvc/llvm-project?rev=305665&view=rev Log: clang-format: Add capability to format the diff on save in vim. With this patch, one can configure a BufWrite hook that will make the clang-format integration comp

r305666 - clang-format: Handle "if constexpr".

2017-06-19 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Jun 19 02:40:49 2017 New Revision: 305666 URL: http://llvm.org/viewvc/llvm-project?rev=305666&view=rev Log: clang-format: Handle "if constexpr". c++1z adds the following constructions to the language: if constexpr (cond) statement1; else if constexpr (cond)

[PATCH] D34330: [clang-format] handle `if constexpr`

2017-06-19 Thread Daniel Jasper via Phabricator via cfe-commits
djasper closed this revision. djasper added a comment. Yes, I saw. As this version seems to handle the one-line case correctly, I submitted this one as r305666. https://reviews.llvm.org/D34330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D26953: clang-format: handle formatting on constexpr if

2017-06-19 Thread Daniel Jasper via Phabricator via cfe-commits
djasper closed this revision. djasper added a comment. Submitted the other implementation of this as r305666. https://reviews.llvm.org/D26953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

r305667 - clang-format: Improve understanding of combined typedef+record declarations

2017-06-19 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Jun 19 02:45:41 2017 New Revision: 305667 URL: http://llvm.org/viewvc/llvm-project?rev=305667&view=rev Log: clang-format: Improve understanding of combined typedef+record declarations Fixes an issue where struct A { int X; }; would be broken onto multiple lines, but type

[PATCH] D32825: [clang-format] Improve understanding of combined typedef+record declarations

2017-06-19 Thread Daniel Jasper via Phabricator via cfe-commits
djasper closed this revision. djasper added a comment. Renamed Tok to RecordTok to avoid the nested scope and submitted as r305667. https://reviews.llvm.org/D32825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D34206: [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks.

2017-06-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D34206#780455, @Eugene.Zelenko wrote: > It'll be good idea to run modernize-make-unique on LLVM/Clang/etc for > llvm::make_unique. +1. See https://reviews.llvm.org/D34334, https://reviews.llvm.org/D34333. And found a few bugs in the check, w

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-19 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: cfe/trunk/include/clang/Analysis/CloneDetection.h:324 +struct AutoGeneratedCloneConstraint { + StringRef IgnoredFilesPattern; Shouldn't the name be more generic. What this essentially does is to filter out false

[PATCH] D34304: Allow CompilerInvocations to generate .d files.

2017-06-19 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. I think a better way might be to generally leave dependency options alone, add a default argument adapter to filter out all deps related flags, and allow users to add their own argument adapters that don't do that. https://reviews.llvm.org/D34304

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. The code looks good to me now, I'd wait to see whether @alexfh has further comments before submitting the patch. Thanks for your patience with the review ;) Comment at: clang-tidy/android/FileOpenFlagCheck.cpp:61 + Sourc

[PATCH] D34287: Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 102993. ilya-biryukov added a comment. Removed a stray comment (of a previously removed declaration). https://reviews.llvm.org/D34287 Files: include/clang/Frontend/ASTUnit.h include/clang/Frontend/PrecompiledPreamble.h lib/Frontend/ASTUnit.cpp

[PATCH] D34287: Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Frontend/PrecompiledPreamble.h:248 +/// doesn't restore the state \p CI had before calling AddImplicitPreamble, only +/// clears relevant settings, so that preamble is disabled in \p CI. +} // namespace clang ---

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-19 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai added inline comments. Comment at: cfe/trunk/include/clang/Analysis/CloneDetection.h:324 +struct AutoGeneratedCloneConstraint { + StringRef IgnoredFilesPattern; v.g.vassilev wrote: > Shouldn't the name be more generic. What this essentially does is t

[PATCH] D34263: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros

2017-06-19 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Generally this patch lg from my side - how many patches for single file mode are coming down the road, though? I'm somewhat concerned about the overall complexity it'll add to clang. When I saw your first patch my reaction was "wow, this works with this little change - c

[libcxx] r305668 - Add a missing SFINAE condition to the `variant`'s converting constructor.

2017-06-19 Thread Michael Park via cfe-commits
Author: mpark Date: Mon Jun 19 03:25:57 2017 New Revision: 305668 URL: http://llvm.org/viewvc/llvm-project?rev=305668&view=rev Log: Add a missing SFINAE condition to the `variant`'s converting constructor. Remarks: This function shall not participate in overload resolution unless `is_sam

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-06-19 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. @krasimir, @alexfh : can I get some feedback? This patch solves a practical problem, i.e. allowing the comment to overflow a bit without triggering a reflow [according to the priorities which are in config, obviously]. It may not always provide the "best" wrapping, but as

[PATCH] D33491: clang-format: Fix C99 designated initializers corner cases

2017-06-19 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping https://reviews.llvm.org/D33491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. Constant samplers are handled as static variables and clang's code generation library, which leads to llvm::unreachable. We bypass emitting sampler variable as static since it's translated to a function call later. https://reviews.llvm.org/D34342 Files: lib/CodeGe

[PATCH] D34287: Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-19 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: include/clang/Frontend/PrecompiledPreamble.h:42-43 +/// destructors. +/// An assertion will fire if two PCHTempFiles are created with the same name, +/// so it's not intended to be used outside preamble-handling. +class TempPCHFile {

Re: [PATCH] D34252: Add arbitrary file/path support to clang-format style file selection

2017-06-19 Thread Manuel Klimek via cfe-commits
On Fri, Jun 16, 2017 at 8:26 PM Dan Ciliske via Phabricator < revi...@reviews.llvm.org> wrote: > dciliske added a comment. > > So... how should I get something added? That patch has been sitting for a > couple weeks. > > Should I work on that patch? If so, how do I work on it? This is the first >

r305669 - [analyzer] Fix logical not for pointers with different bit width

2017-06-19 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Jun 19 03:55:51 2017 New Revision: 305669 URL: http://llvm.org/viewvc/llvm-project?rev=305669&view=rev Log: [analyzer] Fix logical not for pointers with different bit width Differential Revision: https://reviews.llvm.org/D31029 Modified: cfe/trunk/include/c

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-06-19 Thread Daniel Marjamäki via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. danielmarjamaki marked an inline comment as done. Closed by commit rL305669: [analyzer] Fix logical not for pointers with different bit width (authored by danielmarjamaki). Changed prior to commit: https://reviews.llvm.or

[PATCH] D33823: [clang-format] Support sorting using declarations

2017-06-19 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/UsingDeclarationsSorter.cpp:41-42 + +bool computeUsingDeclarationLabel(const FormatToken *UsingTok, + std::string *Label) { + assert(UsingTok && UsingTok->is(tok::kw_using) && "Expecting a usin

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-06-19 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki abandoned this revision. danielmarjamaki added a comment. I will not continue working on this checker Repository: rL LLVM https://reviews.llvm.org/D32346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D33644: Add default values for function parameter chunks

2017-06-19 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:2453 std::string PlaceholderStr = FormatFunctionParameter(Policy, Param); +if (Param->hasDefaultArg() && PlaceholderStr.find("=") == std::string::npos) { +std::string DefaultValue =

[PATCH] D33644: Add default values for function parameter chunks

2017-06-19 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:2453 std::string PlaceholderStr = FormatFunctionParameter(Policy, Param); +if (Param->hasDefaultArg() && PlaceholderStr.find("=") == std::string::npos) { +std::string DefaultValue = -

[PATCH] D34263: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros

2017-06-19 Thread Vladimir Voskresensky via Phabricator via cfe-commits
voskresensky.vladimir added a comment. In https://reviews.llvm.org/D34263#782391, @akyrtzi wrote: > Hey Vladimir, what you are proposing is orthogonal to this patch. You are > proposing for "the client to provide the value for an undefined identifier", > and the patch is about the client not kn

[PATCH] D33383: [GSoC] Flag value completion for clang

2017-06-19 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM. My comments can be addressed in a separate patch. Comment at: clang/include/clang/Driver/Options.td:496 def cl_std_EQ : Joined<["-"], "cl-std=">, Group, F

[PATCH] D33383: [GSoC] Flag value completion for clang

2017-06-19 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor accepted this revision. teemperor added a comment. LGTM. https://reviews.llvm.org/D33383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-19 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added inline comments. Comment at: cfe/trunk/include/clang/Analysis/CloneDetection.h:324 +struct AutoGeneratedCloneConstraint { + StringRef IgnoredFilesPattern; xiangzhai wrote: > v.g.vassilev wrote: > > Shouldn't the name be more generic. What this

[PATCH] D33491: clang-format: Fix C99 designated initializers corner cases

2017-06-19 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:339 Left->Type = TT_JsComputedPropertyName; + } else if ((Style.Language == FormatStyle::LK_Cpp || + Style.Language == FormatStyle::LK_ObjC) && Use Style.isCpp

r305678 - [driver][macOS] Pick the system version for the deployment target

2017-06-19 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Jun 19 05:57:27 2017 New Revision: 305678 URL: http://llvm.org/viewvc/llvm-project?rev=305678&view=rev Log: [driver][macOS] Pick the system version for the deployment target if the SDK is newer than the system This commit improves the driver by making sure that it picks

[PATCH] D34175: [driver][macOS] Pick the system version for the deployment target if the SDK is newer than the system

2017-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305678: [driver][macOS] Pick the system version for the deployment target (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D34175?vs=102607&id=103009#toc Repository: rL LLVM

[PATCH] D33945: [OpenCL] Add support for missing sub_group functions.

2017-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader requested changes to this revision. bader added a comment. This revision now requires changes to proceed. Please, split this patch into two parts: 1. Improve diagnostics on extension enabling. 2. Add missing `sub_group_*` built-in functions. Comment at: Sema/SemaChecking

r305680 - Add missing OS check to r305678

2017-06-19 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Jun 19 06:25:37 2017 New Revision: 305680 URL: http://llvm.org/viewvc/llvm-project?rev=305680&view=rev Log: Add missing OS check to r305678 That commit failed on non-macOS buildbots as I've forgotten to make sure that the system on which Clang is running on is actually

[PATCH] D34185: [Parser][ObjC] Avoid crashing when skipping to EOF while parsing an ObjC interface/implementation

2017-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: lib/Parse/ParseObjc.cpp:220 CheckNestedObjCContexts(AtLoc); + if (isEofOrEom()) +return nullptr; ahatanak wrote: > Do you need this check here (and below)? Not anymore.

[PATCH] D34185: [Parser][ObjC] Avoid crashing when skipping to EOF while parsing an ObjC interface/implementation

2017-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 103013. arphaman marked an inline comment as done. arphaman added a comment. Remove the old checks and consume EOF unconditionally. Repository: rL LLVM https://reviews.llvm.org/D34185 Files: lib/Parse/ParseObjc.cpp test/Parser/objc-at-implementation

[PATCH] D33644: Add default values for function parameter chunks

2017-06-19 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 103016. yvvan added a comment. Do not evaluate numbers. Check for != "=" is needed not to mess with invalid default arguments or their types (without it I get "const Bar& bar = =" when Bar is not defined) https://reviews.llvm.org/D33644 Files: lib/Sema/Sem

[PATCH] D33491: clang-format: Fix C99 designated initializers corner cases

2017-06-19 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 103018. Typz marked 2 inline comments as done. Typz edited the summary of this revision. Typz added a comment. Fix review comments https://reviews.llvm.org/D33491 Files: lib/Format/ContinuationIndenter.cpp lib/Format/FormatToken.h lib/Format/TokenAnnotat

[PATCH] D33491: clang-format: Fix C99 designated initializers corner cases

2017-06-19 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added inline comments. Comment at: unittests/Format/FormatTest.cpp:1526 + verifyFormat("const struct A a = {[0] = 1, [1] = 2};"); + verifyFormat("const struct A a = {[1] = a,\n" + "[2] = b,\n" djasper wrote

[PATCH] D31709: [NFC] Refactor DiagnosticRenderer to use FullSourceLoc

2017-06-19 Thread Christof Douma via Phabricator via cfe-commits
christof added a comment. I'll go ahead and commit this on the grounds that it was already approved and the changes I made were the last nit-picks of @rnk https://reviews.llvm.org/D31709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

r305684 - [NFC] Refactor DiagnosticRenderer to use FullSourceLoc

2017-06-19 Thread Christof Douma via cfe-commits
Author: christof Date: Mon Jun 19 07:05:58 2017 New Revision: 305684 URL: http://llvm.org/viewvc/llvm-project?rev=305684&view=rev Log: [NFC] Refactor DiagnosticRenderer to use FullSourceLoc Move the DiagnosticRenderer and its dependents to using FullSourceLocs instead of a SourceLocation and Sour

r305685 - Move the test from r305678 to a separte file with 'REQUIRES: system-darwin'

2017-06-19 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Jun 19 07:13:59 2017 New Revision: 305685 URL: http://llvm.org/viewvc/llvm-project?rev=305685&view=rev Log: Move the test from r305678 to a separte file with 'REQUIRES: system-darwin' Otherwise it will fail on non-macOS systems. Added: cfe/trunk/test/Driver/darwin-

r305688 - Revert "[NFC] Refactor DiagnosticRenderer to use FullSourceLoc"

2017-06-19 Thread Christof Douma via cfe-commits
Author: christof Date: Mon Jun 19 07:41:22 2017 New Revision: 305688 URL: http://llvm.org/viewvc/llvm-project?rev=305688&view=rev Log: Revert "[NFC] Refactor DiagnosticRenderer to use FullSourceLoc" This reverts commit 305684. This patch breaks extra/tools/clang-tidy Modified: cfe/trunk/incl

[PATCH] D33823: [clang-format] Support sorting using declarations

2017-06-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 103031. krasimir marked 3 inline comments as done. krasimir added a comment. - Address review comments https://reviews.llvm.org/D33823 Files: include/clang/Format/Format.h lib/Format/CMakeLists.txt lib/Format/Format.cpp lib/Format/UsingDeclarations

[PATCH] D33491: clang-format: Fix C99 designated initializers corner cases

2017-06-19 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. https://reviews.llvm.org/D33491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D33823: [clang-format] Support sorting using declarations

2017-06-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 103032. krasimir added a comment. - Update test case https://reviews.llvm.org/D33823 Files: include/clang/Format/Format.h lib/Format/CMakeLists.txt lib/Format/Format.cpp lib/Format/UsingDeclarationsSorter.cpp lib/Format/UsingDeclarationsSorter.h

[PATCH] D33823: [clang-format] Support sorting using declarations

2017-06-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/UsingDeclarationsSorter.cpp:66 + } + return HasIdentifier && Tok && Tok->isOneOf(tok::semi, tok::comma); +} Typz wrote: > could also be followed by an assignment, in case of type alias: > > using foo = b

[PATCH] D33383: [GSoC] Flag value completion for clang

2017-06-19 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu accepted this revision. ruiu added a comment. LGTM https://reviews.llvm.org/D33383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34249: [libc++] Don't use UTIME_OMIT to detect utimensat on Apple

2017-06-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: src/experimental/filesystem/operations.cpp:27 +// We can use the presence of UTIME_OMIT to detect platforms that do not +// provide utimensat, with some exceptions on OS X. +#if !defined(UTIME_OMIT) ||

[PATCH] D33278: [LLVM][x86][Inline Asm] - Enum support for MS syntax

2017-06-19 Thread Matan via Phabricator via cfe-commits
mharoush added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D33278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r305696 - clang-format: Fix C99 designated initializers corner cases

2017-06-19 Thread Francois Ferrand via cfe-commits
Author: typz Date: Mon Jun 19 09:41:21 2017 New Revision: 305696 URL: http://llvm.org/viewvc/llvm-project?rev=305696&view=rev Log: clang-format: Fix C99 designated initializers corner cases Summary: This fixes the missing space before the designated initializer when `Cpp11BracedListStyle=false`

[PATCH] D33491: clang-format: Fix C99 designated initializers corner cases

2017-06-19 Thread Francois Ferrand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305696: clang-format: Fix C99 designated initializers corner cases (authored by Typz). Changed prior to commit: https://reviews.llvm.org/D33491?vs=103018&id=103041#toc Repository: rL LLVM https://re

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: test/CodeGenOpenCL/sampler.cl:62 + + const sampler_t const_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR; + // CHECK: [[CONST_SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sample

[PATCH] D34351: Simplify TT_SelectorName assignment logic

2017-06-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. While trying to understand TT_SelectorName, I found 2 redundant checks. Removing them doesn't cause any tests to fail. https://reviews.llvm.org/D34351 Files: lib/Format/TokenAnnotator.cpp Index: lib/Format/TokenAnnotator.cpp

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Congratulations of the first GSoC patch! I have some below comments: - Patches should be submitted using the full context (`git diff -U`). This makes it easier for reviewers to understand the change. This patch mainly adds new code, so this won't make much differen

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:277 +Mappings::~Mappings() { + delete[] SrcToDst; + delete[] DstToSrc; Please use `std::unique_ptr` for `SrcToDst` and `DstToSrc` as well and remove the destructor. https://reviews.l

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Generally we shouldn't have untested code in trunk, so I think that we need to find a way to test this before committing. We can start off by testing the output of the diff tool. Since there will be a lot of changes in the future, you don't have to have everything cove

[PATCH] D34279: Fix release_40 build with MSVC (VS 2015)

2017-06-19 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. I have 19.00.24210, so slightly earlier I suppose, but I believe we use Update 3 on our Chromium buildbots, and they seem happy. Can you paste the full error message? The part I see in your screenshot doesn't really make sense. Why should converting 1 to unsigned int be a

[PATCH] D34287: Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 103053. ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. - Added default initializers to PreambleFileHash. - Update file comments to address klimek's questions. https://reviews.llvm.org/D34287 Files: include/clang/Front

[PATCH] D34351: [clang-format] Simplify TT_SelectorName assignment logic

2017-06-19 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. For the test introduced in https://reviews.llvm.org/rL262291, either of the changes causes a TT_SelectorName to become a TT_Unknown. So lets figure out how to make this a difference in observable formatting behavior instead of removing these checks. https://reviews.ll

[PATCH] D34287: Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Frontend/PrecompiledPreamble.h:42-43 +/// destructors. +/// An assertion will fire if two PCHTempFiles are created with the same name, +/// so it's not intended to be used outside preamble-handling. +class TempPCHFile

[PATCH] D34238: clang-format: Do not binpack initialization lists

2017-06-19 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 103056. Typz added a comment. Fix case where the content fits on a line, by wrapping after each comma, like this: static int types[] = { 0, 1, 2, }; https://reviews.llvm.org/D34238 Files: lib/Format/C

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/CodeGenOpenCL/sampler.cl:62 + + const sampler_t const_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR; + // CHECK: [[CONST_SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler

[PATCH] D34238: clang-format: Do not binpack initialization lists

2017-06-19 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 103057. Typz added a comment. Fix indentation https://reviews.llvm.org/D34238 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTest.cpp unittests/Format/FormatTestJava.cpp Index: unittests/Format/FormatTestJava.cpp

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. https://reviews.llvm.org/D34342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D34263: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros

2017-06-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. In https://reviews.llvm.org/D34263#783694, @klimek wrote: > how many patches for single file mode are coming down the road, though? I'm > somewhat concerned about the overall complexity it'll add to clang. There is no other patch for using this preprocessor option. Any

[PATCH] D34353: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler to filter auto generated files

2017-06-19 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai created this revision. Herald added a subscriber: xazax.hun. Hi LLVM developers, As Raphael suggested in https://reviews.llvm.org/D31320 I renamed `AutoGeneratedCloneConstraint` to `FilenamePatternConstraint`, please review it, thanks a lot! Regards, Leslie Zhai Repository: rL LL

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:7031 +Introduced) && +!S.Diags.isIgnored(diag::warn_unguarded_availability_new, Loc); +diag = NewWarning ? diag::warn_partial_availability_new Sorry to keep this

[PATCH] D34263: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros

2017-06-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. In https://reviews.llvm.org/D34263#783770, @voskresensky.vladimir wrote: > What I find problematic in this patch is PPOpts->SingleFileParseMode checks. > Let's suppose we implement what I mentioned above => how is it going to > co-exist nicely? I think code will be less

[PATCH] D34266: Static Analyzer - Localizability Checker: New Localizable APIs for macOS High Sierra & iOS 11

2017-06-19 Thread Kulpreet Chilana via Phabricator via cfe-commits
kulpreet added a comment. In https://reviews.llvm.org/D34266#783156, @zaks.anna wrote: > Thanks! Do you have commit access? No problem! I don’t have commit access. In the past, Devin has commited on my behalf. Repository: rL LLVM https://reviews.llvm.org/D34266

[PATCH] D34263: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros

2017-06-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi updated this revision to Diff 103066. akyrtzi added a comment. Provide doc-comments for `struct DirectiveEvalResult`. https://reviews.llvm.org/D34263 Files: include/clang/Lex/Preprocessor.h include/clang/Lex/PreprocessorOptions.h lib/Lex/PPDirectives.cpp lib/Lex/PPExpressions.cp

[PATCH] D34263: [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, parse all directive blocks if the condition uses undefined macros

2017-06-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi updated this revision to Diff 103067. akyrtzi added a comment. Update doc-comment for `Preprocessor::EvaluateDirectiveExpression` https://reviews.llvm.org/D34263 Files: include/clang/Lex/Preprocessor.h include/clang/Lex/PreprocessorOptions.h lib/Lex/PPDirectives.cpp lib/Lex/PPEx

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-19 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 103068. yawanng marked 3 inline comments as done. https://reviews.llvm.org/D33304 Files: clang-tidy/CMakeLists.txt clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/FileOpenFlagCheck.cpp clang-tidy/android

[PATCH] D34277: [analyzer] Bump default performance thresholds?

2017-06-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. While I have no objections, I am wondering whether this is the good way to spend the performance budget. In particular, there are patches to generate more symbolic expressions, that could also degrade the performance (but fix some fixmes along the way). https://revi

[PATCH] D33383: [GSoC] Flag value completion for clang

2017-06-19 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added inline comments. Comment at: clang/include/clang/Driver/Options.td:496 def cl_std_EQ : Joined<["-"], "cl-std=">, Group, Flags<[CC1Option]>, - HelpText<"OpenCL language standard to compile for.">; + HelpText<"OpenCL language standard to compile for.">, Values<"cl,C

r305711 - CodeGen: Cast temporary variable to proper address space

2017-06-19 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Jun 19 12:03:41 2017 New Revision: 305711 URL: http://llvm.org/viewvc/llvm-project?rev=305711&view=rev Log: CodeGen: Cast temporary variable to proper address space In C++ all variables are in default address space. Previously change has been made to cast automatic variab

[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/spir_version.cl:13 kernel void foo() {} +kernel void bar() {} Would the original code produce duplicate version metadata here or is it just for overloaded functions? Would it make sense to add `C

[PATCH] D33706: CodeGen: Cast temporary variable to proper address space

2017-06-19 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305711: CodeGen: Cast temporary variable to proper address space (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D33706?vs=101227&id=103070#toc Repository: rL LLVM https://re

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1041 +default: + return LangAS::Default; +} bader wrote: > yaxunl wrote: > > bader wrote: > > > yaxunl wrote: > > > > I think the default (including even_t, clk_event_t, qu

[PATCH] D34185: [Parser][ObjC] Avoid crashing when skipping to EOF while parsing an ObjC interface/implementation

2017-06-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Thanks, LGTM. Comment at: lib/Parse/ParseObjc.cpp:3636 + Eof.setEofData(MCDecl); + Eof.setLocation(Tok.getLocation()); + LM.Toks.push_back(Eof); You can use OrigLoc instead of calling Tok.getLocation(). Repository: rL LLVM http

[PATCH] D34235: [OpenCL] Fix OpenCL and SPIR version metadata generation.

2017-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/CodeGenOpenCL/spir_version.cl:13 kernel void foo() {} +kernel void bar() {} Anastasia wrote: > Would the original code produce duplicate version metadata here or is it just > for overloaded functions? Would it mak

[PATCH] D34024: [OpenCL] Diagnose scoped address-space qualified variables

2017-06-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Small comment in the test can be addressed in commit! Comment at: test/SemaOpenCL/storageclass.cl:52 +kernel void invalidScope() { + if (true) { +local int l

[PATCH] D34277: [analyzer] Bump default performance thresholds?

2017-06-19 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. Ok, I hope this will work. Anyway, we can always revert this patch in case of any problems. https://reviews.llvm.org/D34277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

Clang Compile with Libtool

2017-06-19 Thread Mustakimur Rahman Khandaker via cfe-commits
Hi I am working on some Clang source-to-source transformation. I am doing it from Clang source code: clang/tools/extra. What I do is that I am adding a printf("Hello World\n"); at the beginning of the main method. It works perfectly, I run my tool as bin/add-code ../../test/hello.c and it turn

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:7031 +Introduced) && +!S.Diags.isIgnored(diag::warn_unguarded_availability_new, Loc); +diag = NewWarning ? diag::warn_partial_availability_new erik.pilkington wrote: > S

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-06-19 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp added a comment. Thanks. > It would be best to just add the scan-build-py support to the tree, > especially, since the new scrips are not tested. OK. We will update this patch with the scan-build-py changes and remove the ctu-build.py and ctu-analyze.py scripts. > I am curious which op

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-06-19 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Any progress in the review? https://reviews.llvm.org/D32642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1041 +default: + return LangAS::Default; +} Anastasia wrote: > bader wrote: > > yaxunl wrote: > > > bader wrote: > > > > yaxunl wrote: > > > > > I think the default (including

r305719 - [Parser][ObjC] Use an artificial EOF token while parsing lexed ObjC methods

2017-06-19 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Jun 19 12:53:21 2017 New Revision: 305719 URL: http://llvm.org/viewvc/llvm-project?rev=305719&view=rev Log: [Parser][ObjC] Use an artificial EOF token while parsing lexed ObjC methods This change avoid a crash that occurred when skipping to EOF while parsing an ObjC int

[PATCH] D34185: [Parser][ObjC] Avoid crashing when skipping to EOF while parsing an ObjC interface/implementation

2017-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arphaman marked an inline comment as done. Closed by commit rL305719: [Parser][ObjC] Use an artificial EOF token while parsing lexed ObjC methods (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D31868: [analyzer] Check NULL pointer dereference issue for memset function

2017-06-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Thanks, this was very useful, please commit! Repository: rL LLVM https://reviews.llvm.org/D31868 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Edit/EditedSource.h:50 +// Location of argument use inside the top-level macro +SourceLocation Use; + I think a name like `UseLoc` is more appropriate. Comment at: lib/Edit/Edite

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-06-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I'm sorry, i'd try to get back to this and unblock your progress as soon as possible. One thing i notice is that you manipulate symbolic expressions manually, however many of the things that you need, eg stuff in your `compose()` method, seem to be already available in `SV

Re: r305665 - clang-format: Add capability to format the diff on save in vim.

2017-06-19 Thread David Blaikie via cfe-commits
On Mon, Jun 19, 2017 at 12:30 AM Daniel Jasper via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: djasper > Date: Mon Jun 19 02:30:04 2017 > New Revision: 305665 > > URL: http://llvm.org/viewvc/llvm-project?rev=305665&view=rev > Log: > clang-format: Add capability to format the diff on

[PATCH] D26953: clang-format: handle formatting on constexpr if

2017-06-19 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg added a comment. In https://reviews.llvm.org/D26953#783497, @jtbandes wrote: > Hm, I probably should've searched first — but I just re-implemented this in > https://reviews.llvm.org/D34330. Actually, I think my implementation solves > the `AllowShortIfStatementsOnASingleLine` issue yo

Re: r305665 - clang-format: Add capability to format the diff on save in vim.

2017-06-19 Thread David Blaikie via cfe-commits
Ah, nevermind - I hadn't sync'd this change! Sorry for the noise. Thanks for the feature! On Mon, Jun 19, 2017 at 11:18 AM David Blaikie wrote: > On Mon, Jun 19, 2017 at 12:30 AM Daniel Jasper via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: djasper >> Date: Mon Jun 19 02:30:

[PATCH] D34357: [Clang] Handle interaction of -pg and no_instrument_function attribute.

2017-06-19 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta created this revision. Disable generation of counting-function attribute if no_instrument_function attribute is present in function. Interaction between -pg and no_instrument_function is the desired behavior and matches gcc as well. This is required for fixing a crash in Linux kernel wh

[PATCH] D34357: [Clang] Handle interaction of -pg and no_instrument_function attribute.

2017-06-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel accepted this revision. hfinkel added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D34357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

r305728 - [Clang] Handle interaction of -pg and no_instrument_function attribute.

2017-06-19 Thread Manoj Gupta via cfe-commits
Author: manojgupta Date: Mon Jun 19 13:45:03 2017 New Revision: 305728 URL: http://llvm.org/viewvc/llvm-project?rev=305728&view=rev Log: [Clang] Handle interaction of -pg and no_instrument_function attribute. Summary: Disable generation of counting-function attribute if no_instrument_function att

  1   2   >